-KEYRING
Makefile.in
aclocal.m4
configure
COPYING.LIB
autom4te.cache
config
-getdate.h
-getdate.y
-prof
-tinymp
-*.kr
-*.kr.old
-ylwrap
-modes.am
-auto-version
-confsubst
+progs/getdate.h
+progs/getdate.y
+symm/modes.am
+*.t
+*.to
COPYING.LIB
-getdate.y
-getdate.h
config/auto-version
config/confsubst
+progs/getdate.h
+progs/getdate.y
### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
### MA 02111-1307, USA.
-###--------------------------------------------------------------------------
-### Miscellaneous useful definitions.
-
-## Some convenient abbreviations for file suffixes.
-e = $(EXEEXT)
-o = $(OBJEXT)
-t = t$e
-
-## Installation directories.
-archincludedir = $(pkglibdir)/include
-
-###--------------------------------------------------------------------------
-### Initial values of common variables.
+include $(top_srcdir)/vars.am
SUBDIRS =
-EXTRA_DIST =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-SUFFIXES =
-TESTS =
-BUILT_SOURCES =
-
-bin_PROGRAMS =
-noinst_PROGRAMS =
-lib_LTLIBRARIES =
-noinst_LTLIBRARIES =
-pkginclude_HEADERS =
-nodist_pkginclude_HEADERS =
-archinclude_HEADERS =
-nodist_archinclude_HEADERS =
-dist_man_MANS =
-
-###--------------------------------------------------------------------------
-### Standard configuration substitutions.
-
-## Substitute tags in files.
-confsubst = $(top_srcdir)/config/confsubst
-EXTRA_DIST += config/confsubst
-
-SUBSTITUTIONS = \
- prefix=$(prefix) exec_prefix=$(exec_prefix) \
- libdir=$(libdir) includedir=$(includedir) \
- PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
- CATACOMB_LIBS="$(CATACOMB_LIBS)"
-
-V_SUBST = $(V_SUBST_$(V))
-V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
-V_SUBST_0 = @echo " SUBST $@";
-SUBST = $(V_SUBST)$(confsubst)
-
###--------------------------------------------------------------------------
### The main library.
-lib_LTLIBRARIES += libcatacomb.la
-libcatacomb_la_LIBADD = $(CATACOMB_LIBS) $(mLib_LIBS)
+lib_LTLIBRARIES = libcatacomb.la
libcatacomb_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO)
+libcatacomb_la_LIBADD = $(CATACOMB_LIBS) $(mLib_LIBS)
libcatacomb_la_SOURCES =
-nodist_libcatacomb_la_SOURCES =
-
-###--------------------------------------------------------------------------
-### Basic utilities.
-
-## The locked-memory arena.
-pkginclude_HEADERS += arena.h
-libcatacomb_la_SOURCES += arena.c
-
-## Constant-type operations.
-pkginclude_HEADERS += ct.h
-libcatacomb_la_SOURCES += ct.c
-
-## Acceptable key-size descriptions.
-pkginclude_HEADERS += keysz.h
-libcatacomb_la_SOURCES += keysz.c keysz-conv.c
-
-## System-level memory locking.
-pkginclude_HEADERS += lmem.h
-libcatacomb_la_SOURCES += lmem.c
-
-## Clearing secrets from memory.
-pkginclude_HEADERS += paranoia.h
-
-###--------------------------------------------------------------------------
-### Main multiprecision integer library.
-
-## This library is unfortunately intertwined with some of the code generation
-## programs, so we must be rather careful. The important bits of the maths
-## library needed by these programs is separated out into `libmpbase'. There
-## is work going on to fix this unpleasant situation by generating the
-## relevant files from Python scripts rather than C programs, using
-## information gathered by `configure'.
-noinst_LTLIBRARIES += libmpbase.la
-libcatacomb_la_LIBADD += libmpbase.la
-libmpbase_la_LIBADD = $(mLib_LIBS)
-libmpbase_la_SOURCES =
-$(libmpbase_la_OBJECTS): mptypes.h
-
-## Additional buffer I/O functions for mathematical objects.
-pkginclude_HEADERS += buf.h
-libcatacomb_la_SOURCES += buf.c
-
-## Infrastructure for fast exponentiation.
-pkginclude_HEADERS += exp.h
-libcatacomb_la_SOURCES += exp.c
-
-## Main user-visible multiprecision arithmetic.
-pkginclude_HEADERS += mp.h
-libmpbase_la_SOURCES += mp-arith.c
-TESTS += mp-arith.$t
-libmpbase_la_SOURCES += mp-const.c
-libcatacomb_la_SOURCES += mp-exp.c mp-exp.h
-libcatacomb_la_SOURCES += mp-gcd.c
-TESTS += mp-gcd.$t
-libmpbase_la_SOURCES += mp-io.c
-libcatacomb_la_SOURCES += mp-jacobi.c
-TESTS += mp-jacobi.$t
-libmpbase_la_SOURCES += mp-mem.c
-libmpbase_la_SOURCES += mp-misc.c
-libcatacomb_la_SOURCES += mp-modexp.c
-TESTS += mp-modexp.$t
-libcatacomb_la_SOURCES += mp-modsqrt.c
-TESTS += mp-modsqrt.$t
-libcatacomb_la_SOURCES += mp-sqrt.c
-TESTS += mp-sqrt.$t
-libcatacomb_la_SOURCES += mp-test.c
-EXTRA_DIST += tests/mp
-
-## Computing Fibonacci numbers.
-pkginclude_HEADERS += mp-fibonacci.h
-libcatacomb_la_SOURCES += mp-fibonacci.c
-TESTS += mp-fibonacci.$t
-
-## Special memory allocation for multiprecision integers.
-pkginclude_HEADERS += mparena.h
-libmpbase_la_SOURCES += mparena.c
-
-## Barrett reduction, an efficient method for modular reduction.
-pkginclude_HEADERS += mpbarrett.h
-libcatacomb_la_SOURCES += mpbarrett.c
-TESTS += mpbarrett.$t
-libcatacomb_la_SOURCES += mpbarrett-exp.c mpbarrett-mexp.c mpbarrett-exp.h
-TESTS += mpbarrett-exp.$t mpbarrett-mexp.$t
-EXTRA_DIST += tests/mpbarrett
-
-## Solving congruences using the Chinese Remainder Theorem.
-pkginclude_HEADERS += mpcrt.h
-libcatacomb_la_SOURCES += mpcrt.c
-TESTS += mpcrt.$t
-EXTRA_DIST += tests/mpcrt
-
-## Conversions between machine-native and multiprecision integers.
-pkginclude_HEADERS += mpint.h
-libcatacomb_la_SOURCES += mpint.c
-TESTS += mpint.$t
-EXTRA_DIST += tests/mpint
-
-## Table of upper and lower limits of various types of machine integers, as
-## multiprecision integers.
-nodist_archinclude_HEADERS += mplimits.h
-nodist_libcatacomb_la_SOURCES += mplimits.c
-CLEANFILES += mplimits.h mplimits.c
-noinst_PROGRAMS += genlimits
-genlimits_LDADD = libmpbase.la
-mplimits.c: genlimits$e
- $(AM_V_GEN)./genlimits c >mplimits.c.new && \
- mv mplimits.c.new mplimits.c
-mplimits.h: genlimits$e
- $(AM_V_GEN)./genlimits h >mplimits.h.new && \
- mv mplimits.h.new mplimits.h
-$(genlimits_OBJECTS): mptypes.h
-mplimits.lo: mplimits.h
-
-## Montgomery reduction, a clever method for modular arithmetic.
-pkginclude_HEADERS += mpmont.h
-libcatacomb_la_SOURCES += mpmont.c
-TESTS += mpmont.$t
-libcatacomb_la_SOURCES += mpmont-exp.c mpmont-mexp.c mpmont-exp.h
-TESTS += mpmont-exp.$t mpmont-mexp.$t
-EXTRA_DIST += tests/mpmont
-
-## Efficient multiplication of many small numbers.
-pkginclude_HEADERS += mpmul.h
-libcatacomb_la_SOURCES += mpmul.c
-TESTS += mpmul.$t
-
-## Generating random numbers.
-pkginclude_HEADERS += mprand.h
-libcatacomb_la_SOURCES += mprand.c
-
-## Efficient reduction modulo numbers with conveninent binary
-## representations.
-pkginclude_HEADERS += mpreduce.h
-libcatacomb_la_SOURCES += mpreduce.c mpreduce-exp.h
-TESTS += mpreduce.$t
-EXTRA_DIST += tests/mpreduce
-
-## Iteratiion over the bianry representation of multiprecision integers.
-pkginclude_HEADERS += mpscan.h
-libmpbase_la_SOURCES += mpscan.c
-
-## Conversion between multiprecision integers and their textual
-## representations.
-pkginclude_HEADERS += mptext.h
-libmpbase_la_SOURCES += mptext.c
-TESTS += mptext.$t
-libcatacomb_la_SOURCES += mptext-dstr.c
-libcatacomb_la_SOURCES += mptext-file.c
-libcatacomb_la_SOURCES += mptext-len.c
-libmpbase_la_SOURCES += mptext-string.c
-EXTRA_DIST += tests/mptext
-
-## Basic types used in the representation of multiprecision integers.
-nodist_archinclude_HEADERS += mptypes.h
-BUILT_SOURCES += mptypes.h
-CLEANFILES += mptypes.h
-noinst_PROGRAMS += mptypes
-mptypes.h: mptypes$e
- $(AM_V_GEN)./mptypes >mptypes.h.new && mv mptypes.h.new mptypes.h
-
-## Low-level multiprecision arithmetic.
-pkginclude_HEADERS += mpx.h bitops.h mpw.h
-libmpbase_la_SOURCES += mpx.c
-TESTS += mpx.$t
-libmpbase_la_SOURCES += karatsuba.h mpx-kmul.c mpx-ksqr.c
-TESTS += mpx-kmul.$t mpx-ksqr.$t
-noinst_PROGRAMS += bittest
-TESTS += bittest
-EXTRA_DIST += tests/mpx
-
-## A quick-and-dirty parser, used for parsing descriptions of groups, fields,
-## etc.
-pkginclude_HEADERS += rho.h
-libcatacomb_la_SOURCES += rho.c
-TESTS += rho.$t
-
-## Pollard's `rho' algorithm for determining discrete logarithms.
-pkginclude_HEADERS += qdparse.h
-libcatacomb_la_SOURCES += qdparse.c
-
-###--------------------------------------------------------------------------
-### Prime number checking, searching, and related jobs.
-
-## Generating Lim--Lee groups, i.e., unit groups of finite fields without
-## small subgroups (except for the obvious ones).
-pkginclude_HEADERS += limlee.h
-libcatacomb_la_SOURCES += limlee.c
-
-## A table of small prime numbers.
-nodist_pkginclude_HEADERS += primetab.h
-nodist_libcatacomb_la_SOURCES += primetab.c
-CLEANFILES += primetab.h primetab.c
-BUILT_SOURCES += primetab.h primetab.c
-noinst_PROGRAMS += genprimes
-genprimes_LDADD = $(mLib_LIBS)
-primetab.h: primetab.c
-primetab.c: genprimes$e
- $(AM_V_GEN)./genprimes -hprimetab.h -cprimetab.c \
- -sCATACOMB_PRIMETAB_H \
- -n256 -t"unsigned short" -iprimetab
-
-## Filtering candidate prime numbers by checking for small factors
-## efficiently.
-pkginclude_HEADERS += pfilt.h
-libcatacomb_la_SOURCES += pfilt.c
-
-## Generating prime numbers (and other kinds of numbers which need searching
-## for).
-pkginclude_HEADERS += pgen.h
-libcatacomb_la_SOURCES += pgen.c
-libcatacomb_la_SOURCES += pgen-gcd.c
-libcatacomb_la_SOURCES += pgen-simul.c
-libcatacomb_la_SOURCES += pgen-stdev.c
-TESTS += pgen.$t
-EXTRA_DIST += tests/pgen
-
-## Finding primitive elements in finite fields.
-pkginclude_HEADERS += prim.h
-libcatacomb_la_SOURCES += prim.c
-
-## Iterating over all prime numbers from a given starting point.
-pkginclude_HEADERS += primeiter.h
-libcatacomb_la_SOURCES += primeiter.c
-TESTS += primeiter.$t
-primeiter.lo: wheel.h
-
-## The Miller--Rabin primality test.
-pkginclude_HEADERS += rabin.h
-libcatacomb_la_SOURCES += rabin.c
-
-## Finding `strong' primes, using Gordon's algorithm. Once upon a time,
-## products of these kinds of numbers were harder to factor.
-pkginclude_HEADERS += strongprime.h
-libcatacomb_la_SOURCES += strongprime.c
-
-## A `wheel', used by the prime iteration machinery.
-nodist_pkginclude_HEADERS += wheel.h
-nodist_libcatacomb_la_SOURCES += wheel.c
-CLEANFILES += wheel.h wheel.c
-noinst_PROGRAMS += genwheel
-genwheel_LDADD = $(mLib_LIBS)
-wheel.h: wheel.c
-wheel.c: genwheel$e
- $(AM_V_GEN)./genwheel -hwheel.h -cwheel.c \
- -sCATACOMB_WHEEL_H \
- -n5 -t"unsigned char" -iwheel
-
-###--------------------------------------------------------------------------
-### Binary polynomial arithmetic.
-
-## User-visible binary polynomial arithmetic.
-pkginclude_HEADERS += gf.h
-libcatacomb_la_SOURCES += gf-arith.c
-TESTS += gf-arith.$t
-libcatacomb_la_SOURCES += gf-exp.c gf-exp.h
-libcatacomb_la_SOURCES += gf-gcd.c
-TESTS += gf-gcd.$t
-EXTRA_DIST += tests/gf
-
-## Low-level binary polynomial arithmetic.
-pkginclude_HEADERS += gfx.h
-libcatacomb_la_SOURCES += gfx.c
-TESTS += gfx.$t
-libcatacomb_la_SOURCES += gfx-kmul.c
-TESTS += gfx-kmul.$t
-libcatacomb_la_SOURCES += gfx-sqr.c
-gfx-sqr.lo: gfx-sqr-tab.h
-TESTS += gfx-sqr.$t
-CLEANFILES += gfx-sqr-tab.h
-noinst_PROGRAMS += gfx-sqr-mktab
-gfx-sqr-tab.h: gfx-sqr-mktab$e
- $(AM_V_GEN)./gfx-sqr-mktab >gfx-sqr-tab.h.in && \
- mv gfx-sqr-tab.h.in gfx-sqr-tab.h
-EXTRA_DIST += tests/gfx
-
-## Conversions between normal and polynomial basis representations for binary
-## fields.
-pkginclude_HEADERS += gfn.h
-libcatacomb_la_SOURCES += gfn.c
-TESTS += gfn.$t
-EXTRA_DIST += tests/gfn
-
-## Efficient reduction modulo sparse polynomials.
-pkginclude_HEADERS += gfreduce.h
-libcatacomb_la_SOURCES += gfreduce.c gfreduce-exp.h
-TESTS += gfreduce.$t
-EXTRA_DIST += tests/gfreduce
-
-###--------------------------------------------------------------------------
-### Abstractions for various kinds of algebraic objects.
-
-## Abstract cyclic groups.
-pkginclude_HEADERS += group.h group-guts.h
-libcatacomb_la_SOURCES += group-dstr.c
-libcatacomb_la_SOURCES += group-exp.c group-exp.h
-libcatacomb_la_SOURCES += group-file.c
-libcatacomb_la_SOURCES += group-parse.c
-libcatacomb_la_SOURCES += group-stdops.c
-libcatacomb_la_SOURCES += group-string.c
-libcatacomb_la_SOURCES += g-bin.c
-libcatacomb_la_SOURCES += g-prime.c
-libcatacomb_la_SOURCES += g-ec.c
-EXTRA_DIST += group-test.c
-TESTS += group-test.$t
-EXTRA_DIST += tests/group
-
-## Abstract finite fields.
-pkginclude_HEADERS += field.h field-guts.h
-libcatacomb_la_SOURCES += field.c
-libcatacomb_la_SOURCES += field-exp.c field-exp.h
-libcatacomb_la_SOURCES += field-parse.c
-libcatacomb_la_SOURCES += f-binpoly.c
-libcatacomb_la_SOURCES += f-niceprime.c
-libcatacomb_la_SOURCES += f-prime.c
-
-## Table of built-in binary fields.
-pkginclude_HEADERS += bintab.h
-libcatacomb_la_SOURCES += bintab.c
-CLEANFILES += bintab.c
-EXTRA_DIST += bintab.in bin-gentab.awk
-bintab.c: bintab.in bin-gentab.awk mpdump$e
- $(AM_V_GEN)awk -f $(srcdir)/bin-gentab.awk \
- <$(srcdir)/bintab.in >bintab.c.new && \
- mv bintab.c.new bintab.c
-
-## Table of built-in prime fields.
-pkginclude_HEADERS += ptab.h
-libcatacomb_la_SOURCES += ptab.c
-CLEANFILES += ptab.c
-EXTRA_DIST += ptab.in p-gentab.awk
-ptab.c: ptab.in p-gentab.awk mpdump$e
- $(AM_V_GEN)awk -f $(srcdir)/p-gentab.awk \
- <$(srcdir)/ptab.in >ptab.c.new && \
- mv ptab.c.new ptab.c
-
-## A utility for building multiprecision integer constants.
-noinst_PROGRAMS += mpdump
-mpdump_LDADD = libmpbase.la
-$(mpdump_OBJECTS): mptypes.h
-
-###--------------------------------------------------------------------------
-### Elliptic curve arithmetic.
-
-## Basic elliptic curve arithmetic.
-pkginclude_HEADERS += ec.h ec-guts.h
-libcatacomb_la_SOURCES += ec.c
-libcatacomb_la_SOURCES += ec-exp.c ec-exp.h
-libcatacomb_la_SOURCES += ec-info.c
-TESTS += ec-info.$t
-libcatacomb_la_SOURCES += ec-bin.c
-TESTS += ec-bin.$t
-libcatacomb_la_SOURCES += ec-prime.c
-TESTS += ec-prime.$t
-EXTRA_DIST += tests/ec
-
-## The standard `raw' encoding (`EC2OSP') of elliptic curve points.
-pkginclude_HEADERS += ec-raw.h
-libcatacomb_la_SOURCES += ec-raw.c
-
-## Test infrastructure for elliptic curves.
-pkginclude_HEADERS += ec-test.h
-libcatacomb_la_SOURCES += ec-test.c
-TESTS += ec-test.$t
-
-## A table of built-in elliptic curves.
-pkginclude_HEADERS += ectab.h
-libcatacomb_la_SOURCES += ectab.c
-CLEANFILES += ectab.c
-EXTRA_DIST += ectab.in ec-gentab.awk
-ectab.c: ectab.in ec-gentab.awk mpdump$e
- $(AM_V_GEN)awk -f $(srcdir)/ec-gentab.awk \
- <$(srcdir)/ectab.in >ectab.c.new && \
- mv ectab.c.new ectab.c
-
-###--------------------------------------------------------------------------
-### Autogenerated lists.
-
-## Fancy template substitutions.
-multigen = python $(srcdir)/multigen
-EXTRA_DIST += multigen
-
-## The heart of this is an enormous cross-product of crypto primitives and
-## the corresponding modes of operation. Rather than write it out longhand,
-## we generate it using `multigen'. Unfortunately, this needs to be done
-## at the Automake level, which causes some interesting bootstrapping
-## problems.
-include modes.am
-
-EXTRA_DIST += modes.am.in modes.am
-MAINTAINERCLEANFILES += $(srcdir)/modes.am
-
-## Generate the lists.
-$(srcdir)/modes.am: modes.am.in
- $(AM_V_GEN)$(multigen) -g $(srcdir)/modes.am.in $(srcdir)/modes.am \
- blkc="$(BLKCS)" \
- blkcmode="$(BLKCMODES)" \
- blkcciphermode="$(BLKCCIPHERMODES)" \
- hash="$(HASHES)" \
- hashmode="$(HASHMODES)" \
- hashciphermode="$(HASHCIPHERMODES)" \
- hashmacmode="$(HASHMACMODES)"
-
-## Initialize lists of known classes.
-ALL_CIPHERS = $(CIPHER_MODES)
-ALL_HASHES = $(HASHES)
-ALL_MACS = $(MAC_MODES)
-
-###--------------------------------------------------------------------------
-### Block ciphers.
-
-BLKCS =
-BLKCMODES =
-
-BLKCCIPHERMODES =
-BLKCMODES += $(BLKCCIPHERMODES)
-
-## A tool for translating the AES-contest test vectors into a form our test
-## rigs understand.
-EXTRA_DIST += tests/aes-trans
-
-## Block cipher utility macros, mainly used in mode implementations.
-pkginclude_HEADERS += blkc.h
-
-## Source code and headers for the block ciphers.
-libcatacomb_la_SOURCES += $(BLKC_C)
-pkginclude_HEADERS += $(BLKC_H)
-
-## Schneier's `Blowfish' block cipher.
-BLKCS += blowfish
-blowfish.lo: blowfish-tab.h
-CLEANFILES += blowfish-tab.h
-noinst_PROGRAMS += blowfish-mktab
-blowfish_mktab_CPPFLAGS = $(AM_CPPFLAGS) -DQUIET
-blowfish-tab.h: blowfish-mktab$e
- $(AM_V_GEN)./blowfish-mktab >blowfish-tab.h.new && \
- mv blowfish-tab.h.new blowfish-tab.h
-
-## Adams and Tavares' `CAST' block ciphers.
-BLKCS += cast128 cast256
-libcatacomb_la_SOURCES += cast-s.c cast-sk.c cast-base.h cast-tab.h
-cast256.$t: tests/cast256
-EXTRA_DIST += tests/cast256.aes
-MAINTAINERCLEANFILES += $(srcdir)/tests/cast256
-tests/cast256: tests/cast256.aes
- $(AM_V_GEN)$(srcdir)/tests/aes-trans CAST256 \
- <$(srcdir)/tests/cast256.aes \
- >$(srcdir)/tests/cast256.new && \
- mv $(srcdir)/tests/cast256.new $(srcdir)/tests/cast256
-
-## IBM's `DES' block cipher, by Feistel, Coppersmith, and others.
-BLKCS += des des3
-libcatacomb_la_SOURCES += des-base.h des-base.c desx-tab.h
-des-base.lo: des-tab.h
-CLEANFILES += des-tab.h
-noinst_PROGRAMS += des-mktab
-des-tab.h: des-mktab$e
- $(AM_V_GEN)./des-mktab >des-tab.h.new && \
- mv des-tab.h.new des-tab.h
-
-## Rivest's `DESX' variant, with pre- and post-whitening.
-BLKCS += desx
-libcatacomb_la_SOURCES += desx-tab.h
-
-## Lai and Massey's IDEA.
-BLKCS += idea
-
-## IBM's `MARS' block cipher.
-BLKCS += mars
-mars.lo: mars-tab.h
-CLEANFILES += mars-tab.h
-noinst_PROGRAMS += mars-mktab
-mars-tab.h: mars-mktab$e
- $(AM_V_GEN)./mars-mktab >mars-tab.h.new && \
- mv mars-tab.h.new mars-tab.h
-mars.$t: tests/mars
-EXTRA_DIST += tests/mars.aes
-MAINTAINERCLEANFILES += $(srcdir)/tests/mars
-tests/mars: tests/mars.aes
- $(AM_V_GEN)$(srcdir)/tests/aes-trans Mars \
- <$(srcdir)/tests/mars.aes \
- >$(srcdir)/tests/mars.new && \
- mv $(srcdir)/tests/mars.new $(srcdir)/tests/mars
-## Daemen, Peeters, Van Assche and Rijmen's `Noekeon'.
-BLKCS += noekeon
+## Basic utilities.
+SUBDIRS += base
+libcatacomb_la_LIBADD += base/libbase.la
-## Rivest's `RC2' block cipher.
-BLKCS += rc2
-libcatacomb_la_SOURCES += rc2-tab.h
+## Mathematical infrastructure.
+SUBDIRS += math
+libcatacomb_la_LIBADD += math/libmath.la
-## Rivest's `RC5'.
-BLKCS += rc5
+## Symmetric cryptography.
+SUBDIRS += symm
+libcatacomb_la_LIBADD += symm/libsymm.la
-## Daemen and Rijmen's `Rijndael' block cipher, selected as AES.
-BLKCS += rijndael rijndael192 rijndael256
-libcatacomb_la_SOURCES += rijndael-base.h rijndael-base.c
-rijndael-base.lo: rijndael-tab.h
-CLEANFILES += rijndael-tab.h
-noinst_PROGRAMS += rijndael-mktab
-rijndael-tab.h: rijndael-mktab$e
- $(AM_V_GEN)./rijndael-mktab >rijndael-tab.h.new && \
- mv rijndael-tab.h.new rijndael-tab.h
-rijndael.$t: tests/rijndael
-EXTRA_DIST += tests/rijndael.aes
-MAINTAINERCLEANFILES += $(srcdir)/tests/rijndael
-tests/rijndael: tests/rijndael.aes
- $(AM_V_GEN)$(srcdir)/tests/aes-trans Rijndael \
- <$(srcdir)/tests/rijndael.aes \
- >$(srcdir)/tests/rijndael.new && \
- mv $(srcdir)/tests/rijndael.new $(srcdir)/tests/rijndael
+## Key management.
+SUBDIRS += key
+libcatacomb_la_LIBADD += key/libkey.la
-## Massey's `SAFER' block ciphers.
-BLKCS += safer safersk
-safer.lo: safer-tab.h
-CLEANFILES += safer-tab.h
-noinst_PROGRAMS += safer-mktab
-safer-tab.h: safer-mktab$e
- $(AM_V_GEN)./safer-mktab >safer-tab.h.new && \
- mv safer-tab.h.new safer-tab.h
+## Miscellaneous cryptography.
+SUBDIRS += misc
+libcatacomb_la_LIBADD += misc/libmisc.la
-## Anderson, Biham and Knudsen's `Serpent' block cipher.
-BLKCS += serpent
-libcatacomb_la_SOURCES += serpent-sbox.h
-noinst_PROGRAMS += serpent-check
-TESTS += serpent-check
-serpent.$t: tests/serpent
-EXTRA_DIST += tests/serpent.aes
-MAINTAINERCLEANFILES += $(srcdir)/tests/serpent
-tests/serpent: tests/serpent.aes
- $(AM_V_GEN)$(srcdir)/tests/aes-trans Serpent -v rev=1 \
- <$(srcdir)/tests/serpent.aes \
- >$(srcdir)/tests/serpent.new && \
- mv $(srcdir)/tests/serpent.new $(srcdir)/tests/serpent
+## Public-key cryptography.
+SUBDIRS += pub
+libcatacomb_la_LIBADD += pub/libpub.la
-## The National Security Agency's `Skipjack' block cipher. You don't want to
-## use this.
-BLKCS += skipjack
-libcatacomb_la_SOURCES += skipjack-tab.h
+## Random number generators and related functionality.
+SUBDIRS += rand
+libcatacomb_la_LIBADD += rand/librand.la
-## Daemen and Rijmen's `Square' block cipher.
-BLKCS += square
-square.lo: square-tab.h
-CLEANFILES += square-tab.h
-noinst_PROGRAMS += square-mktab
-square-tab.h: square-mktab$e
- $(AM_V_GEN)./square-mktab >square-tab.h.new && \
- mv square-tab.h.new square-tab.h
-
-## Wheeler and Needham's `TEA' and `XTEA' block ciphers.
-BLKCS += tea xtea
-
-## Schneier, Kelsey, Whiting, Wagner, Hall and Ferguson's `Twofish' block
-## cipher.
-BLKCS += twofish
-twofish.lo: twofish-tab.h
-CLEANFILES += twofish-tab.h
-noinst_PROGRAMS += twofish-mktab
-twofish-tab.h: twofish-mktab$e
- $(AM_V_GEN)./twofish-mktab >twofish-tab.h.new && \
- mv twofish-tab.h.new twofish-tab.h
-twofish.$t: tests/twofish
-EXTRA_DIST += tests/twofish.aes
-MAINTAINERCLEANFILES += $(srcdir)/tests/twofish
-tests/twofish: tests/twofish.aes
- $(AM_V_GEN)$(srcdir)/tests/aes-trans Twofish \
- <$(srcdir)/tests/twofish.aes \
- >$(srcdir)/tests/twofish.new && \
- mv $(srcdir)/tests/twofish.new $(srcdir)/tests/twofish
-
-## The old NIST modes for DES.
-BLKCCIPHERMODES += cbc cfb ecb ofb
-
-## Counter mode.
-BLKCCIPHERMODES += counter
-
-###--------------------------------------------------------------------------
-### Hash functions.
-
-HASHES =
-HASHMODES =
-
-HASHCIPHERMODES =
-HASHMODES += $(HASHCIPHERMODES)
-
-HASHMACMODES =
-HASHMODES += $(HASHMACMODES)
-
-## Common definitions for hash functions.
-pkginclude_HEADERS += hash.h
-
-## Source code and headers for the hash functions.
-libcatacomb_la_SOURCES += $(HASH_C)
-pkginclude_HEADERS += $(HASH_H)
-
-## Lim and KISA's `HAS-160', recommended for use with KCDSA.
-HASHES += has160
-
-## Rivest's `MD' series of hash functions
-HASHES += md2 md4 md5
-libcatacomb_la_SOURCES += md2-tab.h
-
-## Dobbertin, Bosselaers and Preneel's `RIPEMD' suite.
-HASHES += rmd128 rmd160 rmd256 rmd320
-
-## The National Security Agency's `SHA-1' hash function.
-HASHES += sha
-
-## The National Security Agency's `SHA-2' suite.
-HASHES += sha224 sha256
-HASHES += sha384 sha512
-
-## Anderson and Biham's `Tiger' hash function.
-HASHES += tiger
-libcatacomb_la_SOURCES += tiger-base.h
-tiger.lo: tiger-tab.h
-CLEANFILES += tiger-tab.h
-noinst_PROGRAMS += tiger-mktab
-tiger-tab.h: tiger-mktab$e
- $(AM_V_GEN)./tiger-mktab >tiger-tab.h.new && \
- mv tiger-tab.h.new tiger-tab.h
-
-## Barreto and Rijmen's `Whirlpool' hash function.
-HASHES += whirlpool whirlpool256
-whirlpool.lo: whirlpool-tab.h
-CLEANFILES += whirlpool-tab.h
-noinst_PROGRAMS += whirlpool-mktab
-whirlpool-tab.h: whirlpool-mktab$e
- $(AM_V_GEN)./whirlpool-mktab >whirlpool-tab.h.new && \
- mv whirlpool-tab.h.new whirlpool-tab.h
-
-## Bellare, Canetti and Krawczyk's `HMAC' mode for message authentication.
-HASHMACMODES += hmac
-
-## MGF1, used in OAEP and PSS.
-HASHCIPHERMODES += mgf
-
-###--------------------------------------------------------------------------
-### Other symmetric primitives.
-
-## The CRC32 algorithm, which is useful, but has no worthwhile security.
-pkginclude_HEADERS += crc32.h
-libcatacomb_la_SOURCES += crc32.c
-ALL_HASHES += crc32=gcrc32
-
-## Rivest's `RC4' stream cipher.
-pkginclude_HEADERS += rc4.h
-libcatacomb_la_SOURCES += rc4.c
-TESTS += rc4.$t
-EXTRA_DIST += tests/rc4
-ALL_CIPHERS += rc4
-
-## Coppersmith and Rogaway's `SEAL' pseudorandom function.
-pkginclude_HEADERS += seal.h
-libcatacomb_la_SOURCES += seal.c
-TESTS += seal.$t
-EXTRA_DIST += tests/seal
-ALL_CIPHERS += seal
-###--------------------------------------------------------------------------
-### Autogenerated mode implementations.
-
-## The master stamp file, indicating that we generated all of the sources.
-CLEANFILES += modes-gen-stamp
-EXTRA_DIST += mode.h.in mode.c.in
-modes-gen-stamp:
- $(AM_V_at)touch modes-gen-stamp
- $(AM_V_GEN)$(multigen) -g $(srcdir)/mode.c.in \
- @base-@mode.c \
- base="$(BLKCS)" mode="$(BLKCMODES)"
- $(AM_V_at)$(multigen) -g $(srcdir)/mode.c.in \
- @base-@mode.c \
- base="$(HASHES)" mode="$(HASHMODES)"
- $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \
- @base-@mode.h \
- base="$(BLKCS)" mode="$(BLKCMODES)"
- $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \
- @base-@mode.h \
- base="$(HASHES)" mode="$(HASHMODES)"
- $(AM_V_at)touch modes-gen-stamp
-
-## The individual mode interfaces and implementations.
-pkginclude_HEADERS += $(MODE_H)
-
-## Generated implementations.
-BUILT_SOURCES += $(GENMODES_C)
-CLEANFILES += $(GENMODES_C)
-nodist_libcatacomb_la_SOURCES += $(GENMODES_C)
-$(GENMODES_C): modes-gen-stamp
-
-## Generated interfaces.
-BUILT_SOURCES += $(GENMODES_H)
-CLEANFILES += $(GENMODES_H)
-nodist_pkginclude_HEADERS += $(GENMODES_H)
-$(GENMODES_H): modes-gen-stamp
-
-###--------------------------------------------------------------------------
-### Tables of classes for encryption, hashing, and message authentication.
-
-## The skeleton for the class tables.
-EXTRA_DIST += gthingtab.c.in
-
-## Table of cipher classes.
-pkginclude_HEADERS += gcipher.h
-CLEANFILES += gciphertab.c
-nodist_libcatacomb_la_SOURCES += gciphertab.c
-gciphertab.c: gthingtab.c.in
- $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gciphertab.c \
- what=gcipher cls=gccipher thing="$(ALL_CIPHERS)"
-
-## Table of hash classes.
-pkginclude_HEADERS += ghash.h ghash-def.h
-CLEANFILES += ghashtab.c
-nodist_libcatacomb_la_SOURCES += ghashtab.c
-ghashtab.c: gthingtab.c.in
- $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in ghashtab.c \
- what=ghash cls=gchash thing="$(ALL_HASHES)"
-
-## Table of MAC classes.
-pkginclude_HEADERS += gmac.h
-CLEANFILES += gmactab.c
-nodist_libcatacomb_la_SOURCES += gmactab.c
-gmactab.c: gthingtab.c.in
- $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gmactab.c \
- what=gmac cls=gcmac thing="$(ALL_MACS)"
-
-###--------------------------------------------------------------------------
-### Testing for symmetric crypto things.
-
-## Run the test programs.
-TESTS += $(SYMM_TESTS)
-EXTRA_DIST += $(SYMM_TEST_FILES)
-
-## A piece of sample text for round-trip testing encryption modes.
-EXTRA_DIST += daftstory.h
-
-###--------------------------------------------------------------------------
-### Key management.
-
-## Assistance for elliptic-curve keys.
-pkginclude_HEADERS += ec-keys.h
-libcatacomb_la_SOURCES += ec-fetch.c
-
-## Managing keys and keyring files.
-pkginclude_HEADERS += key.h
-libcatacomb_la_SOURCES += key-attr.c
-libcatacomb_la_SOURCES += key-fetch.c
-libcatacomb_la_SOURCES += key-file.c
-libcatacomb_la_SOURCES += key-io.c
-libcatacomb_la_SOURCES += key-misc.c
-libcatacomb_la_SOURCES += key-moan.c
-
-## Managing key data.
-pkginclude_HEADERS += key-data.h
-libcatacomb_la_SOURCES += key-binary.c
-libcatacomb_la_SOURCES += key-data.c
-libcatacomb_la_SOURCES += key-flags.c
-libcatacomb_la_SOURCES += key-pack.c
-libcatacomb_la_SOURCES += key-pass.c
-libcatacomb_la_SOURCES += key-text.c
-
-## Error reporting.
-pkginclude_HEADERS += key-error.h
-libcatacomb_la_SOURCES += key-error.c
-
-## Reading passphrases.
-pkginclude_HEADERS += passphrase.h
-libcatacomb_la_SOURCES += passphrase.c
-
-## Interfacing with the passphrase pixie.
-pkginclude_HEADERS += pixie.h
-libcatacomb_la_SOURCES += pixie-common.c
-
-###--------------------------------------------------------------------------
-### Secret sharing.
-
-## Efficient sharing over GF(2^8).
-pkginclude_HEADERS += gfshare.h
-libcatacomb_la_SOURCES += gfshare.c
-gfshare.lo: gfshare-tab.h
-CLEANFILES += gfshare-tab.h
-noinst_PROGRAMS += gfshare-mktab
-gfshare-tab.h: gfshare-mktab$e
- $(AM_V_GEN)./gfshare-mktab >gfshare-tab.h.new && \
- mv gfshare-tab.h.new gfshare-tab.h
-TESTS += gfshare.$t
-
-## Number-theoretic sharing over GF(p).
-pkginclude_HEADERS += share.h
-libcatacomb_la_SOURCES += share.c
-TESTS += share.$t
-
-###--------------------------------------------------------------------------
-### Public-key cryptography.
-
-## The Blum--Blum--Shub random-bit generator.
-pkginclude_HEADERS += bbs.h
-libcatacomb_la_SOURCES += bbs-fetch.c
-libcatacomb_la_SOURCES += bbs-gen.c
-libcatacomb_la_SOURCES += bbs-jump.c
-TESTS += bbs-jump.$t
-libcatacomb_la_SOURCES += bbs-rand.c
-TESTS += bbs-rand.$t
-EXTRA_DIST += tests/bbs
-
-## Plain Diffie--Hellman, in Schorr groups.
-pkginclude_HEADERS += dh.h
-libcatacomb_la_SOURCES += dh-check.c
-libcatacomb_la_SOURCES += dh-fetch.c
-libcatacomb_la_SOURCES += dh-gen.c
-libcatacomb_la_SOURCES += dh-kcdsa.c
-libcatacomb_la_SOURCES += dh-limlee.c
-libcatacomb_la_SOURCES += dh-param.c
-TESTS += dh-param.$t
-
-## The National Security Agency's Digital Signature Algorithm.
-pkginclude_HEADERS += dsa.h
-libcatacomb_la_SOURCES += dsa-gen.c
-TESTS += dsa-gen.$t
-libcatacomb_la_SOURCES += dsa-misc.c
-libcatacomb_la_SOURCES += dsa-sign.c
-TESTS += dsa-sign.$t
-libcatacomb_la_SOURCES += dsa-verify.c
-TESTS += dsa-verify.$t
-libcatacomb_la_SOURCES += dsa-check.c
-EXTRA_DIST += tests/dsa
-
-## Generalization of DSA to arbitrary cyclic groups.
-pkginclude_HEADERS += gdsa.h
-libcatacomb_la_SOURCES += gdsa.c
-TESTS += gdsa.$t
-EXTRA_DIST += tests/gdsa
-
-## KISA `KCDSA', generalized to arbitrary cyclic groups.
-pkginclude_HEADERS += gkcdsa.h
-libcatacomb_la_SOURCES += gkcdsa.c
-TESTS += gkcdsa.$t
-EXTRA_DIST += tests/gkcdsa
-
-## General key validity checking machinery.
-pkginclude_HEADERS += keycheck.h
-libcatacomb_la_SOURCES += keycheck.c
-libcatacomb_la_SOURCES += keycheck-mp.c
-libcatacomb_la_SOURCES += keycheck-report.c
-
-## The Rivest--Shamir--Adleman trapdoor one-way function.
-pkginclude_HEADERS += rsa.h
-libcatacomb_la_SOURCES += rsa-fetch.c
-libcatacomb_la_SOURCES += rsa-gen.c
-libcatacomb_la_SOURCES += rsa-priv.c
-libcatacomb_la_SOURCES += rsa-pub.c
-libcatacomb_la_SOURCES += rsa-recover.c
-libcatacomb_la_SOURCES += oaep.c
-libcatacomb_la_SOURCES += pkcs1.c
-libcatacomb_la_SOURCES += pss.c
-EXTRA_DIST += rsa-test.c
-TESTS += rsa-test.$t
-EXTRA_DIST += tests/rsa
+## At this point, we should construct the library.
+SUBDIRS += .
###--------------------------------------------------------------------------
-### Random number generators.
-
-## The FIPS186 generator used to generate DSA domain parameters.
-pkginclude_HEADERS += dsarand.h
-libcatacomb_la_SOURCES += dsarand.c
-
-## Knuth's lagged-Fibonacci generator.
-pkginclude_HEADERS += fibrand.h
-libcatacomb_la_SOURCES += fibrand.c
-
-## The FIPS 140--2 random number generator tests.
-pkginclude_HEADERS += fipstest.h
-libcatacomb_la_SOURCES += fipstest.c
-
-## Interface for generic random number sources.
-pkginclude_HEADERS += grand.h
-libcatacomb_la_SOURCES += grand.c
+### Ancillary programs.
-## A simple linear-congruential generator.
-pkginclude_HEADERS += lcrand.h
-libcatacomb_la_SOURCES += lcrand.c
-TESTS += lcrand.$t
-EXTRA_DIST += tests/lcrand
-
-## Maurer's universal statistical test.
-pkginclude_HEADERS += maurer.h
-libcatacomb_la_SOURCES += maurer.c
-
-## System-specific noise acquisition.
-pkginclude_HEADERS += noise.h
-libcatacomb_la_SOURCES += noise.c
-
-## Cryptographic laundering for true random data generation.
-pkginclude_HEADERS += rand.h
-libcatacomb_la_SOURCES += rand.c
-
-## The SSL v3 pseudorandom function.
-pkginclude_HEADERS += sslprf.h
-libcatacomb_la_SOURCES += sslprf.c
-TESTS += sslprf.$t
-EXTRA_DIST += tests/sslprf
-
-## The TLS v1 pseudorandom function.
-pkginclude_HEADERS += tlsprf.h
-libcatacomb_la_SOURCES += tlsprf.c
-TESTS += tlsprf.$t
-EXTRA_DIST += tests/tlsprf
-
-###--------------------------------------------------------------------------
-### The `catcrypt' library.
-
-noinst_LTLIBRARIES += libcatcrypt.la
-libcatcrypt_la_SOURCES =
-
-## The main library.
-libcatcrypt_la_SOURCES += cc.h
-libcatcrypt_la_SOURCES += cc-enc.c
-libcatcrypt_la_SOURCES += cc-hash.c
-libcatcrypt_la_SOURCES += cc-kem.c
-libcatcrypt_la_SOURCES += cc-list.c
-libcatcrypt_la_SOURCES += cc-progress.c
-libcatcrypt_la_SOURCES += cc-sig.c
-libcatcrypt_la_SOURCES += cc-subcmd.c
-
-## Date parsing.
-libcatcrypt_la_SOURCES += getdate.h
-libcatcrypt_la_SOURCES += getdate.y
-
-###--------------------------------------------------------------------------
-### Utility programs.
-
-UTILS_LIBS = libcatcrypt.la libcatacomb.la $(mLib_LIBS) $(LIBS)
-
-## Generate and verify datestamped cookies.
-bin_PROGRAMS += cookie
-cookie_LDADD = $(UTILS_LIBS)
-dist_man_MANS += cookie.1
-
-## Asymmetric message encryption and decryption with deniable authentication.
-bin_PROGRAMS += catcrypt
-catcrypt_LDADD = $(UTILS_LIBS)
-dist_man_MANS += catcrypt.1
-
-## Signing and verifying files.
-bin_PROGRAMS += catsign
-catsign_LDADD = $(UTILS_LIBS)
-dist_man_MANS += catsign.1
-
-## Issue and verify signatures on directory trees.
-bin_PROGRAMS += dsig
-dsig_LDADD = $(UTILS_LIBS)
-dist_man_MANS += dsig.1
-
-## Compute factorials to arbitrary precision.
-bin_PROGRAMS += factorial
-factorial_LDADD = $(UTILS_LIBS)
-
-## Compute Fibonacci numbers to arbitrary precision.
-bin_PROGRAMS += fibonacci
-fibonacci_LDADD = $(UTILS_LIBS)
-
-## Compute hashes of files.
-bin_PROGRAMS += hashsum
-hashsum_LDADD = $(UTILS_LIBS)
-dist_man_MANS += hashsum.1
-
-## Key management utility.
-bin_PROGRAMS += key
-key_SOURCES = keyutil.c
-key_LDADD = $(UTILS_LIBS)
-dist_man_MANS += key.1 keyring.5
-
-## Generate passphrases with given entropy using wordlists and Markov models.
-bin_PROGRAMS += mkphrase
-mkphrase_LDADD = $(UTILS_LIBS)
-dist_man_MANS += mkphrase.1
-
-## Performance testing.
-bin_PROGRAMS += perftest
-perftest_LDADD = $(UTILS_LIBS)
-
-## Remember passphrases for limited periods of time.
-bin_PROGRAMS += pixie
-pixie_SOURCES = pixie.c
-pixie_LDADD = libcatacomb.la $(mLib_LIBS) $(PIXIE_LIBS)
-dist_man_MANS += pixie.1
-EXTRA_DIST += xpixie
-
-## Generate random data.
-bin_PROGRAMS += rspit
-rspit_LDADD = $(UTILS_LIBS)
-
-###--------------------------------------------------------------------------
-### Testing.
-
-SUFFIXES += .c .$t .to
-.c.to:
- $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@
-.to.$t: libcatacomb.la
- $(AM_V_CCLD)$(LINK) $< libcatacomb.la $(mLib_LIBS) $(LIBS)
-.PRECIOUS: %.to
-CLEANFILES += *.to *.$t
+SUBDIRS += progs
###--------------------------------------------------------------------------
### The pkg-config file.
## Additional build tools.
EXTRA_DIST += config/auto-version
+EXTRA_DIST += config/confsubst
###--------------------------------------------------------------------------
### Debian.
--- /dev/null
+### -*-makefile-*-
+###
+### Build script for basic utilities
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES = libbase.la
+libbase_la_SOURCES =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## The locked-memory arena.
+pkginclude_HEADERS += arena.h
+libbase_la_SOURCES += arena.c
+
+## Constant-type operations.
+pkginclude_HEADERS += ct.h
+libbase_la_SOURCES += ct.c
+
+## Acceptable key-size descriptions.
+pkginclude_HEADERS += keysz.h
+libbase_la_SOURCES += keysz.c keysz-conv.c
+
+## System-level memory locking.
+pkginclude_HEADERS += lmem.h
+libbase_la_SOURCES += lmem.c
+
+## Clearing secrets from memory.
+pkginclude_HEADERS += paranoia.h
+
+###----- That's all, folks --------------------------------------------------
/* -*-c-*-
- *
- * $Id: arena.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Abstraction for memory allocation arenas
*
/* -*-c-*-
- *
- * $Id: arena.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Abstraction for memory allocation arenas
*
/* -*-c-*-
- *
- * $Id: keysz.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* General block cipher utilities
*
/* -*-c-*-
- *
- * $Id$
*
* Locked memory allocation (Unix-specific)
*
/* -*-c-*-
- *
- * $Id: lmem.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Locked memory allocation
*
/* -*-c-*-
- *
- * $Id: paranoia.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Macros and functions for cryptographic paranoia
*
#! /bin/sh -ex
-if [ ! -r modes.am ]; then touch -t197001010000.00 modes.am; fi
+if [ ! -r symm/modes.am ]; then touch -t197001010000.00 symm/modes.am; fi
/* -*-apcalc-*-
- *
- * $Id: ec2.cal,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Testbed for elliptic curve arithmetic over binary fields
*
/* -*-apcalc-*-
- *
- * $Id: ecp.cal,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Testbed for elliptic curve arithmetic over prime fields
*
/* -*-apcalc-*-
- *
- * $Id: gfx-test.cal,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Generate test cases for %$\gf{2}[x]$% arithmetic
*
/* -*-apcalc-*-
- *
- * $Id: gfx.cal,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Testbed for %$\gf{2}$% poltnomial arithmetic
*
dnl--------------------------------------------------------------------------
dnl C programming environment.
+dnl Find out if we're cross-compiling.
+AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
+
dnl Various standard types.
AC_CHECK_TYPE([pid_t], [int])
AC_TYPE_UID_T
AC_CONFIG_HEADER([config/config.h])
AC_CONFIG_FILES(
- [Makefile])
+ [Makefile]
+ [base/Makefile]
+ [key/Makefile]
+ [math/Makefile]
+ [misc/Makefile]
+ [pub/Makefile]
+ [rand/Makefile]
+ [symm/Makefile]
+ [progs/Makefile])
AC_OUTPUT
dnl----- That's all, folks --------------------------------------------------
--- /dev/null
+### -*-makefile-*-
+###
+### Build script for key management
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES = libkey.la
+libkey_la_SOURCES =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Managing keys and keyring files.
+pkginclude_HEADERS += key.h
+libkey_la_SOURCES += key-attr.c
+libkey_la_SOURCES += key-fetch.c
+libkey_la_SOURCES += key-file.c
+libkey_la_SOURCES += key-io.c
+libkey_la_SOURCES += key-misc.c
+libkey_la_SOURCES += key-moan.c
+
+## Managing key data.
+pkginclude_HEADERS += key-data.h
+libkey_la_SOURCES += key-binary.c
+libkey_la_SOURCES += key-data.c
+libkey_la_SOURCES += key-flags.c
+libkey_la_SOURCES += key-pack.c
+libkey_la_SOURCES += key-pass.c
+libkey_la_SOURCES += key-text.c
+
+## Error reporting.
+pkginclude_HEADERS += key-error.h
+libkey_la_SOURCES += key-error.c
+
+## Reading passphrases.
+pkginclude_HEADERS += passphrase.h
+libkey_la_SOURCES += passphrase.c
+
+## Interfacing with the passphrase pixie.
+pkginclude_HEADERS += pixie.h
+libkey_la_SOURCES += pixie-common.c
+
+###----- That's all, folks --------------------------------------------------
/* -*-c-*-
- *
- * $Id$
*
* Key attribute manipulation
*
/* -*-c-*-
- *
- * $Id$
*
* Key binary encoding
*
/* -*-c-*-
- *
- * $Id$
*
* Encoding and decoding of key data
*
/* -*-c-*-
- *
- * $Id$
*
* Manipulating key data
*
/* -*-c-*-
- *
- * $Id$
*
* Translating key error codes into strings
*
/* -*-c-*-
- *
- * $Id$
*
* Key management error codes
*
/* -*-c-*-
- *
- * $Id$
*
* Higher-level key unpacking
*
/* -*-c-*-
- *
- * $Id$
*
* System-dependent key filing operations
*
/* -*-c-*-
- *
- * $Id$
*
* Reading and writing key flag strings
*
/* -*-c-*-
- *
- * $Id$
*
* Adding new keys to a key file
*
/* -*-c-*-
- *
- * $Id$
*
* Simple key management
*
/* -*-c-*-
- *
- * $Id: key-moan.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Standard error handling function for key loading
*
/* -*-c-*-
- *
- * $Id$
*
* Packing and unpacking key data
*
/* -*-c-*-
- *
- * $Id$
*
* Encrypting keys with passphrases
*
/* -*-c-*-
- *
- * $Id$
*
* Key textual encoding
*
/* -*-c-*-
- *
- * $Id$
*
* Simple key management
*
/* -*-c-*-
- *
- * $Id$
*
* Reading of passphrases (Unix-specific)
*
/* -*-c-*-
- *
- * $Id$
*
* Reading passphrases
*
/* -*-c-*-
- *
- * $Id$
*
* Common code for Pixie client and server (Unix-specific)
*
/* -*-c-*-
- *
- * $Id: pixie.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Passphrase pixie definitions (Unix-specific)
*
%%% -*-latex-*-
%%%
-%%% $Id: catacomb.tex,v 1.3 2004/04/08 01:36:15 mdw Exp $
-%%%
%%% Catacomb manual
%%%
%%% (c) 1999 Straylight/Edgeware
--- /dev/null
+### -*-makefile-*-
+###
+### Build script for mathematical infrastructure
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES = libmath.la
+libmath_la_SOURCES =
+nodist_libmath_la_SOURCES =
+libmath_la_LIBADD =
+
+TEST_LIBS = libmath.la
+
+###--------------------------------------------------------------------------
+### Main multiprecision integer library.
+
+## This library is unfortunately intertwined with some of the code generation
+## programs, so we must be rather careful. The important bits of the maths
+## library needed by these programs is separated out into `libmpbase'. There
+## is work going on to fix this unpleasant situation by generating the
+## relevant files from Python scripts rather than C programs, using
+## information gathered by `configure'.
+noinst_LTLIBRARIES += libmpbase.la
+libmath_la_LIBADD += libmpbase.la
+libmpbase_la_LIBADD = $(mLib_LIBS)
+libmpbase_la_SOURCES =
+$(libmpbase_la_OBJECTS): mptypes.h
+
+## Additional buffer I/O functions for mathematical objects.
+pkginclude_HEADERS += buf.h
+libmath_la_SOURCES += buf.c
+
+## Infrastructure for fast exponentiation.
+pkginclude_HEADERS += exp.h
+libmath_la_SOURCES += exp.c
+
+## Main user-visible multiprecision arithmetic.
+pkginclude_HEADERS += mp.h
+libmpbase_la_SOURCES += mp-arith.c
+TESTS += mp-arith.$t
+libmpbase_la_SOURCES += mp-const.c
+libmath_la_SOURCES += mp-exp.c mp-exp.h
+libmath_la_SOURCES += mp-gcd.c
+TESTS += mp-gcd.$t
+libmpbase_la_SOURCES += mp-io.c
+libmath_la_SOURCES += mp-jacobi.c
+TESTS += mp-jacobi.$t
+libmpbase_la_SOURCES += mp-mem.c
+libmpbase_la_SOURCES += mp-misc.c
+libmath_la_SOURCES += mp-modexp.c
+TESTS += mp-modexp.$t
+libmath_la_SOURCES += mp-modsqrt.c
+TESTS += mp-modsqrt.$t
+libmath_la_SOURCES += mp-sqrt.c
+TESTS += mp-sqrt.$t
+libmath_la_SOURCES += mp-test.c
+EXTRA_DIST += t/mp
+
+## Computing Fibonacci numbers.
+pkginclude_HEADERS += mp-fibonacci.h
+libmath_la_SOURCES += mp-fibonacci.c
+TESTS += mp-fibonacci.$t
+
+## Special memory allocation for multiprecision integers.
+pkginclude_HEADERS += mparena.h
+libmpbase_la_SOURCES += mparena.c
+
+## Barrett reduction, an efficient method for modular reduction.
+pkginclude_HEADERS += mpbarrett.h
+libmath_la_SOURCES += mpbarrett.c
+TESTS += mpbarrett.$t
+libmath_la_SOURCES += mpbarrett-exp.c mpbarrett-mexp.c mpbarrett-exp.h
+TESTS += mpbarrett-exp.$t mpbarrett-mexp.$t
+TESTS += mpbarrett.$t
+EXTRA_DIST += t/mpbarrett
+
+## Solving congruences using the Chinese Remainder Theorem.
+pkginclude_HEADERS += mpcrt.h
+libmath_la_SOURCES += mpcrt.c
+TESTS += mpcrt.$t
+EXTRA_DIST += t/mpcrt
+
+## Conversions between machine-native and multiprecision integers.
+pkginclude_HEADERS += mpint.h
+libmath_la_SOURCES += mpint.c
+TESTS += mpint.$t
+EXTRA_DIST += t/mpint
+
+## Table of upper and lower limits of various types of machine integers, as
+## multiprecision integers.
+nodist_archinclude_HEADERS += mplimits.h
+nodist_libmath_la_SOURCES += mplimits.c
+CLEANFILES += mplimits.h mplimits.c
+noinst_PROGRAMS += genlimits
+genlimits_LDADD = libmpbase.la
+mplimits.c: genlimits$e
+ $(AM_V_GEN)./genlimits c >mplimits.c.new && \
+ mv mplimits.c.new mplimits.c
+mplimits.h: genlimits$e
+ $(AM_V_GEN)./genlimits h >mplimits.h.new && \
+ mv mplimits.h.new mplimits.h
+$(genlimits_OBJECTS): mptypes.h
+mplimits.lo: mplimits.h
+
+## Montgomery reduction, a clever method for modular arithmetic.
+pkginclude_HEADERS += mpmont.h
+libmath_la_SOURCES += mpmont.c
+TESTS += mpmont.$t
+libmath_la_SOURCES += mpmont-exp.c mpmont-mexp.c mpmont-exp.h
+TESTS += mpmont-exp.$t mpmont-mexp.$t
+EXTRA_DIST += t/mpmont
+
+## Efficient multiplication of many small numbers.
+pkginclude_HEADERS += mpmul.h
+libmath_la_SOURCES += mpmul.c
+TESTS += mpmul.$t
+
+## Generating random numbers.
+pkginclude_HEADERS += mprand.h
+libmath_la_SOURCES += mprand.c
+
+## Efficient reduction modulo numbers with conveninent binary
+## representations.
+pkginclude_HEADERS += mpreduce.h
+libmath_la_SOURCES += mpreduce.c mpreduce-exp.h
+TESTS += mpreduce.$t
+EXTRA_DIST += t/mpreduce
+
+## Iteratiion over the bianry representation of multiprecision integers.
+pkginclude_HEADERS += mpscan.h
+libmpbase_la_SOURCES += mpscan.c
+
+## Conversion between multiprecision integers and their textual
+## representations.
+pkginclude_HEADERS += mptext.h
+libmpbase_la_SOURCES += mptext.c
+TESTS += mptext.$t
+libmath_la_SOURCES += mptext-dstr.c
+libmath_la_SOURCES += mptext-file.c
+libmath_la_SOURCES += mptext-len.c
+libmpbase_la_SOURCES += mptext-string.c
+EXTRA_DIST += t/mptext
+
+## Basic types used in the representation of multiprecision integers.
+nodist_archinclude_HEADERS += mptypes.h
+BUILT_SOURCES += mptypes.h
+CLEANFILES += mptypes.h
+noinst_PROGRAMS += mptypes
+mptypes.h: mptypes$e
+ $(AM_V_GEN)./mptypes >mptypes.h.new && mv mptypes.h.new mptypes.h
+
+## Low-level multiprecision arithmetic.
+pkginclude_HEADERS += mpx.h bitops.h mpw.h
+libmpbase_la_SOURCES += mpx.c
+TESTS += mpx.$t
+libmpbase_la_SOURCES += karatsuba.h mpx-kmul.c mpx-ksqr.c
+TESTS += mpx-kmul.$t mpx-ksqr.$t
+noinst_PROGRAMS += bittest
+TESTS += bittest
+EXTRA_DIST += t/mpx
+
+## A quick-and-dirty parser, used for parsing descriptions of groups, fields,
+## etc.
+pkginclude_HEADERS += qdparse.h
+libmath_la_SOURCES += qdparse.c
+
+## Pollard's `rho' algorithm for determining discrete logarithms.
+pkginclude_HEADERS += rho.h
+libmath_la_SOURCES += rho.c
+TESTS += rho.$t
+
+###--------------------------------------------------------------------------
+### Prime number checking, searching, and related jobs.
+
+## Generating Lim--Lee groups, i.e., unit groups of finite fields without
+## small subgroups (except for the obvious ones).
+pkginclude_HEADERS += limlee.h
+libmath_la_SOURCES += limlee.c
+
+## A table of small prime numbers.
+nodist_pkginclude_HEADERS += primetab.h
+nodist_libmath_la_SOURCES += primetab.c
+CLEANFILES += primetab.h primetab.c
+BUILT_SOURCES += primetab.h primetab.c
+noinst_PROGRAMS += genprimes
+genprimes_LDADD = $(mLib_LIBS)
+primetab.h: primetab.c
+primetab.c: genprimes$e
+ $(AM_V_GEN)./genprimes -hprimetab.h -cprimetab.c \
+ -sCATACOMB_PRIMETAB_H \
+ -n256 -t"unsigned short" -iprimetab
+
+## Filtering candidate prime numbers by checking for small factors
+## efficiently.
+pkginclude_HEADERS += pfilt.h
+libmath_la_SOURCES += pfilt.c
+
+## Generating prime numbers (and other kinds of numbers which need searching
+## for).
+pkginclude_HEADERS += pgen.h
+libmath_la_SOURCES += pgen.c
+libmath_la_SOURCES += pgen-gcd.c
+libmath_la_SOURCES += pgen-simul.c
+libmath_la_SOURCES += pgen-stdev.c
+TESTS += pgen.$t
+EXTRA_DIST += t/pgen
+
+## Finding primitive elements in finite fields.
+pkginclude_HEADERS += prim.h
+libmath_la_SOURCES += prim.c
+
+## Iterating over all prime numbers from a given starting point.
+pkginclude_HEADERS += primeiter.h
+libmath_la_SOURCES += primeiter.c
+TESTS += primeiter.$t
+primeiter.lo: wheel.h
+
+## The Miller--Rabin primality test.
+pkginclude_HEADERS += rabin.h
+libmath_la_SOURCES += rabin.c
+
+## Finding `strong' primes, using Gordon's algorithm. Once upon a time,
+## products of these kinds of numbers were harder to factor.
+pkginclude_HEADERS += strongprime.h
+libmath_la_SOURCES += strongprime.c
+
+## A `wheel', used by the prime iteration machinery.
+nodist_pkginclude_HEADERS += wheel.h
+nodist_libmath_la_SOURCES += wheel.c
+CLEANFILES += wheel.h wheel.c
+noinst_PROGRAMS += genwheel
+genwheel_LDADD = $(mLib_LIBS)
+wheel.h: wheel.c
+wheel.c: genwheel$e
+ $(AM_V_GEN)./genwheel -hwheel.h -cwheel.c \
+ -sCATACOMB_WHEEL_H \
+ -n5 -t"unsigned char" -iwheel
+
+###--------------------------------------------------------------------------
+### Binary polynomial arithmetic.
+
+## User-visible binary polynomial arithmetic.
+pkginclude_HEADERS += gf.h
+libmath_la_SOURCES += gf-arith.c
+TESTS += gf-arith.$t
+libmath_la_SOURCES += gf-exp.c gf-exp.h
+libmath_la_SOURCES += gf-gcd.c
+TESTS += gf-gcd.$t
+EXTRA_DIST += t/gf
+
+## Low-level binary polynomial arithmetic.
+pkginclude_HEADERS += gfx.h
+libmath_la_SOURCES += gfx.c
+TESTS += gfx.$t
+libmath_la_SOURCES += gfx-kmul.c
+TESTS += gfx-kmul.$t
+libmath_la_SOURCES += gfx-sqr.c
+gfx-sqr.lo: gfx-sqr-tab.h
+TESTS += gfx-sqr.$t
+CLEANFILES += gfx-sqr-tab.h
+noinst_PROGRAMS += gfx-sqr-mktab
+gfx-sqr-tab.h: gfx-sqr-mktab$e
+ $(AM_V_GEN)./gfx-sqr-mktab >gfx-sqr-tab.h.in && \
+ mv gfx-sqr-tab.h.in gfx-sqr-tab.h
+EXTRA_DIST += t/gfx
+
+## Conversions between normal and polynomial basis representations for binary
+## fields.
+pkginclude_HEADERS += gfn.h
+libmath_la_SOURCES += gfn.c
+TESTS += gfn.$t
+EXTRA_DIST += t/gfn
+
+## Efficient reduction modulo sparse polynomials.
+pkginclude_HEADERS += gfreduce.h
+libmath_la_SOURCES += gfreduce.c gfreduce-exp.h
+TESTS += gfreduce.$t
+EXTRA_DIST += t/gfreduce
+
+###--------------------------------------------------------------------------
+### Abstractions for various kinds of algebraic objects.
+
+## Abstract cyclic groups.
+pkginclude_HEADERS += group.h group-guts.h
+libmath_la_SOURCES += group-dstr.c
+libmath_la_SOURCES += group-exp.c group-exp.h
+libmath_la_SOURCES += group-file.c
+libmath_la_SOURCES += group-parse.c
+libmath_la_SOURCES += group-stdops.c
+libmath_la_SOURCES += group-string.c
+libmath_la_SOURCES += g-bin.c
+libmath_la_SOURCES += g-prime.c
+libmath_la_SOURCES += g-ec.c
+EXTRA_DIST += group-test.c
+TESTS += group-test.$t
+EXTRA_DIST += t/group
+
+## Abstract finite fields.
+pkginclude_HEADERS += field.h field-guts.h
+libmath_la_SOURCES += field.c
+libmath_la_SOURCES += field-exp.c field-exp.h
+libmath_la_SOURCES += field-parse.c
+libmath_la_SOURCES += f-binpoly.c
+libmath_la_SOURCES += f-niceprime.c
+libmath_la_SOURCES += f-prime.c
+
+## Table of built-in binary fields.
+pkginclude_HEADERS += bintab.h
+libmath_la_SOURCES += bintab.c
+CLEANFILES += bintab.c
+EXTRA_DIST += bintab.in bin-gentab.awk
+bintab.c: bintab.in bin-gentab.awk mpdump$e
+ $(AM_V_GEN)awk -f $(srcdir)/bin-gentab.awk \
+ <$(srcdir)/bintab.in >bintab.c.new && \
+ mv bintab.c.new bintab.c
+
+## Table of built-in prime fields.
+pkginclude_HEADERS += ptab.h
+libmath_la_SOURCES += ptab.c
+CLEANFILES += ptab.c
+EXTRA_DIST += ptab.in p-gentab.awk
+ptab.c: ptab.in p-gentab.awk mpdump$e
+ $(AM_V_GEN)awk -f $(srcdir)/p-gentab.awk \
+ <$(srcdir)/ptab.in >ptab.c.new && \
+ mv ptab.c.new ptab.c
+
+## A utility for building multiprecision integer constants.
+noinst_PROGRAMS += mpdump
+mpdump_LDADD = libmpbase.la
+$(mpdump_OBJECTS): mptypes.h
+
+###--------------------------------------------------------------------------
+### Elliptic curve arithmetic.
+
+## Basic elliptic curve arithmetic.
+pkginclude_HEADERS += ec.h ec-guts.h
+libmath_la_SOURCES += ec.c
+libmath_la_SOURCES += ec-exp.c ec-exp.h
+libmath_la_SOURCES += ec-info.c
+TESTS += ec-info.$t
+libmath_la_SOURCES += ec-bin.c
+TESTS += ec-bin.$t
+libmath_la_SOURCES += ec-prime.c
+TESTS += ec-prime.$t
+EXTRA_DIST += t/ec
+
+## The standard `raw' encoding (`EC2OSP') of elliptic curve points.
+pkginclude_HEADERS += ec-raw.h
+libmath_la_SOURCES += ec-raw.c
+
+## Assistance for elliptic-curve keys.
+pkginclude_HEADERS += ec-keys.h
+libmath_la_SOURCES += ec-fetch.c
+
+## Test infrastructure for elliptic curves.
+pkginclude_HEADERS += ec-test.h
+libmath_la_SOURCES += ec-test.c
+TESTS += ec-test.$t
+
+## A table of built-in elliptic curves.
+pkginclude_HEADERS += ectab.h
+libmath_la_SOURCES += ectab.c
+CLEANFILES += ectab.c
+EXTRA_DIST += ectab.in ec-gentab.awk
+ectab.c: ectab.in ec-gentab.awk mpdump$e
+ $(AM_V_GEN)awk -f $(srcdir)/ec-gentab.awk \
+ <$(srcdir)/ectab.in >ectab.c.new && \
+ mv ectab.c.new ectab.c
+
+###----- That's all, folks --------------------------------------------------
#! /usr/bin/awk -f
-#
-# $Id: p-gentab.awk 2187 2004-09-04 07:50:08Z mdw $
-function banner(name, s, i)
+function banner(name, s, i)
{
s = "/*----- " name " ";
while (length(s) < 75) s = s "-";
/* -*-c-*-
- *
- * $Id$
*
* Table of standard (ish) binary groups
*
-# $Id$
-#
# Standard binary groups
#----- From P1363 annex A ---------------------------------------------------
/* -*-c-*-
- *
- * $Id: bitops.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Bit operations by truth table
*
/* -*-c-*-
- *
- * $Id: bittest.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Check the bit operations work
*
/* -*-c-*-
- *
- * $Id$
*
* Buffer handling
*
/* -*-c-*-
- *
- * $Id$
*
* Reading and writing packet buffers
*
/* -*-c-*-
- *
- * $Id$
*
* Arithmetic for elliptic curves over binary fields
*
/* -*-c-*-
- *
- * $Id$
*
* Point multiplication for elliptic curves
*
/* -*-c-*-
- *
- * $Id: ec-exp.h,v 1.6 2004/04/08 01:36:15 mdw Exp $
*
* Exponentiation operations for elliptic curves
*
/* -*-c-*-
- *
- * $Id: ec-fetch.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Key fetching for elliptic curve public and private keys
*
#! /usr/bin/awk -f
-#
-# $Id: ec-gentab.awk,v 1.1 2004/04/01 21:28:41 mdw Exp $
-function banner(name, s, i)
+function banner(name, s, i)
{
s = "/*----- " name " ";
while (length(s) < 75) s = s "-";
/* -*-c-*-
- *
- * $Id$
*
* Internal structures for built-in elliptic curve types
*
/* -*-c-*-
- *
- * $Id$
*
* Elliptic curve information management
*
/* -*-c-*-
- *
- * $Id: ec-keys.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Elliptic curve key-fetching
*
/* -*-c-*-
- *
- * $Id$
*
* Elliptic curves over prime fields
*
/* -*-c-*-
- *
- * $Id: ec-raw.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Raw formatting of elliptic curve points
*
/* -*-c-*-
- *
- * $Id: ec-raw.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Raw formatting of elliptic curve points
*
/* -*-c-*-
- *
- * $Id$
*
* Code for testing elliptic-curve stuff
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/ec");
+ test_run(argc, argv, tests, SRCDIR "/t/ec");
return (0);
}
/* -*-c-*-
- *
- * $Id: ec-test.h,v 1.3 2004/04/08 16:17:32 mdw Exp $
*
* Elliptic curve test functions
*
/* -*-c-*-
- *
- * $Id$
*
* Elliptic curve definitions
*
/* -*-c-*-
- *
- * $Id$
*
* Elliptic curve definitions
*
/* -*-c-*-
- *
- * $Id: ectab.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Table of standard elliptic curves
*
-# $Id$
-#
# Standard ellipic curves
#----- Curves from SEC2 -----------------------------------------------------
/* -*-c-*-
- *
- * $Id: exp.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Generalized exponentiation
*
/* -*-c-*-
- *
- * $Id$
*
* Generalized exponentiation
*
/* -*-c-*-
- *
- * $Id$
*
* Binary fields with polynomial basis representation
*
/* -*-c-*-
- *
- * $Id$
*
* Prime fields with efficient reduction for special-form primes
*
/* -*-c-*-
- *
- * $Id$
*
* Prime fields with Montgomery arithmetic
*
/* -*-c-*-
- *
- * $Id$
*
* Exponentiation in finite fields
*
/* -*-c-*-
- *
- * $Id$
*
* Exponentiation in finite fields
*
/* -*-c-*-
- *
- * $Id$
*
* Internal structures for built-in fields
*
/* -*-c-*-
- *
- * $Id: field-parse.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Parse field descriptions
*
/* -*-c-*-
- *
- * $Id$
*
* Abstract field operations
*
/* -*-c-*-
- *
- * $Id$
*
* Definitions for field arithmetic
*
/* -*-c-*-
- *
- * $Id$
*
* Abstraction for prime groups
*
/* -*-c-*-
- *
- * $Id$
*
* Abstraction for elliptic curve groups
*
/* -*-c-*-
- *
- * $Id$
*
* Abstraction for prime groups
*
/* -*-c-*-
- *
- * $Id$
*
* Generate limit MPs for C types
*
/* -*-c-*-
- *
- * $Id: genprimes.c,v 1.7 2004/04/08 01:36:15 mdw Exp $
*
* Generate prime number table
*
/* -*-c-*-
- *
- * $Id$
*
* Basic arithmetic on binary polynomials
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/gf");
+ test_run(argc, argv, tests, SRCDIR "/t/gf");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Exponentiation for binary polynomials
*
/* -*-c-*-
- *
- * $Id$
*
* Exponentiation for binary polynomials
*
/* -*-c-*-
- *
- * $Id$
*
* Euclidian algorithm on binary polynomials
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/gf");
+ test_run(argc, argv, tests, SRCDIR "/t/gf");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Arithmetic on binary polynomials
*
/* -*-c-*-
- *
- * $Id: gfn.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Normal-basis translation for binary fields
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, tests, SRCDIR "/tests/gfn");
+ test_run(argc, argv, tests, SRCDIR "/t/gfn");
return (0);
}
/* -*-c-*-
- *
- * $Id: gfn.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Normal-basis translation for binary fields
*
/* -*-c-*-
- *
- * $Id: gfreduce-exp.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Exponentiation operations for binary field reduction
*
/* -*-c-*-
- *
- * $Id$
*
* Efficient reduction modulo sparse binary polynomials
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/gfreduce");
+ test_run(argc, argv, defs, SRCDIR"/t/gfreduce");
return (0);
}
/* -*-c-*-
- *
- * $Id: gfreduce.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Reduction modulo sparse binary polynomials
*
/* -*-c-*-
- *
- * $Id$
*
* Karatsuba's multiplication algorithm on binary polynomials
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/gfx");
+ test_run(argc, argv, defs, SRCDIR"/t/gfx");
return (0);
}
/* -*-c-*-
- *
- * $Id: gfx-sqr-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Build table for squaring of binary polynomials
*
/* -*-c-*-
- *
- * $Id$
*
* Sqaring binary polynomials
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/gfx");
+ test_run(argc, argv, defs, SRCDIR"/t/gfx");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Low-level arithmetic on binary polynomials
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/gfx");
+ test_run(argc, argv, defs, SRCDIR"/t/gfx");
return (0);
}
/* -*-c-*-
- *
- * $Id: gfx.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Low-level arithmetic on binary polynomials
*
/* -*-c-*-
- *
- * $Id: group-dstr.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Dynamic string I/O for group elements
*
/* -*-c-*-
- *
- * $Id$
*
* Exponentiation for abstract groups
*
/* -*-c-*-
- *
- * $Id: group-exp.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Exponentiation operations for abstract groups
*
/* -*-c-*-
- *
- * $Id: group-file.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* File I/O for group elements
*
/* -*-c-*-
- *
- * $Id$
*
* Internal structures for built-in groups
*
/* -*-c-*-
- *
- * $Id: group-parse.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Parse group description strings
*
/* -*-c-*-
- *
- * $Id$
*
* Standard group operations
*
/* -*-c-*-
- *
- * $Id: group-string.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* String I/O for group elements
*
/* -*-c-*-
- *
- * $Id: group-test.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Testing group operations
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/group");
+ test_run(argc, argv, tests, SRCDIR "/t/group");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* General cyclic group abstraction
*
/* -*-c-*-
- *
- * $Id: karatsuba.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Macros for Karatsuba functions
*
/* -*-c-*-
- *
- * $Id: limlee.c,v 1.9 2004/04/08 01:36:15 mdw Exp $
*
* Generate Lim-Lee primes
*
/* -*-c-*-
- *
- * $Id: limlee.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Generate Lim-Lee primes
*
/* -*-c-*-
- *
- * $Id$
*
* Basic arithmetic on multiprecision integers
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mp");
+ test_run(argc, argv, tests, SRCDIR "/t/mp");
return (0);
}
/* -*-c-*-
- *
- * $Id: mp-const.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Useful multiprecision constants
*
/* -*-c-*-
- *
- * $Id$
*
* Exponentiation for large integers
*
/* -*-c-*-
- *
- * $Id$
*
* Exponentiation for large integers
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, tests, SRCDIR "/tests/mp");
+ test_run(argc, argv, tests, SRCDIR "/t/mp");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Extended GCD calculation
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mp");
+ test_run(argc, argv, tests, SRCDIR "/t/mp");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Loading and storing of multiprecision integers
*
/* -*-c-*-
- *
- * $Id$
*
* Compute Jacobi symbol
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mp");
+ test_run(argc, argv, tests, SRCDIR "/t/mp");
return (0);
}
/* -*-c-*-
- *
- * $Id: mp-mem.c,v 1.8 2004/04/08 16:17:32 mdw Exp $
*
* Memory management for multiprecision numbers
*
/* -*-c-*-
- *
- * $Id: mp-misc.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Miscellaneous multiprecision support functions
*
/* -*-c-*-
- *
- * $Id$
*
* General-purpose modular exponentiation
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mp");
+ test_run(argc, argv, tests, SRCDIR "/t/mp");
return (0);
}
/* -*-c-*-
- *
- * $Id: mp-modsqrt.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Compute square roots modulo a prime
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mp");
+ test_run(argc, argv, tests, SRCDIR "/t/mp");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Compute integer square roots
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mp");
+ test_run(argc, argv, tests, SRCDIR "/t/mp");
return (0);
}
/* -*-c-*-
- *
- * $Id: mp-test.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Testing functionality for multiprecision integers
*
/* -*-c-*-
- *
- * $Id$
*
* Simple multiprecision arithmetic
*
/* -*-c-*-
- *
- * $Id$
*
* Allocation and freeing of MP buffers
*
/* -*-c-*-
- *
- * $Id: mparena.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Allocation and freeing of MP buffers
*
/* -*-c-*-
- *
- * $Id$
*
* Modular exponentiation using Barrett reduction
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mpbarrett");
+ test_run(argc, argv, tests, SRCDIR "/t/mpbarrett");
return (0);
}
/* -*-c-*-
- *
- * $Id: mpbarrett-exp.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Exponentiation operations for Barrett reduction
*
/* -*-c-*-
- *
- * $Id$
*
* Multiple simultaneous exponentiations
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mpbarrett");
+ test_run(argc, argv, tests, SRCDIR "/t/mpbarrett");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Barrett modular reduction
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mpbarrett");
+ test_run(argc, argv, tests, SRCDIR "/t/mpbarrett");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Barrett modular reduction
*
/* -*-c-*-
- *
- * $Id$
*
* Chinese Remainder Theorem computations (Gauss's algorithm)
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mpcrt");
+ test_run(argc, argv, tests, SRCDIR "/t/mpcrt");
return (0);
}
/* -*-c-*-
- *
- * $Id: mpcrt.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Chinese Remainder Theorem computations (Gauss's algorithm)
*
/* -*-c-*-
- *
- * $Id: mpdump.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Dump a multiprecision integer as C data
*
/* -*-c-*-
- *
- * $Id: mpint.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Conversion between MPs and standard C integers
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mpint");
+ test_run(argc, argv, tests, SRCDIR "/t/mpint");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Conversion between MPs and standard C integers
*
/* -*-c-*-
- *
- * $Id$
*
* Modular exponentiation with Montgomery reduction
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mpmont");
+ test_run(argc, argv, tests, SRCDIR "/t/mpmont");
return (0);
}
/* -*-c-*-
- *
- * $Id: mpmont-exp.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Exponentiation operations for Montgomery reduction
*
/* -*-c-*-
- *
- * $Id$
*
* Multiple simultaneous exponentiations
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mpmont");
+ test_run(argc, argv, tests, SRCDIR "/t/mpmont");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Montgomery reduction
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mpmont");
+ test_run(argc, argv, tests, SRCDIR "/t/mpmont");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Montgomery reduction
*
/* -*-c-*-
- *
- * $Id: mpmul.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Multiply many small numbers together
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, tests, SRCDIR "/tests/mp");
+ test_run(argc, argv, tests, SRCDIR "/t/mp");
return (0);
}
/* -*-c-*-
- *
- * $Id: mpmul.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Multiply many small numbers together
*
/* -*-c-*-
- *
- * $Id: mprand.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Generate a random multiprecision integer
*
/* -*-c-*-
- *
- * $Id: mprand.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Generate a random multiprecision integer
*
/* -*-c-*-
- *
- * $Id: mpreduce-exp.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Exponentiation operations for binary field reduction
*
/* -*-c-*-
- *
- * $Id$
*
* Efficient reduction modulo nice primes
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/mpreduce");
+ test_run(argc, argv, defs, SRCDIR"/t/mpreduce");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Efficient reduction modulo nice primes
*
/* -*-c-*-
- *
- * $Id: mpscan.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Sequential bit scan of multiprecision integers
*
/* -*-c-*-
- *
- * $Id: mpscan.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Sequential bit scan of multiprecision integers
*
/* -*-c-*-
- *
- * $Id: mptext-dstr.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Reading and writing large integers on strings
*
/* -*-c-*-
- *
- * $Id: mptext-file.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Reading and writing large integers on files
*
/* -*-c-*-
- *
- * $Id$
*
* Work out length of a number's string representation
*
/* -*-c-*-
- *
- * $Id: mptext-string.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Reading and writing large integers on strings
*
/* -*-c-*-
- *
- * $Id$
*
* Textual representation of multiprecision numbers
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/mptext");
+ test_run(argc, argv, tests, SRCDIR "/t/mptext");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Textual representation of multiprecision numbers
*
/* -*-c-*-
- *
- * $Id$
*
* Generate `mptypes.h' header file for current architecture
*
/* -*-c-*-
- *
- * $Id: mpw.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Very low-level multiprecision definitions
*
/* -*-c-*-
- *
- * $Id$
*
* Karatsuba's multiplication algorithm
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/mpx");
+ test_run(argc, argv, defs, SRCDIR"/t/mpx");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Karatsuba-based squaring algorithm
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/mpx");
+ test_run(argc, argv, defs, SRCDIR"/t/mpx");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Low-level multiprecision arithmetic
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/mpx");
+ test_run(argc, argv, defs, SRCDIR"/t/mpx");
return (0);
}
/* -*-c-*-
- *
- * $Id: mpx.h,v 1.18 2004/04/08 01:36:15 mdw Exp $
*
* Low level multiprecision arithmetic
*
#! /usr/bin/awk -f
-#
-# $Id$
-function banner(name, s, i)
+function banner(name, s, i)
{
s = "/*----- " name " ";
while (length(s) < 75) s = s "-";
/* -*-c-*-
- *
- * $Id: pfilt.c,v 1.6 2004/04/08 01:36:15 mdw Exp $
*
* Finding and testing prime numbers
*
/* -*-c-*-
- *
- * $Id: pfilt.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Finding and testing prime numbers
*
/* -*-c-*-
- *
- * $Id: pgen-gcd.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Prime search stepper ensuring a low GCD for %$(p - 1)/2$%
*
/* -*-c-*-
- *
- * $Id$
*
* Simultaneous prime search
*
/* -*-c-*-
- *
- * $Id: pgen-stdev.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Standard event handlers
*
/* -*-c-*-
- *
- * $Id$
*
* Prime generation glue
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/pgen");
+ test_run(argc, argv, tests, SRCDIR "/t/pgen");
return (0);
}
#endif
/* -*-c-*-
- *
- * $Id$
*
* Prime generation glue
*
/* -*-c-*-
- *
- * $Id: prim.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Finding primitive elements
*
/* -*-c-*-
- *
- * $Id: prim.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Finding primitive elements
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, tests, SRCDIR "/tests/pgen");
+ test_run(argc, argv, tests, SRCDIR "/t/pgen");
return (0);
}
/* -*-c-*-
- *
- * $Id: ptab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Table of standard prime groups
*
-# $Id$
-#
# Standard prime groups
#----- Groups from Oakley (RFC2412) -----------------------------------------
/* -*-c-*-
- *
- * $Id: qdparse.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Quick-and-dirty parser
*
/* -*-c-*-
- *
- * $Id: qdparse.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Quick-and-dirty parser
*
/* -*-c-*-
- *
- * $Id$
*
* Miller-Rabin primality test
*
/* -*-c-*-
- *
- * $Id$
*
* Miller-Rabin primality test
*
/* -*-c-*-
- *
- * $Id: rho.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Pollard's rho algorithm for discrete logs
*
/* -*-c-*-
- *
- * $Id: rho.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Pollard's rho algorithm for discrete logs
*
/* -*-c-*-
- *
- * $Id: strongprime.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Generate `strong' prime numbers
*
#include <mLib/dstr.h>
#include "grand.h"
-#include "rand.h"
#include "mp.h"
#include "mpmont.h"
#include "mprand.h"
/* -*-c-*-
- *
- * $Id: strongprime.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Generate `strong' prime numbers
*
-# $Id$
-#
# Elliptic curve tests
check {
-# $Id$
-#
# Test cases for higher-level binary poly arithmetic.
add {
-# $Id: gfn,v 1.2 2004/04/02 08:41:45 mdw Exp $
-#
# Normal basis conversions
gfn {
-# $Id$
-#
# Test efficient polynomial reduction
reduce {
# Test vectors for low-level GF functions
-#
-# $Id: gfx,v 1.2 2004/03/21 22:52:06 mdw Exp $
# --- Addition (and subtraction) ---
-# $Id$
-#
# Test group abstraction, and a bunch of other things.
check {
# Test vectors for MP functions
-#
-# $Id$
add {
5 4 9; 5 -4 1; -5 4 -1; -5 -4 -9;
# Test vectors for Barrett modular reduction
-#
-# $Id$
mpbarrett-reduce {
17 11 6;
# Test vectors for Chinese Remainder Theorem solution (Gauss's algorithm)
-#
-# $Id: mpcrt,v 1.2 2000/07/09 21:33:54 mdw Exp $
crt-1 {
1 5 1;
# Test vectors for conversion between MP ints and C ints
#
-# $Id: mpint,v 1.4 2002/01/13 19:51:34 mdw Exp $
-
# The tests look messy because I'm fighting with atoi here as well as the
# integer conversion routines I'm trying to test.
# Test vectors for Montgomery reduction
-#
-# $Id$
create {
340809809850981098423498794792349 # m
-# $Id$
-#
# Tests for efficient reduction
reduce {
# Test vectors for MP textual I/O
-#
-# $Id: mptext,v 1.12 2002/10/19 11:59:04 mdw Exp $
mptext-ascii {
# --- Perfectly valid things ---
# Test vectors for low-level MP functions
-#
-# $Id: mpx,v 1.12 2004/04/01 12:50:41 mdw Exp $
# --- Load-store tests ---
#
#! /usr/bin/awk -f
#
-# $Id: mpx-gen,v 1.2 1999/12/10 23:26:51 mdw Exp $
-#
# Generate test vectors for MPX testing
# --- Generate an `l'-byte hex number ---
# Test vectors for prime number finder
-#
-# $Id: pgen,v 1.2 2001/06/16 13:20:46 mdw Exp $
pgen {
2 2;
--- /dev/null
+### -*-makefile-*-
+###
+### Build script for miscellaneous cryptography
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES = libmisc.la
+libmisc_la_SOURCES =
+
+###--------------------------------------------------------------------------
+### Secret sharing.
+
+## Efficient sharing over GF(2^8).
+pkginclude_HEADERS += gfshare.h
+libmisc_la_SOURCES += gfshare.c
+gfshare.lo: gfshare-tab.h
+CLEANFILES += gfshare-tab.h
+noinst_PROGRAMS += gfshare-mktab
+gfshare-tab.h: gfshare-mktab$e
+ $(AM_V_GEN)./gfshare-mktab >gfshare-tab.h.new && \
+ mv gfshare-tab.h.new gfshare-tab.h
+TESTS += gfshare.$t
+
+## Number-theoretic sharing over GF(p).
+pkginclude_HEADERS += share.h
+libmisc_la_SOURCES += share.c
+TESTS += share.$t
+
+###----- That's all, folks --------------------------------------------------
/* -*-c-*-
- *
- * $Id: gfshare-mktab.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Generate tables for %$\gf{2^8}$% multiplication
*
/* -*-c-*-
- *
- * $Id$
*
* Secret sharing over %$\gf{2^8}$%
*
/* -*-c-*-
- *
- * $Id$
*
* Secret sharing over %$\gf{2^8}$%
*
/* -*-c-*-
- *
- * $Id$
*
* Shamir's secret sharing
*
/* -*-c-*-
- *
- * $Id$
*
* Shamir's secret sharing
*
+++ /dev/null
-#! /usr/bin/python
-
-import catacomb as C
-import mLib as M
-from sys import stdin
-
-kf = C.KeyFile('pgroups.kr', C.KOPEN_WRITE)
-
-for line in stdin:
- line = line.strip()
- if line == '' or (line.startswith('#') and not line.startswith('#:')):
- continue
- F = line.split()
- if F[0] == 'group':
- name = F[1]
- if not name.startswith('catacomb'):
- continue
- def snarf(what):
- F = stdin.next().split()
- assert F[0] == what
- return F[1]
- p = C.MP(snarf('p'))
- q = C.MP(snarf('q'))
- g = C.MP(snarf('g'))
- ff = []
- while True:
- F = stdin.next().split()
- if not F or F[0] != '#:factor':
- break
- ff.append(C.MP(F[1]))
- seed = C.rmd160().hash(name).done()
- k = kf.newkey(C.ReadBuffer(seed).getu32(), 'dh-param')
- k.tag = name
- k.data = C.KeyDataStructured({
- 'p': C.KeyDataMP(p, 'shared'),
- 'q': C.KeyDataMP(q, 'shared'),
- 'g': C.KeyDataMP(g, 'shared')
- })
- k.attr['factor'] = ', '.join([f.tostring() for f in ff])
- k.attr['genseed'] = M.base64_encode(seed)
- k.attr['seedalg'] = 'rmd160-mgf'
-kf.save()
%%% -*-latex-*-
%%%
-%%% $Id: rand.tex,v 1.4 2004/04/08 01:36:15 mdw Exp $
-%%%
%%% Description of Catacomb's random number generator
%%%
%%% (c) 1999 Straylight/Edgeware
+++ /dev/null
-#! /usr/bin/perl
-
-# Reads ptab.in or similarly-formatted file; writes a calc script to check
-# it.
-
-while (<>) {
- next if /^\s*(\#[^!]|$)/;
- @F = split;
- if ($F[0] eq "group") {
- $group = $F[1];
- $_ = <>; @F = split; $F[0] eq "p" or die $F[0]; $p = $F[1];
- $_ = <>; @F = split; $F[0] eq "q" or die $F[0]; $q = $F[1];
- $_ = <>; @F = split; $F[0] eq "g" or die $F[0]; $g = $F[1];
- print <<EOF;
- print "testing $group...";
- p = $p;
- q = $q;
- g = $g;
- if (!ptest(p)) print " p not prime";
- if (!ptest(q)) print " q not prime";
- if ((p - 1)%q) print " q doesn't divide p - 1";
- h = (p - 1)/q;
- if (pmod(g, q, p) != 1) print " g doesn't have order q";
- if (pmod(g, h, p) == 1) print " g generates overly large group";
- ff = 2;
-EOF
- $ll = 0;
- for (;;) {
- $_ = <>; @F = split; $F[0] eq "#:factor" or last; $f = $F[1];
- print <<EOF;
- f = $f;
- if (!ptest(f)) print " factor not prime", f;
- ff *= f;
-EOF
- $ll = 1;
- }
- if ($ll) {
- print <<EOF;
- if (ff != p - 1) print " missing factors";
-EOF
- }
- }
-}
--- /dev/null
+### -*-makefile-*-
+###
+### Build script for utility programs
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+bin_PROGRAMS =
+dist_man_MANS =
+
+UTILS_LIBS = \
+ libcatcrypt.la $(top_builddir)/libcatacomb.la \
+ $(mLib_LIBS) $(LIBS)
+
+LDADD = $(UTILS_LIBS)
+
+###--------------------------------------------------------------------------
+### The `catcrypt' library.
+
+noinst_LTLIBRARIES = libcatcrypt.la
+libcatcrypt_la_SOURCES =
+
+## The main library.
+libcatcrypt_la_SOURCES += cc.h
+libcatcrypt_la_SOURCES += cc-enc.c
+libcatcrypt_la_SOURCES += cc-hash.c
+libcatcrypt_la_SOURCES += cc-kem.c
+libcatcrypt_la_SOURCES += cc-list.c
+libcatcrypt_la_SOURCES += cc-progress.c
+libcatcrypt_la_SOURCES += cc-sig.c
+libcatcrypt_la_SOURCES += cc-subcmd.c
+
+## Date parsing.
+libcatcrypt_la_SOURCES += getdate.h
+libcatcrypt_la_SOURCES += getdate.y
+
+###--------------------------------------------------------------------------
+### Utility programs.
+
+## Generate and verify datestamped cookies.
+bin_PROGRAMS += cookie
+dist_man_MANS += cookie.1
+
+## Asymmetric message encryption and decryption with deniable authentication.
+bin_PROGRAMS += catcrypt
+dist_man_MANS += catcrypt.1
+
+## Signing and verifying files.
+bin_PROGRAMS += catsign
+dist_man_MANS += catsign.1
+
+## Issue and verify signatures on directory trees.
+bin_PROGRAMS += dsig
+dist_man_MANS += dsig.1
+
+## Compute factorials to arbitrary precision.
+bin_PROGRAMS += factorial
+
+## Compute Fibonacci numbers to arbitrary precision.
+bin_PROGRAMS += fibonacci
+
+## Compute hashes of files.
+bin_PROGRAMS += hashsum
+dist_man_MANS += hashsum.1
+
+## Key management utility.
+bin_PROGRAMS += key
+key_SOURCES = key.c
+dist_man_MANS += key.1 keyring.5
+
+## Generate passphrases with given entropy using wordlists and Markov models.
+bin_PROGRAMS += mkphrase
+dist_man_MANS += mkphrase.1
+
+## Performance testing.
+bin_PROGRAMS += perftest
+
+## Remember passphrases for limited periods of time.
+bin_PROGRAMS += pixie
+pixie_SOURCES = pixie.c
+pixie_LDADD = $(UTILS_LIBS) $(PIXIE_LIBS)
+dist_man_MANS += pixie.1
+EXTRA_DIST += xpixie
+
+## Generate random data.
+bin_PROGRAMS += rspit
+
+###----- That's all, folks --------------------------------------------------
/* -*-c-*-
- *
- * $Id$
*
* Command-line encryption tool
*
/* -*-c-*-
- *
- * $Id$
*
* Sign files
*
/* -*-c-*-
- *
- * $Id$
*
* Catcrypt data encoding
*
/* -*-c-*-
- *
- * $Id$
*
* Catcrypt key-encapsulation
*
/* -*-c-*-
- *
- * $Id$
*
* Emit lists of things in tables
*
/* -*-c-*-
- *
- * $Id$
*
* Catcrypt signatures
*
/* -*-c-*-
- *
- * $Id$
*
* Subcommand infrastructure
*
/* -*-c-*-
- *
- * $Id$
*
* Catcrypt common stuff
*
/* -*-c-*-
- *
- * $Id$
*
* Generate and validate cryptographic cookies
*
/* -*-c-*-
- *
- * $Id$
*
* Verify signatures on distribuitions of files
*
/* -*-c-*-
- *
- * $Id: factorial.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Example factorial computation
*
/* -*-c-*-
- *
- * $Id$
*
* Hash files using some secure hash function
*
/* -*-c-*-
- *
- * $Id$
*
* Simple key manager program
*
/* -*-c-*-
- *
- * $Id$
*
* Generate passphrases from word lists
*
/* -*-c-*-
- *
- * $Id$
*
* Measure performance of various operations (Unix-specific)
*
/* -*-c-*-
- *
- * $Id$
*
* Passphrase pixie for Catacomb
*
/* -*-c-*-
- *
- * $Id$
*
* Spit out random numbers
*
--- /dev/null
+### -*-makefile-*-
+###
+### Build script for public-key cryptography
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES = libpub.la
+libpub_la_SOURCES =
+
+TEST_LIBS = libpub.la
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## The Blum--Blum--Shub random-bit generator.
+pkginclude_HEADERS += bbs.h
+libpub_la_SOURCES += bbs-fetch.c
+libpub_la_SOURCES += bbs-gen.c
+libpub_la_SOURCES += bbs-jump.c
+TESTS += bbs-jump.$t
+libpub_la_SOURCES += bbs-rand.c
+TESTS += bbs-rand.$t
+EXTRA_DIST += t/bbs
+
+## Plain Diffie--Hellman, in Schorr groups.
+pkginclude_HEADERS += dh.h
+libpub_la_SOURCES += dh-check.c
+libpub_la_SOURCES += dh-fetch.c
+libpub_la_SOURCES += dh-gen.c
+libpub_la_SOURCES += dh-kcdsa.c
+libpub_la_SOURCES += dh-limlee.c
+libpub_la_SOURCES += dh-param.c
+TESTS += dh-param.$t
+
+## The National Security Agency's Digital Signature Algorithm.
+pkginclude_HEADERS += dsa.h
+libpub_la_SOURCES += dsa-gen.c
+TESTS += dsa-gen.$t
+libpub_la_SOURCES += dsa-misc.c
+libpub_la_SOURCES += dsa-sign.c
+TESTS += dsa-sign.$t
+libpub_la_SOURCES += dsa-verify.c
+TESTS += dsa-verify.$t
+libpub_la_SOURCES += dsa-check.c
+EXTRA_DIST += t/dsa
+
+## Generalization of DSA to arbitrary cyclic groups.
+pkginclude_HEADERS += gdsa.h
+libpub_la_SOURCES += gdsa.c
+TESTS += gdsa.$t
+EXTRA_DIST += t/gdsa
+
+## KISA `KCDSA', generalized to arbitrary cyclic groups.
+pkginclude_HEADERS += gkcdsa.h
+libpub_la_SOURCES += gkcdsa.c
+TESTS += gkcdsa.$t
+EXTRA_DIST += t/gkcdsa
+
+## General key validity checking machinery.
+pkginclude_HEADERS += keycheck.h
+libpub_la_SOURCES += keycheck.c
+libpub_la_SOURCES += keycheck-mp.c
+libpub_la_SOURCES += keycheck-report.c
+
+## The Rivest--Shamir--Adleman trapdoor one-way function.
+pkginclude_HEADERS += rsa.h
+libpub_la_SOURCES += rsa-fetch.c
+libpub_la_SOURCES += rsa-gen.c
+libpub_la_SOURCES += rsa-priv.c
+libpub_la_SOURCES += rsa-pub.c
+libpub_la_SOURCES += rsa-recover.c
+libpub_la_SOURCES += oaep.c
+libpub_la_SOURCES += pkcs1.c
+libpub_la_SOURCES += pss.c
+EXTRA_DIST += rsa-test.c
+TESTS += rsa-test.$t
+EXTRA_DIST += t/rsa
+
+###----- That's all, folks --------------------------------------------------
/* -*-c-*-
- *
- * $Id: bbs-fetch.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Key fetching for BBS public and private keys
*
/* -*-c-*-
- *
- * $Id: bbs-gen.c,v 1.6 2004/04/08 01:36:15 mdw Exp $
*
* Generate Blum integers
*
/* -*-c-*-
- *
- * $Id$
*
* Jumping around a BBS sequence
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/bbs");
+ test_run(argc, argv, tests, SRCDIR "/t/bbs");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Blum-Blum-Shub secure random number generator
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/bbs");
+ test_run(argc, argv, tests, SRCDIR "/t/bbs");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* The Blum-Blum-Shub random bit generator
*
/* -*-c-*-
- *
- * $Id: dh-check.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Checks Diffie-Hellman group parameters
*
/* -*-c-*-
- *
- * $Id: dh-fetch.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Key fetching for Diffie-Hellman public and private keys
*
/* -*-c-*-
- *
- * $Id: dh-gen.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Generate Diffie-Hellman parameters
*
/* -*-c-*-
- *
- * $Id$
*
* Generate KCDSA prime groups
*
/* -*-c-*-
- *
- * $Id: dh-limlee.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Generate Diffie-Hellman parameters from Lim-Lee primes
*
/* -*-c-*-
- *
- * $Id$
*
* Reading Diffie-Hellman parameters
*
/* -*-c-*-
- *
- * $Id$
*
* Diffie-Hellman and related public-key systems
*
/* -*-c-*-
- *
- * $Id: dsa-check.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Consistency checking for DSA keys
*
/* -*-c-*-
- *
- * $Id: dsa-gen.c,v 1.10 2004/04/08 01:36:15 mdw Exp $
*
* Generate DSA shared parameters
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/dsa");
+ test_run(argc, argv, tests, SRCDIR "/t/dsa");
return (0);
}
/* -*-c-*-
- *
- * $Id: dsa-sign.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* DSA signing operation
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/dsa");
+ test_run(argc, argv, tests, SRCDIR "/t/dsa");
return (0);
}
/* -*-c-*-
- *
- * $Id: dsa-verify.c,v 1.7 2004/04/08 01:36:15 mdw Exp $
*
* DSA signature verification
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/dsa");
+ test_run(argc, argv, tests, SRCDIR "/t/dsa");
return (0);
}
/* -*-c-*-
- *
- * $Id: dsa.h,v 1.9 2004/04/08 01:36:15 mdw Exp $
*
* Digital Signature Algorithm
*
/* -*-c-*-
- *
- * $Id$
*
* Generalized version of DSA
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/gdsa");
+ test_run(argc, argv, tests, SRCDIR "/t/gdsa");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Generalized version of DSA
*
/* -*-c-*-
- *
- * $Id$
*
* Generalized version of KCDSA
*
int main(int argc, char *argv[])
{
sub_init();
- test_run(argc, argv, tests, SRCDIR "/tests/gkcdsa");
+ test_run(argc, argv, tests, SRCDIR "/t/gkcdsa");
return (0);
}
/* -*-c-*-
- *
- * $Id$
*
* Generalized version of KCDSA
*
/* -*-c-*-
- *
- * $Id: keycheck-mp.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Key consistency checking tools for large integers
*
/* -*-c-*-
- *
- * $Id: keycheck-report.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* A standard reporter function
*
/* -*-c-*-
- *
- * $Id: keycheck.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Framework for checking consistency of keys
*
/* -*-c-*-
- *
- * $Id: keycheck.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Framework for checking consistency of keys
*
/* -*-c-*-
- *
- * $Id: oaep.c,v 1.6 2004/04/08 01:36:15 mdw Exp $
*
* Optimal asymmetric encryption packing
*
/* -*-c-*-
- *
- * $Id: pkcs1.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* PKCS#1 1.5 packing
*
/* -*-c-*-
- *
- * $Id: pss.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Probabistic signature scheme
*
/* -*-c-*-
- *
- * $Id: rsa-fetch.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Key fetching for RSA public and private keys
*
/* -*-c-*-
- *
- * $Id$
*
* RSA parameter generation
*
/* -*-c-*-
- *
- * $Id: rsa-priv.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* RSA private-key operations
*
/* -*-c-*-
- *
- * $Id: rsa-pub.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* [RSA encryption with padding *
* (c) 2000 Straylight/Edgeware
/* -*-c-*-
- *
- * $Id: rsa-recover.c,v 1.7 2004/04/08 01:36:15 mdw Exp $
*
* Recover RSA parameters
*
/* -*-c-*-
- *
- * $Id$
*
* Testing RSA padding operations
*
{
sub_init();
fib = fibrand_create(0);
- test_run(argc, argv, tests, SRCDIR "/tests/rsa");
+ test_run(argc, argv, tests, SRCDIR "/t/rsa");
GR_DESTROY(fib);
return (0);
}
/* -*-c-*-
- *
- * $Id: rsa.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The RSA public-key cryptosystem
*
# Test vectors for Blum-Blum-Shub generator
-#
-# $Id: bbs,v 1.2 2000/07/09 21:33:54 mdw Exp $
bbs {
58618255351802153154518076227263324405595169368832105733339611861073310668957206153928098662820028322143309562326246028101842658621324089654810023510552099428926874474919949521150122806716423750640359105584279946965449493907636556236204117444242840921432253645386399913807490661488722966090824347967771475377
# Test vectors for DSA
-#
-# $Id: dsa,v 1.5 2001/02/03 16:10:12 mdw Exp $
# --- About the tests ---
#
-# $Id: gdsa,v 1.2 2004/04/08 01:36:16 mdw Exp $
-#
# Tests for abstract-group implementation of DSA
sign {
-# $Id: gkcdsa,v 1.1 2004/04/04 19:42:59 mdw Exp $
-#
# Tests for KCDSA
sign {
-# $Id$
-#
# Test vectors for the completely mad RSA infrastructure tests
p1sig-pad {
--- /dev/null
+### -*-makefile-*-
+###
+### Build script for random number generators
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES = librand.la
+librand_la_SOURCES =
+
+TEST_LIBS = librand.la
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## The FIPS186 generator used to generate DSA domain parameters.
+pkginclude_HEADERS += dsarand.h
+librand_la_SOURCES += dsarand.c
+
+## Knuth's lagged-Fibonacci generator.
+pkginclude_HEADERS += fibrand.h
+librand_la_SOURCES += fibrand.c
+
+## The FIPS 140--2 random number generator tests.
+pkginclude_HEADERS += fipstest.h
+librand_la_SOURCES += fipstest.c
+
+## Interface for generic random number sources.
+pkginclude_HEADERS += grand.h
+librand_la_SOURCES += grand.c
+
+## A simple linear-congruential generator.
+pkginclude_HEADERS += lcrand.h
+librand_la_SOURCES += lcrand.c
+TESTS += lcrand.$t
+EXTRA_DIST += t/lcrand
+
+## Maurer's universal statistical test.
+pkginclude_HEADERS += maurer.h
+librand_la_SOURCES += maurer.c
+
+## System-specific noise acquisition.
+pkginclude_HEADERS += noise.h
+librand_la_SOURCES += noise.c
+
+## Cryptographic laundering for true random data generation.
+pkginclude_HEADERS += rand.h
+librand_la_SOURCES += rand.c
+
+## The SSL v3 pseudorandom function.
+pkginclude_HEADERS += sslprf.h
+librand_la_SOURCES += sslprf.c
+TESTS += sslprf.$t
+EXTRA_DIST += t/sslprf
+
+## The TLS v1 pseudorandom function.
+pkginclude_HEADERS += tlsprf.h
+librand_la_SOURCES += tlsprf.c
+TESTS += tlsprf.$t
+EXTRA_DIST += t/tlsprf
+
+###----- That's all, folks --------------------------------------------------
/* -*-c-*-
- *
- * $Id: dsarand.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Random number generator for DSA
*
/* -*-c-*-
- *
- * $Id: dsarand.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Random number generator for DSA
*
/* -*-c-*-
- *
- * $Id: fibrand.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Fibonacci generator
*
/* -*-c-*-
- *
- * $Id: fibrand.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Fibonacci generator
*
/* -*-c-*-
- *
- * $Id: fipstest.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* FIPS140 randomness tests
*
/* -*-c-*-
- *
- * $Id: fipstest.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* FIPS140 randomness tests
*
/* -*-c-*-
- *
- * $Id: grand.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Generic interface to random number generators
*
/* -*-c-*-
- *
- * $Id: grand.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Generic interface to random number generators
*
/* -*-c-*-
- *
- * $Id: lcrand.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Simple linear congruential generator
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, tests, SRCDIR"/tests/lcrand");
+ test_run(argc, argv, tests, SRCDIR"/t/lcrand");
return (0);
}
/* -*-c-*-
- *
- * $Id: lcrand.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Simple linear congruential generator
*
/* -*-c-*-
- *
- * $Id: maurer.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Maurer's universal statistical test
*
/* -*-c-*-
- *
- * $Id: maurer.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Maurer's universal statistical test
*
/* -*-c-*-
- *
- * $Id$
*
* Acquisition of environmental noise (Unix-specific)
*
/* -*-c-*-
- *
- * $Id: noise.h,v 1.6 2004/04/08 01:36:15 mdw Exp $
*
* Acquisition of environmental noise (Unix-specific)
*
/* -*-c-*-
- *
- * $Id$
*
* Secure random number generator
*
/* -*-c-*-
- *
- * $Id$
*
* Secure random number generator
*
/* -*-c-*-
- *
- * $Id: sslprf.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The SSL pseudo-random function
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/sslprf");
+ test_run(argc, argv, defs, SRCDIR"/t/sslprf");
return (0);
}
/* -*-c-*-
- *
- * $Id: sslprf.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The SSL pseudo-random function
*
# Test vectors for linear congruential generator
-#
-# $Id: lcrand,v 1.3 2000/07/15 10:03:13 mdw Exp $
lcrand {
# --- Standard stuff ---
-# $Id: sslprf,v 1.1 2001/04/06 22:05:11 mdw Exp $
-#
# SSL pseudo-random function
sslprf {
-# $Id: tlsprf,v 1.2 2001/04/06 22:06:01 mdw Exp $
-#
# TLS pseudo-random function
tlsprf {
/* -*-c-*-
- *
- * $Id: tlsprf.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The TLS pseudo-random function
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/tlsprf");
+ test_run(argc, argv, defs, SRCDIR"/t/tlsprf");
return (0);
}
/* -*-c-*-
- *
- * $Id: tlsprf.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The TLS pseudo-random function
*
--- /dev/null
+### -*-makefile-*-
+###
+### Build script for symmetric cryptography
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES = libsymm.la
+libsymm_la_SOURCES =
+nodist_libsymm_la_SOURCES =
+
+TEST_LIBS = libsymm.la
+
+VPATH += modes
+
+###--------------------------------------------------------------------------
+### Autogenerated lists.
+
+## Fancy template substitutions.
+multigen = $(PYTHON) $(srcdir)/multigen
+EXTRA_DIST += multigen
+
+## The heart of this is an enormous cross-product of crypto primitives and
+## the corresponding modes of operation. Rather than write it out longhand,
+## we generate it using `multigen'. Unfortunately, this needs to be done
+## at the Automake level, which causes some interesting bootstrapping
+## problems.
+include modes.am
+
+EXTRA_DIST += modes.am.in modes.am
+MAINTAINERCLEANFILES += $(srcdir)/modes.am
+
+## Generate the lists.
+$(srcdir)/modes.am: modes.am.in
+ $(AM_V_GEN)$(multigen) -g $(srcdir)/modes.am.in $(srcdir)/modes.am \
+ blkc="$(BLKCS)" \
+ blkcmode="$(BLKCMODES)" \
+ blkcciphermode="$(BLKCCIPHERMODES)" \
+ hash="$(HASHES)" \
+ hashmode="$(HASHMODES)" \
+ hashciphermode="$(HASHCIPHERMODES)" \
+ hashmacmode="$(HASHMACMODES)"
+
+## Initialize lists of known classes.
+ALL_CIPHERS = $(CIPHER_MODES)
+ALL_HASHES = $(HASHES)
+ALL_MACS = $(MAC_MODES)
+
+###--------------------------------------------------------------------------
+### Block ciphers.
+
+BLKCS =
+BLKCMODES =
+
+BLKCCIPHERMODES =
+BLKCMODES += $(BLKCCIPHERMODES)
+
+## A tool for translating the AES-contest test vectors into a form our test
+## rigs understand.
+EXTRA_DIST += aes-trans
+
+## Block cipher utility macros, mainly used in mode implementations.
+pkginclude_HEADERS += blkc.h
+
+## Source code and headers for the block ciphers.
+libsymm_la_SOURCES += $(BLKC_C)
+pkginclude_HEADERS += $(BLKC_H)
+
+## Schneier's `Blowfish' block cipher.
+BLKCS += blowfish
+blowfish.lo: blowfish-tab.h
+CLEANFILES += blowfish-tab.h
+noinst_PROGRAMS += blowfish-mktab
+blowfish_mktab_CPPFLAGS = $(AM_CPPFLAGS) -DQUIET
+blowfish-tab.h: blowfish-mktab$e
+ $(AM_V_GEN)./blowfish-mktab >blowfish-tab.h.new && \
+ mv blowfish-tab.h.new blowfish-tab.h
+
+## Adams and Tavares' `CAST' block ciphers.
+BLKCS += cast128 cast256
+libsymm_la_SOURCES += cast-s.c cast-sk.c cast-base.h cast-tab.h
+cast256.$t: t/cast256
+EXTRA_DIST += t/cast256.aes
+MAINTAINERCLEANFILES += $(srcdir)/t/cast256
+t/cast256: t/cast256.aes
+ $(AM_V_GEN)$(srcdir)/aes-trans CAST256 \
+ <$(srcdir)/t/cast256.aes \
+ >$(srcdir)/t/cast256.new && \
+ mv $(srcdir)/t/cast256.new $(srcdir)/t/cast256
+
+## IBM's `DES' block cipher, by Feistel, Coppersmith, and others.
+BLKCS += des des3
+libsymm_la_SOURCES += des-base.h des-base.c desx-tab.h
+des-base.lo: des-tab.h
+CLEANFILES += des-tab.h
+noinst_PROGRAMS += des-mktab
+des-tab.h: des-mktab$e
+ $(AM_V_GEN)./des-mktab >des-tab.h.new && \
+ mv des-tab.h.new des-tab.h
+
+## Rivest's `DESX' variant, with pre- and post-whitening.
+BLKCS += desx
+libsymm_la_SOURCES += desx-tab.h
+
+## Lai and Massey's IDEA.
+BLKCS += idea
+
+## IBM's `MARS' block cipher.
+BLKCS += mars
+mars.lo: mars-tab.h
+CLEANFILES += mars-tab.h
+noinst_PROGRAMS += mars-mktab
+mars-tab.h: mars-mktab$e
+ $(AM_V_GEN)./mars-mktab >mars-tab.h.new && \
+ mv mars-tab.h.new mars-tab.h
+mars.$t: t/mars
+EXTRA_DIST += t/mars.aes
+MAINTAINERCLEANFILES += $(srcdir)/t/mars
+t/mars: t/mars.aes
+ $(AM_V_GEN)$(srcdir)/aes-trans Mars \
+ <$(srcdir)/t/mars.aes \
+ >$(srcdir)/t/mars.new && \
+ mv $(srcdir)/t/mars.new $(srcdir)/t/mars
+
+## Daemen, Peeters, Van Assche and Rijmen's `Noekeon'.
+BLKCS += noekeon
+
+## Rivest's `RC2' block cipher.
+BLKCS += rc2
+libsymm_la_SOURCES += rc2-tab.h
+
+## Rivest's `RC5'.
+BLKCS += rc5
+
+## Daemen and Rijmen's `Rijndael' block cipher, selected as AES.
+BLKCS += rijndael rijndael192 rijndael256
+libsymm_la_SOURCES += rijndael-base.h rijndael-base.c
+rijndael-base.lo: rijndael-tab.h
+CLEANFILES += rijndael-tab.h
+noinst_PROGRAMS += rijndael-mktab
+rijndael-tab.h: rijndael-mktab$e
+ $(AM_V_GEN)./rijndael-mktab >rijndael-tab.h.new && \
+ mv rijndael-tab.h.new rijndael-tab.h
+rijndael.$t: t/rijndael
+EXTRA_DIST += t/rijndael.aes
+MAINTAINERCLEANFILES += $(srcdir)/t/rijndael
+t/rijndael: t/rijndael.aes
+ $(AM_V_GEN)$(srcdir)/aes-trans Rijndael \
+ <$(srcdir)/t/rijndael.aes \
+ >$(srcdir)/t/rijndael.new && \
+ mv $(srcdir)/t/rijndael.new $(srcdir)/t/rijndael
+
+## Massey's `SAFER' block ciphers.
+BLKCS += safer safersk
+safer.lo: safer-tab.h
+CLEANFILES += safer-tab.h
+noinst_PROGRAMS += safer-mktab
+safer-tab.h: safer-mktab$e
+ $(AM_V_GEN)./safer-mktab >safer-tab.h.new && \
+ mv safer-tab.h.new safer-tab.h
+
+## Anderson, Biham and Knudsen's `Serpent' block cipher.
+BLKCS += serpent
+libsymm_la_SOURCES += serpent-sbox.h
+noinst_PROGRAMS += serpent-check
+TESTS += serpent-check
+serpent.$t: t/serpent
+EXTRA_DIST += t/serpent.aes
+MAINTAINERCLEANFILES += $(srcdir)/t/serpent
+t/serpent: t/serpent.aes
+ $(AM_V_GEN)$(srcdir)/aes-trans Serpent -v rev=1 \
+ <$(srcdir)/t/serpent.aes \
+ >$(srcdir)/t/serpent.new && \
+ mv $(srcdir)/t/serpent.new $(srcdir)/t/serpent
+
+## The National Security Agency's `Skipjack' block cipher. You don't want to
+## use this.
+BLKCS += skipjack
+libsymm_la_SOURCES += skipjack-tab.h
+
+## Daemen and Rijmen's `Square' block cipher.
+BLKCS += square
+square.lo: square-tab.h
+CLEANFILES += square-tab.h
+noinst_PROGRAMS += square-mktab
+square-tab.h: square-mktab$e
+ $(AM_V_GEN)./square-mktab >square-tab.h.new && \
+ mv square-tab.h.new square-tab.h
+
+## Wheeler and Needham's `TEA' and `XTEA' block ciphers.
+BLKCS += tea xtea
+
+## Schneier, Kelsey, Whiting, Wagner, Hall and Ferguson's `Twofish' block
+## cipher.
+BLKCS += twofish
+twofish.lo: twofish-tab.h
+CLEANFILES += twofish-tab.h
+noinst_PROGRAMS += twofish-mktab
+twofish-tab.h: twofish-mktab$e
+ $(AM_V_GEN)./twofish-mktab >twofish-tab.h.new && \
+ mv twofish-tab.h.new twofish-tab.h
+twofish.$t: t/twofish
+EXTRA_DIST += t/twofish.aes
+MAINTAINERCLEANFILES += $(srcdir)/t/twofish
+t/twofish: t/twofish.aes
+ $(AM_V_GEN)$(srcdir)/aes-trans Twofish \
+ <$(srcdir)/t/twofish.aes \
+ >$(srcdir)/t/twofish.new && \
+ mv $(srcdir)/t/twofish.new $(srcdir)/t/twofish
+
+## The old NIST modes for DES.
+BLKCCIPHERMODES += cbc cfb ecb ofb
+
+## Counter mode.
+BLKCCIPHERMODES += counter
+
+###--------------------------------------------------------------------------
+### Hash functions.
+
+HASHES =
+HASHMODES =
+
+HASHCIPHERMODES =
+HASHMODES += $(HASHCIPHERMODES)
+
+HASHMACMODES =
+HASHMODES += $(HASHMACMODES)
+
+## Common definitions for hash functions.
+pkginclude_HEADERS += hash.h
+
+## Source code and headers for the hash functions.
+libsymm_la_SOURCES += $(HASH_C)
+pkginclude_HEADERS += $(HASH_H)
+
+## Lim and KISA's `HAS-160', recommended for use with KCDSA.
+HASHES += has160
+
+## Rivest's `MD' series of hash functions
+HASHES += md2 md4 md5
+libsymm_la_SOURCES += md2-tab.h
+
+## Dobbertin, Bosselaers and Preneel's `RIPEMD' suite.
+HASHES += rmd128 rmd160 rmd256 rmd320
+
+## The National Security Agency's `SHA-1' hash function.
+HASHES += sha
+
+## The National Security Agency's `SHA-2' suite.
+HASHES += sha224 sha256
+HASHES += sha384 sha512
+
+## Anderson and Biham's `Tiger' hash function.
+HASHES += tiger
+libsymm_la_SOURCES += tiger-base.h
+tiger.lo: tiger-tab.h
+CLEANFILES += tiger-tab.h
+noinst_PROGRAMS += tiger-mktab
+tiger-tab.h: tiger-mktab$e
+ $(AM_V_GEN)./tiger-mktab >tiger-tab.h.new && \
+ mv tiger-tab.h.new tiger-tab.h
+
+## Barreto and Rijmen's `Whirlpool' hash function.
+HASHES += whirlpool whirlpool256
+whirlpool.lo: whirlpool-tab.h
+CLEANFILES += whirlpool-tab.h
+noinst_PROGRAMS += whirlpool-mktab
+whirlpool-tab.h: whirlpool-mktab$e
+ $(AM_V_GEN)./whirlpool-mktab >whirlpool-tab.h.new && \
+ mv whirlpool-tab.h.new whirlpool-tab.h
+
+## Bellare, Canetti and Krawczyk's `HMAC' mode for message authentication.
+HASHMACMODES += hmac
+
+## MGF1, used in OAEP and PSS.
+HASHCIPHERMODES += mgf
+
+###--------------------------------------------------------------------------
+### Other symmetric primitives.
+
+## The CRC32 algorithm, which is useful, but has no worthwhile security.
+pkginclude_HEADERS += crc32.h
+libsymm_la_SOURCES += crc32.c
+ALL_HASHES += crc32=gcrc32
+
+## Rivest's `RC4' stream cipher.
+pkginclude_HEADERS += rc4.h
+libsymm_la_SOURCES += rc4.c
+TESTS += rc4.$t
+EXTRA_DIST += t/rc4
+ALL_CIPHERS += rc4
+
+## Coppersmith and Rogaway's `SEAL' pseudorandom function.
+pkginclude_HEADERS += seal.h
+libsymm_la_SOURCES += seal.c
+TESTS += seal.$t
+EXTRA_DIST += t/seal
+ALL_CIPHERS += seal
+
+###--------------------------------------------------------------------------
+### Autogenerated mode implementations.
+
+## The master stamp file, indicating that we generated all of the sources.
+CLEANFILES += modes/gen-stamp
+EXTRA_DIST += mode.h.in mode.c.in
+modes/gen-stamp:
+ $(AM_V_at)$(MKDIR_P) modes
+ $(AM_V_GEN)$(multigen) -g $(srcdir)/mode.c.in \
+ modes/@base-@mode.c \
+ base="$(BLKCS)" mode="$(BLKCMODES)"
+ $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \
+ modes/@base-@mode.h \
+ base="$(BLKCS)" mode="$(BLKCMODES)"
+ $(AM_V_at)$(multigen) -g $(srcdir)/mode.c.in \
+ modes/@base-@mode.c \
+ base="$(HASHES)" mode="$(HASHMODES)"
+ $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \
+ modes/@base-@mode.h \
+ base="$(HASHES)" mode="$(HASHMODES)"
+ $(AM_V_at)touch modes/gen-stamp
+
+## The individual mode interfaces and implementations.
+pkginclude_HEADERS += $(MODE_H)
+
+## Generated implementations.
+BUILT_SOURCES += $(GENMODES_C)
+CLEANFILES += $(GENMODES_C)
+nodist_libsymm_la_SOURCES += $(GENMODES_C)
+$(GENMODES_C): modes/gen-stamp
+
+## Generated interfaces.
+BUILT_SOURCES += $(GENMODES_H)
+CLEANFILES += $(GENMODES_H)
+nodist_pkginclude_HEADERS += $(GENMODES_H)
+$(GENMODES_H): modes/gen-stamp
+
+###--------------------------------------------------------------------------
+### Tables of classes for encryption, hashing, and message authentication.
+
+## The skeleton for the class tables.
+EXTRA_DIST += gthingtab.c.in
+
+## Table of cipher classes.
+pkginclude_HEADERS += gcipher.h
+CLEANFILES += gciphertab.c
+nodist_libsymm_la_SOURCES += gciphertab.c
+gciphertab.c: gthingtab.c.in
+ $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gciphertab.c \
+ what=gcipher cls=gccipher thing="$(ALL_CIPHERS)"
+
+## Table of hash classes.
+pkginclude_HEADERS += ghash.h ghash-def.h
+CLEANFILES += ghashtab.c
+nodist_libsymm_la_SOURCES += ghashtab.c
+ghashtab.c: gthingtab.c.in
+ $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in ghashtab.c \
+ what=ghash cls=gchash thing="$(ALL_HASHES)"
+
+## Table of MAC classes.
+pkginclude_HEADERS += gmac.h
+CLEANFILES += gmactab.c
+nodist_libsymm_la_SOURCES += gmactab.c
+gmactab.c: gthingtab.c.in
+ $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gmactab.c \
+ what=gmac cls=gcmac thing="$(ALL_MACS)"
+
+###--------------------------------------------------------------------------
+### Testing.
+
+## Run the test programs.
+TESTS += $(SYMM_TESTS)
+EXTRA_DIST += $(SYMM_TEST_FILES)
+
+## A piece of sample text for round-trip testing encryption modes.
+EXTRA_DIST += daftstory.h
+
+## Clean the debris from the `modes' subdirectory.
+CLEANFILES += modes/*.to modes/*.$t
+
+###----- That's all, folks --------------------------------------------------
/* -*-c-*-
- *
- * $Id$
*
* Common definitions for block ciphers
*
\
int main(int argc, char *argv[]) \
{ \
- test_run(argc, argv, defs, SRCDIR"/tests/" #pre); \
+ test_run(argc, argv, defs, SRCDIR"/t/" #pre); \
return (0); \
}
/* -*-c-*-
- *
- * $Id: blowfish-mktab.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Build Blowfish key table
*
/* -*-c-*-
- *
- * $Id: blowfish.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The Blowfish block cipher
*
/* -*-c-*-
- *
- * $Id: blowfish.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The Blowfish block cipher
*
/* -*-c-*-
- *
- * $Id: cast-base.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Basic macros and definitions for CAST-128 and CAST-256
*
/* -*-c-*-
- *
- * $Id: cast-s.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Basic S-boxes for CAST-128 and CAST-256
*
/* -*-c-*-
- *
- * $Id: cast-sk.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Key-schedule S-boxes for CAST-128
*
/* -*-c-*-
- *
- * $Id: cast-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* S-boxes for CAST-128 and CAST-256
*
/* -*-c-*-
- *
- * $Id: cast128.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The CAST-128 block cipher
*
/* -*-c-*-
- *
- * $Id: cast128.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The CAST-128 block cipher
*
/* -*-c-*-
- *
- * $Id: cast256.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The CAST-256 block cipher
*
/* -*-c-*-
- *
- * $Id: cast256.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The CAST-128 block cipher
*
/* -*-c-*-
- *
- * $Id: cbc-def.h,v 1.6 2004/04/17 09:58:36 mdw Exp $
*
* Definitions for cipher block chaining mode
*
/* -*-c-*-
- *
- * $Id: cbc.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Ciphertext block chaining for block ciphers
*
/* -*-c-*-
- *
- * $Id: cfb-def.h,v 1.6 2004/04/17 09:58:37 mdw Exp $
*
* Definitions for ciphertext feedback mode
*
/* -*-c-*-
- *
- * $Id: cfb.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Ciphertext feedback for block ciphers
*
/* -*-c-*-
- *
- * $Id: counter-def.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Block cipher counter mode (or long cycle mode)
*
/* -*-c-*-
- *
- * $Id: counter.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Block cipher counter mode (or long cycle mode)
*
/* -*-c-*-
- *
- * $Id: crc32.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Generic hash wrapper for CRC32
*
/* -*-c-*-
- *
- * $Id: crc32.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Generic hash wrapper for CRC32
*
/* -*-c-*-
- *
- * $Id: daftstory.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Daft story for use in test encryptions
*
/* -*-c-*-
- *
- * $Id: des-base.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Common features for DES implementation
*
/* -*-c-*-
- *
- * $Id: des-base.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Common features for DES implementation
*
/* -*-c-*-
- *
- * $Id: des-mktab.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Build combined S-P tables for DES
*
/* -*-c-*-
- *
- * $Id$
*
* The Data Encryption Standard
*
/* -*-c-*-
- *
- * $Id$
*
* The Data Encryption Standard
*
/* -*-c-*-
- *
- * $Id: des3.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of double- and triple-DES
*
/* -*-c-*-
- *
- * $Id: des3.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of double- and triple-DES
*
/* -*-c-*-
- *
- * $Id: desx-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Tables for DESX
*
/* -*-c-*-
- *
- * $Id$
*
* Implementation of DESX
*
/* -*-c-*-
- *
- * $Id: desx.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The DESX algorithm
*
/* -*-c-*-
- *
- * $Id: ecb-def.h,v 1.4 2004/04/17 09:58:37 mdw Exp $
*
* Definitions electronic code book mode
*
/* -*-c-*-
- *
- * $Id: ecb.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Electronic code book for block ciphers
*
/* -*-c-*-
- *
- * $Id: gcipher.h,v 1.5 2004/04/21 00:37:32 mdw Exp $
*
* Generic symmetric cipher interface
*
/* -*-c-*-
- *
- * $Id: ghash-def.h,v 1.7 2004/04/08 01:36:15 mdw Exp $
*
* Definitions for generic hash interface
*
/* -*-c-*-
- *
- * $Id$
*
* Generic hash function interface
*
/* -*-c-*-
- *
- * $Id: gmac.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Generic MAC function interface
*
/* -*-c-*-
- *
- * $Id: has160.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The HAS160 message digest function
*
/* -*-c-*-
- *
- * $Id: has160.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The HAS160 message digest function
*
/* -*-c-*-
- *
- * $Id$
*
* Generic handling for message digest functions
*
int main(int argc, char *argv[]) \
{ \
ego(argv[0]); \
- test_run(argc, argv, defs, SRCDIR"/tests/" #pre); \
+ test_run(argc, argv, defs, SRCDIR"/t/" #pre); \
return (0); \
}
/* -*-c-*-
- *
- * $Id: hmac-def.h,v 1.8 2004/04/08 01:36:15 mdw Exp $
*
* Definitions for HMAC and NMAC
*
int main(int argc, char *argv[]) \
{ \
ego(argv[0]); \
- test_run(argc, argv, macdefs, SRCDIR"/tests/" #pre); \
+ test_run(argc, argv, macdefs, SRCDIR"/t/" #pre); \
return (0); \
}
/* -*-c-*-
- *
- * $Id: hmac.h,v 1.7 2004/04/08 01:36:15 mdw Exp $
*
* Generic code for HMAC and NMAC
*
/* -*-c-*-
- *
- * $Id: idea.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of the IDEA cipher
*
/* -*-c-*-
- *
- * $Id: idea.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of the IDEA cipher
*
/* -*-c-*-
- *
- * $Id: mars-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Generate the MARS S-box table
*
/* -*-c-*-
- *
- * $Id: mars.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The MARS block cipher
*
/* -*-c-*-
- *
- * $Id: mars.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The MARS block cipher
*
/* -*-c-*-
- *
- * $Id: md2-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Tables for MD2
*
/* -*-c-*-
- *
- * $Id: md2.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The MD2 message digest function
*
/* -*-c-*-
- *
- * $Id: md2.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The MD2 message digest function
*
/* -*-c-*-
- *
- * $Id: md4.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The MD4 message digest function
*
/* -*-c-*-
- *
- * $Id: md4.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* The MD4 message digest function
*
/* -*-c-*-
- *
- * $Id: md5.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The MD5 message digest function
*
/* -*-c-*-
- *
- * $Id: md5.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* The MD5 message digest function
*
/* -*-c-*-
- *
- * $Id: mgf-def.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Definitions for the MGF-1 mask generator
*
/* -*-c-*-
- *
- * $Id: mgf.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The MGF mask generation function
*
###
### Lots of lists of crypto primitives in various modes of operation.
+## Test programs for symmetric primitives.
SYMM_TESTS =
+## Source and header files for primitives under modes of operation.
GENMODES_C =
GENMODES_H =
+## Block cipher modes.
%repeat
-GENMODES_C += @blkc-@blkcmode.c
-GENMODES_H += @blkc-@blkcmode.h
+GENMODES_C += modes/@blkc-@blkcmode.c
+GENMODES_H += modes/@blkc-@blkcmode.h
SYMM_TESTS += @blkc-@blkcmode.$t
%end
+## Hash function modes.
%repeat
-GENMODES_C += @hash-@hashmode.c
-GENMODES_H += @hash-@hashmode.h
+GENMODES_C += modes/@hash-@hashmode.c
+GENMODES_H += modes/@hash-@hashmode.h
SYMM_TESTS += @hash-@hashmode.$t
%end
+## Interface and implementation headers for the various modes.
MODE_H =
%repeat
MODE_H += @blkcmode.h @blkcmode-def.h
MODE_H += @hashmode.h @hashmode-def.h
%end
+## Block cipher interfaces and implementations.
BLKC_C =
BLKC_H =
%repeat
SYMM_TESTS += @blkc.$t
%end
+## Hash function interfaces and implementations.
HASH_C =
HASH_H =
%repeat
SYMM_TESTS += @hash.$t
%end
+## Modes for symmetric encryption.
CIPHER_MODES =
%repeat
CIPHER_MODES += @blkc-@blkcciphermode
CIPHER_MODES += @hash-@hashciphermode
%end
+## Modes for message authentication.
MAC_MODES =
%repeat
MAC_MODES += @hash-@hashmacmode
%end
+## Test input files.
SYMM_TEST_FILES =
%repeat
-SYMM_TEST_FILES += tests/@blkc
+SYMM_TEST_FILES += t/@blkc
%end
%repeat
-SYMM_TEST_FILES += tests/@hash
+SYMM_TEST_FILES += t/@hash
%end
/* -*-c-*-
- *
- * $Id: noekeon.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The Noekeon block cipher
*
/* -*-c-*-
- *
- * $Id: noekeon.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Noekeon block cipher
*
/* -*-c-*-
- *
- * $Id: ofb-def.h,v 1.7 2004/04/08 01:36:15 mdw Exp $
*
* Definitions for output feedback mode
*
/* -*-c-*-
- *
- * $Id: ofb.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Output feedback for block ciphers
*
/* -*-c-*-
- *
- * $Id: rc2-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Substitution table for RC2
*
/* -*-c-*-
- *
- * $Id: rc2.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The RC2 block cipher
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/rc2");
+ test_run(argc, argv, defs, SRCDIR"/t/rc2");
return (0);
}
/* -*-c-*-
- *
- * $Id: rc2.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The RC2 block cipher
*
/* -*-c-*-
- *
- * $Id: rc4.c,v 1.6 2004/04/08 01:36:15 mdw Exp $
*
* The alleged RC4 stream cipher
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/rc4");
+ test_run(argc, argv, defs, SRCDIR"/t/rc4");
return (0);
}
/* -*-c-*-
- *
- * $Id: rc4.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The alleged RC4 stream cipher
*
/* -*-c-*-
- *
- * $Id: rc5.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The RC5-32/12 block cipher
*
/* -*-c-*-
- *
- * $Id: rc5.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The RC5-32/12 block cipher
*
/* -*-c-*-
- *
- * $Id: rijndael-base.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Low-level stuff for all Rijndael block sizes
*
/* -*-c-*-
- *
- * $Id: rijndael-base.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Internal header for Rijndael implementation
*
/* -*-c-*-
- *
- * $Id: rijndael-mktab.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Build precomputed tables for the Rijndael block cipher
*
/* -*-c-*-
- *
- * $Id: rijndael.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* The Rijndael block cipher
*
/* -*-c-*-
- *
- * $Id: rijndael.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The Rijndael block cipher
*
/* -*-c-*-
- *
- * $Id: rijndael192.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Rijndael block cipher, 192-bit version
*
/* -*-c-*-
- *
- * $Id: rijndael192.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Rijndael block cipher, 192-bit version
*
/* -*-c-*-
- *
- * $Id: rijndael256.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Rijndael block cipher, 256-bit version
*
/* -*-c-*-
- *
- * $Id: rijndael256.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Rijndael block cipher, 256-bit version
*
/* -*-c-*-
- *
- * $Id: rmd128.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The RIPEMD-128 message digest function
*
/* -*-c-*-
- *
- * $Id: rmd128.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The RIPEMD-128 message digest function
*
/* -*-c-*-
- *
- * $Id: rmd160.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The RIPEMD-160 message digest function
*
/* -*-c-*-
- *
- * $Id: rmd160.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* The RIPEMD-160 message digest function
*
/* -*-c-*-
- *
- * $Id: rmd256.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The RIPEMD-256 message digest function
*
/* -*-c-*-
- *
- * $Id: rmd256.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The RIPEMD-256 message digest function
*
/* -*-c-*-
- *
- * $Id: rmd320.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The RIPEMD-320 message digest function
*
/* -*-c-*-
- *
- * $Id: rmd320.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The RIPEMD-320 message digest function
*
/* -*-c-*-
- *
- * $Id: safer-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Generate tables for SAFER
*
/* -*-c-*-
- *
- * $Id: safer.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The SAFER block cipher
*
/* -*-c-*-
- *
- * $Id: safer.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The SAFER block cipher
*
/* -*-c-*-
- *
- * $Id: safersk.c,v 1.1 2001/04/29 17:37:35 mdw Exp $
*
* Stub source for SAFER SK
*
/* -*-c-*-
- *
- * $Id: safersk.h,v 1.1 2001/04/29 17:37:35 mdw Exp $
*
* Stub header for SAFER SK
*
/* -*-c-*-
- *
- * $Id: seal.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The SEAL pseudo-random function family
*
int main(int argc, char *argv[])
{
- test_run(argc, argv, defs, SRCDIR"/tests/seal");
+ test_run(argc, argv, defs, SRCDIR"/t/seal");
return (0);
}
/* -*-c-*-
- *
- * $Id: seal.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The SEAL pseudo-random function family
*
/* -*-c-*-
- *
- * $Id: serpent-check.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Check the Serpent S-boxes
*
/* -*-c-*-
- *
- * $Id: serpent-sbox.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Bitslice S-box implementations
*
/* -*-c-*-
- *
- * $Id: serpent.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Serpent block cipher
*
/* -*-c-*-
- *
- * $Id: serpent.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The Serpent block cipher
*
/* -*-c-*-
- *
- * $Id: sha.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of the SHA-1 hash function
*
/* -*-c-*-
- *
- * $Id: sha.h,v 1.6 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of the SHA-1 hash function
*
/* -*-c-*-
- *
- * $Id: sha224.c,v 1.1 2004/03/21 22:43:34 mdw Exp $
*
* Stub code for SHA-224
*/
/* -*-c-*-
- *
- * $Id: sha224.h,v 1.1 2004/03/21 22:43:34 mdw Exp $
*
* Stub header for SHA-224
*/
/* -*-c-*-
- *
- * $Id: sha256.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of the SHA-256 hash function
*
/* -*-c-*-
- *
- * $Id$
*
* Implementation of the SHA-256 hash function
*
/* -*-c-*-
- *
- * $Id: sha384.c,v 1.1 2000/10/15 17:48:15 mdw Exp $
*
* Stub code for SHA-384
*/
/* -*-c-*-
- *
- * $Id: sha384.h,v 1.1 2000/10/15 17:48:15 mdw Exp $
*
* Stub header for SHA-384
*/
/* -*-c-*-
- *
- * $Id: sha512.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of the SHA-512 hash function
*
/* -*-c-*-
- *
- * $Id$
*
* Implementation of the SHA-512 hash function
*
/* -*-c-*-
- *
- * $Id: skipjack-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Skipjack S-box
*
/* -*-c-*-
- *
- * $Id: skipjack.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* The Skipjack block cipher
*
/* -*-c-*-
- *
- * $Id: skipjack.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The Skipjack block cipher
*
/* -*-c-*-
- *
- * $Id: square-mktab.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* Build precomputed tables for the Square block cipher
*
/* -*-c-*-
- *
- * $Id: square.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The Square block cipher
*
/* -*-c-*-
- *
- * $Id: square.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Square block cipher
*
mars
rijndael
serpent
-tea-test
twofish
-xtea-test
# Test vectors for Blowfish
-#
-# $Id: blowfish,v 1.3 2001/04/29 17:38:07 mdw Exp $
blowfish {
-# $Id: cast128,v 1.1 2000/06/17 12:11:49 mdw Exp $
-#
# Test vectors for CAST128
cast128 {
# Test vectors for DES
-#
-# $Id: des,v 1.2 2001/05/07 17:32:32 mdw Exp $
des {
# --- 7-byte keys ---
# Test vectors for double and triple DES
-#
-# $Id: des3,v 1.1 1999/09/03 08:41:14 mdw Exp $
des3 {
# --- Some simple single-DES things ---
# Test vectors for DES
-#
-# $Id: desx,v 1.1 2001/04/03 19:36:51 mdw Exp $
desx {
# --- From SCAN ---
# Test vectors for HAS160 hash function
-#
-# $Id: has160,v 1.1 2004/04/04 19:42:59 mdw Exp $
# --- Basic hash function ---
#
# Test vectors for IDEA
-#
-# $Id: idea,v 1.2 2000/07/15 17:48:15 mdw Exp $
# --- Thin on the ground, these are ---
# Test vectors for MD2 hash function
-#
-# $Id: md2,v 1.1 2001/02/21 20:03:23 mdw Exp $
# --- Basic hash function ---
#
# Test vectors for MD4 hash function
-#
-# $Id: md4,v 1.2 2000/07/15 10:03:13 mdw Exp $
# --- Basic hash function ---
#
# Test vectors for MD5 hash function
-#
-# $Id: md5,v 1.3 2000/07/15 10:03:13 mdw Exp $
# --- Basic hash function ---
#
-# $Id: noekeon,v 1.1 2001/05/08 22:17:42 mdw Exp $
-#
# Test vectors for Noekeon
noekeon {
# Test vectors for RC2
-#
-# $Id: rc2,v 1.1 2000/06/17 12:11:49 mdw Exp $
rc2 {
0000000000000000 63 0000000000000000 ebb773f993278eff;
# Test vectors for RC4
#
-# $Id: rc4,v 1.1 1999/09/03 08:41:14 mdw Exp $
-
-# --- Note about these test vectors ---
#
# These test vectors come from two places: the Usenet article confirming that
# the alleged RC4 source is interoperable with the BSAFE version, and some
# Test vectors for RC5-32/12
-#
-# $Id: rc5,v 1.1 1999/09/03 08:41:14 mdw Exp $
# --- Main cipher test vectors ---
#
-# $Id: rijndael192,v 1.2 2001/06/16 13:23:19 mdw Exp $
-#
# Test vectors for Rijndael
rijndael192 {
-# $Id: rijndael256,v 1.2 2001/06/16 13:23:19 mdw Exp $
-#
# Test vectors for Rijndael
rijndael256 {
# Test vectors for RIPEMD-160
#
-# $Id: rmd128,v 1.3 2004/03/21 22:44:36 mdw Exp $
-
-# --- Basic hash function ---
#
# Taken from the authors' web pages.
# Test vectors for RIPEMD-160
-#
-# $Id: rmd160,v 1.4 2004/03/21 22:44:36 mdw Exp $
# --- Basic hash function ---
#
# Test vectors for RIPEMD-256
-#
-# $Id: rmd256,v 1.2 2000/07/15 10:03:13 mdw Exp $
# --- Basic hash function ---
#
# Test vectors for RIPEMD-320
-#
-# $Id: rmd320,v 1.2 2000/07/15 10:03:13 mdw Exp $
# --- Basic hash function ---
#
-# $Id: safer,v 1.1 2001/04/29 17:37:38 mdw Exp $
-#
# Test vectors for SAFER
# From HAC 7.114, and Richard de Moliner's implementation
-# $Id: safersk,v 1.1 2001/04/29 17:37:38 mdw Exp $
-#
# Test vectors for SAFER
# From HAC 7.114, and Richard de Moliner's implementation
# Test vectors for SEAL
-#
-# $Id: seal,v 1.1 2000/06/17 12:11:49 mdw Exp $
seal {
67452301efcdab8998badcfe10325476c3d2e1f0 0x013577af
# Test vectors for the SHA-1 hash function
-#
-# $Id: sha,v 1.6 2004/04/21 00:38:42 mdw Exp $
# --- Basic hash function ---
#
-# $Id: sha224,v 1.2 2004/04/21 00:38:42 mdw Exp $
-#
# Test vectors for SHA-224
# --- Basic hash function ---
-# $Id: sha256,v 1.3 2004/04/21 00:38:42 mdw Exp $
-#
# Test vectors for SHA-256
# --- Basic hash function ---
-# $Id: sha384,v 1.4 2004/04/21 00:38:42 mdw Exp $
-#
# Test vectors for SHA-384
# --- Basic hash function ---
-# $Id: sha512,v 1.4 2004/04/21 00:38:42 mdw Exp $
-#
# Test vectors for SHA-512
# --- Basic hash function ---
-# $Id: skipjack,v 1.3 2000/08/04 23:24:01 mdw Exp $
-#
# Test vectors for Skipjack
# --- From the Skipjack definition ---
-# $Id: square,v 1.1 2000/07/15 20:51:59 mdw Exp $
-#
# Test vectors for the Square block cipher
square {
-# $Id: tea,v 1.2 2000/08/16 17:57:14 mdw Exp $
-#
# Test vectors for TEA
# --- Generated from Needham and Wheeler's original implementation ---
-# $Id: tiger,v 1.1 2000/07/15 10:17:19 mdw Exp $
-#
# Test vectors for Tiger
# --- The main hash ---
# Test vectors for the Whirlpool hash function
-#
-# $Id: sha 2187 2004-09-04 07:50:08Z mdw $
# --- Basic hash function ---
#
# Test vectors for the Whirlpool hash function
-#
-# $Id: sha 2187 2004-09-04 07:50:08Z mdw $
# --- Basic hash function ---
#
-# $Id: xtea,v 1.1 2000/07/15 13:44:32 mdw Exp $
-#
# Test vectors for XTEA
# --- Generated from Needham and Wheeler's original implementation ---
/* -*-c-*-
- *
- * $Id: tea.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The Tiny Encryption Algorithm
*
/* -*-c-*-
- *
- * $Id: tea.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The Tiny Encryption Algorithm
*
/* -*-c-*-
- *
- * $Id: tiger-base.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Common definitions for the Tiger hash function
*
/* -*-c-*-
- *
- * $Id: tiger-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Generate S-boxes for the Tiger hash function
*
/* -*-c-*-
- *
- * $Id: tiger.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* The Tiger hash function
*
/* -*-c-*-
- *
- * $Id: tiger.h,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The Tiger hash function
*
/* -*-c-*-
- *
- * $Id: twofish-mktab.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Build constant tables for Twofish
*
/* -*-c-*-
- *
- * $Id: twofish.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* Implementation of the Twofish cipher
*
/* -*-c-*-
- *
- * $Id: twofish.h,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* The Twofish block cipher
*
/* -*-c-*-
- *
- * $Id$
*
* Generate tables for Whirlpool hash function
*
/* -*-c-*-
- *
- * $Id$
*
* Whirlpool hash function
*
/* -*-c-*-
- *
- * $Id$
*
* Implementation of the Whirlpool hash function
*
/* -*-c-*-
- *
- * $Id$
*
* Stub code for Whirlpool-256
*/
/* -*-c-*-
- *
- * $Id$
*
* Stub header for Whirlpool-256
*/
/* -*-c-*-
- *
- * $Id: xtea.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
*
* The Extended Tiny Encryption Algorithm
*
/* -*-c-*-
- *
- * $Id: xtea.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
*
* The Extended Tiny Encryption Algorithm
*
--- /dev/null
+### -*-makefile-*-
+###
+### Common definitions for build scripts
+###
+### (c) 2013 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Catacomb.
+###
+### Catacomb is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### Catacomb is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with Catacomb; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+###--------------------------------------------------------------------------
+### Miscellaneous useful definitions.
+
+## Some convenient abbreviations for file suffixes.
+e = $(EXEEXT)
+o = $(OBJEXT)
+t = t$e
+
+## Installation directories.
+archincludedir = $(pkglibdir)/include
+
+###--------------------------------------------------------------------------
+### Initial values of common variables.
+
+EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+SUFFIXES =
+TESTS =
+BUILT_SOURCES =
+
+noinst_PROGRAMS =
+pkginclude_HEADERS =
+nodist_pkginclude_HEADERS =
+archinclude_HEADERS =
+nodist_archinclude_HEADERS =
+
+###--------------------------------------------------------------------------
+### Standard configuration substitutions.
+
+## Substitute tags in files.
+confsubst = $(top_srcdir)/config/confsubst
+
+SUBSTITUTIONS = \
+ prefix=$(prefix) exec_prefix=$(exec_prefix) \
+ libdir=$(libdir) includedir=$(includedir) \
+ PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
+ CATACOMB_LIBS="$(CATACOMB_LIBS)"
+
+V_SUBST = $(V_SUBST_$(V))
+V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
+V_SUBST_0 = @echo " SUBST $@";
+SUBST = $(V_SUBST)$(confsubst)
+
+###--------------------------------------------------------------------------
+### Include path.
+
+CATACOMB_INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/base \
+ -I$(top_srcdir)/key \
+ -I$(top_srcdir)/math \
+ -I$(top_builddir)/math \
+ -I$(top_srcdir)/misc \
+ -I$(top_srcdir)/pub \
+ -I$(top_srcdir)/rand \
+ -I$(top_srcdir)/symm \
+ -I$(top_srcdir)/symm/modes -I$(top_builddir)/symm/modes
+
+AM_CPPFLAGS = $(CATACOMB_INCLUDES)
+
+###--------------------------------------------------------------------------
+### Testing.
+
+SUFFIXES += .c .$t .to
+.c.to:
+ $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@
+.to.$t: libcatacomb.la
+ $(AM_V_CCLD)$(LINK) $< \
+ $(TEST_LIBS) $(top_builddir)/libcatacomb.la \
+ $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS)
+.PRECIOUS: %.to
+CLEANFILES += *.to *.$t
+
+###----- That's all, folks --------------------------------------------------