| 1 | ### -*-makefile-*- |
| 2 | ### |
| 3 | ### Build script for Catacomb |
| 4 | ### |
| 5 | ### (c) 2013 Straylight/Edgeware |
| 6 | ### |
| 7 | |
| 8 | ###----- Licensing notice --------------------------------------------------- |
| 9 | ### |
| 10 | ### This file is part of Catacomb. |
| 11 | ### |
| 12 | ### Catacomb is free software; you can redistribute it and/or modify |
| 13 | ### it under the terms of the GNU Library General Public License as |
| 14 | ### published by the Free Software Foundation; either version 2 of the |
| 15 | ### License, or (at your option) any later version. |
| 16 | ### |
| 17 | ### Catacomb is distributed in the hope that it will be useful, |
| 18 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | ### GNU Library General Public License for more details. |
| 21 | ### |
| 22 | ### You should have received a copy of the GNU Library General Public |
| 23 | ### License along with Catacomb; if not, write to the Free |
| 24 | ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
| 25 | ### MA 02111-1307, USA. |
| 26 | |
| 27 | ###-------------------------------------------------------------------------- |
| 28 | ### Miscellaneous useful definitions. |
| 29 | |
| 30 | ## Some convenient abbreviations for file suffixes. |
| 31 | e = $(EXEEXT) |
| 32 | o = $(OBJEXT) |
| 33 | t = t$e |
| 34 | |
| 35 | ## Installation directories. |
| 36 | archincludedir = $(pkglibdir)/include |
| 37 | |
| 38 | ###-------------------------------------------------------------------------- |
| 39 | ### Initial values of common variables. |
| 40 | |
| 41 | SUBDIRS = |
| 42 | |
| 43 | EXTRA_DIST = |
| 44 | CLEANFILES = |
| 45 | DISTCLEANFILES = |
| 46 | MAINTAINERCLEANFILES = |
| 47 | SUFFIXES = |
| 48 | TESTS = |
| 49 | BUILT_SOURCES = |
| 50 | |
| 51 | bin_PROGRAMS = |
| 52 | noinst_PROGRAMS = |
| 53 | lib_LTLIBRARIES = |
| 54 | noinst_LTLIBRARIES = |
| 55 | pkginclude_HEADERS = |
| 56 | nodist_pkginclude_HEADERS = |
| 57 | archinclude_HEADERS = |
| 58 | nodist_archinclude_HEADERS = |
| 59 | dist_man_MANS = |
| 60 | |
| 61 | ###-------------------------------------------------------------------------- |
| 62 | ### Standard configuration substitutions. |
| 63 | |
| 64 | ## Substitute tags in files. |
| 65 | confsubst = $(top_srcdir)/confsubst |
| 66 | EXTRA_DIST += confsubst |
| 67 | |
| 68 | SUBSTITUTIONS = \ |
| 69 | prefix=$(prefix) exec_prefix=$(exec_prefix) \ |
| 70 | libdir=$(libdir) includedir=$(includedir) \ |
| 71 | PACKAGE=$(PACKAGE) VERSION=$(VERSION) |
| 72 | |
| 73 | V_SUBST = $(V_SUBST_$(V)) |
| 74 | V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) |
| 75 | V_SUBST_0 = @echo " SUBST $@"; |
| 76 | SUBST = $(V_SUBST)$(confsubst) |
| 77 | |
| 78 | ###-------------------------------------------------------------------------- |
| 79 | ### The main library. |
| 80 | |
| 81 | lib_LTLIBRARIES += libcatacomb.la |
| 82 | libcatacomb_la_LIBADD = $(CATACOMB_LIBS) |
| 83 | libcatacomb_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) |
| 84 | libcatacomb_la_SOURCES = |
| 85 | nodist_libcatacomb_la_SOURCES = |
| 86 | |
| 87 | ###-------------------------------------------------------------------------- |
| 88 | ### Basic utilities. |
| 89 | |
| 90 | ## The locked-memory arena. |
| 91 | pkginclude_HEADERS += arena.h |
| 92 | libcatacomb_la_SOURCES += arena.c |
| 93 | |
| 94 | ## Constant-type operations. |
| 95 | pkginclude_HEADERS += ct.h |
| 96 | libcatacomb_la_SOURCES += ct.c |
| 97 | |
| 98 | ## Acceptable key-size descriptions. |
| 99 | pkginclude_HEADERS += keysz.h |
| 100 | libcatacomb_la_SOURCES += keysz.c keysz-conv.c |
| 101 | |
| 102 | ## System-level memory locking. |
| 103 | pkginclude_HEADERS += lmem.h |
| 104 | libcatacomb_la_SOURCES += lmem.c |
| 105 | |
| 106 | ## Clearing secrets from memory. |
| 107 | pkginclude_HEADERS += paranoia.h |
| 108 | |
| 109 | ###-------------------------------------------------------------------------- |
| 110 | ### Main multiprecision integer library. |
| 111 | |
| 112 | ## This library is unfortunately intertwined with some of the code generation |
| 113 | ## programs, so we must be rather careful. The important bits of the maths |
| 114 | ## library needed by these programs is separated out into `libmpbase'. There |
| 115 | ## is work going on to fix this unpleasant situation by generating the |
| 116 | ## relevant files from Python scripts rather than C programs, using |
| 117 | ## information gathered by `configure'. |
| 118 | noinst_LTLIBRARIES += libmpbase.la |
| 119 | libcatacomb_la_LIBADD += libmpbase.la |
| 120 | libmpbase_la_SOURCES = |
| 121 | $(libmpbase_la_OBJECTS): mptypes.h |
| 122 | |
| 123 | ## Additional buffer I/O functions for mathematical objects. |
| 124 | pkginclude_HEADERS += buf.h |
| 125 | libcatacomb_la_SOURCES += buf.c |
| 126 | |
| 127 | ## Infrastructure for fast exponentiation. |
| 128 | pkginclude_HEADERS += exp.h |
| 129 | libcatacomb_la_SOURCES += exp.c |
| 130 | |
| 131 | ## Main user-visible multiprecision arithmetic. |
| 132 | pkginclude_HEADERS += mp.h |
| 133 | libmpbase_la_SOURCES += mp-arith.c |
| 134 | TESTS += mp-arith.$t |
| 135 | libmpbase_la_SOURCES += mp-const.c |
| 136 | libcatacomb_la_SOURCES += mp-exp.c mp-exp.h |
| 137 | libcatacomb_la_SOURCES += mp-gcd.c |
| 138 | TESTS += mp-gcd.$t |
| 139 | libmpbase_la_SOURCES += mp-io.c |
| 140 | libcatacomb_la_SOURCES += mp-jacobi.c |
| 141 | TESTS += mp-jacobi.$t |
| 142 | libmpbase_la_SOURCES += mp-mem.c |
| 143 | libmpbase_la_SOURCES += mp-misc.c |
| 144 | libcatacomb_la_SOURCES += mp-modexp.c |
| 145 | TESTS += mp-modexp.$t |
| 146 | libcatacomb_la_SOURCES += mp-modsqrt.c |
| 147 | TESTS += mp-modsqrt.$t |
| 148 | libcatacomb_la_SOURCES += mp-sqrt.c |
| 149 | TESTS += mp-sqrt.$t |
| 150 | libcatacomb_la_SOURCES += mp-test.c |
| 151 | EXTRA_DIST += tests/mp |
| 152 | |
| 153 | ## Computing Fibonacci numbers. |
| 154 | pkginclude_HEADERS += mp-fibonacci.h |
| 155 | libcatacomb_la_SOURCES += mp-fibonacci.c |
| 156 | TESTS += mp-fibonacci.$t |
| 157 | |
| 158 | ## Special memory allocation for multiprecision integers. |
| 159 | pkginclude_HEADERS += mparena.h |
| 160 | libmpbase_la_SOURCES += mparena.c |
| 161 | |
| 162 | ## Barrett reduction, an efficient method for modular reduction. |
| 163 | pkginclude_HEADERS += mpbarrett.h |
| 164 | libcatacomb_la_SOURCES += mpbarrett.c |
| 165 | TESTS += mpbarrett.$t |
| 166 | libcatacomb_la_SOURCES += mpbarrett-exp.c mpbarrett-mexp.c mpbarrett-exp.h |
| 167 | TESTS += mpbarrett-exp.$t mpbarrett-mexp.$t |
| 168 | EXTRA_DIST += tests/mpbarrett |
| 169 | |
| 170 | ## Solving congruences using the Chinese Remainder Theorem. |
| 171 | pkginclude_HEADERS += mpcrt.h |
| 172 | libcatacomb_la_SOURCES += mpcrt.c |
| 173 | TESTS += mpcrt.$t |
| 174 | EXTRA_DIST += tests/mpcrt |
| 175 | |
| 176 | ## Conversions between machine-native and multiprecision integers. |
| 177 | pkginclude_HEADERS += mpint.h |
| 178 | libcatacomb_la_SOURCES += mpint.c |
| 179 | TESTS += mpint.$t |
| 180 | EXTRA_DIST += tests/mpint |
| 181 | |
| 182 | ## Table of upper and lower limits of various types of machine integers, as |
| 183 | ## multiprecision integers. |
| 184 | nodist_archinclude_HEADERS += mplimits.h |
| 185 | nodist_libcatacomb_la_SOURCES += mplimits.c |
| 186 | CLEANFILES += mplimits.h mplimits.c |
| 187 | noinst_PROGRAMS += genlimits |
| 188 | genlimits_LDADD = libmpbase.la |
| 189 | mplimits.c: genlimits$e |
| 190 | $(AM_V_GEN)./genlimits c >mplimits.c.new && \ |
| 191 | mv mplimits.c.new mplimits.c |
| 192 | mplimits.h: genlimits$e |
| 193 | $(AM_V_GEN)./genlimits h >mplimits.h.new && \ |
| 194 | mv mplimits.h.new mplimits.h |
| 195 | $(genlimits_OBJECTS): mptypes.h |
| 196 | mplimits.lo: mplimits.h |
| 197 | |
| 198 | ## Montgomery reduction, a clever method for modular arithmetic. |
| 199 | pkginclude_HEADERS += mpmont.h |
| 200 | libcatacomb_la_SOURCES += mpmont.c |
| 201 | TESTS += mpmont.$t |
| 202 | libcatacomb_la_SOURCES += mpmont-exp.c mpmont-mexp.c mpmont-exp.h |
| 203 | TESTS += mpmont-exp.$t mpmont-mexp.$t |
| 204 | EXTRA_DIST += tests/mpmont |
| 205 | |
| 206 | ## Efficient multiplication of many small numbers. |
| 207 | pkginclude_HEADERS += mpmul.h |
| 208 | libcatacomb_la_SOURCES += mpmul.c |
| 209 | TESTS += mpmul.$t |
| 210 | |
| 211 | ## Generating random numbers. |
| 212 | pkginclude_HEADERS += mprand.h |
| 213 | libcatacomb_la_SOURCES += mprand.c |
| 214 | |
| 215 | ## Efficient reduction modulo numbers with conveninent binary |
| 216 | ## representations. |
| 217 | pkginclude_HEADERS += mpreduce.h |
| 218 | libcatacomb_la_SOURCES += mpreduce.c mpreduce-exp.h |
| 219 | TESTS += mpreduce.$t |
| 220 | EXTRA_DIST += tests/mpreduce |
| 221 | |
| 222 | ## Iteratiion over the bianry representation of multiprecision integers. |
| 223 | pkginclude_HEADERS += mpscan.h |
| 224 | libmpbase_la_SOURCES += mpscan.c |
| 225 | |
| 226 | ## Conversion between multiprecision integers and their textual |
| 227 | ## representations. |
| 228 | pkginclude_HEADERS += mptext.h |
| 229 | libmpbase_la_SOURCES += mptext.c |
| 230 | TESTS += mptext.$t |
| 231 | libcatacomb_la_SOURCES += mptext-dstr.c |
| 232 | libcatacomb_la_SOURCES += mptext-file.c |
| 233 | libcatacomb_la_SOURCES += mptext-len.c |
| 234 | libmpbase_la_SOURCES += mptext-string.c |
| 235 | EXTRA_DIST += tests/mptext |
| 236 | |
| 237 | ## Basic types used in the representation of multiprecision integers. |
| 238 | nodist_archinclude_HEADERS += mptypes.h |
| 239 | BUILT_SOURCES += mptypes.h |
| 240 | CLEANFILES += mptypes.h |
| 241 | noinst_PROGRAMS += mptypes |
| 242 | mptypes.h: mptypes$e |
| 243 | $(AM_V_GEN)./mptypes >mptypes.h.new && mv mptypes.h.new mptypes.h |
| 244 | |
| 245 | ## Low-level multiprecision arithmetic. |
| 246 | pkginclude_HEADERS += mpx.h bitops.h mpw.h |
| 247 | libmpbase_la_SOURCES += mpx.c |
| 248 | TESTS += mpx.$t |
| 249 | libmpbase_la_SOURCES += karatsuba.h mpx-kmul.c mpx-ksqr.c |
| 250 | TESTS += mpx-kmul.$t mpx-ksqr.$t |
| 251 | noinst_PROGRAMS += bittest |
| 252 | TESTS += bittest |
| 253 | EXTRA_DIST += tests/mpx |
| 254 | |
| 255 | ## A quick-and-dirty parser, used for parsing descriptions of groups, fields, |
| 256 | ## etc. |
| 257 | pkginclude_HEADERS += rho.h |
| 258 | libcatacomb_la_SOURCES += rho.c |
| 259 | TESTS += rho.$t |
| 260 | |
| 261 | ## Pollard's `rho' algorithm for determining discrete logarithms. |
| 262 | pkginclude_HEADERS += qdparse.h |
| 263 | libcatacomb_la_SOURCES += qdparse.c |
| 264 | |
| 265 | ###-------------------------------------------------------------------------- |
| 266 | ### Prime number checking, searching, and related jobs. |
| 267 | |
| 268 | ## Generating Lim--Lee groups, i.e., unit groups of finite fields without |
| 269 | ## small subgroups (except for the obvious ones). |
| 270 | pkginclude_HEADERS += limlee.h |
| 271 | libcatacomb_la_SOURCES += limlee.c |
| 272 | |
| 273 | ## A table of small prime numbers. |
| 274 | nodist_pkginclude_HEADERS += primetab.h |
| 275 | nodist_libcatacomb_la_SOURCES += primetab.c |
| 276 | CLEANFILES += primetab.h primetab.c |
| 277 | BUILT_SOURCES += primetab.h primetab.c |
| 278 | noinst_PROGRAMS += genprimes |
| 279 | primetab.h: primetab.c |
| 280 | primetab.c: genprimes$e |
| 281 | $(AM_V_GEN)./genprimes -hprimetab.h -cprimetab.c \ |
| 282 | -sCATACOMB_PRIMETAB_H \ |
| 283 | -n256 -t"unsigned short" -iprimetab |
| 284 | |
| 285 | ## Filtering candidate prime numbers by checking for small factors |
| 286 | ## efficiently. |
| 287 | pkginclude_HEADERS += pfilt.h |
| 288 | libcatacomb_la_SOURCES += pfilt.c |
| 289 | |
| 290 | ## Generating prime numbers (and other kinds of numbers which need searching |
| 291 | ## for). |
| 292 | pkginclude_HEADERS += pgen.h |
| 293 | libcatacomb_la_SOURCES += pgen.c |
| 294 | libcatacomb_la_SOURCES += pgen-gcd.c |
| 295 | libcatacomb_la_SOURCES += pgen-simul.c |
| 296 | libcatacomb_la_SOURCES += pgen-stdev.c |
| 297 | TESTS += pgen.$t |
| 298 | EXTRA_DIST += tests/pgen |
| 299 | |
| 300 | ## Finding primitive elements in finite fields. |
| 301 | pkginclude_HEADERS += prim.h |
| 302 | libcatacomb_la_SOURCES += prim.c |
| 303 | |
| 304 | ## Iterating over all prime numbers from a given starting point. |
| 305 | pkginclude_HEADERS += primeiter.h |
| 306 | libcatacomb_la_SOURCES += primeiter.c |
| 307 | TESTS += primeiter.$t |
| 308 | primeiter.lo: wheel.h |
| 309 | |
| 310 | ## The Miller--Rabin primality test. |
| 311 | pkginclude_HEADERS += rabin.h |
| 312 | libcatacomb_la_SOURCES += rabin.c |
| 313 | |
| 314 | ## Finding `strong' primes, using Gordon's algorithm. Once upon a time, |
| 315 | ## products of these kinds of numbers were harder to factor. |
| 316 | pkginclude_HEADERS += strongprime.h |
| 317 | libcatacomb_la_SOURCES += strongprime.c |
| 318 | |
| 319 | ## A `wheel', used by the prime iteration machinery. |
| 320 | nodist_pkginclude_HEADERS += wheel.h |
| 321 | nodist_libcatacomb_la_SOURCES += wheel.c |
| 322 | CLEANFILES += wheel.h wheel.c |
| 323 | noinst_PROGRAMS += genwheel |
| 324 | wheel.h: wheel.c |
| 325 | wheel.c: genwheel$e |
| 326 | $(AM_V_GEN)./genwheel -hwheel.h -cwheel.c \ |
| 327 | -sCATACOMB_WHEEL_H \ |
| 328 | -n5 -t"unsigned char" -iwheel |
| 329 | |
| 330 | ###-------------------------------------------------------------------------- |
| 331 | ### Binary polynomial arithmetic. |
| 332 | |
| 333 | ## User-visible binary polynomial arithmetic. |
| 334 | pkginclude_HEADERS += gf.h |
| 335 | libcatacomb_la_SOURCES += gf-arith.c |
| 336 | TESTS += gf-arith.$t |
| 337 | libcatacomb_la_SOURCES += gf-exp.c gf-exp.h |
| 338 | libcatacomb_la_SOURCES += gf-gcd.c |
| 339 | TESTS += gf-gcd.$t |
| 340 | EXTRA_DIST += tests/gf |
| 341 | |
| 342 | ## Low-level binary polynomial arithmetic. |
| 343 | pkginclude_HEADERS += gfx.h |
| 344 | libcatacomb_la_SOURCES += gfx.c |
| 345 | TESTS += gfx.$t |
| 346 | libcatacomb_la_SOURCES += gfx-kmul.c |
| 347 | TESTS += gfx-kmul.$t |
| 348 | libcatacomb_la_SOURCES += gfx-sqr.c |
| 349 | gfx-sqr.lo: gfx-sqr-tab.h |
| 350 | TESTS += gfx-sqr.$t |
| 351 | CLEANFILES += gfx-sqr-tab.h |
| 352 | noinst_PROGRAMS += gfx-sqr-mktab |
| 353 | gfx-sqr-tab.h: gfx-sqr-mktab$e |
| 354 | $(AM_V_GEN)./gfx-sqr-mktab >gfx-sqr-tab.h.in && \ |
| 355 | mv gfx-sqr-tab.h.in gfx-sqr-tab.h |
| 356 | EXTRA_DIST += tests/gfx |
| 357 | |
| 358 | ## Conversions between normal and polynomial basis representations for binary |
| 359 | ## fields. |
| 360 | pkginclude_HEADERS += gfn.h |
| 361 | libcatacomb_la_SOURCES += gfn.c |
| 362 | TESTS += gfn.$t |
| 363 | EXTRA_DIST += tests/gfn |
| 364 | |
| 365 | ## Efficient reduction modulo sparse polynomials. |
| 366 | pkginclude_HEADERS += gfreduce.h |
| 367 | libcatacomb_la_SOURCES += gfreduce.c gfreduce-exp.h |
| 368 | TESTS += gfreduce.$t |
| 369 | EXTRA_DIST += tests/gfreduce |
| 370 | |
| 371 | ###-------------------------------------------------------------------------- |
| 372 | ### Abstractions for various kinds of algebraic objects. |
| 373 | |
| 374 | ## Abstract cyclic groups. |
| 375 | pkginclude_HEADERS += group.h group-guts.h |
| 376 | libcatacomb_la_SOURCES += group-dstr.c |
| 377 | libcatacomb_la_SOURCES += group-exp.c group-exp.h |
| 378 | libcatacomb_la_SOURCES += group-file.c |
| 379 | libcatacomb_la_SOURCES += group-parse.c |
| 380 | libcatacomb_la_SOURCES += group-stdops.c |
| 381 | libcatacomb_la_SOURCES += group-string.c |
| 382 | libcatacomb_la_SOURCES += g-bin.c |
| 383 | libcatacomb_la_SOURCES += g-prime.c |
| 384 | libcatacomb_la_SOURCES += g-ec.c |
| 385 | EXTRA_DIST += group-test.c |
| 386 | TESTS += group-test.$t |
| 387 | EXTRA_DIST += tests/group |
| 388 | |
| 389 | ## Abstract finite fields. |
| 390 | pkginclude_HEADERS += field.h field-guts.h |
| 391 | libcatacomb_la_SOURCES += field.c |
| 392 | libcatacomb_la_SOURCES += field-exp.c field-exp.h |
| 393 | libcatacomb_la_SOURCES += field-parse.c |
| 394 | libcatacomb_la_SOURCES += f-binpoly.c |
| 395 | libcatacomb_la_SOURCES += f-niceprime.c |
| 396 | libcatacomb_la_SOURCES += f-prime.c |
| 397 | |
| 398 | ## Table of built-in binary fields. |
| 399 | pkginclude_HEADERS += bintab.h |
| 400 | libcatacomb_la_SOURCES += bintab.c |
| 401 | CLEANFILES += bintab.c |
| 402 | EXTRA_DIST += bintab.in bin-gentab.awk |
| 403 | bintab.c: bintab.in bin-gentab.awk mpdump$e |
| 404 | $(AM_V_GEN)awk -f $(srcdir)/bin-gentab.awk \ |
| 405 | <$(srcdir)/bintab.in >bintab.c.new && \ |
| 406 | mv bintab.c.new bintab.c |
| 407 | |
| 408 | ## Table of built-in prime fields. |
| 409 | pkginclude_HEADERS += ptab.h |
| 410 | libcatacomb_la_SOURCES += ptab.c |
| 411 | CLEANFILES += ptab.c |
| 412 | EXTRA_DIST += ptab.in p-gentab.awk |
| 413 | ptab.c: ptab.in p-gentab.awk mpdump$e |
| 414 | $(AM_V_GEN)awk -f $(srcdir)/p-gentab.awk \ |
| 415 | <$(srcdir)/ptab.in >ptab.c.new && \ |
| 416 | mv ptab.c.new ptab.c |
| 417 | |
| 418 | ## A utility for building multiprecision integer constants. |
| 419 | noinst_PROGRAMS += mpdump |
| 420 | mpdump_LDADD = libmpbase.la |
| 421 | $(mpdump_OBJECTS): mptypes.h |
| 422 | |
| 423 | ###-------------------------------------------------------------------------- |
| 424 | ### Elliptic curve arithmetic. |
| 425 | |
| 426 | ## Basic elliptic curve arithmetic. |
| 427 | pkginclude_HEADERS += ec.h ec-guts.h |
| 428 | libcatacomb_la_SOURCES += ec.c |
| 429 | libcatacomb_la_SOURCES += ec-exp.c ec-exp.h |
| 430 | libcatacomb_la_SOURCES += ec-info.c |
| 431 | TESTS += ec-info.$t |
| 432 | libcatacomb_la_SOURCES += ec-bin.c |
| 433 | TESTS += ec-bin.$t |
| 434 | libcatacomb_la_SOURCES += ec-prime.c |
| 435 | TESTS += ec-prime.$t |
| 436 | EXTRA_DIST += tests/ec |
| 437 | |
| 438 | ## The standard `raw' encoding (`EC2OSP') of elliptic curve points. |
| 439 | pkginclude_HEADERS += ec-raw.h |
| 440 | libcatacomb_la_SOURCES += ec-raw.c |
| 441 | |
| 442 | ## Test infrastructure for elliptic curves. |
| 443 | pkginclude_HEADERS += ec-test.h |
| 444 | libcatacomb_la_SOURCES += ec-test.c |
| 445 | TESTS += ec-test.$t |
| 446 | |
| 447 | ## A table of built-in elliptic curves. |
| 448 | pkginclude_HEADERS += ectab.h |
| 449 | libcatacomb_la_SOURCES += ectab.c |
| 450 | CLEANFILES += ectab.c |
| 451 | EXTRA_DIST += ectab.in ec-gentab.awk |
| 452 | ectab.c: ectab.in ec-gentab.awk mpdump$e |
| 453 | $(AM_V_GEN)awk -f $(srcdir)/ec-gentab.awk \ |
| 454 | <$(srcdir)/ectab.in >ectab.c.new && \ |
| 455 | mv ectab.c.new ectab.c |
| 456 | |
| 457 | ###-------------------------------------------------------------------------- |
| 458 | ### Autogenerated lists. |
| 459 | |
| 460 | ## Fancy template substitutions. |
| 461 | multigen = python $(srcdir)/multigen |
| 462 | EXTRA_DIST += multigen |
| 463 | |
| 464 | ## The heart of this is an enormous cross-product of crypto primitives and |
| 465 | ## the corresponding modes of operation. Rather than write it out longhand, |
| 466 | ## we generate it using `multigen'. Unfortunately, this needs to be done |
| 467 | ## at the Automake level, which causes some interesting bootstrapping |
| 468 | ## problems. |
| 469 | include modes.am |
| 470 | |
| 471 | EXTRA_DIST += modes.am.in modes.am |
| 472 | MAINTAINERCLEANFILES += $(srcdir)/modes.am |
| 473 | |
| 474 | ## Generate the lists. |
| 475 | $(srcdir)/modes.am: modes.am.in |
| 476 | $(AM_V_GEN)$(multigen) -g $(srcdir)/modes.am.in $(srcdir)/modes.am \ |
| 477 | blkc="$(BLKCS)" \ |
| 478 | blkcmode="$(BLKCMODES)" \ |
| 479 | blkcciphermode="$(BLKCCIPHERMODES)" \ |
| 480 | hash="$(HASHES)" \ |
| 481 | hashmode="$(HASHMODES)" \ |
| 482 | hashciphermode="$(HASHCIPHERMODES)" \ |
| 483 | hashmacmode="$(HASHMACMODES)" |
| 484 | |
| 485 | ## Initialize lists of known classes. |
| 486 | ALL_CIPHERS = $(CIPHER_MODES) |
| 487 | ALL_HASHES = $(HASHES) |
| 488 | ALL_MACS = $(MAC_MODES) |
| 489 | |
| 490 | ###-------------------------------------------------------------------------- |
| 491 | ### Block ciphers. |
| 492 | |
| 493 | BLKCS = |
| 494 | BLKCMODES = |
| 495 | |
| 496 | BLKCCIPHERMODES = |
| 497 | BLKCMODES += $(BLKCCIPHERMODES) |
| 498 | |
| 499 | ## A tool for translating the AES-contest test vectors into a form our test |
| 500 | ## rigs understand. |
| 501 | EXTRA_DIST += tests/aes-trans |
| 502 | |
| 503 | ## Block cipher utility macros, mainly used in mode implementations. |
| 504 | pkginclude_HEADERS += blkc.h |
| 505 | |
| 506 | ## Source code and headers for the block ciphers. |
| 507 | libcatacomb_la_SOURCES += $(BLKC_C) |
| 508 | pkginclude_HEADERS += $(BLKC_H) |
| 509 | |
| 510 | ## Schneier's `Blowfish' block cipher. |
| 511 | BLKCS += blowfish |
| 512 | blowfish.lo: blowfish-tab.h |
| 513 | CLEANFILES += blowfish-tab.h |
| 514 | noinst_PROGRAMS += blowfish-mktab |
| 515 | blowfish_mktab_CPPFLAGS = $(AM_CPPFLAGS) -DQUIET |
| 516 | blowfish-tab.h: blowfish-mktab$e |
| 517 | $(AM_V_GEN)./blowfish-mktab >blowfish-tab.h.new && \ |
| 518 | mv blowfish-tab.h.new blowfish-tab.h |
| 519 | |
| 520 | ## Adams and Tavares' `CAST' block ciphers. |
| 521 | BLKCS += cast128 cast256 |
| 522 | libcatacomb_la_SOURCES += cast-s.c cast-sk.c cast-base.h cast-tab.h |
| 523 | cast256.$t: tests/cast256 |
| 524 | EXTRA_DIST += tests/cast256.aes |
| 525 | MAINTAINERCLEANFILES += $(srcdir)/tests/cast256 |
| 526 | tests/cast256: tests/cast256.aes |
| 527 | $(AM_V_GEN)$(srcdir)/tests/aes-trans CAST256 \ |
| 528 | <$(srcdir)/tests/cast256.aes \ |
| 529 | >$(srcdir)/tests/cast256.new && \ |
| 530 | mv $(srcdir)/tests/cast256.new $(srcdir)/tests/cast256 |
| 531 | |
| 532 | ## IBM's `DES' block cipher, by Feistel, Coppersmith, and others. |
| 533 | BLKCS += des des3 |
| 534 | libcatacomb_la_SOURCES += des-base.h des-base.c desx-tab.h |
| 535 | des-base.lo: des-tab.h |
| 536 | CLEANFILES += des-tab.h |
| 537 | noinst_PROGRAMS += des-mktab |
| 538 | des-tab.h: des-mktab$e |
| 539 | $(AM_V_GEN)./des-mktab >des-tab.h.new && \ |
| 540 | mv des-tab.h.new des-tab.h |
| 541 | |
| 542 | ## Rivest's `DESX' variant, with pre- and post-whitening. |
| 543 | BLKCS += desx |
| 544 | libcatacomb_la_SOURCES += desx-tab.h |
| 545 | |
| 546 | ## Lai and Massey's IDEA. |
| 547 | BLKCS += idea |
| 548 | |
| 549 | ## IBM's `MARS' block cipher. |
| 550 | BLKCS += mars |
| 551 | mars.lo: mars-tab.h |
| 552 | CLEANFILES += mars-tab.h |
| 553 | noinst_PROGRAMS += mars-mktab |
| 554 | mars-tab.h: mars-mktab$e |
| 555 | $(AM_V_GEN)./mars-mktab >mars-tab.h.new && \ |
| 556 | mv mars-tab.h.new mars-tab.h |
| 557 | mars.$t: tests/mars |
| 558 | EXTRA_DIST += tests/mars.aes |
| 559 | MAINTAINERCLEANFILES += $(srcdir)/tests/mars |
| 560 | tests/mars: tests/mars.aes |
| 561 | $(AM_V_GEN)$(srcdir)/tests/aes-trans Mars \ |
| 562 | <$(srcdir)/tests/mars.aes \ |
| 563 | >$(srcdir)/tests/mars.new && \ |
| 564 | mv $(srcdir)/tests/mars.new $(srcdir)/tests/mars |
| 565 | |
| 566 | ## Daemen, Peeters, Van Assche and Rijmen's `Noekeon'. |
| 567 | BLKCS += noekeon |
| 568 | |
| 569 | ## Rivest's `RC2' block cipher. |
| 570 | BLKCS += rc2 |
| 571 | libcatacomb_la_SOURCES += rc2-tab.h |
| 572 | |
| 573 | ## Rivest's `RC5'. |
| 574 | BLKCS += rc5 |
| 575 | |
| 576 | ## Daemen and Rijmen's `Rijndael' block cipher, selected as AES. |
| 577 | BLKCS += rijndael rijndael192 rijndael256 |
| 578 | libcatacomb_la_SOURCES += rijndael-base.h rijndael-base.c |
| 579 | rijndael-base.lo: rijndael-tab.h |
| 580 | CLEANFILES += rijndael-tab.h |
| 581 | noinst_PROGRAMS += rijndael-mktab |
| 582 | rijndael-tab.h: rijndael-mktab$e |
| 583 | $(AM_V_GEN)./rijndael-mktab >rijndael-tab.h.new && \ |
| 584 | mv rijndael-tab.h.new rijndael-tab.h |
| 585 | rijndael.$t: tests/rijndael |
| 586 | EXTRA_DIST += tests/rijndael.aes |
| 587 | MAINTAINERCLEANFILES += $(srcdir)/tests/rijndael |
| 588 | tests/rijndael: tests/rijndael.aes |
| 589 | $(AM_V_GEN)$(srcdir)/tests/aes-trans Rijndael \ |
| 590 | <$(srcdir)/tests/rijndael.aes \ |
| 591 | >$(srcdir)/tests/rijndael.new && \ |
| 592 | mv $(srcdir)/tests/rijndael.new $(srcdir)/tests/rijndael |
| 593 | |
| 594 | ## Massey's `SAFER' block ciphers. |
| 595 | BLKCS += safer safersk |
| 596 | safer.lo: safer-tab.h |
| 597 | CLEANFILES += safer-tab.h |
| 598 | noinst_PROGRAMS += safer-mktab |
| 599 | safer-tab.h: safer-mktab$e |
| 600 | $(AM_V_GEN)./safer-mktab >safer-tab.h.new && \ |
| 601 | mv safer-tab.h.new safer-tab.h |
| 602 | |
| 603 | ## Anderson, Biham and Knudsen's `Serpent' block cipher. |
| 604 | BLKCS += serpent |
| 605 | libcatacomb_la_SOURCES += serpent-sbox.h |
| 606 | noinst_PROGRAMS += serpent-check |
| 607 | TESTS += serpent-check |
| 608 | serpent.$t: tests/serpent |
| 609 | EXTRA_DIST += tests/serpent.aes |
| 610 | MAINTAINERCLEANFILES += $(srcdir)/tests/serpent |
| 611 | tests/serpent: tests/serpent.aes |
| 612 | $(AM_V_GEN)$(srcdir)/tests/aes-trans Serpent -v rev=1 \ |
| 613 | <$(srcdir)/tests/serpent.aes \ |
| 614 | >$(srcdir)/tests/serpent.new && \ |
| 615 | mv $(srcdir)/tests/serpent.new $(srcdir)/tests/serpent |
| 616 | |
| 617 | ## The National Security Agency's `Skipjack' block cipher. You don't want to |
| 618 | ## use this. |
| 619 | BLKCS += skipjack |
| 620 | libcatacomb_la_SOURCES += skipjack-tab.h |
| 621 | |
| 622 | ## Daemen and Rijmen's `Square' block cipher. |
| 623 | BLKCS += square |
| 624 | square.lo: square-tab.h |
| 625 | CLEANFILES += square-tab.h |
| 626 | noinst_PROGRAMS += square-mktab |
| 627 | square-tab.h: square-mktab$e |
| 628 | $(AM_V_GEN)./square-mktab >square-tab.h.new && \ |
| 629 | mv square-tab.h.new square-tab.h |
| 630 | |
| 631 | ## Wheeler and Needham's `TEA' and `XTEA' block ciphers. |
| 632 | BLKCS += tea xtea |
| 633 | |
| 634 | ## Schneier, Kelsey, Whiting, Wagner, Hall and Ferguson's `Twofish' block |
| 635 | ## cipher. |
| 636 | BLKCS += twofish |
| 637 | twofish.lo: twofish-tab.h |
| 638 | CLEANFILES += twofish-tab.h |
| 639 | noinst_PROGRAMS += twofish-mktab |
| 640 | twofish-tab.h: twofish-mktab$e |
| 641 | $(AM_V_GEN)./twofish-mktab >twofish-tab.h.new && \ |
| 642 | mv twofish-tab.h.new twofish-tab.h |
| 643 | twofish.$t: tests/twofish |
| 644 | EXTRA_DIST += tests/twofish.aes |
| 645 | MAINTAINERCLEANFILES += $(srcdir)/tests/twofish |
| 646 | tests/twofish: tests/twofish.aes |
| 647 | $(AM_V_GEN)$(srcdir)/tests/aes-trans Twofish \ |
| 648 | <$(srcdir)/tests/twofish.aes \ |
| 649 | >$(srcdir)/tests/twofish.new && \ |
| 650 | mv $(srcdir)/tests/twofish.new $(srcdir)/tests/twofish |
| 651 | |
| 652 | ## The old NIST modes for DES. |
| 653 | BLKCCIPHERMODES += cbc cfb ecb ofb |
| 654 | |
| 655 | ## Counter mode. |
| 656 | BLKCCIPHERMODES += counter |
| 657 | |
| 658 | ###-------------------------------------------------------------------------- |
| 659 | ### Hash functions. |
| 660 | |
| 661 | HASHES = |
| 662 | HASHMODES = |
| 663 | |
| 664 | HASHCIPHERMODES = |
| 665 | HASHMODES += $(HASHCIPHERMODES) |
| 666 | |
| 667 | HASHMACMODES = |
| 668 | HASHMODES += $(HASHMACMODES) |
| 669 | |
| 670 | ## Common definitions for hash functions. |
| 671 | pkginclude_HEADERS += hash.h |
| 672 | |
| 673 | ## Source code and headers for the hash functions. |
| 674 | libcatacomb_la_SOURCES += $(HASH_C) |
| 675 | pkginclude_HEADERS += $(HASH_H) |
| 676 | |
| 677 | ## Lim and KISA's `HAS-160', recommended for use with KCDSA. |
| 678 | HASHES += has160 |
| 679 | |
| 680 | ## Rivest's `MD' series of hash functions |
| 681 | HASHES += md2 md4 md5 |
| 682 | libcatacomb_la_SOURCES += md2-tab.h |
| 683 | |
| 684 | ## Dobbertin, Bosselaers and Preneel's `RIPEMD' suite. |
| 685 | HASHES += rmd128 rmd160 rmd256 rmd320 |
| 686 | |
| 687 | ## The National Security Agency's `SHA-1' hash function. |
| 688 | HASHES += sha |
| 689 | |
| 690 | ## The National Security Agency's `SHA-2' suite. |
| 691 | HASHES += sha224 sha256 |
| 692 | HASHES += sha384 sha512 |
| 693 | |
| 694 | ## Anderson and Biham's `Tiger' hash function. |
| 695 | HASHES += tiger |
| 696 | libcatacomb_la_SOURCES += tiger-base.h |
| 697 | tiger.lo: tiger-tab.h |
| 698 | CLEANFILES += tiger-tab.h |
| 699 | noinst_PROGRAMS += tiger-mktab |
| 700 | tiger-tab.h: tiger-mktab$e |
| 701 | $(AM_V_GEN)./tiger-mktab >tiger-tab.h.new && \ |
| 702 | mv tiger-tab.h.new tiger-tab.h |
| 703 | |
| 704 | ## Barreto and Rijmen's `Whirlpool' hash function. |
| 705 | HASHES += whirlpool whirlpool256 |
| 706 | whirlpool.lo: whirlpool-tab.h |
| 707 | CLEANFILES += whirlpool-tab.h |
| 708 | noinst_PROGRAMS += whirlpool-mktab |
| 709 | whirlpool-tab.h: whirlpool-mktab$e |
| 710 | $(AM_V_GEN)./whirlpool-mktab >whirlpool-tab.h.new && \ |
| 711 | mv whirlpool-tab.h.new whirlpool-tab.h |
| 712 | |
| 713 | ## Bellare, Canetti and Krawczyk's `HMAC' mode for message authentication. |
| 714 | HASHMACMODES += hmac |
| 715 | |
| 716 | ## MGF1, used in OAEP and PSS. |
| 717 | HASHCIPHERMODES += mgf |
| 718 | |
| 719 | ###-------------------------------------------------------------------------- |
| 720 | ### Other symmetric primitives. |
| 721 | |
| 722 | ## The CRC32 algorithm, which is useful, but has no worthwhile security. |
| 723 | pkginclude_HEADERS += crc32.h |
| 724 | libcatacomb_la_SOURCES += crc32.c |
| 725 | ALL_HASHES += crc32=gcrc32 |
| 726 | |
| 727 | ## Rivest's `RC4' stream cipher. |
| 728 | pkginclude_HEADERS += rc4.h |
| 729 | libcatacomb_la_SOURCES += rc4.c |
| 730 | TESTS += rc4.$t |
| 731 | EXTRA_DIST += tests/rc4 |
| 732 | ALL_CIPHERS += rc4 |
| 733 | |
| 734 | ## Coppersmith and Rogaway's `SEAL' pseudorandom function. |
| 735 | pkginclude_HEADERS += seal.h |
| 736 | libcatacomb_la_SOURCES += seal.c |
| 737 | TESTS += seal.$t |
| 738 | EXTRA_DIST += tests/seal |
| 739 | ALL_CIPHERS += seal |
| 740 | ###-------------------------------------------------------------------------- |
| 741 | ### Autogenerated mode implementations. |
| 742 | |
| 743 | ## The master stamp file, indicating that we generated all of the sources. |
| 744 | CLEANFILES += modes-gen-stamp |
| 745 | EXTRA_DIST += mode.h.in mode.c.in |
| 746 | modes-gen-stamp: |
| 747 | $(AM_V_at)touch modes-gen-stamp |
| 748 | $(AM_V_GEN)$(multigen) -g $(srcdir)/mode.c.in \ |
| 749 | @base-@mode.c \ |
| 750 | base="$(BLKCS)" mode="$(BLKCMODES)" |
| 751 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.c.in \ |
| 752 | @base-@mode.c \ |
| 753 | base="$(HASHES)" mode="$(HASHMODES)" |
| 754 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \ |
| 755 | @base-@mode.h \ |
| 756 | base="$(BLKCS)" mode="$(BLKCMODES)" |
| 757 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \ |
| 758 | @base-@mode.h \ |
| 759 | base="$(HASHES)" mode="$(HASHMODES)" |
| 760 | $(AM_V_at)touch modes-gen-stamp |
| 761 | |
| 762 | ## The individual mode interfaces and implementations. |
| 763 | pkginclude_HEADERS += $(MODE_H) |
| 764 | |
| 765 | ## Generated implementations. |
| 766 | BUILT_SOURCES += $(GENMODES_C) |
| 767 | CLEANFILES += $(GENMODES_C) |
| 768 | nodist_libcatacomb_la_SOURCES += $(GENMODES_C) |
| 769 | $(GENMODES_C): modes-gen-stamp |
| 770 | |
| 771 | ## Generated interfaces. |
| 772 | BUILT_SOURCES += $(GENMODES_H) |
| 773 | CLEANFILES += $(GENMODES_H) |
| 774 | nodist_pkginclude_HEADERS += $(GENMODES_H) |
| 775 | $(GENMODES_H): modes-gen-stamp |
| 776 | |
| 777 | ###-------------------------------------------------------------------------- |
| 778 | ### Tables of classes for encryption, hashing, and message authentication. |
| 779 | |
| 780 | ## The skeleton for the class tables. |
| 781 | EXTRA_DIST += gthingtab.c.in |
| 782 | |
| 783 | ## Table of cipher classes. |
| 784 | pkginclude_HEADERS += gcipher.h |
| 785 | CLEANFILES += gciphertab.c |
| 786 | nodist_libcatacomb_la_SOURCES += gciphertab.c |
| 787 | gciphertab.c: gthingtab.c.in |
| 788 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gciphertab.c \ |
| 789 | what=gcipher cls=gccipher thing="$(ALL_CIPHERS)" |
| 790 | |
| 791 | ## Table of hash classes. |
| 792 | pkginclude_HEADERS += ghash.h ghash-def.h |
| 793 | CLEANFILES += ghashtab.c |
| 794 | nodist_libcatacomb_la_SOURCES += ghashtab.c |
| 795 | ghashtab.c: gthingtab.c.in |
| 796 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in ghashtab.c \ |
| 797 | what=ghash cls=gchash thing="$(ALL_HASHES)" |
| 798 | |
| 799 | ## Table of MAC classes. |
| 800 | pkginclude_HEADERS += gmac.h |
| 801 | CLEANFILES += gmactab.c |
| 802 | nodist_libcatacomb_la_SOURCES += gmactab.c |
| 803 | gmactab.c: gthingtab.c.in |
| 804 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gmactab.c \ |
| 805 | what=gmac cls=gcmac thing="$(ALL_MACS)" |
| 806 | |
| 807 | ###-------------------------------------------------------------------------- |
| 808 | ### Testing for symmetric crypto things. |
| 809 | |
| 810 | ## Run the test programs. |
| 811 | TESTS += $(SYMM_TESTS) |
| 812 | EXTRA_DIST += $(SYMM_TEST_FILES) |
| 813 | |
| 814 | ## A piece of sample text for round-trip testing encryption modes. |
| 815 | EXTRA_DIST += daftstory.h |
| 816 | |
| 817 | ###-------------------------------------------------------------------------- |
| 818 | ### Key management. |
| 819 | |
| 820 | ## Assistance for elliptic-curve keys. |
| 821 | pkginclude_HEADERS += ec-keys.h |
| 822 | libcatacomb_la_SOURCES += ec-fetch.c |
| 823 | |
| 824 | ## Managing keys and keyring files. |
| 825 | pkginclude_HEADERS += key.h |
| 826 | libcatacomb_la_SOURCES += key-attr.c |
| 827 | libcatacomb_la_SOURCES += key-fetch.c |
| 828 | libcatacomb_la_SOURCES += key-file.c |
| 829 | libcatacomb_la_SOURCES += key-io.c |
| 830 | libcatacomb_la_SOURCES += key-misc.c |
| 831 | libcatacomb_la_SOURCES += key-moan.c |
| 832 | |
| 833 | ## Managing key data. |
| 834 | pkginclude_HEADERS += key-data.h |
| 835 | libcatacomb_la_SOURCES += key-binary.c |
| 836 | libcatacomb_la_SOURCES += key-data.c |
| 837 | libcatacomb_la_SOURCES += key-flags.c |
| 838 | libcatacomb_la_SOURCES += key-pack.c |
| 839 | libcatacomb_la_SOURCES += key-pass.c |
| 840 | libcatacomb_la_SOURCES += key-text.c |
| 841 | |
| 842 | ## Error reporting. |
| 843 | pkginclude_HEADERS += key-error.h |
| 844 | libcatacomb_la_SOURCES += key-error.c |
| 845 | |
| 846 | ## Reading passphrases. |
| 847 | pkginclude_HEADERS += passphrase.h |
| 848 | libcatacomb_la_SOURCES += passphrase.c |
| 849 | |
| 850 | ## Interfacing with the passphrase pixie. |
| 851 | pkginclude_HEADERS += pixie.h |
| 852 | libcatacomb_la_SOURCES += pixie-common.c |
| 853 | |
| 854 | ###-------------------------------------------------------------------------- |
| 855 | ### Secret sharing. |
| 856 | |
| 857 | ## Efficient sharing over GF(2^8). |
| 858 | pkginclude_HEADERS += gfshare.h |
| 859 | libcatacomb_la_SOURCES += gfshare.c |
| 860 | gfshare.lo: gfshare-tab.h |
| 861 | CLEANFILES += gfshare-tab.h |
| 862 | noinst_PROGRAMS += gfshare-mktab |
| 863 | gfshare-tab.h: gfshare-mktab$e |
| 864 | $(AM_V_GEN)./gfshare-mktab >gfshare-tab.h.new && \ |
| 865 | mv gfshare-tab.h.new gfshare-tab.h |
| 866 | TESTS += gfshare.$t |
| 867 | |
| 868 | ## Number-theoretic sharing over GF(p). |
| 869 | pkginclude_HEADERS += share.h |
| 870 | libcatacomb_la_SOURCES += share.c |
| 871 | TESTS += share.$t |
| 872 | |
| 873 | ###-------------------------------------------------------------------------- |
| 874 | ### Public-key cryptography. |
| 875 | |
| 876 | ## The Blum--Blum--Shub random-bit generator. |
| 877 | pkginclude_HEADERS += bbs.h |
| 878 | libcatacomb_la_SOURCES += bbs-fetch.c |
| 879 | libcatacomb_la_SOURCES += bbs-gen.c |
| 880 | libcatacomb_la_SOURCES += bbs-jump.c |
| 881 | TESTS += bbs-jump.$t |
| 882 | libcatacomb_la_SOURCES += bbs-rand.c |
| 883 | TESTS += bbs-rand.$t |
| 884 | EXTRA_DIST += tests/bbs |
| 885 | |
| 886 | ## Plain Diffie--Hellman, in Schorr groups. |
| 887 | pkginclude_HEADERS += dh.h |
| 888 | libcatacomb_la_SOURCES += dh-check.c |
| 889 | libcatacomb_la_SOURCES += dh-fetch.c |
| 890 | libcatacomb_la_SOURCES += dh-gen.c |
| 891 | libcatacomb_la_SOURCES += dh-kcdsa.c |
| 892 | libcatacomb_la_SOURCES += dh-limlee.c |
| 893 | libcatacomb_la_SOURCES += dh-param.c |
| 894 | TESTS += dh-param.$t |
| 895 | |
| 896 | ## The National Security Agency's Digital Signature Algorithm. |
| 897 | pkginclude_HEADERS += dsa.h |
| 898 | libcatacomb_la_SOURCES += dsa-gen.c |
| 899 | TESTS += dsa-gen.$t |
| 900 | libcatacomb_la_SOURCES += dsa-misc.c |
| 901 | libcatacomb_la_SOURCES += dsa-sign.c |
| 902 | TESTS += dsa-sign.$t |
| 903 | libcatacomb_la_SOURCES += dsa-verify.c |
| 904 | TESTS += dsa-verify.$t |
| 905 | libcatacomb_la_SOURCES += dsa-check.c |
| 906 | EXTRA_DIST += tests/dsa |
| 907 | |
| 908 | ## Generalization of DSA to arbitrary cyclic groups. |
| 909 | pkginclude_HEADERS += gdsa.h |
| 910 | libcatacomb_la_SOURCES += gdsa.c |
| 911 | TESTS += gdsa.$t |
| 912 | EXTRA_DIST += tests/gdsa |
| 913 | |
| 914 | ## KISA `KCDSA', generalized to arbitrary cyclic groups. |
| 915 | pkginclude_HEADERS += gkcdsa.h |
| 916 | libcatacomb_la_SOURCES += gkcdsa.c |
| 917 | TESTS += gkcdsa.$t |
| 918 | EXTRA_DIST += tests/gkcdsa |
| 919 | |
| 920 | ## General key validity checking machinery. |
| 921 | pkginclude_HEADERS += keycheck.h |
| 922 | libcatacomb_la_SOURCES += keycheck.c |
| 923 | libcatacomb_la_SOURCES += keycheck-mp.c |
| 924 | libcatacomb_la_SOURCES += keycheck-report.c |
| 925 | |
| 926 | ## The Rivest--Shamir--Adleman trapdoor one-way function. |
| 927 | pkginclude_HEADERS += rsa.h |
| 928 | libcatacomb_la_SOURCES += rsa-fetch.c |
| 929 | libcatacomb_la_SOURCES += rsa-gen.c |
| 930 | libcatacomb_la_SOURCES += rsa-priv.c |
| 931 | libcatacomb_la_SOURCES += rsa-pub.c |
| 932 | libcatacomb_la_SOURCES += rsa-recover.c |
| 933 | libcatacomb_la_SOURCES += oaep.c |
| 934 | libcatacomb_la_SOURCES += pkcs1.c |
| 935 | libcatacomb_la_SOURCES += pss.c |
| 936 | EXTRA_DIST += rsa-test.c |
| 937 | TESTS += rsa-test.$t |
| 938 | EXTRA_DIST += tests/rsa |
| 939 | |
| 940 | ###-------------------------------------------------------------------------- |
| 941 | ### Random number generators. |
| 942 | |
| 943 | ## The FIPS186 generator used to generate DSA domain parameters. |
| 944 | pkginclude_HEADERS += dsarand.h |
| 945 | libcatacomb_la_SOURCES += dsarand.c |
| 946 | |
| 947 | ## Knuth's lagged-Fibonacci generator. |
| 948 | pkginclude_HEADERS += fibrand.h |
| 949 | libcatacomb_la_SOURCES += fibrand.c |
| 950 | |
| 951 | ## The FIPS 140--2 random number generator tests. |
| 952 | pkginclude_HEADERS += fipstest.h |
| 953 | libcatacomb_la_SOURCES += fipstest.c |
| 954 | |
| 955 | ## Interface for generic random number sources. |
| 956 | pkginclude_HEADERS += grand.h |
| 957 | libcatacomb_la_SOURCES += grand.c |
| 958 | |
| 959 | ## A simple linear-congruential generator. |
| 960 | pkginclude_HEADERS += lcrand.h |
| 961 | libcatacomb_la_SOURCES += lcrand.c |
| 962 | TESTS += lcrand.$t |
| 963 | EXTRA_DIST += tests/lcrand |
| 964 | |
| 965 | ## Maurer's universal statistical test. |
| 966 | pkginclude_HEADERS += maurer.h |
| 967 | libcatacomb_la_SOURCES += maurer.c |
| 968 | |
| 969 | ## System-specific noise acquisition. |
| 970 | pkginclude_HEADERS += noise.h |
| 971 | libcatacomb_la_SOURCES += noise.c |
| 972 | |
| 973 | ## Cryptographic laundering for true random data generation. |
| 974 | pkginclude_HEADERS += rand.h |
| 975 | libcatacomb_la_SOURCES += rand.c |
| 976 | |
| 977 | ## The SSL v3 pseudorandom function. |
| 978 | pkginclude_HEADERS += sslprf.h |
| 979 | libcatacomb_la_SOURCES += sslprf.c |
| 980 | TESTS += sslprf.$t |
| 981 | EXTRA_DIST += tests/sslprf |
| 982 | |
| 983 | ## The TLS v1 pseudorandom function. |
| 984 | pkginclude_HEADERS += tlsprf.h |
| 985 | libcatacomb_la_SOURCES += tlsprf.c |
| 986 | TESTS += tlsprf.$t |
| 987 | EXTRA_DIST += tests/tlsprf |
| 988 | |
| 989 | ###-------------------------------------------------------------------------- |
| 990 | ### The `catcrypt' library. |
| 991 | |
| 992 | noinst_LTLIBRARIES += libcatcrypt.la |
| 993 | libcatcrypt_la_SOURCES = |
| 994 | |
| 995 | ## The main library. |
| 996 | libcatcrypt_la_SOURCES += cc.h |
| 997 | libcatcrypt_la_SOURCES += cc-enc.c |
| 998 | libcatcrypt_la_SOURCES += cc-hash.c |
| 999 | libcatcrypt_la_SOURCES += cc-kem.c |
| 1000 | libcatcrypt_la_SOURCES += cc-list.c |
| 1001 | libcatcrypt_la_SOURCES += cc-progress.c |
| 1002 | libcatcrypt_la_SOURCES += cc-sig.c |
| 1003 | libcatcrypt_la_SOURCES += cc-subcmd.c |
| 1004 | |
| 1005 | ## Date parsing. |
| 1006 | libcatcrypt_la_SOURCES += getdate.h |
| 1007 | libcatcrypt_la_SOURCES += getdate.y |
| 1008 | |
| 1009 | ###-------------------------------------------------------------------------- |
| 1010 | ### Utility programs. |
| 1011 | |
| 1012 | UTILS_LIBS = libcatcrypt.la libcatacomb.la $(LIBS) |
| 1013 | |
| 1014 | ## Generate and verify datestamped cookies. |
| 1015 | bin_PROGRAMS += cookie |
| 1016 | cookie_LDADD = $(UTILS_LIBS) |
| 1017 | dist_man_MANS += cookie.1 |
| 1018 | |
| 1019 | ## Asymmetric message encryption and decryption with deniable authentication. |
| 1020 | bin_PROGRAMS += catcrypt |
| 1021 | catcrypt_LDADD = $(UTILS_LIBS) |
| 1022 | dist_man_MANS += catcrypt.1 |
| 1023 | |
| 1024 | ## Signing and verifying files. |
| 1025 | bin_PROGRAMS += catsign |
| 1026 | catsign_LDADD = $(UTILS_LIBS) |
| 1027 | dist_man_MANS += catsign.1 |
| 1028 | |
| 1029 | ## Issue and verify signatures on directory trees. |
| 1030 | bin_PROGRAMS += dsig |
| 1031 | dsig_LDADD = $(UTILS_LIBS) |
| 1032 | dist_man_MANS += dsig.1 |
| 1033 | |
| 1034 | ## Compute factorials to arbitrary precision. |
| 1035 | bin_PROGRAMS += factorial |
| 1036 | factorial_LDADD = $(UTILS_LIBS) |
| 1037 | |
| 1038 | ## Compute Fibonacci numbers to arbitrary precision. |
| 1039 | bin_PROGRAMS += fibonacci |
| 1040 | fibonacci_LDADD = $(UTILS_LIBS) |
| 1041 | |
| 1042 | ## Compute hashes of files. |
| 1043 | bin_PROGRAMS += hashsum |
| 1044 | hashsum_LDADD = $(UTILS_LIBS) |
| 1045 | dist_man_MANS += hashsum.1 |
| 1046 | |
| 1047 | ## Key management utility. |
| 1048 | bin_PROGRAMS += key |
| 1049 | key_SOURCES = keyutil.c |
| 1050 | key_LDADD = $(UTILS_LIBS) |
| 1051 | dist_man_MANS += key.1 keyring.5 |
| 1052 | |
| 1053 | ## Generate passphrases with given entropy using wordlists and Markov models. |
| 1054 | bin_PROGRAMS += mkphrase |
| 1055 | mkphrase_LDADD = $(UTILS_LIBS) |
| 1056 | dist_man_MANS += mkphrase.1 |
| 1057 | |
| 1058 | ## Performance testing. |
| 1059 | bin_PROGRAMS += perftest |
| 1060 | perftest_LDADD = $(UTILS_LIBS) |
| 1061 | |
| 1062 | ## Remember passphrases for limited periods of time. |
| 1063 | bin_PROGRAMS += pixie |
| 1064 | pixie_SOURCES = pixie.c |
| 1065 | pixie_LDADD = libcatacomb.la |
| 1066 | dist_man_MANS += pixie.1 |
| 1067 | EXTRA_DIST += xpixie |
| 1068 | |
| 1069 | ## Generate random data. |
| 1070 | bin_PROGRAMS += rspit |
| 1071 | rspit_LDADD = $(UTILS_LIBS) |
| 1072 | |
| 1073 | ###-------------------------------------------------------------------------- |
| 1074 | ### Testing. |
| 1075 | |
| 1076 | SUFFIXES += .c .$t .to |
| 1077 | .c.to: |
| 1078 | $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@ |
| 1079 | .to.$t: libcatacomb.la |
| 1080 | $(AM_V_CCLD)$(LINK) $< libcatacomb.la $(LIBS) |
| 1081 | .PRECIOUS: %.to |
| 1082 | CLEANFILES += *.to *.$t |
| 1083 | |
| 1084 | ###-------------------------------------------------------------------------- |
| 1085 | ### The pkg-config file. |
| 1086 | |
| 1087 | pkgconfigdir = $(libdir)/pkgconfig |
| 1088 | pkgconfig_DATA = catacomb.pc |
| 1089 | EXTRA_DIST += catacomb.pc.in |
| 1090 | CLEANFILES += catacomb.pc |
| 1091 | |
| 1092 | catacomb.pc: catacomb.pc.in Makefile |
| 1093 | $(SUBST) $(srcdir)/catacomb.pc.in >$@.new $(SUBSTITUTIONS) && \ |
| 1094 | mv $@.new $@ |
| 1095 | |
| 1096 | ###-------------------------------------------------------------------------- |
| 1097 | ### Release tweaking. |
| 1098 | |
| 1099 | ## Release number. |
| 1100 | dist-hook:: |
| 1101 | echo $(VERSION) >$(distdir)/RELEASE |
| 1102 | |
| 1103 | ## Additional build tools. |
| 1104 | EXTRA_DIST += auto-version |
| 1105 | |
| 1106 | ###-------------------------------------------------------------------------- |
| 1107 | ### Debian. |
| 1108 | |
| 1109 | ## General stuff. |
| 1110 | EXTRA_DIST += debian/rules |
| 1111 | EXTRA_DIST += debian/control |
| 1112 | EXTRA_DIST += debian/changelog |
| 1113 | EXTRA_DIST += debian/copyright |
| 1114 | |
| 1115 | ## catacomb-bin |
| 1116 | EXTRA_DIST += debian/catacomb-bin.prerm |
| 1117 | EXTRA_DIST += debian/catacomb-bin.postinst |
| 1118 | EXTRA_DIST += debian/catacomb-bin.config |
| 1119 | EXTRA_DIST += debian/catacomb-bin.templates |
| 1120 | |
| 1121 | ###----- That's all, folks -------------------------------------------------- |