From 0f00dc4c8eb47e67bc0f148c2dd109f73a451e0a Mon Sep 17 00:00:00 2001 Message-Id: <0f00dc4c8eb47e67bc0f148c2dd109f73a451e0a.1717669097.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 2 Jun 2013 12:54:11 +0100 Subject: [PATCH] Rearrange the file tree. Organization: Straylight/Edgeware From: Mark Wooding It's actually, like, a tree now. Testing is a bit wobbly: you really do have to make the library before the tests will build. I don't like this, but the pieces of the library are all rather intertwined. One small piece of unintertwining: `strongprime.c' no longer includes `rand.h', which detaches the mathematical code from the symmetric-crypto build system disaster. Test files have been moved into `t/' directories as is now established practice. Also take the opportunity to eradicate the CVS `$Id...$' droppings. --- .gitignore | 16 +- .links | 4 +- Makefile.am | 1070 +------------------ base/Makefile.am | 54 + arena.c => base/arena.c | 2 - arena.h => base/arena.h | 2 - ct.c => base/ct.c | 0 ct.h => base/ct.h | 0 keysz-conv.c => base/keysz-conv.c | 0 keysz.c => base/keysz.c | 2 - keysz.h => base/keysz.h | 0 lmem.c => base/lmem.c | 2 - lmem.h => base/lmem.h | 2 - paranoia.h => base/paranoia.h | 2 - build-setup | 2 +- calc/ec2.cal | 2 - calc/ecp.cal | 2 - calc/gfx-test.cal | 2 - calc/gfx.cal | 2 - configure.ac | 13 +- key/Makefile.am | 65 ++ key-attr.c => key/key-attr.c | 2 - key-binary.c => key/key-binary.c | 2 - key-data.c => key/key-data.c | 2 - key-data.h => key/key-data.h | 2 - key-error.c => key/key-error.c | 2 - key-error.h => key/key-error.h | 2 - key-fetch.c => key/key-fetch.c | 2 - key-file.c => key/key-file.c | 2 - key-flags.c => key/key-flags.c | 2 - key-io.c => key/key-io.c | 2 - key-misc.c => key/key-misc.c | 2 - key-moan.c => key/key-moan.c | 2 - key-pack.c => key/key-pack.c | 2 - key-pass.c => key/key-pass.c | 2 - key-text.c => key/key-text.c | 2 - key.h => key/key.h | 2 - passphrase.c => key/passphrase.c | 2 - passphrase.h => key/passphrase.h | 2 - pixie-common.c => key/pixie-common.c | 2 - pixie.h => key/pixie.h | 2 - manual/catacomb.tex | 2 - math/Makefile.am | 392 +++++++ bin-gentab.awk => math/bin-gentab.awk | 4 +- bintab.h => math/bintab.h | 2 - bintab.in => math/bintab.in | 2 - bitops.h => math/bitops.h | 2 - bittest.c => math/bittest.c | 2 - buf.c => math/buf.c | 2 - buf.h => math/buf.h | 2 - ec-bin.c => math/ec-bin.c | 2 - ec-exp.c => math/ec-exp.c | 2 - ec-exp.h => math/ec-exp.h | 2 - ec-fetch.c => math/ec-fetch.c | 2 - ec-gentab.awk => math/ec-gentab.awk | 4 +- ec-guts.h => math/ec-guts.h | 2 - ec-info.c => math/ec-info.c | 2 - ec-keys.h => math/ec-keys.h | 2 - ec-prime.c => math/ec-prime.c | 2 - ec-raw.c => math/ec-raw.c | 2 - ec-raw.h => math/ec-raw.h | 2 - ec-test.c => math/ec-test.c | 4 +- ec-test.h => math/ec-test.h | 2 - ec.c => math/ec.c | 2 - ec.h => math/ec.h | 2 - ectab.h => math/ectab.h | 2 - ectab.in => math/ectab.in | 2 - exp.c => math/exp.c | 2 - exp.h => math/exp.h | 2 - f-binpoly.c => math/f-binpoly.c | 2 - f-niceprime.c => math/f-niceprime.c | 2 - f-prime.c => math/f-prime.c | 2 - field-exp.c => math/field-exp.c | 2 - field-exp.h => math/field-exp.h | 2 - field-guts.h => math/field-guts.h | 2 - field-parse.c => math/field-parse.c | 2 - field.c => math/field.c | 2 - field.h => math/field.h | 2 - g-bin.c => math/g-bin.c | 2 - g-ec.c => math/g-ec.c | 2 - g-prime.c => math/g-prime.c | 2 - genlimits.c => math/genlimits.c | 2 - genprimes.c => math/genprimes.c | 2 - genwheel.c => math/genwheel.c | 0 gf-arith.c => math/gf-arith.c | 4 +- gf-exp.c => math/gf-exp.c | 2 - gf-exp.h => math/gf-exp.h | 2 - gf-gcd.c => math/gf-gcd.c | 4 +- gf.h => math/gf.h | 2 - gfn.c => math/gfn.c | 4 +- gfn.h => math/gfn.h | 2 - gfreduce-exp.h => math/gfreduce-exp.h | 2 - gfreduce.c => math/gfreduce.c | 4 +- gfreduce.h => math/gfreduce.h | 2 - gfx-kmul.c => math/gfx-kmul.c | 4 +- gfx-sqr-mktab.c => math/gfx-sqr-mktab.c | 2 - gfx-sqr.c => math/gfx-sqr.c | 4 +- gfx.c => math/gfx.c | 4 +- gfx.h => math/gfx.h | 2 - group-dstr.c => math/group-dstr.c | 2 - group-exp.c => math/group-exp.c | 2 - group-exp.h => math/group-exp.h | 2 - group-file.c => math/group-file.c | 2 - group-guts.h => math/group-guts.h | 2 - group-parse.c => math/group-parse.c | 2 - group-stdops.c => math/group-stdops.c | 2 - group-string.c => math/group-string.c | 2 - group-test.c => math/group-test.c | 4 +- group.h => math/group.h | 2 - karatsuba.h => math/karatsuba.h | 2 - limlee.c => math/limlee.c | 2 - limlee.h => math/limlee.h | 2 - mp-arith.c => math/mp-arith.c | 4 +- mp-const.c => math/mp-const.c | 2 - mp-exp.c => math/mp-exp.c | 2 - mp-exp.h => math/mp-exp.h | 2 - mp-fibonacci.c => math/mp-fibonacci.c | 2 +- mp-fibonacci.h => math/mp-fibonacci.h | 0 mp-gcd.c => math/mp-gcd.c | 4 +- mp-io.c => math/mp-io.c | 2 - mp-jacobi.c => math/mp-jacobi.c | 4 +- mp-mem.c => math/mp-mem.c | 2 - mp-misc.c => math/mp-misc.c | 2 - mp-modexp.c => math/mp-modexp.c | 4 +- mp-modsqrt.c => math/mp-modsqrt.c | 4 +- mp-sqrt.c => math/mp-sqrt.c | 4 +- mp-test.c => math/mp-test.c | 2 - mp.h => math/mp.h | 2 - mparena.c => math/mparena.c | 2 - mparena.h => math/mparena.h | 2 - mpbarrett-exp.c => math/mpbarrett-exp.c | 4 +- mpbarrett-exp.h => math/mpbarrett-exp.h | 2 - mpbarrett-mexp.c => math/mpbarrett-mexp.c | 4 +- mpbarrett.c => math/mpbarrett.c | 4 +- mpbarrett.h => math/mpbarrett.h | 2 - mpcrt.c => math/mpcrt.c | 4 +- mpcrt.h => math/mpcrt.h | 2 - mpdump.c => math/mpdump.c | 2 - mpint.c => math/mpint.c | 4 +- mpint.h => math/mpint.h | 2 - mpmont-exp.c => math/mpmont-exp.c | 4 +- mpmont-exp.h => math/mpmont-exp.h | 2 - mpmont-mexp.c => math/mpmont-mexp.c | 4 +- mpmont.c => math/mpmont.c | 4 +- mpmont.h => math/mpmont.h | 2 - mpmul.c => math/mpmul.c | 4 +- mpmul.h => math/mpmul.h | 2 - mprand.c => math/mprand.c | 2 - mprand.h => math/mprand.h | 2 - mpreduce-exp.h => math/mpreduce-exp.h | 2 - mpreduce.c => math/mpreduce.c | 4 +- mpreduce.h => math/mpreduce.h | 2 - mpscan.c => math/mpscan.c | 2 - mpscan.h => math/mpscan.h | 2 - mptext-dstr.c => math/mptext-dstr.c | 2 - mptext-file.c => math/mptext-file.c | 2 - mptext-len.c => math/mptext-len.c | 2 - mptext-string.c => math/mptext-string.c | 2 - mptext.c => math/mptext.c | 4 +- mptext.h => math/mptext.h | 2 - mptypes.c => math/mptypes.c | 2 - mpw.h => math/mpw.h | 2 - mpx-kmul.c => math/mpx-kmul.c | 4 +- mpx-ksqr.c => math/mpx-ksqr.c | 4 +- mpx.c => math/mpx.c | 4 +- mpx.h => math/mpx.h | 2 - p-gentab.awk => math/p-gentab.awk | 4 +- pfilt.c => math/pfilt.c | 2 - pfilt.h => math/pfilt.h | 2 - pgen-gcd.c => math/pgen-gcd.c | 2 - pgen-simul.c => math/pgen-simul.c | 2 - pgen-stdev.c => math/pgen-stdev.c | 2 - pgen.c => math/pgen.c | 4 +- pgen.h => math/pgen.h | 2 - prim.c => math/prim.c | 2 - prim.h => math/prim.h | 2 - primeiter.c => math/primeiter.c | 2 +- primeiter.h => math/primeiter.h | 0 ptab.h => math/ptab.h | 2 - ptab.in => math/ptab.in | 2 - qdparse.c => math/qdparse.c | 2 - qdparse.h => math/qdparse.h | 2 - rabin.c => math/rabin.c | 2 - rabin.h => math/rabin.h | 2 - rho.c => math/rho.c | 2 - rho.h => math/rho.h | 2 - strongprime.c => math/strongprime.c | 3 - strongprime.h => math/strongprime.h | 2 - {tests => math/t}/ec | 2 - {tests => math/t}/gf | 2 - {tests => math/t}/gfn | 2 - {tests => math/t}/gfreduce | 2 - {tests => math/t}/gfx | 2 - {tests => math/t}/group | 2 - {tests => math/t}/mp | 2 - {tests => math/t}/mpbarrett | 2 - {tests => math/t}/mpcrt | 2 - {tests => math/t}/mpint | 2 - {tests => math/t}/mpmont | 2 - {tests => math/t}/mpreduce | 2 - {tests => math/t}/mptext | 2 - {tests => math/t}/mpx | 2 - {tests => math/t}/mpx-gen | 2 - {tests => math/t}/pgen | 2 - misc/Makefile.am | 51 + gfshare-mktab.c => misc/gfshare-mktab.c | 2 - gfshare.c => misc/gfshare.c | 2 - gfshare.h => misc/gfshare.h | 2 - share.c => misc/share.c | 2 - share.h => misc/share.h | 2 - mkpgroups | 42 - papers/rand.tex | 2 - pcheck.pl | 43 - progs/Makefile.am | 109 ++ catcrypt.1 => progs/catcrypt.1 | 0 catcrypt.c => progs/catcrypt.c | 2 - catsign.1 => progs/catsign.1 | 0 catsign.c => progs/catsign.c | 2 - cc-enc.c => progs/cc-enc.c | 2 - cc-hash.c => progs/cc-hash.c | 0 cc-kem.c => progs/cc-kem.c | 2 - cc-list.c => progs/cc-list.c | 2 - cc-progress.c => progs/cc-progress.c | 0 cc-sig.c => progs/cc-sig.c | 2 - cc-subcmd.c => progs/cc-subcmd.c | 2 - cc.h => progs/cc.h | 2 - cookie.1 => progs/cookie.1 | 0 cookie.c => progs/cookie.c | 2 - dsig.1 => progs/dsig.1 | 0 dsig.c => progs/dsig.c | 2 - factorial.c => progs/factorial.c | 2 - fibonacci.c => progs/fibonacci.c | 0 hashsum.1 => progs/hashsum.1 | 0 hashsum.c => progs/hashsum.c | 2 - key.1 => progs/key.1 | 0 keyutil.c => progs/key.c | 2 - keyring.5 => progs/keyring.5 | 0 mkphrase.1 => progs/mkphrase.1 | 0 mkphrase.c => progs/mkphrase.c | 2 - perftest.c => progs/perftest.c | 2 - pixie.1 => progs/pixie.1 | 0 pixie.c => progs/pixie.c | 2 - rspit.c => progs/rspit.c | 2 - xpixie => progs/xpixie | 0 pub/Makefile.am | 101 ++ bbs-fetch.c => pub/bbs-fetch.c | 2 - bbs-gen.c => pub/bbs-gen.c | 2 - bbs-jump.c => pub/bbs-jump.c | 4 +- bbs-rand.c => pub/bbs-rand.c | 4 +- bbs.h => pub/bbs.h | 2 - dh-check.c => pub/dh-check.c | 2 - dh-fetch.c => pub/dh-fetch.c | 2 - dh-gen.c => pub/dh-gen.c | 2 - dh-kcdsa.c => pub/dh-kcdsa.c | 2 - dh-limlee.c => pub/dh-limlee.c | 2 - dh-param.c => pub/dh-param.c | 2 - dh.h => pub/dh.h | 2 - dsa-check.c => pub/dsa-check.c | 2 - dsa-gen.c => pub/dsa-gen.c | 4 +- dsa-misc.c => pub/dsa-misc.c | 0 dsa-sign.c => pub/dsa-sign.c | 4 +- dsa-verify.c => pub/dsa-verify.c | 4 +- dsa.h => pub/dsa.h | 2 - gdsa.c => pub/gdsa.c | 4 +- gdsa.h => pub/gdsa.h | 2 - gkcdsa.c => pub/gkcdsa.c | 4 +- gkcdsa.h => pub/gkcdsa.h | 2 - keycheck-mp.c => pub/keycheck-mp.c | 2 - keycheck-report.c => pub/keycheck-report.c | 2 - keycheck.c => pub/keycheck.c | 2 - keycheck.h => pub/keycheck.h | 2 - oaep.c => pub/oaep.c | 2 - pkcs1.c => pub/pkcs1.c | 2 - pss.c => pub/pss.c | 2 - rsa-fetch.c => pub/rsa-fetch.c | 2 - rsa-gen.c => pub/rsa-gen.c | 2 - rsa-priv.c => pub/rsa-priv.c | 2 - rsa-pub.c => pub/rsa-pub.c | 2 - rsa-recover.c => pub/rsa-recover.c | 2 - rsa-test.c => pub/rsa-test.c | 4 +- rsa.h => pub/rsa.h | 2 - {tests => pub/t}/bbs | 2 - {tests => pub/t}/dsa | 2 - {tests => pub/t}/gdsa | 2 - {tests => pub/t}/gkcdsa | 2 - {tests => pub/t}/rsa | 2 - rand/Makefile.am | 83 ++ dsarand.c => rand/dsarand.c | 2 - dsarand.h => rand/dsarand.h | 2 - fibrand.c => rand/fibrand.c | 2 - fibrand.h => rand/fibrand.h | 2 - fipstest.c => rand/fipstest.c | 2 - fipstest.h => rand/fipstest.h | 2 - grand.c => rand/grand.c | 2 - grand.h => rand/grand.h | 2 - lcrand.c => rand/lcrand.c | 4 +- lcrand.h => rand/lcrand.h | 2 - maurer.c => rand/maurer.c | 2 - maurer.h => rand/maurer.h | 2 - noise.c => rand/noise.c | 2 - noise.h => rand/noise.h | 2 - rand.c => rand/rand.c | 2 - rand.h => rand/rand.h | 2 - sslprf.c => rand/sslprf.c | 4 +- sslprf.h => rand/sslprf.h | 2 - {tests => rand/t}/lcrand | 2 - {tests => rand/t}/sslprf | 2 - {tests => rand/t}/tlsprf | 2 - tlsprf.c => rand/tlsprf.c | 4 +- tlsprf.h => rand/tlsprf.h | 2 - symm/Makefile.am | 401 +++++++ {tests => symm}/aes-trans | 0 blkc.h => symm/blkc.h | 4 +- blowfish-mktab.c => symm/blowfish-mktab.c | 2 - blowfish.c => symm/blowfish.c | 2 - blowfish.h => symm/blowfish.h | 2 - cast-base.h => symm/cast-base.h | 2 - cast-s.c => symm/cast-s.c | 2 - cast-sk.c => symm/cast-sk.c | 2 - cast-tab.h => symm/cast-tab.h | 2 - cast128.c => symm/cast128.c | 2 - cast128.h => symm/cast128.h | 2 - cast256.c => symm/cast256.c | 2 - cast256.h => symm/cast256.h | 2 - cbc-def.h => symm/cbc-def.h | 2 - cbc.h => symm/cbc.h | 2 - cfb-def.h => symm/cfb-def.h | 2 - cfb.h => symm/cfb.h | 2 - counter-def.h => symm/counter-def.h | 2 - counter.h => symm/counter.h | 2 - crc32.c => symm/crc32.c | 2 - crc32.h => symm/crc32.h | 2 - daftstory.h => symm/daftstory.h | 2 - des-base.c => symm/des-base.c | 2 - des-base.h => symm/des-base.h | 2 - des-mktab.c => symm/des-mktab.c | 2 - des.c => symm/des.c | 2 - des.h => symm/des.h | 2 - des3.c => symm/des3.c | 2 - des3.h => symm/des3.h | 2 - desx-tab.h => symm/desx-tab.h | 2 - desx.c => symm/desx.c | 2 - desx.h => symm/desx.h | 2 - ecb-def.h => symm/ecb-def.h | 2 - ecb.h => symm/ecb.h | 2 - gcipher.h => symm/gcipher.h | 2 - ghash-def.h => symm/ghash-def.h | 2 - ghash.h => symm/ghash.h | 2 - gmac.h => symm/gmac.h | 2 - gthingtab.c.in => symm/gthingtab.c.in | 0 has160.c => symm/has160.c | 2 - has160.h => symm/has160.h | 2 - hash.h => symm/hash.h | 4 +- hmac-def.h => symm/hmac-def.h | 4 +- hmac.h => symm/hmac.h | 2 - idea.c => symm/idea.c | 2 - idea.h => symm/idea.h | 2 - mars-mktab.c => symm/mars-mktab.c | 2 - mars.c => symm/mars.c | 2 - mars.h => symm/mars.h | 2 - md2-tab.h => symm/md2-tab.h | 2 - md2.c => symm/md2.c | 2 - md2.h => symm/md2.h | 2 - md4.c => symm/md4.c | 2 - md4.h => symm/md4.h | 2 - md5.c => symm/md5.c | 2 - md5.h => symm/md5.h | 2 - mgf-def.h => symm/mgf-def.h | 2 - mgf.h => symm/mgf.h | 2 - mode.c.in => symm/mode.c.in | 0 mode.h.in => symm/mode.h.in | 0 modes.am.in => symm/modes.am.in | 22 +- multigen => symm/multigen | 0 noekeon.c => symm/noekeon.c | 2 - noekeon.h => symm/noekeon.h | 2 - ofb-def.h => symm/ofb-def.h | 2 - ofb.h => symm/ofb.h | 2 - rc2-tab.h => symm/rc2-tab.h | 2 - rc2.c => symm/rc2.c | 4 +- rc2.h => symm/rc2.h | 2 - rc4.c => symm/rc4.c | 4 +- rc4.h => symm/rc4.h | 2 - rc5.c => symm/rc5.c | 2 - rc5.h => symm/rc5.h | 2 - rijndael-base.c => symm/rijndael-base.c | 2 - rijndael-base.h => symm/rijndael-base.h | 2 - rijndael-mktab.c => symm/rijndael-mktab.c | 2 - rijndael.c => symm/rijndael.c | 2 - rijndael.h => symm/rijndael.h | 2 - rijndael192.c => symm/rijndael192.c | 2 - rijndael192.h => symm/rijndael192.h | 2 - rijndael256.c => symm/rijndael256.c | 2 - rijndael256.h => symm/rijndael256.h | 2 - rmd128.c => symm/rmd128.c | 2 - rmd128.h => symm/rmd128.h | 2 - rmd160.c => symm/rmd160.c | 2 - rmd160.h => symm/rmd160.h | 2 - rmd256.c => symm/rmd256.c | 2 - rmd256.h => symm/rmd256.h | 2 - rmd320.c => symm/rmd320.c | 2 - rmd320.h => symm/rmd320.h | 2 - safer-mktab.c => symm/safer-mktab.c | 2 - safer.c => symm/safer.c | 2 - safer.h => symm/safer.h | 2 - safersk.c => symm/safersk.c | 2 - safersk.h => symm/safersk.h | 2 - seal.c => symm/seal.c | 4 +- seal.h => symm/seal.h | 2 - serpent-check.c => symm/serpent-check.c | 2 - serpent-sbox.h => symm/serpent-sbox.h | 2 - serpent.c => symm/serpent.c | 2 - serpent.h => symm/serpent.h | 2 - sha.c => symm/sha.c | 2 - sha.h => symm/sha.h | 2 - sha224.c => symm/sha224.c | 2 - sha224.h => symm/sha224.h | 2 - sha256.c => symm/sha256.c | 2 - sha256.h => symm/sha256.h | 2 - sha384.c => symm/sha384.c | 2 - sha384.h => symm/sha384.h | 2 - sha512.c => symm/sha512.c | 2 - sha512.h => symm/sha512.h | 2 - skipjack-tab.h => symm/skipjack-tab.h | 2 - skipjack.c => symm/skipjack.c | 2 - skipjack.h => symm/skipjack.h | 2 - square-mktab.c => symm/square-mktab.c | 2 - square.c => symm/square.c | 2 - square.h => symm/square.h | 2 - {tests => symm/t}/.gitignore | 2 - {tests => symm/t}/blowfish | 2 - {tests => symm/t}/cast128 | 2 - {tests => symm/t}/cast256.aes | 0 {tests => symm/t}/des | 2 - {tests => symm/t}/des3 | 2 - {tests => symm/t}/desx | 2 - {tests => symm/t}/has160 | 2 - {tests => symm/t}/idea | 2 - {tests => symm/t}/mars.aes | 0 {tests => symm/t}/md2 | 2 - {tests => symm/t}/md4 | 2 - {tests => symm/t}/md5 | 2 - {tests => symm/t}/noekeon | 2 - {tests => symm/t}/rc2 | 2 - {tests => symm/t}/rc4 | 3 - {tests => symm/t}/rc5 | 2 - {tests => symm/t}/rijndael.aes | 0 {tests => symm/t}/rijndael192 | 2 - {tests => symm/t}/rijndael256 | 2 - {tests => symm/t}/rmd128 | 3 - {tests => symm/t}/rmd160 | 2 - {tests => symm/t}/rmd256 | 2 - {tests => symm/t}/rmd320 | 2 - {tests => symm/t}/safer | 2 - {tests => symm/t}/safersk | 2 - {tests => symm/t}/seal | 2 - {tests => symm/t}/serpent.aes | 0 {tests => symm/t}/sha | 2 - {tests => symm/t}/sha224 | 2 - {tests => symm/t}/sha256 | 2 - {tests => symm/t}/sha384 | 2 - {tests => symm/t}/sha512 | 2 - {tests => symm/t}/skipjack | 2 - {tests => symm/t}/square | 2 - {tests => symm/t}/tea | 2 - {tests => symm/t}/tea-test.c | 0 {tests => symm/t}/tiger | 2 - {tests => symm/t}/twofish.aes | 0 {tests => symm/t}/whirlpool | 2 - {tests => symm/t}/whirlpool256 | 2 - {tests => symm/t}/xtea | 2 - {tests => symm/t}/xtea-test.c | 0 tea.c => symm/tea.c | 2 - tea.h => symm/tea.h | 2 - tiger-base.h => symm/tiger-base.h | 2 - tiger-mktab.c => symm/tiger-mktab.c | 2 - tiger.c => symm/tiger.c | 2 - tiger.h => symm/tiger.h | 2 - twofish-mktab.c => symm/twofish-mktab.c | 2 - twofish.c => symm/twofish.c | 2 - twofish.h => symm/twofish.h | 2 - whirlpool-mktab.c => symm/whirlpool-mktab.c | 2 - whirlpool.c => symm/whirlpool.c | 2 - whirlpool.h => symm/whirlpool.h | 2 - whirlpool256.c => symm/whirlpool256.c | 2 - whirlpool256.h => symm/whirlpool256.h | 2 - xtea.c => symm/xtea.c | 2 - xtea.h => symm/xtea.h | 2 - vars.am | 102 ++ 488 files changed, 1475 insertions(+), 2074 deletions(-) create mode 100644 base/Makefile.am rename arena.c => base/arena.c (97%) rename arena.h => base/arena.h (97%) rename ct.c => base/ct.c (100%) rename ct.h => base/ct.h (100%) rename keysz-conv.c => base/keysz-conv.c (100%) rename keysz.c => base/keysz.c (97%) rename keysz.h => base/keysz.h (100%) rename lmem.c => base/lmem.c (99%) rename lmem.h => base/lmem.h (98%) rename paranoia.h => base/paranoia.h (96%) create mode 100644 key/Makefile.am rename key-attr.c => key/key-attr.c (99%) rename key-binary.c => key/key-binary.c (99%) rename key-data.c => key/key-data.c (99%) rename key-data.h => key/key-data.h (99%) rename key-error.c => key/key-error.c (99%) rename key-error.h => key/key-error.h (99%) rename key-fetch.c => key/key-fetch.c (99%) rename key-file.c => key/key-file.c (99%) rename key-flags.c => key/key-flags.c (99%) rename key-io.c => key/key-io.c (99%) rename key-misc.c => key/key-misc.c (99%) rename key-moan.c => key/key-moan.c (96%) rename key-pack.c => key/key-pack.c (99%) rename key-pass.c => key/key-pass.c (99%) rename key-text.c => key/key-text.c (99%) rename key.h => key/key.h (99%) rename passphrase.c => key/passphrase.c (99%) rename passphrase.h => key/passphrase.h (99%) rename pixie-common.c => key/pixie-common.c (99%) rename pixie.h => key/pixie.h (99%) create mode 100644 math/Makefile.am rename bin-gentab.awk => math/bin-gentab.awk (95%) rename bintab.h => math/bintab.h (99%) rename bintab.in => math/bintab.in (99%) rename bitops.h => math/bitops.h (96%) rename bittest.c => math/bittest.c (96%) rename buf.c => math/buf.c (99%) rename buf.h => math/buf.h (99%) rename ec-bin.c => math/ec-bin.c (99%) rename ec-exp.c => math/ec-exp.c (99%) rename ec-exp.h => math/ec-exp.h (97%) rename ec-fetch.c => math/ec-fetch.c (97%) rename ec-gentab.awk => math/ec-gentab.awk (96%) rename ec-guts.h => math/ec-guts.h (99%) rename ec-info.c => math/ec-info.c (99%) rename ec-keys.h => math/ec-keys.h (97%) rename ec-prime.c => math/ec-prime.c (99%) rename ec-raw.c => math/ec-raw.c (97%) rename ec-raw.h => math/ec-raw.h (97%) rename ec-test.c => math/ec-test.c (99%) rename ec-test.h => math/ec-test.h (96%) rename ec.c => math/ec.c (99%) rename ec.h => math/ec.h (99%) rename ectab.h => math/ectab.h (97%) rename ectab.in => math/ectab.in (99%) rename exp.c => math/exp.c (97%) rename exp.h => math/exp.h (99%) rename f-binpoly.c => math/f-binpoly.c (99%) rename f-niceprime.c => math/f-niceprime.c (99%) rename f-prime.c => math/f-prime.c (99%) rename field-exp.c => math/field-exp.c (99%) rename field-exp.h => math/field-exp.h (99%) rename field-guts.h => math/field-guts.h (99%) rename field-parse.c => math/field-parse.c (97%) rename field.c => math/field.c (99%) rename field.h => math/field.h (99%) rename g-bin.c => math/g-bin.c (99%) rename g-ec.c => math/g-ec.c (99%) rename g-prime.c => math/g-prime.c (99%) rename genlimits.c => math/genlimits.c (99%) rename genprimes.c => math/genprimes.c (98%) rename genwheel.c => math/genwheel.c (100%) rename gf-arith.c => math/gf-arith.c (99%) rename gf-exp.c => math/gf-exp.c (99%) rename gf-exp.h => math/gf-exp.h (99%) rename gf-gcd.c => math/gf-gcd.c (99%) rename gf.h => math/gf.h (99%) rename gfn.c => math/gfn.c (98%) rename gfn.h => math/gfn.h (98%) rename gfreduce-exp.h => math/gfreduce-exp.h (96%) rename gfreduce.c => math/gfreduce.c (99%) rename gfreduce.h => math/gfreduce.h (98%) rename gfx-kmul.c => math/gfx-kmul.c (99%) rename gfx-sqr-mktab.c => math/gfx-sqr-mktab.c (97%) rename gfx-sqr.c => math/gfx-sqr.c (98%) rename gfx.c => math/gfx.c (99%) rename gfx.h => math/gfx.h (98%) rename group-dstr.c => math/group-dstr.c (97%) rename group-exp.c => math/group-exp.c (99%) rename group-exp.h => math/group-exp.h (96%) rename group-file.c => math/group-file.c (96%) rename group-guts.h => math/group-guts.h (99%) rename group-parse.c => math/group-parse.c (97%) rename group-stdops.c => math/group-stdops.c (99%) rename group-string.c => math/group-string.c (97%) rename group-test.c => math/group-test.c (99%) rename group.h => math/group.h (99%) rename karatsuba.h => math/karatsuba.h (98%) rename limlee.c => math/limlee.c (99%) rename limlee.h => math/limlee.h (98%) rename mp-arith.c => math/mp-arith.c (99%) rename mp-const.c => math/mp-const.c (96%) rename mp-exp.c => math/mp-exp.c (99%) rename mp-exp.h => math/mp-exp.h (99%) rename mp-fibonacci.c => math/mp-fibonacci.c (99%) rename mp-fibonacci.h => math/mp-fibonacci.h (100%) rename mp-gcd.c => math/mp-gcd.c (99%) rename mp-io.c => math/mp-io.c (99%) rename mp-jacobi.c => math/mp-jacobi.c (98%) rename mp-mem.c => math/mp-mem.c (99%) rename mp-misc.c => math/mp-misc.c (97%) rename mp-modexp.c => math/mp-modexp.c (97%) rename mp-modsqrt.c => math/mp-modsqrt.c (97%) rename mp-sqrt.c => math/mp-sqrt.c (98%) rename mp-test.c => math/mp-test.c (96%) rename mp.h => math/mp.h (99%) rename mparena.c => math/mparena.c (99%) rename mparena.h => math/mparena.h (98%) rename mpbarrett-exp.c => math/mpbarrett-exp.c (97%) rename mpbarrett-exp.h => math/mpbarrett-exp.h (96%) rename mpbarrett-mexp.c => math/mpbarrett-mexp.c (98%) rename mpbarrett.c => math/mpbarrett.c (98%) rename mpbarrett.h => math/mpbarrett.h (99%) rename mpcrt.c => math/mpcrt.c (99%) rename mpcrt.h => math/mpcrt.h (98%) rename mpdump.c => math/mpdump.c (97%) rename mpint.c => math/mpint.c (97%) rename mpint.h => math/mpint.h (99%) rename mpmont-exp.c => math/mpmont-exp.c (98%) rename mpmont-exp.h => math/mpmont-exp.h (96%) rename mpmont-mexp.c => math/mpmont-mexp.c (98%) rename mpmont.c => math/mpmont.c (99%) rename mpmont.h => math/mpmont.h (99%) rename mpmul.c => math/mpmul.c (97%) rename mpmul.h => math/mpmul.h (98%) rename mprand.c => math/mprand.c (98%) rename mprand.h => math/mprand.h (97%) rename mpreduce-exp.h => math/mpreduce-exp.h (96%) rename mpreduce.c => math/mpreduce.c (99%) rename mpreduce.h => math/mpreduce.h (99%) rename mpscan.c => math/mpscan.c (98%) rename mpscan.h => math/mpscan.h (98%) rename mptext-dstr.c => math/mptext-dstr.c (97%) rename mptext-file.c => math/mptext-file.c (96%) rename mptext-len.c => math/mptext-len.c (99%) rename mptext-string.c => math/mptext-string.c (97%) rename mptext.c => math/mptext.c (99%) rename mptext.h => math/mptext.h (99%) rename mptypes.c => math/mptypes.c (99%) rename mpw.h => math/mpw.h (97%) rename mpx-kmul.c => math/mpx-kmul.c (99%) rename mpx-ksqr.c => math/mpx-ksqr.c (98%) rename mpx.c => math/mpx.c (99%) rename mpx.h => math/mpx.h (99%) rename p-gentab.awk => math/p-gentab.awk (98%) rename pfilt.c => math/pfilt.c (99%) rename pfilt.h => math/pfilt.h (98%) rename pgen-gcd.c => math/pgen-gcd.c (97%) rename pgen-simul.c => math/pgen-simul.c (99%) rename pgen-stdev.c => math/pgen-stdev.c (97%) rename pgen.c => math/pgen.c (99%) rename pgen.h => math/pgen.h (99%) rename prim.c => math/prim.c (97%) rename prim.h => math/prim.h (97%) rename primeiter.c => math/primeiter.c (99%) rename primeiter.h => math/primeiter.h (100%) rename ptab.h => math/ptab.h (96%) rename ptab.in => math/ptab.in (99%) rename qdparse.c => math/qdparse.c (98%) rename qdparse.h => math/qdparse.h (97%) rename rabin.c => math/rabin.c (99%) rename rabin.h => math/rabin.h (99%) rename rho.c => math/rho.c (99%) rename rho.h => math/rho.h (98%) rename strongprime.c => math/strongprime.c (98%) rename strongprime.h => math/strongprime.h (98%) rename {tests => math/t}/ec (99%) rename {tests => math/t}/gf (99%) rename {tests => math/t}/gfn (96%) rename {tests => math/t}/gfreduce (99%) rename {tests => math/t}/gfx (99%) rename {tests => math/t}/group (99%) rename {tests => math/t}/mp (99%) rename {tests => math/t}/mpbarrett (99%) rename {tests => math/t}/mpcrt (92%) rename {tests => math/t}/mpint (94%) rename {tests => math/t}/mpmont (99%) rename {tests => math/t}/mpreduce (99%) rename {tests => math/t}/mptext (99%) rename {tests => math/t}/mpx (99%) rename {tests => math/t}/mpx-gen (97%) rename {tests => math/t}/pgen (96%) create mode 100644 misc/Makefile.am rename gfshare-mktab.c => misc/gfshare-mktab.c (97%) rename gfshare.c => misc/gfshare.c (99%) rename gfshare.h => misc/gfshare.h (99%) rename share.c => misc/share.c (99%) rename share.h => misc/share.h (99%) delete mode 100755 mkpgroups delete mode 100644 pcheck.pl create mode 100644 progs/Makefile.am rename catcrypt.1 => progs/catcrypt.1 (100%) rename catcrypt.c => progs/catcrypt.c (99%) rename catsign.1 => progs/catsign.1 (100%) rename catsign.c => progs/catsign.c (99%) rename cc-enc.c => progs/cc-enc.c (99%) rename cc-hash.c => progs/cc-hash.c (100%) rename cc-kem.c => progs/cc-kem.c (99%) rename cc-list.c => progs/cc-list.c (99%) rename cc-progress.c => progs/cc-progress.c (100%) rename cc-sig.c => progs/cc-sig.c (99%) rename cc-subcmd.c => progs/cc-subcmd.c (99%) rename cc.h => progs/cc.h (99%) rename cookie.1 => progs/cookie.1 (100%) rename cookie.c => progs/cookie.c (99%) rename dsig.1 => progs/dsig.1 (100%) rename dsig.c => progs/dsig.c (99%) rename factorial.c => progs/factorial.c (98%) rename fibonacci.c => progs/fibonacci.c (100%) rename hashsum.1 => progs/hashsum.1 (100%) rename hashsum.c => progs/hashsum.c (99%) rename key.1 => progs/key.1 (100%) rename keyutil.c => progs/key.c (99%) rename keyring.5 => progs/keyring.5 (100%) rename mkphrase.1 => progs/mkphrase.1 (100%) rename mkphrase.c => progs/mkphrase.c (99%) rename perftest.c => progs/perftest.c (99%) rename pixie.1 => progs/pixie.1 (100%) rename pixie.c => progs/pixie.c (99%) rename rspit.c => progs/rspit.c (99%) rename xpixie => progs/xpixie (100%) create mode 100644 pub/Makefile.am rename bbs-fetch.c => pub/bbs-fetch.c (97%) rename bbs-gen.c => pub/bbs-gen.c (98%) rename bbs-jump.c => pub/bbs-jump.c (99%) rename bbs-rand.c => pub/bbs-rand.c (99%) rename bbs.h => pub/bbs.h (99%) rename dh-check.c => pub/dh-check.c (98%) rename dh-fetch.c => pub/dh-fetch.c (97%) rename dh-gen.c => pub/dh-gen.c (98%) rename dh-kcdsa.c => pub/dh-kcdsa.c (99%) rename dh-limlee.c => pub/dh-limlee.c (98%) rename dh-param.c => pub/dh-param.c (99%) rename dh.h => pub/dh.h (99%) rename dsa-check.c => pub/dsa-check.c (97%) rename dsa-gen.c => pub/dsa-gen.c (98%) rename dsa-misc.c => pub/dsa-misc.c (100%) rename dsa-sign.c => pub/dsa-sign.c (97%) rename dsa-verify.c => pub/dsa-verify.c (97%) rename dsa.h => pub/dsa.h (99%) rename gdsa.c => pub/gdsa.c (99%) rename gdsa.h => pub/gdsa.h (99%) rename gkcdsa.c => pub/gkcdsa.c (99%) rename gkcdsa.h => pub/gkcdsa.h (99%) rename keycheck-mp.c => pub/keycheck-mp.c (97%) rename keycheck-report.c => pub/keycheck-report.c (96%) rename keycheck.c => pub/keycheck.c (97%) rename keycheck.h => pub/keycheck.h (98%) rename oaep.c => pub/oaep.c (98%) rename pkcs1.c => pub/pkcs1.c (99%) rename pss.c => pub/pss.c (98%) rename rsa-fetch.c => pub/rsa-fetch.c (97%) rename rsa-gen.c => pub/rsa-gen.c (99%) rename rsa-priv.c => pub/rsa-priv.c (99%) rename rsa-pub.c => pub/rsa-pub.c (98%) rename rsa-recover.c => pub/rsa-recover.c (98%) rename rsa-test.c => pub/rsa-test.c (99%) rename rsa.h => pub/rsa.h (99%) rename {tests => pub/t}/bbs (95%) rename {tests => pub/t}/dsa (99%) rename {tests => pub/t}/gdsa (99%) rename {tests => pub/t}/gkcdsa (98%) rename {tests => pub/t}/rsa (99%) create mode 100644 rand/Makefile.am rename dsarand.c => rand/dsarand.c (99%) rename dsarand.h => rand/dsarand.h (98%) rename fibrand.c => rand/fibrand.c (98%) rename fibrand.h => rand/fibrand.h (98%) rename fipstest.c => rand/fipstest.c (98%) rename fipstest.h => rand/fipstest.h (96%) rename grand.c => rand/grand.c (98%) rename grand.h => rand/grand.h (98%) rename lcrand.c => rand/lcrand.c (98%) rename lcrand.h => rand/lcrand.h (98%) rename maurer.c => rand/maurer.c (99%) rename maurer.h => rand/maurer.h (98%) rename noise.c => rand/noise.c (99%) rename noise.h => rand/noise.h (98%) rename rand.c => rand/rand.c (99%) rename rand.h => rand/rand.h (99%) rename sslprf.c => rand/sslprf.c (98%) rename sslprf.h => rand/sslprf.h (98%) rename {tests => rand/t}/lcrand (92%) rename {tests => rand/t}/sslprf (94%) rename {tests => rand/t}/tlsprf (93%) rename tlsprf.c => rand/tlsprf.c (99%) rename tlsprf.h => rand/tlsprf.h (99%) create mode 100644 symm/Makefile.am rename {tests => symm}/aes-trans (100%) rename blkc.h => symm/blkc.h (99%) rename blowfish-mktab.c => symm/blowfish-mktab.c (98%) rename blowfish.c => symm/blowfish.c (98%) rename blowfish.h => symm/blowfish.h (98%) rename cast-base.h => symm/cast-base.h (97%) rename cast-s.c => symm/cast-s.c (95%) rename cast-sk.c => symm/cast-sk.c (95%) rename cast-tab.h => symm/cast-tab.h (99%) rename cast128.c => symm/cast128.c (99%) rename cast128.h => symm/cast128.h (98%) rename cast256.c => symm/cast256.c (99%) rename cast256.h => symm/cast256.h (98%) rename cbc-def.h => symm/cbc-def.h (99%) rename cbc.h => symm/cbc.h (99%) rename cfb-def.h => symm/cfb-def.h (99%) rename cfb.h => symm/cfb.h (99%) rename counter-def.h => symm/counter-def.h (99%) rename counter.h => symm/counter.h (99%) rename crc32.c => symm/crc32.c (97%) rename crc32.h => symm/crc32.h (96%) rename daftstory.h => symm/daftstory.h (97%) rename des-base.c => symm/des-base.c (95%) rename des-base.h => symm/des-base.h (98%) rename des-mktab.c => symm/des-mktab.c (99%) rename des.c => symm/des.c (99%) rename des.h => symm/des.h (99%) rename des3.c => symm/des3.c (98%) rename des3.h => symm/des3.h (98%) rename desx-tab.h => symm/desx-tab.h (98%) rename desx.c => symm/desx.c (99%) rename desx.h => symm/desx.h (98%) rename ecb-def.h => symm/ecb-def.h (99%) rename ecb.h => symm/ecb.h (98%) rename gcipher.h => symm/gcipher.h (98%) rename ghash-def.h => symm/ghash-def.h (98%) rename ghash.h => symm/ghash.h (99%) rename gmac.h => symm/gmac.h (97%) rename gthingtab.c.in => symm/gthingtab.c.in (100%) rename has160.c => symm/has160.c (99%) rename has160.h => symm/has160.h (98%) rename hash.h => symm/hash.h (99%) rename hmac-def.h => symm/hmac-def.h (99%) rename hmac.h => symm/hmac.h (99%) rename idea.c => symm/idea.c (99%) rename idea.h => symm/idea.h (98%) rename mars-mktab.c => symm/mars-mktab.c (99%) rename mars.c => symm/mars.c (99%) rename mars.h => symm/mars.h (98%) rename md2-tab.h => symm/md2-tab.h (98%) rename md2.c => symm/md2.c (99%) rename md2.h => symm/md2.h (98%) rename md4.c => symm/md4.c (99%) rename md4.h => symm/md4.h (98%) rename md5.c => symm/md5.c (99%) rename md5.h => symm/md5.h (98%) rename mgf-def.h => symm/mgf-def.h (99%) rename mgf.h => symm/mgf.h (98%) rename mode.c.in => symm/mode.c.in (100%) rename mode.h.in => symm/mode.h.in (100%) rename modes.am.in => symm/modes.am.in (56%) rename multigen => symm/multigen (100%) rename noekeon.c => symm/noekeon.c (99%) rename noekeon.h => symm/noekeon.h (98%) rename ofb-def.h => symm/ofb-def.h (99%) rename ofb.h => symm/ofb.h (99%) rename rc2-tab.h => symm/rc2-tab.h (98%) rename rc2.c => symm/rc2.c (98%) rename rc2.h => symm/rc2.h (98%) rename rc4.c => symm/rc4.c (98%) rename rc4.h => symm/rc4.h (99%) rename rc5.c => symm/rc5.c (99%) rename rc5.h => symm/rc5.h (98%) rename rijndael-base.c => symm/rijndael-base.c (98%) rename rijndael-base.h => symm/rijndael-base.h (97%) rename rijndael-mktab.c => symm/rijndael-mktab.c (99%) rename rijndael.c => symm/rijndael.c (98%) rename rijndael.h => symm/rijndael.h (98%) rename rijndael192.c => symm/rijndael192.c (98%) rename rijndael192.h => symm/rijndael192.h (97%) rename rijndael256.c => symm/rijndael256.c (99%) rename rijndael256.h => symm/rijndael256.h (97%) rename rmd128.c => symm/rmd128.c (99%) rename rmd128.h => symm/rmd128.h (98%) rename rmd160.c => symm/rmd160.c (99%) rename rmd160.h => symm/rmd160.h (98%) rename rmd256.c => symm/rmd256.c (99%) rename rmd256.h => symm/rmd256.h (98%) rename rmd320.c => symm/rmd320.c (99%) rename rmd320.h => symm/rmd320.h (98%) rename safer-mktab.c => symm/safer-mktab.c (97%) rename safer.c => symm/safer.c (99%) rename safer.h => symm/safer.h (98%) rename safersk.c => symm/safersk.c (78%) rename safersk.h => symm/safersk.h (77%) rename seal.c => symm/seal.c (99%) rename seal.h => symm/seal.h (98%) rename serpent-check.c => symm/serpent-check.c (98%) rename serpent-sbox.h => symm/serpent-sbox.h (99%) rename serpent.c => symm/serpent.c (99%) rename serpent.h => symm/serpent.h (98%) rename sha.c => symm/sha.c (99%) rename sha.h => symm/sha.h (98%) rename sha224.c => symm/sha224.c (75%) rename sha224.h => symm/sha224.h (69%) rename sha256.c => symm/sha256.c (99%) rename sha256.h => symm/sha256.h (99%) rename sha384.c => symm/sha384.c (75%) rename sha384.h => symm/sha384.h (69%) rename sha512.c => symm/sha512.c (99%) rename sha512.h => symm/sha512.h (99%) rename skipjack-tab.h => symm/skipjack-tab.h (97%) rename skipjack.c => symm/skipjack.c (99%) rename skipjack.h => symm/skipjack.h (98%) rename square-mktab.c => symm/square-mktab.c (99%) rename square.c => symm/square.c (98%) rename square.h => symm/square.h (98%) rename {tests => symm/t}/.gitignore (66%) rename {tests => symm/t}/blowfish (98%) rename {tests => symm/t}/cast128 (81%) rename {tests => symm/t}/cast256.aes (100%) rename {tests => symm/t}/des (98%) rename {tests => symm/t}/des3 (96%) rename {tests => symm/t}/desx (91%) rename {tests => symm/t}/has160 (97%) rename {tests => symm/t}/idea (96%) rename {tests => symm/t}/mars.aes (100%) rename {tests => symm/t}/md2 (98%) rename {tests => symm/t}/md4 (97%) rename {tests => symm/t}/md5 (98%) rename {tests => symm/t}/noekeon (87%) rename {tests => symm/t}/rc2 (92%) rename {tests => symm/t}/rc4 (91%) rename {tests => symm/t}/rc5 (92%) rename {tests => symm/t}/rijndael.aes (100%) rename {tests => symm/t}/rijndael192 (99%) rename {tests => symm/t}/rijndael256 (99%) rename {tests => symm/t}/rmd128 (97%) rename {tests => symm/t}/rmd160 (98%) rename {tests => symm/t}/rmd256 (97%) rename {tests => symm/t}/rmd320 (98%) rename {tests => symm/t}/safer (81%) rename {tests => symm/t}/safersk (80%) rename {tests => symm/t}/seal (81%) rename {tests => symm/t}/serpent.aes (100%) rename {tests => symm/t}/sha (97%) rename {tests => symm/t}/sha224 (98%) rename {tests => symm/t}/sha256 (98%) rename {tests => symm/t}/sha384 (98%) rename {tests => symm/t}/sha512 (98%) rename {tests => symm/t}/skipjack (98%) rename {tests => symm/t}/square (99%) rename {tests => symm/t}/tea (99%) rename {tests => symm/t}/tea-test.c (100%) rename {tests => symm/t}/tiger (98%) rename {tests => symm/t}/twofish.aes (100%) rename {tests => symm/t}/whirlpool (98%) rename {tests => symm/t}/whirlpool256 (98%) rename {tests => symm/t}/xtea (98%) rename {tests => symm/t}/xtea-test.c (100%) rename tea.c => symm/tea.c (98%) rename tea.h => symm/tea.h (98%) rename tiger-base.h => symm/tiger-base.h (98%) rename tiger-mktab.c => symm/tiger-mktab.c (98%) rename tiger.c => symm/tiger.c (98%) rename tiger.h => symm/tiger.h (98%) rename twofish-mktab.c => symm/twofish-mktab.c (99%) rename twofish.c => symm/twofish.c (99%) rename twofish.h => symm/twofish.h (98%) rename whirlpool-mktab.c => symm/whirlpool-mktab.c (99%) rename whirlpool.c => symm/whirlpool.c (99%) rename whirlpool.h => symm/whirlpool.h (99%) rename whirlpool256.c => symm/whirlpool256.c (95%) rename whirlpool256.h => symm/whirlpool256.h (93%) rename xtea.c => symm/xtea.c (98%) rename xtea.h => symm/xtea.h (98%) create mode 100644 vars.am diff --git a/.gitignore b/.gitignore index 41bc25fd..e8491124 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,11 @@ -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 diff --git a/.links b/.links index 161dfb03..a6772a49 100644 --- a/.links +++ b/.links @@ -1,5 +1,5 @@ COPYING.LIB -getdate.y -getdate.h config/auto-version config/confsubst +progs/getdate.h +progs/getdate.y diff --git a/Makefile.am b/Makefile.am index 11251fa7..4cacfbea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,1066 +24,53 @@ ### 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. @@ -1106,6 +93,7 @@ dist-hook:: ## Additional build tools. EXTRA_DIST += config/auto-version +EXTRA_DIST += config/confsubst ###-------------------------------------------------------------------------- ### Debian. diff --git a/base/Makefile.am b/base/Makefile.am new file mode 100644 index 00000000..35c86ff5 --- /dev/null +++ b/base/Makefile.am @@ -0,0 +1,54 @@ +### -*-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 -------------------------------------------------- diff --git a/arena.c b/base/arena.c similarity index 97% rename from arena.c rename to base/arena.c index dde8e84b..93cbfa58 100644 --- a/arena.c +++ b/base/arena.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: arena.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Abstraction for memory allocation arenas * diff --git a/arena.h b/base/arena.h similarity index 97% rename from arena.h rename to base/arena.h index acae6792..70952da8 100644 --- a/arena.h +++ b/base/arena.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: arena.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Abstraction for memory allocation arenas * diff --git a/ct.c b/base/ct.c similarity index 100% rename from ct.c rename to base/ct.c diff --git a/ct.h b/base/ct.h similarity index 100% rename from ct.h rename to base/ct.h diff --git a/keysz-conv.c b/base/keysz-conv.c similarity index 100% rename from keysz-conv.c rename to base/keysz-conv.c diff --git a/keysz.c b/base/keysz.c similarity index 97% rename from keysz.c rename to base/keysz.c index ccc07697..82919281 100644 --- a/keysz.c +++ b/base/keysz.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: keysz.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * General block cipher utilities * diff --git a/keysz.h b/base/keysz.h similarity index 100% rename from keysz.h rename to base/keysz.h diff --git a/lmem.c b/base/lmem.c similarity index 99% rename from lmem.c rename to base/lmem.c index a7033d04..a613a54b 100644 --- a/lmem.c +++ b/base/lmem.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Locked memory allocation (Unix-specific) * diff --git a/lmem.h b/base/lmem.h similarity index 98% rename from lmem.h rename to base/lmem.h index 65a31a88..88b0062c 100644 --- a/lmem.h +++ b/base/lmem.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: lmem.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Locked memory allocation * diff --git a/paranoia.h b/base/paranoia.h similarity index 96% rename from paranoia.h rename to base/paranoia.h index e1ad2f52..368667c9 100644 --- a/paranoia.h +++ b/base/paranoia.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: paranoia.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Macros and functions for cryptographic paranoia * diff --git a/build-setup b/build-setup index 50aabee8..77af12e8 100755 --- a/build-setup +++ b/build-setup @@ -1,2 +1,2 @@ #! /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 diff --git a/calc/ec2.cal b/calc/ec2.cal index e43c61b2..3a373309 100644 --- a/calc/ec2.cal +++ b/calc/ec2.cal @@ -1,6 +1,4 @@ /* -*-apcalc-*- - * - * $Id: ec2.cal,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Testbed for elliptic curve arithmetic over binary fields * diff --git a/calc/ecp.cal b/calc/ecp.cal index 4fedccf9..700b18f5 100644 --- a/calc/ecp.cal +++ b/calc/ecp.cal @@ -1,6 +1,4 @@ /* -*-apcalc-*- - * - * $Id: ecp.cal,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Testbed for elliptic curve arithmetic over prime fields * diff --git a/calc/gfx-test.cal b/calc/gfx-test.cal index 3a5804f8..1c2d4c64 100644 --- a/calc/gfx-test.cal +++ b/calc/gfx-test.cal @@ -1,6 +1,4 @@ /* -*-apcalc-*- - * - * $Id: gfx-test.cal,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Generate test cases for %$\gf{2}[x]$% arithmetic * diff --git a/calc/gfx.cal b/calc/gfx.cal index 01d5c100..f898c45a 100644 --- a/calc/gfx.cal +++ b/calc/gfx.cal @@ -1,6 +1,4 @@ /* -*-apcalc-*- - * - * $Id: gfx.cal,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Testbed for %$\gf{2}$% poltnomial arithmetic * diff --git a/configure.ac b/configure.ac index 9aff84a4..aca24fed 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,9 @@ AC_SUBST(AM_CFLAGS) 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 @@ -119,7 +122,15 @@ dnl Produce output. 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 -------------------------------------------------- diff --git a/key/Makefile.am b/key/Makefile.am new file mode 100644 index 00000000..b73aad81 --- /dev/null +++ b/key/Makefile.am @@ -0,0 +1,65 @@ +### -*-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 -------------------------------------------------- diff --git a/key-attr.c b/key/key-attr.c similarity index 99% rename from key-attr.c rename to key/key-attr.c index b6a36166..e884d699 100644 --- a/key-attr.c +++ b/key/key-attr.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Key attribute manipulation * diff --git a/key-binary.c b/key/key-binary.c similarity index 99% rename from key-binary.c rename to key/key-binary.c index c1ef53b2..046819a4 100644 --- a/key-binary.c +++ b/key/key-binary.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Key binary encoding * diff --git a/key-data.c b/key/key-data.c similarity index 99% rename from key-data.c rename to key/key-data.c index 69795fe6..8b01d725 100644 --- a/key-data.c +++ b/key/key-data.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Encoding and decoding of key data * diff --git a/key-data.h b/key/key-data.h similarity index 99% rename from key-data.h rename to key/key-data.h index d6a5636d..9c00908e 100644 --- a/key-data.h +++ b/key/key-data.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Manipulating key data * diff --git a/key-error.c b/key/key-error.c similarity index 99% rename from key-error.c rename to key/key-error.c index cd7d3864..a0919977 100644 --- a/key-error.c +++ b/key/key-error.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Translating key error codes into strings * diff --git a/key-error.h b/key/key-error.h similarity index 99% rename from key-error.h rename to key/key-error.h index 2029a2b8..6b3131ca 100644 --- a/key-error.h +++ b/key/key-error.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Key management error codes * diff --git a/key-fetch.c b/key/key-fetch.c similarity index 99% rename from key-fetch.c rename to key/key-fetch.c index 08a800bc..d8d6da2d 100644 --- a/key-fetch.c +++ b/key/key-fetch.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Higher-level key unpacking * diff --git a/key-file.c b/key/key-file.c similarity index 99% rename from key-file.c rename to key/key-file.c index 3245b939..e7f4fdd8 100644 --- a/key-file.c +++ b/key/key-file.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * System-dependent key filing operations * diff --git a/key-flags.c b/key/key-flags.c similarity index 99% rename from key-flags.c rename to key/key-flags.c index a5478985..169de2c5 100644 --- a/key-flags.c +++ b/key/key-flags.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Reading and writing key flag strings * diff --git a/key-io.c b/key/key-io.c similarity index 99% rename from key-io.c rename to key/key-io.c index 5c70909c..df7cd53f 100644 --- a/key-io.c +++ b/key/key-io.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Adding new keys to a key file * diff --git a/key-misc.c b/key/key-misc.c similarity index 99% rename from key-misc.c rename to key/key-misc.c index 5ff7078a..80e9597d 100644 --- a/key-misc.c +++ b/key/key-misc.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Simple key management * diff --git a/key-moan.c b/key/key-moan.c similarity index 96% rename from key-moan.c rename to key/key-moan.c index ebefe02f..cc44770e 100644 --- a/key-moan.c +++ b/key/key-moan.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: key-moan.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Standard error handling function for key loading * diff --git a/key-pack.c b/key/key-pack.c similarity index 99% rename from key-pack.c rename to key/key-pack.c index 7f798001..61495b97 100644 --- a/key-pack.c +++ b/key/key-pack.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Packing and unpacking key data * diff --git a/key-pass.c b/key/key-pass.c similarity index 99% rename from key-pass.c rename to key/key-pass.c index f303245b..665030e4 100644 --- a/key-pass.c +++ b/key/key-pass.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Encrypting keys with passphrases * diff --git a/key-text.c b/key/key-text.c similarity index 99% rename from key-text.c rename to key/key-text.c index ff9e7058..98c1fba1 100644 --- a/key-text.c +++ b/key/key-text.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Key textual encoding * diff --git a/key.h b/key/key.h similarity index 99% rename from key.h rename to key/key.h index dffd0eb9..bed36325 100644 --- a/key.h +++ b/key/key.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Simple key management * diff --git a/passphrase.c b/key/passphrase.c similarity index 99% rename from passphrase.c rename to key/passphrase.c index 8bbbb9d4..6f0780f9 100644 --- a/passphrase.c +++ b/key/passphrase.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Reading of passphrases (Unix-specific) * diff --git a/passphrase.h b/key/passphrase.h similarity index 99% rename from passphrase.h rename to key/passphrase.h index 89836c32..876df70c 100644 --- a/passphrase.h +++ b/key/passphrase.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Reading passphrases * diff --git a/pixie-common.c b/key/pixie-common.c similarity index 99% rename from pixie-common.c rename to key/pixie-common.c index fbb7f11e..f24b5766 100644 --- a/pixie-common.c +++ b/key/pixie-common.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Common code for Pixie client and server (Unix-specific) * diff --git a/pixie.h b/key/pixie.h similarity index 99% rename from pixie.h rename to key/pixie.h index a5bc1718..bfda9939 100644 --- a/pixie.h +++ b/key/pixie.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: pixie.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Passphrase pixie definitions (Unix-specific) * diff --git a/manual/catacomb.tex b/manual/catacomb.tex index f13c7c15..a8113319 100644 --- a/manual/catacomb.tex +++ b/manual/catacomb.tex @@ -1,7 +1,5 @@ %%% -*-latex-*- %%% -%%% $Id: catacomb.tex,v 1.3 2004/04/08 01:36:15 mdw Exp $ -%%% %%% Catacomb manual %%% %%% (c) 1999 Straylight/Edgeware diff --git a/math/Makefile.am b/math/Makefile.am new file mode 100644 index 00000000..5bb546c2 --- /dev/null +++ b/math/Makefile.am @@ -0,0 +1,392 @@ +### -*-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 -------------------------------------------------- diff --git a/bin-gentab.awk b/math/bin-gentab.awk similarity index 95% rename from bin-gentab.awk rename to math/bin-gentab.awk index fb8630e6..a848aed5 100755 --- a/bin-gentab.awk +++ b/math/bin-gentab.awk @@ -1,8 +1,6 @@ #! /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 "-"; diff --git a/bintab.h b/math/bintab.h similarity index 99% rename from bintab.h rename to math/bintab.h index 221d7493..dba336cd 100644 --- a/bintab.h +++ b/math/bintab.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Table of standard (ish) binary groups * diff --git a/bintab.in b/math/bintab.in similarity index 99% rename from bintab.in rename to math/bintab.in index debe112b..a33badfc 100644 --- a/bintab.in +++ b/math/bintab.in @@ -1,5 +1,3 @@ -# $Id$ -# # Standard binary groups #----- From P1363 annex A --------------------------------------------------- diff --git a/bitops.h b/math/bitops.h similarity index 96% rename from bitops.h rename to math/bitops.h index 02f9a348..941f71a0 100644 --- a/bitops.h +++ b/math/bitops.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: bitops.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Bit operations by truth table * diff --git a/bittest.c b/math/bittest.c similarity index 96% rename from bittest.c rename to math/bittest.c index f13d3588..5f7b1d76 100644 --- a/bittest.c +++ b/math/bittest.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: bittest.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Check the bit operations work * diff --git a/buf.c b/math/buf.c similarity index 99% rename from buf.c rename to math/buf.c index 0cf2cf0a..01b6a35e 100644 --- a/buf.c +++ b/math/buf.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Buffer handling * diff --git a/buf.h b/math/buf.h similarity index 99% rename from buf.h rename to math/buf.h index 065db075..d619416d 100644 --- a/buf.h +++ b/math/buf.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Reading and writing packet buffers * diff --git a/ec-bin.c b/math/ec-bin.c similarity index 99% rename from ec-bin.c rename to math/ec-bin.c index 8ba7354c..d91b0343 100644 --- a/ec-bin.c +++ b/math/ec-bin.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Arithmetic for elliptic curves over binary fields * diff --git a/ec-exp.c b/math/ec-exp.c similarity index 99% rename from ec-exp.c rename to math/ec-exp.c index 2c9a8002..b2f1ceb1 100644 --- a/ec-exp.c +++ b/math/ec-exp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Point multiplication for elliptic curves * diff --git a/ec-exp.h b/math/ec-exp.h similarity index 97% rename from ec-exp.h rename to math/ec-exp.h index 8ee31543..6cad7537 100644 --- a/ec-exp.h +++ b/math/ec-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ec-exp.h,v 1.6 2004/04/08 01:36:15 mdw Exp $ * * Exponentiation operations for elliptic curves * diff --git a/ec-fetch.c b/math/ec-fetch.c similarity index 97% rename from ec-fetch.c rename to math/ec-fetch.c index 81bfb6c1..3484d527 100644 --- a/ec-fetch.c +++ b/math/ec-fetch.c @@ -1,6 +1,4 @@ /* -*-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 * diff --git a/ec-gentab.awk b/math/ec-gentab.awk similarity index 96% rename from ec-gentab.awk rename to math/ec-gentab.awk index b00300c3..37ccacc5 100755 --- a/ec-gentab.awk +++ b/math/ec-gentab.awk @@ -1,8 +1,6 @@ #! /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 "-"; diff --git a/ec-guts.h b/math/ec-guts.h similarity index 99% rename from ec-guts.h rename to math/ec-guts.h index fb2b3063..8568e62e 100644 --- a/ec-guts.h +++ b/math/ec-guts.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Internal structures for built-in elliptic curve types * diff --git a/ec-info.c b/math/ec-info.c similarity index 99% rename from ec-info.c rename to math/ec-info.c index 6fcef883..21d21fda 100644 --- a/ec-info.c +++ b/math/ec-info.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Elliptic curve information management * diff --git a/ec-keys.h b/math/ec-keys.h similarity index 97% rename from ec-keys.h rename to math/ec-keys.h index 60db9ff1..f4a304da 100644 --- a/ec-keys.h +++ b/math/ec-keys.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ec-keys.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Elliptic curve key-fetching * diff --git a/ec-prime.c b/math/ec-prime.c similarity index 99% rename from ec-prime.c rename to math/ec-prime.c index 52815e4d..f6a7f960 100644 --- a/ec-prime.c +++ b/math/ec-prime.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Elliptic curves over prime fields * diff --git a/ec-raw.c b/math/ec-raw.c similarity index 97% rename from ec-raw.c rename to math/ec-raw.c index 738827fd..54310c8f 100644 --- a/ec-raw.c +++ b/math/ec-raw.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ec-raw.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Raw formatting of elliptic curve points * diff --git a/ec-raw.h b/math/ec-raw.h similarity index 97% rename from ec-raw.h rename to math/ec-raw.h index 083ca932..4792bd70 100644 --- a/ec-raw.h +++ b/math/ec-raw.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ec-raw.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Raw formatting of elliptic curve points * diff --git a/ec-test.c b/math/ec-test.c similarity index 99% rename from ec-test.c rename to math/ec-test.c index ad2af908..db59294c 100644 --- a/ec-test.c +++ b/math/ec-test.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Code for testing elliptic-curve stuff * @@ -338,7 +336,7 @@ static test_chunk tests[] = { 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); } diff --git a/ec-test.h b/math/ec-test.h similarity index 96% rename from ec-test.h rename to math/ec-test.h index 18e4b253..4fd71e13 100644 --- a/ec-test.h +++ b/math/ec-test.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ec-test.h,v 1.3 2004/04/08 16:17:32 mdw Exp $ * * Elliptic curve test functions * diff --git a/ec.c b/math/ec.c similarity index 99% rename from ec.c rename to math/ec.c index cad7a564..f8b77f5e 100644 --- a/ec.c +++ b/math/ec.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Elliptic curve definitions * diff --git a/ec.h b/math/ec.h similarity index 99% rename from ec.h rename to math/ec.h index ac0b8fc1..cc7649da 100644 --- a/ec.h +++ b/math/ec.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Elliptic curve definitions * diff --git a/ectab.h b/math/ectab.h similarity index 97% rename from ectab.h rename to math/ectab.h index 7e6161c7..38d3b304 100644 --- a/ectab.h +++ b/math/ectab.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ectab.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Table of standard elliptic curves * diff --git a/ectab.in b/math/ectab.in similarity index 99% rename from ectab.in rename to math/ectab.in index 238accbd..0e7c8cb7 100644 --- a/ectab.in +++ b/math/ectab.in @@ -1,5 +1,3 @@ -# $Id$ -# # Standard ellipic curves #----- Curves from SEC2 ----------------------------------------------------- diff --git a/exp.c b/math/exp.c similarity index 97% rename from exp.c rename to math/exp.c index 4327129a..4ddfa6d2 100644 --- a/exp.c +++ b/math/exp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: exp.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Generalized exponentiation * diff --git a/exp.h b/math/exp.h similarity index 99% rename from exp.h rename to math/exp.h index 9ff6a240..41581c59 100644 --- a/exp.h +++ b/math/exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Generalized exponentiation * diff --git a/f-binpoly.c b/math/f-binpoly.c similarity index 99% rename from f-binpoly.c rename to math/f-binpoly.c index 5f6a5276..2ed270e9 100644 --- a/f-binpoly.c +++ b/math/f-binpoly.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Binary fields with polynomial basis representation * diff --git a/f-niceprime.c b/math/f-niceprime.c similarity index 99% rename from f-niceprime.c rename to math/f-niceprime.c index 83b9ca5f..342cb862 100644 --- a/f-niceprime.c +++ b/math/f-niceprime.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Prime fields with efficient reduction for special-form primes * diff --git a/f-prime.c b/math/f-prime.c similarity index 99% rename from f-prime.c rename to math/f-prime.c index 31638f56..d9c5c179 100644 --- a/f-prime.c +++ b/math/f-prime.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Prime fields with Montgomery arithmetic * diff --git a/field-exp.c b/math/field-exp.c similarity index 99% rename from field-exp.c rename to math/field-exp.c index 628fa49b..bbadb865 100644 --- a/field-exp.c +++ b/math/field-exp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Exponentiation in finite fields * diff --git a/field-exp.h b/math/field-exp.h similarity index 99% rename from field-exp.h rename to math/field-exp.h index 928a893f..70dda63b 100644 --- a/field-exp.h +++ b/math/field-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Exponentiation in finite fields * diff --git a/field-guts.h b/math/field-guts.h similarity index 99% rename from field-guts.h rename to math/field-guts.h index fc7ce50b..1122b6c0 100644 --- a/field-guts.h +++ b/math/field-guts.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Internal structures for built-in fields * diff --git a/field-parse.c b/math/field-parse.c similarity index 97% rename from field-parse.c rename to math/field-parse.c index cbbd2460..eed08fad 100644 --- a/field-parse.c +++ b/math/field-parse.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: field-parse.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Parse field descriptions * diff --git a/field.c b/math/field.c similarity index 99% rename from field.c rename to math/field.c index 8fb1ad6f..0198fca3 100644 --- a/field.c +++ b/math/field.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Abstract field operations * diff --git a/field.h b/math/field.h similarity index 99% rename from field.h rename to math/field.h index 6085716f..c1ec0309 100644 --- a/field.h +++ b/math/field.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Definitions for field arithmetic * diff --git a/g-bin.c b/math/g-bin.c similarity index 99% rename from g-bin.c rename to math/g-bin.c index bdae80a2..79a989fa 100644 --- a/g-bin.c +++ b/math/g-bin.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Abstraction for prime groups * diff --git a/g-ec.c b/math/g-ec.c similarity index 99% rename from g-ec.c rename to math/g-ec.c index 46797426..f885c40d 100644 --- a/g-ec.c +++ b/math/g-ec.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Abstraction for elliptic curve groups * diff --git a/g-prime.c b/math/g-prime.c similarity index 99% rename from g-prime.c rename to math/g-prime.c index 52301110..892e7433 100644 --- a/g-prime.c +++ b/math/g-prime.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Abstraction for prime groups * diff --git a/genlimits.c b/math/genlimits.c similarity index 99% rename from genlimits.c rename to math/genlimits.c index 6bd0e986..22c9f5f3 100644 --- a/genlimits.c +++ b/math/genlimits.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Generate limit MPs for C types * diff --git a/genprimes.c b/math/genprimes.c similarity index 98% rename from genprimes.c rename to math/genprimes.c index 2d80d07b..a4bf64ae 100644 --- a/genprimes.c +++ b/math/genprimes.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: genprimes.c,v 1.7 2004/04/08 01:36:15 mdw Exp $ * * Generate prime number table * diff --git a/genwheel.c b/math/genwheel.c similarity index 100% rename from genwheel.c rename to math/genwheel.c diff --git a/gf-arith.c b/math/gf-arith.c similarity index 99% rename from gf-arith.c rename to math/gf-arith.c index 5a7b3f29..1c67c74b 100644 --- a/gf-arith.c +++ b/math/gf-arith.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Basic arithmetic on binary polynomials * @@ -300,7 +298,7 @@ static test_chunk tests[] = { 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); } diff --git a/gf-exp.c b/math/gf-exp.c similarity index 99% rename from gf-exp.c rename to math/gf-exp.c index 92c151fc..14c40d31 100644 --- a/gf-exp.c +++ b/math/gf-exp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Exponentiation for binary polynomials * diff --git a/gf-exp.h b/math/gf-exp.h similarity index 99% rename from gf-exp.h rename to math/gf-exp.h index 85090c72..189fc76e 100644 --- a/gf-exp.h +++ b/math/gf-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Exponentiation for binary polynomials * diff --git a/gf-gcd.c b/math/gf-gcd.c similarity index 99% rename from gf-gcd.c rename to math/gf-gcd.c index 03cee470..f81aac71 100644 --- a/gf-gcd.c +++ b/math/gf-gcd.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Euclidian algorithm on binary polynomials * @@ -254,7 +252,7 @@ static test_chunk tests[] = { 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); } diff --git a/gf.h b/math/gf.h similarity index 99% rename from gf.h rename to math/gf.h index 8de82319..edc91fab 100644 --- a/gf.h +++ b/math/gf.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Arithmetic on binary polynomials * diff --git a/gfn.c b/math/gfn.c similarity index 98% rename from gfn.c rename to math/gfn.c index 8bfc4417..c9b90c0c 100644 --- a/gfn.c +++ b/math/gfn.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gfn.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Normal-basis translation for binary fields * @@ -265,7 +263,7 @@ static test_chunk tests[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, tests, SRCDIR "/tests/gfn"); + test_run(argc, argv, tests, SRCDIR "/t/gfn"); return (0); } diff --git a/gfn.h b/math/gfn.h similarity index 98% rename from gfn.h rename to math/gfn.h index dcb0db05..11ecb449 100644 --- a/gfn.h +++ b/math/gfn.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gfn.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Normal-basis translation for binary fields * diff --git a/gfreduce-exp.h b/math/gfreduce-exp.h similarity index 96% rename from gfreduce-exp.h rename to math/gfreduce-exp.h index d4aaf0a2..93af649e 100644 --- a/gfreduce-exp.h +++ b/math/gfreduce-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gfreduce-exp.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Exponentiation operations for binary field reduction * diff --git a/gfreduce.c b/math/gfreduce.c similarity index 99% rename from gfreduce.c rename to math/gfreduce.c index f9b92c8f..164122d8 100644 --- a/gfreduce.c +++ b/math/gfreduce.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Efficient reduction modulo sparse binary polynomials * @@ -643,7 +641,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/gfreduce"); + test_run(argc, argv, defs, SRCDIR"/t/gfreduce"); return (0); } diff --git a/gfreduce.h b/math/gfreduce.h similarity index 98% rename from gfreduce.h rename to math/gfreduce.h index 1a5685cc..2c8a8845 100644 --- a/gfreduce.h +++ b/math/gfreduce.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gfreduce.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Reduction modulo sparse binary polynomials * diff --git a/gfx-kmul.c b/math/gfx-kmul.c similarity index 99% rename from gfx-kmul.c rename to math/gfx-kmul.c index ec2bd6d0..5a5838a0 100644 --- a/gfx-kmul.c +++ b/math/gfx-kmul.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Karatsuba's multiplication algorithm on binary polynomials * @@ -240,7 +238,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/gfx"); + test_run(argc, argv, defs, SRCDIR"/t/gfx"); return (0); } diff --git a/gfx-sqr-mktab.c b/math/gfx-sqr-mktab.c similarity index 97% rename from gfx-sqr-mktab.c rename to math/gfx-sqr-mktab.c index c0a0b369..1ecd995f 100644 --- a/gfx-sqr-mktab.c +++ b/math/gfx-sqr-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gfx-sqr-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Build table for squaring of binary polynomials * diff --git a/gfx-sqr.c b/math/gfx-sqr.c similarity index 98% rename from gfx-sqr.c rename to math/gfx-sqr.c index ef54cf13..8e26f361 100644 --- a/gfx-sqr.c +++ b/math/gfx-sqr.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Sqaring binary polynomials * @@ -205,7 +203,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/gfx"); + test_run(argc, argv, defs, SRCDIR"/t/gfx"); return (0); } diff --git a/gfx.c b/math/gfx.c similarity index 99% rename from gfx.c rename to math/gfx.c index b1bdd512..56bea481 100644 --- a/gfx.c +++ b/math/gfx.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Low-level arithmetic on binary polynomials * @@ -380,7 +378,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/gfx"); + test_run(argc, argv, defs, SRCDIR"/t/gfx"); return (0); } diff --git a/gfx.h b/math/gfx.h similarity index 98% rename from gfx.h rename to math/gfx.h index 91ea226b..214ec2bc 100644 --- a/gfx.h +++ b/math/gfx.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gfx.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Low-level arithmetic on binary polynomials * diff --git a/group-dstr.c b/math/group-dstr.c similarity index 97% rename from group-dstr.c rename to math/group-dstr.c index f41b9785..47141835 100644 --- a/group-dstr.c +++ b/math/group-dstr.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: group-dstr.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Dynamic string I/O for group elements * diff --git a/group-exp.c b/math/group-exp.c similarity index 99% rename from group-exp.c rename to math/group-exp.c index a7061255..083da9e1 100644 --- a/group-exp.c +++ b/math/group-exp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Exponentiation for abstract groups * diff --git a/group-exp.h b/math/group-exp.h similarity index 96% rename from group-exp.h rename to math/group-exp.h index 6f1c1c51..0bc029c6 100644 --- a/group-exp.h +++ b/math/group-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: group-exp.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Exponentiation operations for abstract groups * diff --git a/group-file.c b/math/group-file.c similarity index 96% rename from group-file.c rename to math/group-file.c index 212e26e3..bb95df19 100644 --- a/group-file.c +++ b/math/group-file.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: group-file.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * File I/O for group elements * diff --git a/group-guts.h b/math/group-guts.h similarity index 99% rename from group-guts.h rename to math/group-guts.h index 42ab20d2..c34d89c2 100644 --- a/group-guts.h +++ b/math/group-guts.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Internal structures for built-in groups * diff --git a/group-parse.c b/math/group-parse.c similarity index 97% rename from group-parse.c rename to math/group-parse.c index 77119529..b46898d6 100644 --- a/group-parse.c +++ b/math/group-parse.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: group-parse.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Parse group description strings * diff --git a/group-stdops.c b/math/group-stdops.c similarity index 99% rename from group-stdops.c rename to math/group-stdops.c index 77f48f73..b0f87539 100644 --- a/group-stdops.c +++ b/math/group-stdops.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Standard group operations * diff --git a/group-string.c b/math/group-string.c similarity index 97% rename from group-string.c rename to math/group-string.c index 7753d971..09db3ea8 100644 --- a/group-string.c +++ b/math/group-string.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: group-string.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * String I/O for group elements * diff --git a/group-test.c b/math/group-test.c similarity index 99% rename from group-test.c rename to math/group-test.c index 5608ec06..7cd0cd25 100644 --- a/group-test.c +++ b/math/group-test.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: group-test.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Testing group operations * @@ -556,7 +554,7 @@ static const test_chunk tests[] = { 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); } diff --git a/group.h b/math/group.h similarity index 99% rename from group.h rename to math/group.h index a144706a..cdfbdd46 100644 --- a/group.h +++ b/math/group.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * General cyclic group abstraction * diff --git a/karatsuba.h b/math/karatsuba.h similarity index 98% rename from karatsuba.h rename to math/karatsuba.h index d0b81fce..015f7b07 100644 --- a/karatsuba.h +++ b/math/karatsuba.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: karatsuba.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Macros for Karatsuba functions * diff --git a/limlee.c b/math/limlee.c similarity index 99% rename from limlee.c rename to math/limlee.c index b6fc4d64..b20965a9 100644 --- a/limlee.c +++ b/math/limlee.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: limlee.c,v 1.9 2004/04/08 01:36:15 mdw Exp $ * * Generate Lim-Lee primes * diff --git a/limlee.h b/math/limlee.h similarity index 98% rename from limlee.h rename to math/limlee.h index 8b03bc33..d22b5a7e 100644 --- a/limlee.h +++ b/math/limlee.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: limlee.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Generate Lim-Lee primes * diff --git a/mp-arith.c b/math/mp-arith.c similarity index 99% rename from mp-arith.c rename to math/mp-arith.c index f00af543..2d7d6359 100644 --- a/mp-arith.c +++ b/math/mp-arith.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Basic arithmetic on multiprecision integers * @@ -922,7 +920,7 @@ static test_chunk tests[] = { 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); } diff --git a/mp-const.c b/math/mp-const.c similarity index 96% rename from mp-const.c rename to math/mp-const.c index dc310074..b35a0e6d 100644 --- a/mp-const.c +++ b/math/mp-const.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mp-const.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Useful multiprecision constants * diff --git a/mp-exp.c b/math/mp-exp.c similarity index 99% rename from mp-exp.c rename to math/mp-exp.c index 9cb56ee1..9ef2fa01 100644 --- a/mp-exp.c +++ b/math/mp-exp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Exponentiation for large integers * diff --git a/mp-exp.h b/math/mp-exp.h similarity index 99% rename from mp-exp.h rename to math/mp-exp.h index 2e5dbf2f..d0fce309 100644 --- a/mp-exp.h +++ b/math/mp-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Exponentiation for large integers * diff --git a/mp-fibonacci.c b/math/mp-fibonacci.c similarity index 99% rename from mp-fibonacci.c rename to math/mp-fibonacci.c index e103979c..9b37ebff 100644 --- a/mp-fibonacci.c +++ b/math/mp-fibonacci.c @@ -262,7 +262,7 @@ static test_chunk tests[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, tests, SRCDIR "/tests/mp"); + test_run(argc, argv, tests, SRCDIR "/t/mp"); return (0); } diff --git a/mp-fibonacci.h b/math/mp-fibonacci.h similarity index 100% rename from mp-fibonacci.h rename to math/mp-fibonacci.h diff --git a/mp-gcd.c b/math/mp-gcd.c similarity index 99% rename from mp-gcd.c rename to math/mp-gcd.c index 40531c7c..6e059e30 100644 --- a/mp-gcd.c +++ b/math/mp-gcd.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Extended GCD calculation * @@ -338,7 +336,7 @@ static test_chunk tests[] = { 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); } diff --git a/mp-io.c b/math/mp-io.c similarity index 99% rename from mp-io.c rename to math/mp-io.c index 9639a998..d7046f30 100644 --- a/mp-io.c +++ b/math/mp-io.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Loading and storing of multiprecision integers * diff --git a/mp-jacobi.c b/math/mp-jacobi.c similarity index 98% rename from mp-jacobi.c rename to math/mp-jacobi.c index 3674f223..1a2835b9 100644 --- a/mp-jacobi.c +++ b/math/mp-jacobi.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Compute Jacobi symbol * @@ -194,7 +192,7 @@ static test_chunk tests[] = { 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); } diff --git a/mp-mem.c b/math/mp-mem.c similarity index 99% rename from mp-mem.c rename to math/mp-mem.c index fcb6c4dc..e1840ee1 100644 --- a/mp-mem.c +++ b/math/mp-mem.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mp-mem.c,v 1.8 2004/04/08 16:17:32 mdw Exp $ * * Memory management for multiprecision numbers * diff --git a/mp-misc.c b/math/mp-misc.c similarity index 97% rename from mp-misc.c rename to math/mp-misc.c index 90bdc37d..35cdc8ec 100644 --- a/mp-misc.c +++ b/math/mp-misc.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mp-misc.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Miscellaneous multiprecision support functions * diff --git a/mp-modexp.c b/math/mp-modexp.c similarity index 97% rename from mp-modexp.c rename to math/mp-modexp.c index ff2cbe0f..f52e5b06 100644 --- a/mp-modexp.c +++ b/math/mp-modexp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * General-purpose modular exponentiation * @@ -104,7 +102,7 @@ static test_chunk tests[] = { 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); } diff --git a/mp-modsqrt.c b/math/mp-modsqrt.c similarity index 97% rename from mp-modsqrt.c rename to math/mp-modsqrt.c index 17911851..b4a11fae 100644 --- a/mp-modsqrt.c +++ b/math/mp-modsqrt.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mp-modsqrt.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Compute square roots modulo a prime * @@ -200,7 +198,7 @@ static test_chunk tests[] = { 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); } diff --git a/mp-sqrt.c b/math/mp-sqrt.c similarity index 98% rename from mp-sqrt.c rename to math/mp-sqrt.c index 1491021b..2dbe4189 100644 --- a/mp-sqrt.c +++ b/math/mp-sqrt.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Compute integer square roots * @@ -146,7 +144,7 @@ static test_chunk tests[] = { 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); } diff --git a/mp-test.c b/math/mp-test.c similarity index 96% rename from mp-test.c rename to math/mp-test.c index 55c9ae94..ebc4833c 100644 --- a/mp-test.c +++ b/math/mp-test.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mp-test.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Testing functionality for multiprecision integers * diff --git a/mp.h b/math/mp.h similarity index 99% rename from mp.h rename to math/mp.h index 13f97d1d..cfaeed5e 100644 --- a/mp.h +++ b/math/mp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Simple multiprecision arithmetic * diff --git a/mparena.c b/math/mparena.c similarity index 99% rename from mparena.c rename to math/mparena.c index c7269125..bbe58678 100644 --- a/mparena.c +++ b/math/mparena.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Allocation and freeing of MP buffers * diff --git a/mparena.h b/math/mparena.h similarity index 98% rename from mparena.h rename to math/mparena.h index 94b69ada..21cacf16 100644 --- a/mparena.h +++ b/math/mparena.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mparena.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Allocation and freeing of MP buffers * diff --git a/mpbarrett-exp.c b/math/mpbarrett-exp.c similarity index 97% rename from mpbarrett-exp.c rename to math/mpbarrett-exp.c index ef8fa59f..44cad7ef 100644 --- a/mpbarrett-exp.c +++ b/math/mpbarrett-exp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Modular exponentiation using Barrett reduction * @@ -115,7 +113,7 @@ static test_chunk tests[] = { 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); } diff --git a/mpbarrett-exp.h b/math/mpbarrett-exp.h similarity index 96% rename from mpbarrett-exp.h rename to math/mpbarrett-exp.h index ee5043d2..08741f32 100644 --- a/mpbarrett-exp.h +++ b/math/mpbarrett-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpbarrett-exp.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Exponentiation operations for Barrett reduction * diff --git a/mpbarrett-mexp.c b/math/mpbarrett-mexp.c similarity index 98% rename from mpbarrett-mexp.c rename to math/mpbarrett-mexp.c index 2cfda96e..a221f104 100644 --- a/mpbarrett-mexp.c +++ b/math/mpbarrett-mexp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Multiple simultaneous exponentiations * @@ -168,7 +166,7 @@ static test_chunk tests[] = { 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); } diff --git a/mpbarrett.c b/math/mpbarrett.c similarity index 98% rename from mpbarrett.c rename to math/mpbarrett.c index 13210b3d..cadb9b36 100644 --- a/mpbarrett.c +++ b/math/mpbarrett.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Barrett modular reduction * @@ -204,7 +202,7 @@ static test_chunk tests[] = { 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); } diff --git a/mpbarrett.h b/math/mpbarrett.h similarity index 99% rename from mpbarrett.h rename to math/mpbarrett.h index 71d9ba7d..40e0fe42 100644 --- a/mpbarrett.h +++ b/math/mpbarrett.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Barrett modular reduction * diff --git a/mpcrt.c b/math/mpcrt.c similarity index 99% rename from mpcrt.c rename to math/mpcrt.c index bf6459f2..a8f805fb 100644 --- a/mpcrt.c +++ b/math/mpcrt.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Chinese Remainder Theorem computations (Gauss's algorithm) * @@ -284,7 +282,7 @@ static test_chunk tests[] = { 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); } diff --git a/mpcrt.h b/math/mpcrt.h similarity index 98% rename from mpcrt.h rename to math/mpcrt.h index c108916d..cebdce57 100644 --- a/mpcrt.h +++ b/math/mpcrt.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpcrt.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Chinese Remainder Theorem computations (Gauss's algorithm) * diff --git a/mpdump.c b/math/mpdump.c similarity index 97% rename from mpdump.c rename to math/mpdump.c index 1d80f40f..3eb2883c 100644 --- a/mpdump.c +++ b/math/mpdump.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpdump.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Dump a multiprecision integer as C data * diff --git a/mpint.c b/math/mpint.c similarity index 97% rename from mpint.c rename to math/mpint.c index 7c1b8cce..d89fb078 100644 --- a/mpint.c +++ b/math/mpint.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpint.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Conversion between MPs and standard C integers * @@ -170,7 +168,7 @@ static test_chunk tests[] = { 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); } diff --git a/mpint.h b/math/mpint.h similarity index 99% rename from mpint.h rename to math/mpint.h index dbf9065c..7867f6a4 100644 --- a/mpint.h +++ b/math/mpint.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Conversion between MPs and standard C integers * diff --git a/mpmont-exp.c b/math/mpmont-exp.c similarity index 98% rename from mpmont-exp.c rename to math/mpmont-exp.c index 6959baf1..0ea554ea 100644 --- a/mpmont-exp.c +++ b/math/mpmont-exp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Modular exponentiation with Montgomery reduction * @@ -138,7 +136,7 @@ static test_chunk tests[] = { 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); } diff --git a/mpmont-exp.h b/math/mpmont-exp.h similarity index 96% rename from mpmont-exp.h rename to math/mpmont-exp.h index 77305247..7ae714de 100644 --- a/mpmont-exp.h +++ b/math/mpmont-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpmont-exp.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Exponentiation operations for Montgomery reduction * diff --git a/mpmont-mexp.c b/math/mpmont-mexp.c similarity index 98% rename from mpmont-mexp.c rename to math/mpmont-mexp.c index 92f40c39..e0f37b53 100644 --- a/mpmont-mexp.c +++ b/math/mpmont-mexp.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Multiple simultaneous exponentiations * @@ -204,7 +202,7 @@ static test_chunk tests[] = { 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); } diff --git a/mpmont.c b/math/mpmont.c similarity index 99% rename from mpmont.c rename to math/mpmont.c index 65b3fcc8..88efacab 100644 --- a/mpmont.c +++ b/math/mpmont.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Montgomery reduction * @@ -420,7 +418,7 @@ static test_chunk tests[] = { 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); } diff --git a/mpmont.h b/math/mpmont.h similarity index 99% rename from mpmont.h rename to math/mpmont.h index 745cf5a6..9973ec3f 100644 --- a/mpmont.h +++ b/math/mpmont.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Montgomery reduction * diff --git a/mpmul.c b/math/mpmul.c similarity index 97% rename from mpmul.c rename to math/mpmul.c index 1f932b0d..e168bc19 100644 --- a/mpmul.c +++ b/math/mpmul.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpmul.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Multiply many small numbers together * @@ -172,7 +170,7 @@ static test_chunk tests[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, tests, SRCDIR "/tests/mp"); + test_run(argc, argv, tests, SRCDIR "/t/mp"); return (0); } diff --git a/mpmul.h b/math/mpmul.h similarity index 98% rename from mpmul.h rename to math/mpmul.h index bd1f1566..1dfb5871 100644 --- a/mpmul.h +++ b/math/mpmul.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpmul.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Multiply many small numbers together * diff --git a/mprand.c b/math/mprand.c similarity index 98% rename from mprand.c rename to math/mprand.c index c0f9675f..eb779cb8 100644 --- a/mprand.c +++ b/math/mprand.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mprand.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Generate a random multiprecision integer * diff --git a/mprand.h b/math/mprand.h similarity index 97% rename from mprand.h rename to math/mprand.h index cb51e1ca..0c193c03 100644 --- a/mprand.h +++ b/math/mprand.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mprand.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Generate a random multiprecision integer * diff --git a/mpreduce-exp.h b/math/mpreduce-exp.h similarity index 96% rename from mpreduce-exp.h rename to math/mpreduce-exp.h index c22fd47c..f314514d 100644 --- a/mpreduce-exp.h +++ b/math/mpreduce-exp.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpreduce-exp.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Exponentiation operations for binary field reduction * diff --git a/mpreduce.c b/math/mpreduce.c similarity index 99% rename from mpreduce.c rename to math/mpreduce.c index 5016f29e..669f516f 100644 --- a/mpreduce.c +++ b/math/mpreduce.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Efficient reduction modulo nice primes * @@ -431,7 +429,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/mpreduce"); + test_run(argc, argv, defs, SRCDIR"/t/mpreduce"); return (0); } diff --git a/mpreduce.h b/math/mpreduce.h similarity index 99% rename from mpreduce.h rename to math/mpreduce.h index 80037d17..c90c93fb 100644 --- a/mpreduce.h +++ b/math/mpreduce.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Efficient reduction modulo nice primes * diff --git a/mpscan.c b/math/mpscan.c similarity index 98% rename from mpscan.c rename to math/mpscan.c index a939333a..4b8c9712 100644 --- a/mpscan.c +++ b/math/mpscan.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpscan.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Sequential bit scan of multiprecision integers * diff --git a/mpscan.h b/math/mpscan.h similarity index 98% rename from mpscan.h rename to math/mpscan.h index 0d02519e..8ba4bd7a 100644 --- a/mpscan.h +++ b/math/mpscan.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpscan.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Sequential bit scan of multiprecision integers * diff --git a/mptext-dstr.c b/math/mptext-dstr.c similarity index 97% rename from mptext-dstr.c rename to math/mptext-dstr.c index 6a9ad687..bb523907 100644 --- a/mptext-dstr.c +++ b/math/mptext-dstr.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mptext-dstr.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Reading and writing large integers on strings * diff --git a/mptext-file.c b/math/mptext-file.c similarity index 96% rename from mptext-file.c rename to math/mptext-file.c index 1eb273aa..aefcd496 100644 --- a/mptext-file.c +++ b/math/mptext-file.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mptext-file.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Reading and writing large integers on files * diff --git a/mptext-len.c b/math/mptext-len.c similarity index 99% rename from mptext-len.c rename to math/mptext-len.c index e8142fbd..352dba22 100644 --- a/mptext-len.c +++ b/math/mptext-len.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Work out length of a number's string representation * diff --git a/mptext-string.c b/math/mptext-string.c similarity index 97% rename from mptext-string.c rename to math/mptext-string.c index ecb8f182..c70ca94d 100644 --- a/mptext-string.c +++ b/math/mptext-string.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mptext-string.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Reading and writing large integers on strings * diff --git a/mptext.c b/math/mptext.c similarity index 99% rename from mptext.c rename to math/mptext.c index 8c00e346..5d4640ef 100644 --- a/mptext.c +++ b/math/mptext.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Textual representation of multiprecision numbers * @@ -842,7 +840,7 @@ static test_chunk tests[] = { 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); } diff --git a/mptext.h b/math/mptext.h similarity index 99% rename from mptext.h rename to math/mptext.h index dade3cf0..8d9342d4 100644 --- a/mptext.h +++ b/math/mptext.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Textual representation of multiprecision numbers * diff --git a/mptypes.c b/math/mptypes.c similarity index 99% rename from mptypes.c rename to math/mptypes.c index eb8b975c..807ffee5 100644 --- a/mptypes.c +++ b/math/mptypes.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Generate `mptypes.h' header file for current architecture * diff --git a/mpw.h b/math/mpw.h similarity index 97% rename from mpw.h rename to math/mpw.h index e37ea160..fa663169 100644 --- a/mpw.h +++ b/math/mpw.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpw.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Very low-level multiprecision definitions * diff --git a/mpx-kmul.c b/math/mpx-kmul.c similarity index 99% rename from mpx-kmul.c rename to math/mpx-kmul.c index 081de885..35a3deb6 100644 --- a/mpx-kmul.c +++ b/math/mpx-kmul.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Karatsuba's multiplication algorithm * @@ -240,7 +238,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/mpx"); + test_run(argc, argv, defs, SRCDIR"/t/mpx"); return (0); } diff --git a/mpx-ksqr.c b/math/mpx-ksqr.c similarity index 98% rename from mpx-ksqr.c rename to math/mpx-ksqr.c index ba7aa18b..e96040b3 100644 --- a/mpx-ksqr.c +++ b/math/mpx-ksqr.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Karatsuba-based squaring algorithm * @@ -204,7 +202,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/mpx"); + test_run(argc, argv, defs, SRCDIR"/t/mpx"); return (0); } diff --git a/mpx.c b/math/mpx.c similarity index 99% rename from mpx.c rename to math/mpx.c index 29e1dedb..12941247 100644 --- a/mpx.c +++ b/math/mpx.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Low-level multiprecision arithmetic * @@ -1730,7 +1728,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/mpx"); + test_run(argc, argv, defs, SRCDIR"/t/mpx"); return (0); } diff --git a/mpx.h b/math/mpx.h similarity index 99% rename from mpx.h rename to math/mpx.h index 19f5cc7f..4d6288ed 100644 --- a/mpx.h +++ b/math/mpx.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mpx.h,v 1.18 2004/04/08 01:36:15 mdw Exp $ * * Low level multiprecision arithmetic * diff --git a/p-gentab.awk b/math/p-gentab.awk similarity index 98% rename from p-gentab.awk rename to math/p-gentab.awk index 09a1c372..f0dd357b 100755 --- a/p-gentab.awk +++ b/math/p-gentab.awk @@ -1,8 +1,6 @@ #! /usr/bin/awk -f -# -# $Id$ -function banner(name, s, i) +function banner(name, s, i) { s = "/*----- " name " "; while (length(s) < 75) s = s "-"; diff --git a/pfilt.c b/math/pfilt.c similarity index 99% rename from pfilt.c rename to math/pfilt.c index ae99a9b6..de049cbe 100644 --- a/pfilt.c +++ b/math/pfilt.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: pfilt.c,v 1.6 2004/04/08 01:36:15 mdw Exp $ * * Finding and testing prime numbers * diff --git a/pfilt.h b/math/pfilt.h similarity index 98% rename from pfilt.h rename to math/pfilt.h index 24f94c73..a667614c 100644 --- a/pfilt.h +++ b/math/pfilt.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: pfilt.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Finding and testing prime numbers * diff --git a/pgen-gcd.c b/math/pgen-gcd.c similarity index 97% rename from pgen-gcd.c rename to math/pgen-gcd.c index 863b1510..1d205b5c 100644 --- a/pgen-gcd.c +++ b/math/pgen-gcd.c @@ -1,6 +1,4 @@ /* -*-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$% * diff --git a/pgen-simul.c b/math/pgen-simul.c similarity index 99% rename from pgen-simul.c rename to math/pgen-simul.c index 175b0093..03deeb19 100644 --- a/pgen-simul.c +++ b/math/pgen-simul.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Simultaneous prime search * diff --git a/pgen-stdev.c b/math/pgen-stdev.c similarity index 97% rename from pgen-stdev.c rename to math/pgen-stdev.c index c917998e..117fb27e 100644 --- a/pgen-stdev.c +++ b/math/pgen-stdev.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: pgen-stdev.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Standard event handlers * diff --git a/pgen.c b/math/pgen.c similarity index 99% rename from pgen.c rename to math/pgen.c index 1a2a8ac6..9a822f57 100644 --- a/pgen.c +++ b/math/pgen.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Prime generation glue * @@ -414,7 +412,7 @@ static test_chunk tests[] = { 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 diff --git a/pgen.h b/math/pgen.h similarity index 99% rename from pgen.h rename to math/pgen.h index a066e284..b103c30e 100644 --- a/pgen.h +++ b/math/pgen.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Prime generation glue * diff --git a/prim.c b/math/prim.c similarity index 97% rename from prim.c rename to math/prim.c index 47679120..00031224 100644 --- a/prim.c +++ b/math/prim.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: prim.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Finding primitive elements * diff --git a/prim.h b/math/prim.h similarity index 97% rename from prim.h rename to math/prim.h index 1df2ed63..4b3dff3b 100644 --- a/prim.h +++ b/math/prim.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: prim.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Finding primitive elements * diff --git a/primeiter.c b/math/primeiter.c similarity index 99% rename from primeiter.c rename to math/primeiter.c index d7126ba1..463fc47e 100644 --- a/primeiter.c +++ b/math/primeiter.c @@ -245,7 +245,7 @@ static test_chunk tests[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, tests, SRCDIR "/tests/pgen"); + test_run(argc, argv, tests, SRCDIR "/t/pgen"); return (0); } diff --git a/primeiter.h b/math/primeiter.h similarity index 100% rename from primeiter.h rename to math/primeiter.h diff --git a/ptab.h b/math/ptab.h similarity index 96% rename from ptab.h rename to math/ptab.h index 1e9af6e2..4ddeeb1b 100644 --- a/ptab.h +++ b/math/ptab.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ptab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Table of standard prime groups * diff --git a/ptab.in b/math/ptab.in similarity index 99% rename from ptab.in rename to math/ptab.in index 24151f94..162d0c95 100644 --- a/ptab.in +++ b/math/ptab.in @@ -1,5 +1,3 @@ -# $Id$ -# # Standard prime groups #----- Groups from Oakley (RFC2412) ----------------------------------------- diff --git a/qdparse.c b/math/qdparse.c similarity index 98% rename from qdparse.c rename to math/qdparse.c index 9615bb56..217cc628 100644 --- a/qdparse.c +++ b/math/qdparse.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: qdparse.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Quick-and-dirty parser * diff --git a/qdparse.h b/math/qdparse.h similarity index 97% rename from qdparse.h rename to math/qdparse.h index f6696e4c..9e56b6bd 100644 --- a/qdparse.h +++ b/math/qdparse.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: qdparse.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Quick-and-dirty parser * diff --git a/rabin.c b/math/rabin.c similarity index 99% rename from rabin.c rename to math/rabin.c index 1b1130b8..b543eefe 100644 --- a/rabin.c +++ b/math/rabin.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Miller-Rabin primality test * diff --git a/rabin.h b/math/rabin.h similarity index 99% rename from rabin.h rename to math/rabin.h index a4916258..c3eec720 100644 --- a/rabin.h +++ b/math/rabin.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Miller-Rabin primality test * diff --git a/rho.c b/math/rho.c similarity index 99% rename from rho.c rename to math/rho.c index a02eeba7..fc5076bf 100644 --- a/rho.c +++ b/math/rho.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rho.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Pollard's rho algorithm for discrete logs * diff --git a/rho.h b/math/rho.h similarity index 98% rename from rho.h rename to math/rho.h index 75bf7fa2..0817fe82 100644 --- a/rho.h +++ b/math/rho.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rho.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Pollard's rho algorithm for discrete logs * diff --git a/strongprime.c b/math/strongprime.c similarity index 98% rename from strongprime.c rename to math/strongprime.c index 866533d7..6acac174 100644 --- a/strongprime.c +++ b/math/strongprime.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: strongprime.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Generate `strong' prime numbers * @@ -32,7 +30,6 @@ #include #include "grand.h" -#include "rand.h" #include "mp.h" #include "mpmont.h" #include "mprand.h" diff --git a/strongprime.h b/math/strongprime.h similarity index 98% rename from strongprime.h rename to math/strongprime.h index 1986d806..6f39f500 100644 --- a/strongprime.h +++ b/math/strongprime.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: strongprime.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Generate `strong' prime numbers * diff --git a/tests/ec b/math/t/ec similarity index 99% rename from tests/ec rename to math/t/ec index b3c6e0e9..92fb26a8 100644 --- a/tests/ec +++ b/math/t/ec @@ -1,5 +1,3 @@ -# $Id$ -# # Elliptic curve tests check { diff --git a/tests/gf b/math/t/gf similarity index 99% rename from tests/gf rename to math/t/gf index 88d94cd2..0ed1c49b 100644 --- a/tests/gf +++ b/math/t/gf @@ -1,5 +1,3 @@ -# $Id$ -# # Test cases for higher-level binary poly arithmetic. add { diff --git a/tests/gfn b/math/t/gfn similarity index 96% rename from tests/gfn rename to math/t/gfn index 6586d50b..f7720e1c 100644 --- a/tests/gfn +++ b/math/t/gfn @@ -1,5 +1,3 @@ -# $Id: gfn,v 1.2 2004/04/02 08:41:45 mdw Exp $ -# # Normal basis conversions gfn { diff --git a/tests/gfreduce b/math/t/gfreduce similarity index 99% rename from tests/gfreduce rename to math/t/gfreduce index c7c474a0..f7123164 100644 --- a/tests/gfreduce +++ b/math/t/gfreduce @@ -1,5 +1,3 @@ -# $Id$ -# # Test efficient polynomial reduction reduce { diff --git a/tests/gfx b/math/t/gfx similarity index 99% rename from tests/gfx rename to math/t/gfx index b26433d6..c0a873a3 100644 --- a/tests/gfx +++ b/math/t/gfx @@ -1,6 +1,4 @@ # Test vectors for low-level GF functions -# -# $Id: gfx,v 1.2 2004/03/21 22:52:06 mdw Exp $ # --- Addition (and subtraction) --- diff --git a/tests/group b/math/t/group similarity index 99% rename from tests/group rename to math/t/group index dd090605..a2a820fd 100644 --- a/tests/group +++ b/math/t/group @@ -1,5 +1,3 @@ -# $Id$ -# # Test group abstraction, and a bunch of other things. check { diff --git a/tests/mp b/math/t/mp similarity index 99% rename from tests/mp rename to math/t/mp index 0fbaf06a..fe74f073 100644 --- a/tests/mp +++ b/math/t/mp @@ -1,6 +1,4 @@ # Test vectors for MP functions -# -# $Id$ add { 5 4 9; 5 -4 1; -5 4 -1; -5 -4 -9; diff --git a/tests/mpbarrett b/math/t/mpbarrett similarity index 99% rename from tests/mpbarrett rename to math/t/mpbarrett index 801b0910..c492ecec 100644 --- a/tests/mpbarrett +++ b/math/t/mpbarrett @@ -1,6 +1,4 @@ # Test vectors for Barrett modular reduction -# -# $Id$ mpbarrett-reduce { 17 11 6; diff --git a/tests/mpcrt b/math/t/mpcrt similarity index 92% rename from tests/mpcrt rename to math/t/mpcrt index 65a3c3d7..89665b62 100644 --- a/tests/mpcrt +++ b/math/t/mpcrt @@ -1,6 +1,4 @@ # 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; diff --git a/tests/mpint b/math/t/mpint similarity index 94% rename from tests/mpint rename to math/t/mpint index 49157ba4..9c3263dd 100644 --- a/tests/mpint +++ b/math/t/mpint @@ -1,7 +1,5 @@ # 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. diff --git a/tests/mpmont b/math/t/mpmont similarity index 99% rename from tests/mpmont rename to math/t/mpmont index a541508d..27e03c15 100644 --- a/tests/mpmont +++ b/math/t/mpmont @@ -1,6 +1,4 @@ # Test vectors for Montgomery reduction -# -# $Id$ create { 340809809850981098423498794792349 # m diff --git a/tests/mpreduce b/math/t/mpreduce similarity index 99% rename from tests/mpreduce rename to math/t/mpreduce index 16cd81f2..2fb8f09b 100644 --- a/tests/mpreduce +++ b/math/t/mpreduce @@ -1,5 +1,3 @@ -# $Id$ -# # Tests for efficient reduction reduce { diff --git a/tests/mptext b/math/t/mptext similarity index 99% rename from tests/mptext rename to math/t/mptext index ed9fb6aa..fadaef64 100644 --- a/tests/mptext +++ b/math/t/mptext @@ -1,6 +1,4 @@ # 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 --- diff --git a/tests/mpx b/math/t/mpx similarity index 99% rename from tests/mpx rename to math/t/mpx index e30e91ab..bf104e91 100644 --- a/tests/mpx +++ b/math/t/mpx @@ -1,6 +1,4 @@ # Test vectors for low-level MP functions -# -# $Id: mpx,v 1.12 2004/04/01 12:50:41 mdw Exp $ # --- Load-store tests --- # diff --git a/tests/mpx-gen b/math/t/mpx-gen similarity index 97% rename from tests/mpx-gen rename to math/t/mpx-gen index e53b1d6b..891e4d64 100755 --- a/tests/mpx-gen +++ b/math/t/mpx-gen @@ -1,7 +1,5 @@ #! /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 --- diff --git a/tests/pgen b/math/t/pgen similarity index 96% rename from tests/pgen rename to math/t/pgen index 6e78dee7..8d52d197 100644 --- a/tests/pgen +++ b/math/t/pgen @@ -1,6 +1,4 @@ # Test vectors for prime number finder -# -# $Id: pgen,v 1.2 2001/06/16 13:20:46 mdw Exp $ pgen { 2 2; diff --git a/misc/Makefile.am b/misc/Makefile.am new file mode 100644 index 00000000..f5f380a5 --- /dev/null +++ b/misc/Makefile.am @@ -0,0 +1,51 @@ +### -*-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 -------------------------------------------------- diff --git a/gfshare-mktab.c b/misc/gfshare-mktab.c similarity index 97% rename from gfshare-mktab.c rename to misc/gfshare-mktab.c index 4cf57275..9fc073f3 100644 --- a/gfshare-mktab.c +++ b/misc/gfshare-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gfshare-mktab.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Generate tables for %$\gf{2^8}$% multiplication * diff --git a/gfshare.c b/misc/gfshare.c similarity index 99% rename from gfshare.c rename to misc/gfshare.c index 99b1223b..0eb076b1 100644 --- a/gfshare.c +++ b/misc/gfshare.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Secret sharing over %$\gf{2^8}$% * diff --git a/gfshare.h b/misc/gfshare.h similarity index 99% rename from gfshare.h rename to misc/gfshare.h index 98267584..3337e3bc 100644 --- a/gfshare.h +++ b/misc/gfshare.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Secret sharing over %$\gf{2^8}$% * diff --git a/share.c b/misc/share.c similarity index 99% rename from share.c rename to misc/share.c index 1afa1891..e99781e7 100644 --- a/share.c +++ b/misc/share.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Shamir's secret sharing * diff --git a/share.h b/misc/share.h similarity index 99% rename from share.h rename to misc/share.h index 5500a4cf..9b82fdd0 100644 --- a/share.h +++ b/misc/share.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Shamir's secret sharing * diff --git a/mkpgroups b/mkpgroups deleted file mode 100755 index b40c23b3..00000000 --- a/mkpgroups +++ /dev/null @@ -1,42 +0,0 @@ -#! /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() diff --git a/papers/rand.tex b/papers/rand.tex index 5a2014d6..a82387be 100644 --- a/papers/rand.tex +++ b/papers/rand.tex @@ -1,7 +1,5 @@ %%% -*-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 diff --git a/pcheck.pl b/pcheck.pl deleted file mode 100644 index 3b1447a8..00000000 --- a/pcheck.pl +++ /dev/null @@ -1,43 +0,0 @@ -#! /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 <; @F = split; $F[0] eq "#:factor" or last; $f = $F[1]; - print <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 -------------------------------------------------- diff --git a/tests/aes-trans b/symm/aes-trans similarity index 100% rename from tests/aes-trans rename to symm/aes-trans diff --git a/blkc.h b/symm/blkc.h similarity index 99% rename from blkc.h rename to symm/blkc.h index d95c4f9c..d6e3da0f 100644 --- a/blkc.h +++ b/symm/blkc.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Common definitions for block ciphers * @@ -329,7 +327,7 @@ static const test_chunk defs[] = { \ \ int main(int argc, char *argv[]) \ { \ - test_run(argc, argv, defs, SRCDIR"/tests/" #pre); \ + test_run(argc, argv, defs, SRCDIR"/t/" #pre); \ return (0); \ } diff --git a/blowfish-mktab.c b/symm/blowfish-mktab.c similarity index 98% rename from blowfish-mktab.c rename to symm/blowfish-mktab.c index 9d6fcb25..752fb326 100644 --- a/blowfish-mktab.c +++ b/symm/blowfish-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: blowfish-mktab.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Build Blowfish key table * diff --git a/blowfish.c b/symm/blowfish.c similarity index 98% rename from blowfish.c rename to symm/blowfish.c index 2750cfbd..4bfb84d3 100644 --- a/blowfish.c +++ b/symm/blowfish.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: blowfish.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The Blowfish block cipher * diff --git a/blowfish.h b/symm/blowfish.h similarity index 98% rename from blowfish.h rename to symm/blowfish.h index a9ece5ee..eedf820a 100644 --- a/blowfish.h +++ b/symm/blowfish.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: blowfish.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The Blowfish block cipher * diff --git a/cast-base.h b/symm/cast-base.h similarity index 97% rename from cast-base.h rename to symm/cast-base.h index 36cd42be..8a8dcc65 100644 --- a/cast-base.h +++ b/symm/cast-base.h @@ -1,6 +1,4 @@ /* -*-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 * diff --git a/cast-s.c b/symm/cast-s.c similarity index 95% rename from cast-s.c rename to symm/cast-s.c index e9b1e6a1..968d888e 100644 --- a/cast-s.c +++ b/symm/cast-s.c @@ -1,6 +1,4 @@ /* -*-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 * diff --git a/cast-sk.c b/symm/cast-sk.c similarity index 95% rename from cast-sk.c rename to symm/cast-sk.c index 25210b76..d1620ee4 100644 --- a/cast-sk.c +++ b/symm/cast-sk.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cast-sk.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Key-schedule S-boxes for CAST-128 * diff --git a/cast-tab.h b/symm/cast-tab.h similarity index 99% rename from cast-tab.h rename to symm/cast-tab.h index 6155f922..b6e2f9f9 100644 --- a/cast-tab.h +++ b/symm/cast-tab.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cast-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * S-boxes for CAST-128 and CAST-256 * diff --git a/cast128.c b/symm/cast128.c similarity index 99% rename from cast128.c rename to symm/cast128.c index 5f136147..cbff8d1b 100644 --- a/cast128.c +++ b/symm/cast128.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cast128.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The CAST-128 block cipher * diff --git a/cast128.h b/symm/cast128.h similarity index 98% rename from cast128.h rename to symm/cast128.h index fb51416f..01ba6c67 100644 --- a/cast128.h +++ b/symm/cast128.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cast128.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The CAST-128 block cipher * diff --git a/cast256.c b/symm/cast256.c similarity index 99% rename from cast256.c rename to symm/cast256.c index 36546b0d..38aec60b 100644 --- a/cast256.c +++ b/symm/cast256.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cast256.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The CAST-256 block cipher * diff --git a/cast256.h b/symm/cast256.h similarity index 98% rename from cast256.h rename to symm/cast256.h index 7e65a831..dd96460c 100644 --- a/cast256.h +++ b/symm/cast256.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cast256.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The CAST-128 block cipher * diff --git a/cbc-def.h b/symm/cbc-def.h similarity index 99% rename from cbc-def.h rename to symm/cbc-def.h index d14c952c..f48ee460 100644 --- a/cbc-def.h +++ b/symm/cbc-def.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cbc-def.h,v 1.6 2004/04/17 09:58:36 mdw Exp $ * * Definitions for cipher block chaining mode * diff --git a/cbc.h b/symm/cbc.h similarity index 99% rename from cbc.h rename to symm/cbc.h index 651df8ad..5f1f22aa 100644 --- a/cbc.h +++ b/symm/cbc.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cbc.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Ciphertext block chaining for block ciphers * diff --git a/cfb-def.h b/symm/cfb-def.h similarity index 99% rename from cfb-def.h rename to symm/cfb-def.h index 357bb956..767f4c42 100644 --- a/cfb-def.h +++ b/symm/cfb-def.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cfb-def.h,v 1.6 2004/04/17 09:58:37 mdw Exp $ * * Definitions for ciphertext feedback mode * diff --git a/cfb.h b/symm/cfb.h similarity index 99% rename from cfb.h rename to symm/cfb.h index e2082a1a..c357115c 100644 --- a/cfb.h +++ b/symm/cfb.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: cfb.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Ciphertext feedback for block ciphers * diff --git a/counter-def.h b/symm/counter-def.h similarity index 99% rename from counter-def.h rename to symm/counter-def.h index 129efd9a..2f353232 100644 --- a/counter-def.h +++ b/symm/counter-def.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: counter-def.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Block cipher counter mode (or long cycle mode) * diff --git a/counter.h b/symm/counter.h similarity index 99% rename from counter.h rename to symm/counter.h index 0cfaa726..7e07b3c5 100644 --- a/counter.h +++ b/symm/counter.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: counter.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Block cipher counter mode (or long cycle mode) * diff --git a/crc32.c b/symm/crc32.c similarity index 97% rename from crc32.c rename to symm/crc32.c index 3bccfa3a..4b6f27bc 100644 --- a/crc32.c +++ b/symm/crc32.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: crc32.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Generic hash wrapper for CRC32 * diff --git a/crc32.h b/symm/crc32.h similarity index 96% rename from crc32.h rename to symm/crc32.h index 1cf164f0..a242273a 100644 --- a/crc32.h +++ b/symm/crc32.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: crc32.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Generic hash wrapper for CRC32 * diff --git a/daftstory.h b/symm/daftstory.h similarity index 97% rename from daftstory.h rename to symm/daftstory.h index 30313a44..b4d6b58c 100644 --- a/daftstory.h +++ b/symm/daftstory.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: daftstory.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Daft story for use in test encryptions * diff --git a/des-base.c b/symm/des-base.c similarity index 95% rename from des-base.c rename to symm/des-base.c index 1003cb64..4d55881e 100644 --- a/des-base.c +++ b/symm/des-base.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: des-base.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Common features for DES implementation * diff --git a/des-base.h b/symm/des-base.h similarity index 98% rename from des-base.h rename to symm/des-base.h index 709877bc..49bbed7e 100644 --- a/des-base.h +++ b/symm/des-base.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: des-base.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Common features for DES implementation * diff --git a/des-mktab.c b/symm/des-mktab.c similarity index 99% rename from des-mktab.c rename to symm/des-mktab.c index 9f27e627..5dc8c4ad 100644 --- a/des-mktab.c +++ b/symm/des-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: des-mktab.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Build combined S-P tables for DES * diff --git a/des.c b/symm/des.c similarity index 99% rename from des.c rename to symm/des.c index e2f07613..06400a15 100644 --- a/des.c +++ b/symm/des.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * The Data Encryption Standard * diff --git a/des.h b/symm/des.h similarity index 99% rename from des.h rename to symm/des.h index f3fe91c6..682be6b0 100644 --- a/des.h +++ b/symm/des.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * The Data Encryption Standard * diff --git a/des3.c b/symm/des3.c similarity index 98% rename from des3.c rename to symm/des3.c index 66f82431..dedd9f28 100644 --- a/des3.c +++ b/symm/des3.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: des3.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Implementation of double- and triple-DES * diff --git a/des3.h b/symm/des3.h similarity index 98% rename from des3.h rename to symm/des3.h index f4f33113..881f558a 100644 --- a/des3.h +++ b/symm/des3.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: des3.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Implementation of double- and triple-DES * diff --git a/desx-tab.h b/symm/desx-tab.h similarity index 98% rename from desx-tab.h rename to symm/desx-tab.h index 7c892e5c..f1b54d49 100644 --- a/desx-tab.h +++ b/symm/desx-tab.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: desx-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Tables for DESX * diff --git a/desx.c b/symm/desx.c similarity index 99% rename from desx.c rename to symm/desx.c index d7794826..d65ffa75 100644 --- a/desx.c +++ b/symm/desx.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Implementation of DESX * diff --git a/desx.h b/symm/desx.h similarity index 98% rename from desx.h rename to symm/desx.h index bee363ef..62e8300d 100644 --- a/desx.h +++ b/symm/desx.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: desx.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The DESX algorithm * diff --git a/ecb-def.h b/symm/ecb-def.h similarity index 99% rename from ecb-def.h rename to symm/ecb-def.h index 08a25f6d..ea153a27 100644 --- a/ecb-def.h +++ b/symm/ecb-def.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ecb-def.h,v 1.4 2004/04/17 09:58:37 mdw Exp $ * * Definitions electronic code book mode * diff --git a/ecb.h b/symm/ecb.h similarity index 98% rename from ecb.h rename to symm/ecb.h index ed39310f..4f5d525b 100644 --- a/ecb.h +++ b/symm/ecb.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ecb.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Electronic code book for block ciphers * diff --git a/gcipher.h b/symm/gcipher.h similarity index 98% rename from gcipher.h rename to symm/gcipher.h index 5682738f..efe9f51a 100644 --- a/gcipher.h +++ b/symm/gcipher.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gcipher.h,v 1.5 2004/04/21 00:37:32 mdw Exp $ * * Generic symmetric cipher interface * diff --git a/ghash-def.h b/symm/ghash-def.h similarity index 98% rename from ghash-def.h rename to symm/ghash-def.h index 6d20e5bd..2ede96f3 100644 --- a/ghash-def.h +++ b/symm/ghash-def.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ghash-def.h,v 1.7 2004/04/08 01:36:15 mdw Exp $ * * Definitions for generic hash interface * diff --git a/ghash.h b/symm/ghash.h similarity index 99% rename from ghash.h rename to symm/ghash.h index d20aff45..2f6a6cda 100644 --- a/ghash.h +++ b/symm/ghash.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Generic hash function interface * diff --git a/gmac.h b/symm/gmac.h similarity index 97% rename from gmac.h rename to symm/gmac.h index 096c36d8..efd4a025 100644 --- a/gmac.h +++ b/symm/gmac.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: gmac.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Generic MAC function interface * diff --git a/gthingtab.c.in b/symm/gthingtab.c.in similarity index 100% rename from gthingtab.c.in rename to symm/gthingtab.c.in diff --git a/has160.c b/symm/has160.c similarity index 99% rename from has160.c rename to symm/has160.c index 76c63aa2..483b9fe8 100644 --- a/has160.c +++ b/symm/has160.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: has160.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The HAS160 message digest function * diff --git a/has160.h b/symm/has160.h similarity index 98% rename from has160.h rename to symm/has160.h index 699260a1..d3c17f1e 100644 --- a/has160.h +++ b/symm/has160.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: has160.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The HAS160 message digest function * diff --git a/hash.h b/symm/hash.h similarity index 99% rename from hash.h rename to symm/hash.h index c2c10d04..31cf4a85 100644 --- a/hash.h +++ b/symm/hash.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Generic handling for message digest functions * @@ -262,7 +260,7 @@ static test_chunk defs[] = { \ 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); \ } diff --git a/hmac-def.h b/symm/hmac-def.h similarity index 99% rename from hmac-def.h rename to symm/hmac-def.h index 8b6b4f58..032c69f2 100644 --- a/hmac-def.h +++ b/symm/hmac-def.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: hmac-def.h,v 1.8 2004/04/08 01:36:15 mdw Exp $ * * Definitions for HMAC and NMAC * @@ -427,7 +425,7 @@ static test_chunk macdefs[] = { \ 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); \ } diff --git a/hmac.h b/symm/hmac.h similarity index 99% rename from hmac.h rename to symm/hmac.h index fffb093b..12da5fd7 100644 --- a/hmac.h +++ b/symm/hmac.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: hmac.h,v 1.7 2004/04/08 01:36:15 mdw Exp $ * * Generic code for HMAC and NMAC * diff --git a/idea.c b/symm/idea.c similarity index 99% rename from idea.c rename to symm/idea.c index c0f7fe74..51edb2d7 100644 --- a/idea.c +++ b/symm/idea.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: idea.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Implementation of the IDEA cipher * diff --git a/idea.h b/symm/idea.h similarity index 98% rename from idea.h rename to symm/idea.h index b049d740..a25a82a7 100644 --- a/idea.h +++ b/symm/idea.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: idea.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Implementation of the IDEA cipher * diff --git a/mars-mktab.c b/symm/mars-mktab.c similarity index 99% rename from mars-mktab.c rename to symm/mars-mktab.c index 9726ed9d..750f727a 100644 --- a/mars-mktab.c +++ b/symm/mars-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mars-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Generate the MARS S-box table * diff --git a/mars.c b/symm/mars.c similarity index 99% rename from mars.c rename to symm/mars.c index 9240083a..6f73b42f 100644 --- a/mars.c +++ b/symm/mars.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mars.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The MARS block cipher * diff --git a/mars.h b/symm/mars.h similarity index 98% rename from mars.h rename to symm/mars.h index f32f9f4c..f13f8a8a 100644 --- a/mars.h +++ b/symm/mars.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mars.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The MARS block cipher * diff --git a/md2-tab.h b/symm/md2-tab.h similarity index 98% rename from md2-tab.h rename to symm/md2-tab.h index 4217e771..3e1b2e96 100644 --- a/md2-tab.h +++ b/symm/md2-tab.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: md2-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Tables for MD2 * diff --git a/md2.c b/symm/md2.c similarity index 99% rename from md2.c rename to symm/md2.c index 987eb399..180bc651 100644 --- a/md2.c +++ b/symm/md2.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: md2.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The MD2 message digest function * diff --git a/md2.h b/symm/md2.h similarity index 98% rename from md2.h rename to symm/md2.h index 4d2b884c..26a1f2a4 100644 --- a/md2.h +++ b/symm/md2.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: md2.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The MD2 message digest function * diff --git a/md4.c b/symm/md4.c similarity index 99% rename from md4.c rename to symm/md4.c index 5d438179..eee5d6b3 100644 --- a/md4.c +++ b/symm/md4.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: md4.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The MD4 message digest function * diff --git a/md4.h b/symm/md4.h similarity index 98% rename from md4.h rename to symm/md4.h index d33d8cea..29ca7309 100644 --- a/md4.h +++ b/symm/md4.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: md4.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * The MD4 message digest function * diff --git a/md5.c b/symm/md5.c similarity index 99% rename from md5.c rename to symm/md5.c index a062c723..f3b37e19 100644 --- a/md5.c +++ b/symm/md5.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: md5.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The MD5 message digest function * diff --git a/md5.h b/symm/md5.h similarity index 98% rename from md5.h rename to symm/md5.h index 291cecaf..4248db2d 100644 --- a/md5.h +++ b/symm/md5.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: md5.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * The MD5 message digest function * diff --git a/mgf-def.h b/symm/mgf-def.h similarity index 99% rename from mgf-def.h rename to symm/mgf-def.h index 6d9f4e51..b5105ed3 100644 --- a/mgf-def.h +++ b/symm/mgf-def.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mgf-def.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Definitions for the MGF-1 mask generator * diff --git a/mgf.h b/symm/mgf.h similarity index 98% rename from mgf.h rename to symm/mgf.h index 273d5b0b..d5b0fd1b 100644 --- a/mgf.h +++ b/symm/mgf.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: mgf.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The MGF mask generation function * diff --git a/mode.c.in b/symm/mode.c.in similarity index 100% rename from mode.c.in rename to symm/mode.c.in diff --git a/mode.h.in b/symm/mode.h.in similarity index 100% rename from mode.h.in rename to symm/mode.h.in diff --git a/modes.am.in b/symm/modes.am.in similarity index 56% rename from modes.am.in rename to symm/modes.am.in index 88ee2178..4cbc88f2 100644 --- a/modes.am.in +++ b/symm/modes.am.in @@ -4,23 +4,28 @@ ### ### 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 @@ -29,6 +34,7 @@ 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 @@ -37,6 +43,7 @@ BLKC_H += @blkc.h SYMM_TESTS += @blkc.$t %end +## Hash function interfaces and implementations. HASH_C = HASH_H = %repeat @@ -45,6 +52,7 @@ HASH_H += @hash.h SYMM_TESTS += @hash.$t %end +## Modes for symmetric encryption. CIPHER_MODES = %repeat CIPHER_MODES += @blkc-@blkcciphermode @@ -53,15 +61,17 @@ 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 diff --git a/multigen b/symm/multigen similarity index 100% rename from multigen rename to symm/multigen diff --git a/noekeon.c b/symm/noekeon.c similarity index 99% rename from noekeon.c rename to symm/noekeon.c index 9e0f295c..6452091d 100644 --- a/noekeon.c +++ b/symm/noekeon.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: noekeon.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The Noekeon block cipher * diff --git a/noekeon.h b/symm/noekeon.h similarity index 98% rename from noekeon.h rename to symm/noekeon.h index e8497083..744db96b 100644 --- a/noekeon.h +++ b/symm/noekeon.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: noekeon.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Noekeon block cipher * diff --git a/ofb-def.h b/symm/ofb-def.h similarity index 99% rename from ofb-def.h rename to symm/ofb-def.h index 82503959..6b1357d0 100644 --- a/ofb-def.h +++ b/symm/ofb-def.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ofb-def.h,v 1.7 2004/04/08 01:36:15 mdw Exp $ * * Definitions for output feedback mode * diff --git a/ofb.h b/symm/ofb.h similarity index 99% rename from ofb.h rename to symm/ofb.h index 970acf75..5eec2ff0 100644 --- a/ofb.h +++ b/symm/ofb.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: ofb.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Output feedback for block ciphers * diff --git a/rc2-tab.h b/symm/rc2-tab.h similarity index 98% rename from rc2-tab.h rename to symm/rc2-tab.h index 4a0a29a6..48b46e0d 100644 --- a/rc2-tab.h +++ b/symm/rc2-tab.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rc2-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Substitution table for RC2 * diff --git a/rc2.c b/symm/rc2.c similarity index 98% rename from rc2.c rename to symm/rc2.c index 8241c06d..4ea85b6c 100644 --- a/rc2.c +++ b/symm/rc2.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rc2.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The RC2 block cipher * @@ -320,7 +318,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/rc2"); + test_run(argc, argv, defs, SRCDIR"/t/rc2"); return (0); } diff --git a/rc2.h b/symm/rc2.h similarity index 98% rename from rc2.h rename to symm/rc2.h index 5d35b14b..8b72a8b2 100644 --- a/rc2.h +++ b/symm/rc2.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rc2.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The RC2 block cipher * diff --git a/rc4.c b/symm/rc4.c similarity index 98% rename from rc4.c rename to symm/rc4.c index 83b51042..0d02062c 100644 --- a/rc4.c +++ b/symm/rc4.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rc4.c,v 1.6 2004/04/08 01:36:15 mdw Exp $ * * The alleged RC4 stream cipher * @@ -360,7 +358,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/rc4"); + test_run(argc, argv, defs, SRCDIR"/t/rc4"); return (0); } diff --git a/rc4.h b/symm/rc4.h similarity index 99% rename from rc4.h rename to symm/rc4.h index 7df1348b..caeeadbd 100644 --- a/rc4.h +++ b/symm/rc4.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rc4.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The alleged RC4 stream cipher * diff --git a/rc5.c b/symm/rc5.c similarity index 99% rename from rc5.c rename to symm/rc5.c index 306b5eca..634f0b7c 100644 --- a/rc5.c +++ b/symm/rc5.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rc5.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The RC5-32/12 block cipher * diff --git a/rc5.h b/symm/rc5.h similarity index 98% rename from rc5.h rename to symm/rc5.h index c029832a..c21b56dd 100644 --- a/rc5.h +++ b/symm/rc5.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rc5.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The RC5-32/12 block cipher * diff --git a/rijndael-base.c b/symm/rijndael-base.c similarity index 98% rename from rijndael-base.c rename to symm/rijndael-base.c index 5230cbc6..d3ec0d65 100644 --- a/rijndael-base.c +++ b/symm/rijndael-base.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael-base.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Low-level stuff for all Rijndael block sizes * diff --git a/rijndael-base.h b/symm/rijndael-base.h similarity index 97% rename from rijndael-base.h rename to symm/rijndael-base.h index e3f168d8..b213b13d 100644 --- a/rijndael-base.h +++ b/symm/rijndael-base.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael-base.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Internal header for Rijndael implementation * diff --git a/rijndael-mktab.c b/symm/rijndael-mktab.c similarity index 99% rename from rijndael-mktab.c rename to symm/rijndael-mktab.c index 0ecdfcda..4260de66 100644 --- a/rijndael-mktab.c +++ b/symm/rijndael-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael-mktab.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Build precomputed tables for the Rijndael block cipher * diff --git a/rijndael.c b/symm/rijndael.c similarity index 98% rename from rijndael.c rename to symm/rijndael.c index 9eb5f21d..9d8e739f 100644 --- a/rijndael.c +++ b/symm/rijndael.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * The Rijndael block cipher * diff --git a/rijndael.h b/symm/rijndael.h similarity index 98% rename from rijndael.h rename to symm/rijndael.h index b1ba75f1..7b93440a 100644 --- a/rijndael.h +++ b/symm/rijndael.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The Rijndael block cipher * diff --git a/rijndael192.c b/symm/rijndael192.c similarity index 98% rename from rijndael192.c rename to symm/rijndael192.c index aef5955e..424f8f90 100644 --- a/rijndael192.c +++ b/symm/rijndael192.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael192.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Rijndael block cipher, 192-bit version * diff --git a/rijndael192.h b/symm/rijndael192.h similarity index 97% rename from rijndael192.h rename to symm/rijndael192.h index fb3d0133..b9357cdc 100644 --- a/rijndael192.h +++ b/symm/rijndael192.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael192.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Rijndael block cipher, 192-bit version * diff --git a/rijndael256.c b/symm/rijndael256.c similarity index 99% rename from rijndael256.c rename to symm/rijndael256.c index 27f06d7a..9fb72983 100644 --- a/rijndael256.c +++ b/symm/rijndael256.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael256.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Rijndael block cipher, 256-bit version * diff --git a/rijndael256.h b/symm/rijndael256.h similarity index 97% rename from rijndael256.h rename to symm/rijndael256.h index 79ab09e1..fce2d0ec 100644 --- a/rijndael256.h +++ b/symm/rijndael256.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rijndael256.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Rijndael block cipher, 256-bit version * diff --git a/rmd128.c b/symm/rmd128.c similarity index 99% rename from rmd128.c rename to symm/rmd128.c index 10f56c4e..85b6c33e 100644 --- a/rmd128.c +++ b/symm/rmd128.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rmd128.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The RIPEMD-128 message digest function * diff --git a/rmd128.h b/symm/rmd128.h similarity index 98% rename from rmd128.h rename to symm/rmd128.h index b121e3cf..c1395618 100644 --- a/rmd128.h +++ b/symm/rmd128.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rmd128.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The RIPEMD-128 message digest function * diff --git a/rmd160.c b/symm/rmd160.c similarity index 99% rename from rmd160.c rename to symm/rmd160.c index f4812092..bc7e8672 100644 --- a/rmd160.c +++ b/symm/rmd160.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rmd160.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The RIPEMD-160 message digest function * diff --git a/rmd160.h b/symm/rmd160.h similarity index 98% rename from rmd160.h rename to symm/rmd160.h index f97a462b..fef71125 100644 --- a/rmd160.h +++ b/symm/rmd160.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rmd160.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * The RIPEMD-160 message digest function * diff --git a/rmd256.c b/symm/rmd256.c similarity index 99% rename from rmd256.c rename to symm/rmd256.c index e2fc70a3..99648f5f 100644 --- a/rmd256.c +++ b/symm/rmd256.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rmd256.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The RIPEMD-256 message digest function * diff --git a/rmd256.h b/symm/rmd256.h similarity index 98% rename from rmd256.h rename to symm/rmd256.h index aa1e883c..9d4d206c 100644 --- a/rmd256.h +++ b/symm/rmd256.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rmd256.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The RIPEMD-256 message digest function * diff --git a/rmd320.c b/symm/rmd320.c similarity index 99% rename from rmd320.c rename to symm/rmd320.c index a91f874a..022903e7 100644 --- a/rmd320.c +++ b/symm/rmd320.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rmd320.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The RIPEMD-320 message digest function * diff --git a/rmd320.h b/symm/rmd320.h similarity index 98% rename from rmd320.h rename to symm/rmd320.h index 592e96fb..7fdf3887 100644 --- a/rmd320.h +++ b/symm/rmd320.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: rmd320.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The RIPEMD-320 message digest function * diff --git a/safer-mktab.c b/symm/safer-mktab.c similarity index 97% rename from safer-mktab.c rename to symm/safer-mktab.c index 869d66f5..d9ae784e 100644 --- a/safer-mktab.c +++ b/symm/safer-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: safer-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Generate tables for SAFER * diff --git a/safer.c b/symm/safer.c similarity index 99% rename from safer.c rename to symm/safer.c index 6a63565d..055a5f6a 100644 --- a/safer.c +++ b/symm/safer.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: safer.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The SAFER block cipher * diff --git a/safer.h b/symm/safer.h similarity index 98% rename from safer.h rename to symm/safer.h index 198bc8eb..6186d966 100644 --- a/safer.h +++ b/symm/safer.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: safer.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The SAFER block cipher * diff --git a/safersk.c b/symm/safersk.c similarity index 78% rename from safersk.c rename to symm/safersk.c index 6ea27c97..e6654108 100644 --- a/safersk.c +++ b/symm/safersk.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: safersk.c,v 1.1 2001/04/29 17:37:35 mdw Exp $ * * Stub source for SAFER SK * diff --git a/safersk.h b/symm/safersk.h similarity index 77% rename from safersk.h rename to symm/safersk.h index 7403de78..7087432e 100644 --- a/safersk.h +++ b/symm/safersk.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: safersk.h,v 1.1 2001/04/29 17:37:35 mdw Exp $ * * Stub header for SAFER SK * diff --git a/seal.c b/symm/seal.c similarity index 99% rename from seal.c rename to symm/seal.c index 444a11cd..df7cd1ba 100644 --- a/seal.c +++ b/symm/seal.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: seal.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The SEAL pseudo-random function family * @@ -607,7 +605,7 @@ static test_chunk defs[] = { int main(int argc, char *argv[]) { - test_run(argc, argv, defs, SRCDIR"/tests/seal"); + test_run(argc, argv, defs, SRCDIR"/t/seal"); return (0); } diff --git a/seal.h b/symm/seal.h similarity index 98% rename from seal.h rename to symm/seal.h index bee3b309..875994e8 100644 --- a/seal.h +++ b/symm/seal.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: seal.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The SEAL pseudo-random function family * diff --git a/serpent-check.c b/symm/serpent-check.c similarity index 98% rename from serpent-check.c rename to symm/serpent-check.c index 340af4fd..7f95ffc7 100644 --- a/serpent-check.c +++ b/symm/serpent-check.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: serpent-check.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Check the Serpent S-boxes * diff --git a/serpent-sbox.h b/symm/serpent-sbox.h similarity index 99% rename from serpent-sbox.h rename to symm/serpent-sbox.h index 16123308..f59155c6 100644 --- a/serpent-sbox.h +++ b/symm/serpent-sbox.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: serpent-sbox.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Bitslice S-box implementations * diff --git a/serpent.c b/symm/serpent.c similarity index 99% rename from serpent.c rename to symm/serpent.c index 9c03764b..5ad0fc94 100644 --- a/serpent.c +++ b/symm/serpent.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: serpent.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Serpent block cipher * diff --git a/serpent.h b/symm/serpent.h similarity index 98% rename from serpent.h rename to symm/serpent.h index bbab7120..05cc31c1 100644 --- a/serpent.h +++ b/symm/serpent.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: serpent.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The Serpent block cipher * diff --git a/sha.c b/symm/sha.c similarity index 99% rename from sha.c rename to symm/sha.c index 157b81b4..e4b50237 100644 --- a/sha.c +++ b/symm/sha.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: sha.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * Implementation of the SHA-1 hash function * diff --git a/sha.h b/symm/sha.h similarity index 98% rename from sha.h rename to symm/sha.h index 0ce367a9..77f8feb6 100644 --- a/sha.h +++ b/symm/sha.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: sha.h,v 1.6 2004/04/08 01:36:15 mdw Exp $ * * Implementation of the SHA-1 hash function * diff --git a/sha224.c b/symm/sha224.c similarity index 75% rename from sha224.c rename to symm/sha224.c index 2eceba09..997c51ab 100644 --- a/sha224.c +++ b/symm/sha224.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: sha224.c,v 1.1 2004/03/21 22:43:34 mdw Exp $ * * Stub code for SHA-224 */ diff --git a/sha224.h b/symm/sha224.h similarity index 69% rename from sha224.h rename to symm/sha224.h index 23684b78..3a495693 100644 --- a/sha224.h +++ b/symm/sha224.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: sha224.h,v 1.1 2004/03/21 22:43:34 mdw Exp $ * * Stub header for SHA-224 */ diff --git a/sha256.c b/symm/sha256.c similarity index 99% rename from sha256.c rename to symm/sha256.c index 683ba136..a8796d33 100644 --- a/sha256.c +++ b/symm/sha256.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: sha256.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Implementation of the SHA-256 hash function * diff --git a/sha256.h b/symm/sha256.h similarity index 99% rename from sha256.h rename to symm/sha256.h index 7b21dd29..aab843d3 100644 --- a/sha256.h +++ b/symm/sha256.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Implementation of the SHA-256 hash function * diff --git a/sha384.c b/symm/sha384.c similarity index 75% rename from sha384.c rename to symm/sha384.c index a634ef7a..e7de7ad7 100644 --- a/sha384.c +++ b/symm/sha384.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: sha384.c,v 1.1 2000/10/15 17:48:15 mdw Exp $ * * Stub code for SHA-384 */ diff --git a/sha384.h b/symm/sha384.h similarity index 69% rename from sha384.h rename to symm/sha384.h index 661ca60f..ed7731fe 100644 --- a/sha384.h +++ b/symm/sha384.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: sha384.h,v 1.1 2000/10/15 17:48:15 mdw Exp $ * * Stub header for SHA-384 */ diff --git a/sha512.c b/symm/sha512.c similarity index 99% rename from sha512.c rename to symm/sha512.c index 2f394722..d4df182c 100644 --- a/sha512.c +++ b/symm/sha512.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: sha512.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Implementation of the SHA-512 hash function * diff --git a/sha512.h b/symm/sha512.h similarity index 99% rename from sha512.h rename to symm/sha512.h index f727e82d..2f3edc29 100644 --- a/sha512.h +++ b/symm/sha512.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Implementation of the SHA-512 hash function * diff --git a/skipjack-tab.h b/symm/skipjack-tab.h similarity index 97% rename from skipjack-tab.h rename to symm/skipjack-tab.h index cee075e5..8994bbb6 100644 --- a/skipjack-tab.h +++ b/symm/skipjack-tab.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: skipjack-tab.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Skipjack S-box * diff --git a/skipjack.c b/symm/skipjack.c similarity index 99% rename from skipjack.c rename to symm/skipjack.c index d87f22ce..bd58edee 100644 --- a/skipjack.c +++ b/symm/skipjack.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: skipjack.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * The Skipjack block cipher * diff --git a/skipjack.h b/symm/skipjack.h similarity index 98% rename from skipjack.h rename to symm/skipjack.h index 0afff1f2..ab437097 100644 --- a/skipjack.h +++ b/symm/skipjack.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: skipjack.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The Skipjack block cipher * diff --git a/square-mktab.c b/symm/square-mktab.c similarity index 99% rename from square-mktab.c rename to symm/square-mktab.c index f1c7f029..a2e90e36 100644 --- a/square-mktab.c +++ b/symm/square-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: square-mktab.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Build precomputed tables for the Square block cipher * diff --git a/square.c b/symm/square.c similarity index 98% rename from square.c rename to symm/square.c index 6ed8d866..490b9170 100644 --- a/square.c +++ b/symm/square.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: square.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The Square block cipher * diff --git a/square.h b/symm/square.h similarity index 98% rename from square.h rename to symm/square.h index 60a0876c..25671d80 100644 --- a/square.h +++ b/symm/square.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: square.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Square block cipher * diff --git a/tests/.gitignore b/symm/t/.gitignore similarity index 66% rename from tests/.gitignore rename to symm/t/.gitignore index 8b605eb1..88cf4713 100644 --- a/tests/.gitignore +++ b/symm/t/.gitignore @@ -2,6 +2,4 @@ cast256 mars rijndael serpent -tea-test twofish -xtea-test diff --git a/tests/blowfish b/symm/t/blowfish similarity index 98% rename from tests/blowfish rename to symm/t/blowfish index 9f7075ea..449f9678 100644 --- a/tests/blowfish +++ b/symm/t/blowfish @@ -1,6 +1,4 @@ # Test vectors for Blowfish -# -# $Id: blowfish,v 1.3 2001/04/29 17:38:07 mdw Exp $ blowfish { diff --git a/tests/cast128 b/symm/t/cast128 similarity index 81% rename from tests/cast128 rename to symm/t/cast128 index dacd736d..a456ea09 100644 --- a/tests/cast128 +++ b/symm/t/cast128 @@ -1,5 +1,3 @@ -# $Id: cast128,v 1.1 2000/06/17 12:11:49 mdw Exp $ -# # Test vectors for CAST128 cast128 { diff --git a/tests/cast256.aes b/symm/t/cast256.aes similarity index 100% rename from tests/cast256.aes rename to symm/t/cast256.aes diff --git a/tests/des b/symm/t/des similarity index 98% rename from tests/des rename to symm/t/des index 28cd9e8d..7b753045 100644 --- a/tests/des +++ b/symm/t/des @@ -1,6 +1,4 @@ # Test vectors for DES -# -# $Id: des,v 1.2 2001/05/07 17:32:32 mdw Exp $ des { # --- 7-byte keys --- diff --git a/tests/des3 b/symm/t/des3 similarity index 96% rename from tests/des3 rename to symm/t/des3 index 0f8b3d15..f1adb1a6 100644 --- a/tests/des3 +++ b/symm/t/des3 @@ -1,6 +1,4 @@ # 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 --- diff --git a/tests/desx b/symm/t/desx similarity index 91% rename from tests/desx rename to symm/t/desx index fd77fc46..0f640861 100644 --- a/tests/desx +++ b/symm/t/desx @@ -1,6 +1,4 @@ # Test vectors for DES -# -# $Id: desx,v 1.1 2001/04/03 19:36:51 mdw Exp $ desx { # --- From SCAN --- diff --git a/tests/has160 b/symm/t/has160 similarity index 97% rename from tests/has160 rename to symm/t/has160 index ba3db65a..e1a30860 100644 --- a/tests/has160 +++ b/symm/t/has160 @@ -1,6 +1,4 @@ # Test vectors for HAS160 hash function -# -# $Id: has160,v 1.1 2004/04/04 19:42:59 mdw Exp $ # --- Basic hash function --- # diff --git a/tests/idea b/symm/t/idea similarity index 96% rename from tests/idea rename to symm/t/idea index ce947d3f..c0b928d4 100644 --- a/tests/idea +++ b/symm/t/idea @@ -1,6 +1,4 @@ # Test vectors for IDEA -# -# $Id: idea,v 1.2 2000/07/15 17:48:15 mdw Exp $ # --- Thin on the ground, these are --- diff --git a/tests/mars.aes b/symm/t/mars.aes similarity index 100% rename from tests/mars.aes rename to symm/t/mars.aes diff --git a/tests/md2 b/symm/t/md2 similarity index 98% rename from tests/md2 rename to symm/t/md2 index 89302539..e478ae82 100644 --- a/tests/md2 +++ b/symm/t/md2 @@ -1,6 +1,4 @@ # Test vectors for MD2 hash function -# -# $Id: md2,v 1.1 2001/02/21 20:03:23 mdw Exp $ # --- Basic hash function --- # diff --git a/tests/md4 b/symm/t/md4 similarity index 97% rename from tests/md4 rename to symm/t/md4 index 1439c35b..0b78cc4c 100644 --- a/tests/md4 +++ b/symm/t/md4 @@ -1,6 +1,4 @@ # Test vectors for MD4 hash function -# -# $Id: md4,v 1.2 2000/07/15 10:03:13 mdw Exp $ # --- Basic hash function --- # diff --git a/tests/md5 b/symm/t/md5 similarity index 98% rename from tests/md5 rename to symm/t/md5 index d34918d7..533c562f 100644 --- a/tests/md5 +++ b/symm/t/md5 @@ -1,6 +1,4 @@ # Test vectors for MD5 hash function -# -# $Id: md5,v 1.3 2000/07/15 10:03:13 mdw Exp $ # --- Basic hash function --- # diff --git a/tests/noekeon b/symm/t/noekeon similarity index 87% rename from tests/noekeon rename to symm/t/noekeon index c9ae935e..07647327 100644 --- a/tests/noekeon +++ b/symm/t/noekeon @@ -1,5 +1,3 @@ -# $Id: noekeon,v 1.1 2001/05/08 22:17:42 mdw Exp $ -# # Test vectors for Noekeon noekeon { diff --git a/tests/rc2 b/symm/t/rc2 similarity index 92% rename from tests/rc2 rename to symm/t/rc2 index d6f9e749..ed90d3f4 100644 --- a/tests/rc2 +++ b/symm/t/rc2 @@ -1,6 +1,4 @@ # Test vectors for RC2 -# -# $Id: rc2,v 1.1 2000/06/17 12:11:49 mdw Exp $ rc2 { 0000000000000000 63 0000000000000000 ebb773f993278eff; diff --git a/tests/rc4 b/symm/t/rc4 similarity index 91% rename from tests/rc4 rename to symm/t/rc4 index 374430da..4e55ba5e 100644 --- a/tests/rc4 +++ b/symm/t/rc4 @@ -1,8 +1,5 @@ # 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 diff --git a/tests/rc5 b/symm/t/rc5 similarity index 92% rename from tests/rc5 rename to symm/t/rc5 index 340354f6..e7a02c96 100644 --- a/tests/rc5 +++ b/symm/t/rc5 @@ -1,6 +1,4 @@ # Test vectors for RC5-32/12 -# -# $Id: rc5,v 1.1 1999/09/03 08:41:14 mdw Exp $ # --- Main cipher test vectors --- # diff --git a/tests/rijndael.aes b/symm/t/rijndael.aes similarity index 100% rename from tests/rijndael.aes rename to symm/t/rijndael.aes diff --git a/tests/rijndael192 b/symm/t/rijndael192 similarity index 99% rename from tests/rijndael192 rename to symm/t/rijndael192 index 49898cbd..d7732ff5 100644 --- a/tests/rijndael192 +++ b/symm/t/rijndael192 @@ -1,5 +1,3 @@ -# $Id: rijndael192,v 1.2 2001/06/16 13:23:19 mdw Exp $ -# # Test vectors for Rijndael rijndael192 { diff --git a/tests/rijndael256 b/symm/t/rijndael256 similarity index 99% rename from tests/rijndael256 rename to symm/t/rijndael256 index dd93096d..9a4b8664 100644 --- a/tests/rijndael256 +++ b/symm/t/rijndael256 @@ -1,5 +1,3 @@ -# $Id: rijndael256,v 1.2 2001/06/16 13:23:19 mdw Exp $ -# # Test vectors for Rijndael rijndael256 { diff --git a/tests/rmd128 b/symm/t/rmd128 similarity index 97% rename from tests/rmd128 rename to symm/t/rmd128 index c82b25d1..3dbac5f0 100644 --- a/tests/rmd128 +++ b/symm/t/rmd128 @@ -1,8 +1,5 @@ # 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. diff --git a/tests/rmd160 b/symm/t/rmd160 similarity index 98% rename from tests/rmd160 rename to symm/t/rmd160 index 1bd3a771..d6c78823 100644 --- a/tests/rmd160 +++ b/symm/t/rmd160 @@ -1,6 +1,4 @@ # Test vectors for RIPEMD-160 -# -# $Id: rmd160,v 1.4 2004/03/21 22:44:36 mdw Exp $ # --- Basic hash function --- # diff --git a/tests/rmd256 b/symm/t/rmd256 similarity index 97% rename from tests/rmd256 rename to symm/t/rmd256 index bc4d9764..c9986671 100644 --- a/tests/rmd256 +++ b/symm/t/rmd256 @@ -1,6 +1,4 @@ # Test vectors for RIPEMD-256 -# -# $Id: rmd256,v 1.2 2000/07/15 10:03:13 mdw Exp $ # --- Basic hash function --- # diff --git a/tests/rmd320 b/symm/t/rmd320 similarity index 98% rename from tests/rmd320 rename to symm/t/rmd320 index 82bbc4ae..783bc7b0 100644 --- a/tests/rmd320 +++ b/symm/t/rmd320 @@ -1,6 +1,4 @@ # Test vectors for RIPEMD-320 -# -# $Id: rmd320,v 1.2 2000/07/15 10:03:13 mdw Exp $ # --- Basic hash function --- # diff --git a/tests/safer b/symm/t/safer similarity index 81% rename from tests/safer rename to symm/t/safer index 36149a0a..1279b75f 100644 --- a/tests/safer +++ b/symm/t/safer @@ -1,5 +1,3 @@ -# $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 diff --git a/tests/safersk b/symm/t/safersk similarity index 80% rename from tests/safersk rename to symm/t/safersk index d1ea05a4..ac83b5b7 100644 --- a/tests/safersk +++ b/symm/t/safersk @@ -1,5 +1,3 @@ -# $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 diff --git a/tests/seal b/symm/t/seal similarity index 81% rename from tests/seal rename to symm/t/seal index 7c480955..c338c32b 100644 --- a/tests/seal +++ b/symm/t/seal @@ -1,6 +1,4 @@ # Test vectors for SEAL -# -# $Id: seal,v 1.1 2000/06/17 12:11:49 mdw Exp $ seal { 67452301efcdab8998badcfe10325476c3d2e1f0 0x013577af diff --git a/tests/serpent.aes b/symm/t/serpent.aes similarity index 100% rename from tests/serpent.aes rename to symm/t/serpent.aes diff --git a/tests/sha b/symm/t/sha similarity index 97% rename from tests/sha rename to symm/t/sha index 841c96c2..9ae4f4b9 100644 --- a/tests/sha +++ b/symm/t/sha @@ -1,6 +1,4 @@ # Test vectors for the SHA-1 hash function -# -# $Id: sha,v 1.6 2004/04/21 00:38:42 mdw Exp $ # --- Basic hash function --- # diff --git a/tests/sha224 b/symm/t/sha224 similarity index 98% rename from tests/sha224 rename to symm/t/sha224 index 5d9a7598..35e11715 100644 --- a/tests/sha224 +++ b/symm/t/sha224 @@ -1,5 +1,3 @@ -# $Id: sha224,v 1.2 2004/04/21 00:38:42 mdw Exp $ -# # Test vectors for SHA-224 # --- Basic hash function --- diff --git a/tests/sha256 b/symm/t/sha256 similarity index 98% rename from tests/sha256 rename to symm/t/sha256 index d00ca149..f4561e8a 100644 --- a/tests/sha256 +++ b/symm/t/sha256 @@ -1,5 +1,3 @@ -# $Id: sha256,v 1.3 2004/04/21 00:38:42 mdw Exp $ -# # Test vectors for SHA-256 # --- Basic hash function --- diff --git a/tests/sha384 b/symm/t/sha384 similarity index 98% rename from tests/sha384 rename to symm/t/sha384 index 13ad630c..f3148fde 100644 --- a/tests/sha384 +++ b/symm/t/sha384 @@ -1,5 +1,3 @@ -# $Id: sha384,v 1.4 2004/04/21 00:38:42 mdw Exp $ -# # Test vectors for SHA-384 # --- Basic hash function --- diff --git a/tests/sha512 b/symm/t/sha512 similarity index 98% rename from tests/sha512 rename to symm/t/sha512 index f0cebb9e..dcf3f04d 100644 --- a/tests/sha512 +++ b/symm/t/sha512 @@ -1,5 +1,3 @@ -# $Id: sha512,v 1.4 2004/04/21 00:38:42 mdw Exp $ -# # Test vectors for SHA-512 # --- Basic hash function --- diff --git a/tests/skipjack b/symm/t/skipjack similarity index 98% rename from tests/skipjack rename to symm/t/skipjack index a646803d..63ac0cbc 100644 --- a/tests/skipjack +++ b/symm/t/skipjack @@ -1,5 +1,3 @@ -# $Id: skipjack,v 1.3 2000/08/04 23:24:01 mdw Exp $ -# # Test vectors for Skipjack # --- From the Skipjack definition --- diff --git a/tests/square b/symm/t/square similarity index 99% rename from tests/square rename to symm/t/square index 360d56ba..7b348e2d 100644 --- a/tests/square +++ b/symm/t/square @@ -1,5 +1,3 @@ -# $Id: square,v 1.1 2000/07/15 20:51:59 mdw Exp $ -# # Test vectors for the Square block cipher square { diff --git a/tests/tea b/symm/t/tea similarity index 99% rename from tests/tea rename to symm/t/tea index 492d21c2..9eec55d0 100644 --- a/tests/tea +++ b/symm/t/tea @@ -1,5 +1,3 @@ -# $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 --- diff --git a/tests/tea-test.c b/symm/t/tea-test.c similarity index 100% rename from tests/tea-test.c rename to symm/t/tea-test.c diff --git a/tests/tiger b/symm/t/tiger similarity index 98% rename from tests/tiger rename to symm/t/tiger index 7679aa49..46a74e02 100644 --- a/tests/tiger +++ b/symm/t/tiger @@ -1,5 +1,3 @@ -# $Id: tiger,v 1.1 2000/07/15 10:17:19 mdw Exp $ -# # Test vectors for Tiger # --- The main hash --- diff --git a/tests/twofish.aes b/symm/t/twofish.aes similarity index 100% rename from tests/twofish.aes rename to symm/t/twofish.aes diff --git a/tests/whirlpool b/symm/t/whirlpool similarity index 98% rename from tests/whirlpool rename to symm/t/whirlpool index 5f2383ee..56477875 100644 --- a/tests/whirlpool +++ b/symm/t/whirlpool @@ -1,6 +1,4 @@ # Test vectors for the Whirlpool hash function -# -# $Id: sha 2187 2004-09-04 07:50:08Z mdw $ # --- Basic hash function --- # diff --git a/tests/whirlpool256 b/symm/t/whirlpool256 similarity index 98% rename from tests/whirlpool256 rename to symm/t/whirlpool256 index 968777c2..b1b68c20 100644 --- a/tests/whirlpool256 +++ b/symm/t/whirlpool256 @@ -1,6 +1,4 @@ # Test vectors for the Whirlpool hash function -# -# $Id: sha 2187 2004-09-04 07:50:08Z mdw $ # --- Basic hash function --- # diff --git a/tests/xtea b/symm/t/xtea similarity index 98% rename from tests/xtea rename to symm/t/xtea index fcc68b9c..be34740f 100644 --- a/tests/xtea +++ b/symm/t/xtea @@ -1,5 +1,3 @@ -# $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 --- diff --git a/tests/xtea-test.c b/symm/t/xtea-test.c similarity index 100% rename from tests/xtea-test.c rename to symm/t/xtea-test.c diff --git a/tea.c b/symm/tea.c similarity index 98% rename from tea.c rename to symm/tea.c index 4cb5ef82..4832674b 100644 --- a/tea.c +++ b/symm/tea.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: tea.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The Tiny Encryption Algorithm * diff --git a/tea.h b/symm/tea.h similarity index 98% rename from tea.h rename to symm/tea.h index 6d96b907..fdad8acb 100644 --- a/tea.h +++ b/symm/tea.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: tea.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The Tiny Encryption Algorithm * diff --git a/tiger-base.h b/symm/tiger-base.h similarity index 98% rename from tiger-base.h rename to symm/tiger-base.h index 6b6a81e0..49e05ef5 100644 --- a/tiger-base.h +++ b/symm/tiger-base.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: tiger-base.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Common definitions for the Tiger hash function * diff --git a/tiger-mktab.c b/symm/tiger-mktab.c similarity index 98% rename from tiger-mktab.c rename to symm/tiger-mktab.c index 222c523c..50293307 100644 --- a/tiger-mktab.c +++ b/symm/tiger-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: tiger-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Generate S-boxes for the Tiger hash function * diff --git a/tiger.c b/symm/tiger.c similarity index 98% rename from tiger.c rename to symm/tiger.c index 87f3ca97..f9aa8243 100644 --- a/tiger.c +++ b/symm/tiger.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: tiger.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Tiger hash function * diff --git a/tiger.h b/symm/tiger.h similarity index 98% rename from tiger.h rename to symm/tiger.h index 78e83f2b..d705cd5c 100644 --- a/tiger.h +++ b/symm/tiger.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: tiger.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The Tiger hash function * diff --git a/twofish-mktab.c b/symm/twofish-mktab.c similarity index 99% rename from twofish-mktab.c rename to symm/twofish-mktab.c index 1a314637..4453fbe9 100644 --- a/twofish-mktab.c +++ b/symm/twofish-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: twofish-mktab.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Build constant tables for Twofish * diff --git a/twofish.c b/symm/twofish.c similarity index 99% rename from twofish.c rename to symm/twofish.c index ad4882ff..75e74916 100644 --- a/twofish.c +++ b/symm/twofish.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: twofish.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Implementation of the Twofish cipher * diff --git a/twofish.h b/symm/twofish.h similarity index 98% rename from twofish.h rename to symm/twofish.h index 65007db8..328d00a6 100644 --- a/twofish.h +++ b/symm/twofish.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: twofish.h,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * The Twofish block cipher * diff --git a/whirlpool-mktab.c b/symm/whirlpool-mktab.c similarity index 99% rename from whirlpool-mktab.c rename to symm/whirlpool-mktab.c index 75f7bb26..cac72bf9 100644 --- a/whirlpool-mktab.c +++ b/symm/whirlpool-mktab.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Generate tables for Whirlpool hash function * diff --git a/whirlpool.c b/symm/whirlpool.c similarity index 99% rename from whirlpool.c rename to symm/whirlpool.c index 48e6e972..4543287e 100644 --- a/whirlpool.c +++ b/symm/whirlpool.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Whirlpool hash function * diff --git a/whirlpool.h b/symm/whirlpool.h similarity index 99% rename from whirlpool.h rename to symm/whirlpool.h index eb29a16e..95b40dcd 100644 --- a/whirlpool.h +++ b/symm/whirlpool.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Implementation of the Whirlpool hash function * diff --git a/whirlpool256.c b/symm/whirlpool256.c similarity index 95% rename from whirlpool256.c rename to symm/whirlpool256.c index 38fe6659..48245f28 100644 --- a/whirlpool256.c +++ b/symm/whirlpool256.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Stub code for Whirlpool-256 */ diff --git a/whirlpool256.h b/symm/whirlpool256.h similarity index 93% rename from whirlpool256.h rename to symm/whirlpool256.h index 171d8863..8091d74e 100644 --- a/whirlpool256.h +++ b/symm/whirlpool256.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Stub header for Whirlpool-256 */ diff --git a/xtea.c b/symm/xtea.c similarity index 98% rename from xtea.c rename to symm/xtea.c index 13cb7fda..7f959810 100644 --- a/xtea.c +++ b/symm/xtea.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: xtea.c,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * The Extended Tiny Encryption Algorithm * diff --git a/xtea.h b/symm/xtea.h similarity index 98% rename from xtea.h rename to symm/xtea.h index 9e40b1eb..768a5269 100644 --- a/xtea.h +++ b/symm/xtea.h @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id: xtea.h,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The Extended Tiny Encryption Algorithm * diff --git a/vars.am b/vars.am new file mode 100644 index 00000000..de795453 --- /dev/null +++ b/vars.am @@ -0,0 +1,102 @@ +### -*-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 -------------------------------------------------- -- [mdw]