- started to rebuild source layout
authorMartin Willi <martin@strongswan.org>
Wed, 10 May 2006 07:32:34 +0000 (07:32 -0000)
committerMartin Willi <martin@strongswan.org>
Wed, 10 May 2006 07:32:34 +0000 (07:32 -0000)
579 files changed:
lib/.cvsignore [deleted file]
lib/COPYING.LIB [deleted file]
lib/Makefile [deleted file]
lib/Makefile.kernel [deleted file]
lib/README [deleted file]
lib/libcrypto/include/cbc_generic.h [deleted file]
lib/libcrypto/include/hmac_generic.h [deleted file]
lib/libcrypto/include/md32_common.h [deleted file]
lib/libcrypto/libaes/Makefile [deleted file]
lib/libcrypto/libaes/aes.c [deleted file]
lib/libcrypto/libaes/aes.h [deleted file]
lib/libcrypto/libaes/aes_cbc.c [deleted file]
lib/libcrypto/libaes/aes_cbc.h [deleted file]
lib/libcrypto/libaes/aes_xcbc_mac.c [deleted file]
lib/libcrypto/libaes/aes_xcbc_mac.h [deleted file]
lib/libcrypto/libaes/asm/aes-i586.S [deleted file]
lib/libcrypto/libaes/test_main.c [deleted file]
lib/libcrypto/libaes/test_main_mac.c [deleted file]
lib/libcrypto/libblowfish/COPYRIGHT [deleted file]
lib/libcrypto/libblowfish/INSTALL [deleted file]
lib/libcrypto/libblowfish/Makefile [deleted file]
lib/libcrypto/libblowfish/Makefile.ssl [deleted file]
lib/libcrypto/libblowfish/README [deleted file]
lib/libcrypto/libblowfish/VERSION [deleted file]
lib/libcrypto/libblowfish/asm/bf-586.pl [deleted file]
lib/libcrypto/libblowfish/asm/bf-686.pl [deleted file]
lib/libcrypto/libblowfish/asm/readme [deleted file]
lib/libcrypto/libblowfish/bf_enc.c [deleted file]
lib/libcrypto/libblowfish/bf_locl.h [deleted file]
lib/libcrypto/libblowfish/bf_pi.h [deleted file]
lib/libcrypto/libblowfish/bf_skey.c [deleted file]
lib/libcrypto/libblowfish/blowfish.h [deleted file]
lib/libcrypto/libserpent/Makefile [deleted file]
lib/libcrypto/libserpent/serpent.c [deleted file]
lib/libcrypto/libserpent/serpent.h [deleted file]
lib/libcrypto/libserpent/serpent_cbc.c [deleted file]
lib/libcrypto/libserpent/serpent_cbc.h [deleted file]
lib/libcrypto/libserpent/test_main.c [deleted file]
lib/libcrypto/libsha2/Makefile [deleted file]
lib/libcrypto/libsha2/hmac_sha2.c [deleted file]
lib/libcrypto/libsha2/hmac_sha2.h [deleted file]
lib/libcrypto/libsha2/sha2.c [deleted file]
lib/libcrypto/libsha2/sha2.h [deleted file]
lib/libcrypto/libtwofish/Makefile [deleted file]
lib/libcrypto/libtwofish/test_main.c [deleted file]
lib/libcrypto/libtwofish/twofish.c [deleted file]
lib/libcrypto/libtwofish/twofish.h [deleted file]
lib/libcrypto/libtwofish/twofish_cbc.c [deleted file]
lib/libcrypto/libtwofish/twofish_cbc.h [deleted file]
lib/libcrypto/perlasm/LICENSE [deleted file]
lib/libcrypto/perlasm/alpha.pl [deleted file]
lib/libcrypto/perlasm/cbc.pl [deleted file]
lib/libcrypto/perlasm/readme [deleted file]
lib/libcrypto/perlasm/version [deleted file]
lib/libcrypto/perlasm/x86asm.pl [deleted file]
lib/libcrypto/perlasm/x86ms.pl [deleted file]
lib/libcrypto/perlasm/x86nasm.pl [deleted file]
lib/libcrypto/perlasm/x86unix.pl [deleted file]
lib/libdes/.cvsignore [deleted file]
lib/libdes/Makefile [deleted file]
lib/libfreeswan/.cvsignore [deleted file]
lib/libfreeswan/Makefile [deleted file]
lib/libipsecpolicy/.cvsignore [deleted file]
lib/libipsecpolicy/Makefile [deleted file]
lib/libipsecpolicy/cgipolicy.c [deleted file]
lib/libipsecpolicy/libipsecpolicy.h [deleted file]
lib/libipsecpolicy/policyquery.c [deleted file]
lib/libipsecpolicy/version.in.c [deleted file]
lib/liblwres/Makefile [deleted file]
lib/liblwres/api [deleted file]
lib/liblwres/assert_p.h [deleted file]
lib/liblwres/async.c [deleted file]
lib/liblwres/config.h [deleted file]
lib/liblwres/context.c [deleted file]
lib/liblwres/context_p.h [deleted file]
lib/liblwres/gai_strerror.c [deleted file]
lib/liblwres/getaddrinfo.c [deleted file]
lib/liblwres/gethost.c [deleted file]
lib/liblwres/getipnode.c [deleted file]
lib/liblwres/getnameinfo.c [deleted file]
lib/liblwres/getrrset.c [deleted file]
lib/liblwres/getrrset2.c [deleted file]
lib/liblwres/herror.c [deleted file]
lib/liblwres/include/lwres/async.h [deleted file]
lib/liblwres/include/lwres/context.h [deleted file]
lib/liblwres/include/lwres/int.h [deleted file]
lib/liblwres/include/lwres/ipv6.h [deleted file]
lib/liblwres/include/lwres/lang.h [deleted file]
lib/liblwres/include/lwres/list.h [deleted file]
lib/liblwres/include/lwres/lwbuffer.h [deleted file]
lib/liblwres/include/lwres/lwpacket.h [deleted file]
lib/liblwres/include/lwres/lwres.h [deleted file]
lib/liblwres/include/lwres/netdb.h [deleted file]
lib/liblwres/include/lwres/netdb.h.in [deleted file]
lib/liblwres/include/lwres/platform.h [deleted file]
lib/liblwres/include/lwres/platform.h.in [deleted file]
lib/liblwres/include/lwres/result.h [deleted file]
lib/liblwres/lwbuffer.c [deleted file]
lib/liblwres/lwconfig.c [deleted file]
lib/liblwres/lwinetaton.c [deleted file]
lib/liblwres/lwinetntop.c [deleted file]
lib/liblwres/lwinetpton.c [deleted file]
lib/liblwres/lwpacket.c [deleted file]
lib/liblwres/lwres_gabn.c [deleted file]
lib/liblwres/lwres_gnba.c [deleted file]
lib/liblwres/lwres_grbn.c [deleted file]
lib/liblwres/lwres_noop.c [deleted file]
lib/liblwres/lwresutil.c [deleted file]
lib/liblwres/man/Makefile.in [deleted file]
lib/liblwres/man/lwres.3 [deleted file]
lib/liblwres/man/lwres.docbook [deleted file]
lib/liblwres/man/lwres.html [deleted file]
lib/liblwres/man/lwres_buffer.3 [deleted file]
lib/liblwres/man/lwres_buffer.docbook [deleted file]
lib/liblwres/man/lwres_buffer.html [deleted file]
lib/liblwres/man/lwres_config.3 [deleted file]
lib/liblwres/man/lwres_config.docbook [deleted file]
lib/liblwres/man/lwres_config.html [deleted file]
lib/liblwres/man/lwres_context.3 [deleted file]
lib/liblwres/man/lwres_context.docbook [deleted file]
lib/liblwres/man/lwres_context.html [deleted file]
lib/liblwres/man/lwres_gabn.3 [deleted file]
lib/liblwres/man/lwres_gabn.docbook [deleted file]
lib/liblwres/man/lwres_gabn.html [deleted file]
lib/liblwres/man/lwres_gai_strerror.3 [deleted file]
lib/liblwres/man/lwres_gai_strerror.docbook [deleted file]
lib/liblwres/man/lwres_gai_strerror.html [deleted file]
lib/liblwres/man/lwres_getaddrinfo.3 [deleted file]
lib/liblwres/man/lwres_getaddrinfo.docbook [deleted file]
lib/liblwres/man/lwres_getaddrinfo.html [deleted file]
lib/liblwres/man/lwres_gethostent.3 [deleted file]
lib/liblwres/man/lwres_gethostent.docbook [deleted file]
lib/liblwres/man/lwres_gethostent.html [deleted file]
lib/liblwres/man/lwres_getipnode.3 [deleted file]
lib/liblwres/man/lwres_getipnode.docbook [deleted file]
lib/liblwres/man/lwres_getipnode.html [deleted file]
lib/liblwres/man/lwres_getnameinfo.3 [deleted file]
lib/liblwres/man/lwres_getnameinfo.docbook [deleted file]
lib/liblwres/man/lwres_getnameinfo.html [deleted file]
lib/liblwres/man/lwres_getrrsetbyname.3 [deleted file]
lib/liblwres/man/lwres_getrrsetbyname.docbook [deleted file]
lib/liblwres/man/lwres_getrrsetbyname.html [deleted file]
lib/liblwres/man/lwres_gnba.3 [deleted file]
lib/liblwres/man/lwres_gnba.docbook [deleted file]
lib/liblwres/man/lwres_gnba.html [deleted file]
lib/liblwres/man/lwres_hstrerror.3 [deleted file]
lib/liblwres/man/lwres_hstrerror.docbook [deleted file]
lib/liblwres/man/lwres_hstrerror.html [deleted file]
lib/liblwres/man/lwres_inetntop.3 [deleted file]
lib/liblwres/man/lwres_inetntop.docbook [deleted file]
lib/liblwres/man/lwres_inetntop.html [deleted file]
lib/liblwres/man/lwres_noop.3 [deleted file]
lib/liblwres/man/lwres_noop.docbook [deleted file]
lib/liblwres/man/lwres_noop.html [deleted file]
lib/liblwres/man/lwres_packet.3 [deleted file]
lib/liblwres/man/lwres_packet.docbook [deleted file]
lib/liblwres/man/lwres_packet.html [deleted file]
lib/liblwres/man/lwres_resutil.3 [deleted file]
lib/liblwres/man/lwres_resutil.docbook [deleted file]
lib/liblwres/man/lwres_resutil.html [deleted file]
lib/liblwres/unix/include/lwres/net.h [deleted file]
lib/liblwres/version.c [deleted file]
linux/Documentation/Configure.help.fs2_0.patch [deleted file]
linux/Documentation/Configure.help.fs2_2.patch [deleted file]
linux/Documentation/Configure.help.fs2_4.patch [deleted file]
linux/Makefile [deleted file]
linux/README.freeswan [deleted file]
linux/crypto/ciphers/des/COPYRIGHT [deleted file]
linux/crypto/ciphers/des/INSTALL [deleted file]
linux/crypto/ciphers/des/Makefile.objs [deleted file]
linux/crypto/ciphers/des/README [deleted file]
linux/crypto/ciphers/des/README.freeswan [deleted file]
linux/crypto/ciphers/des/VERSION [deleted file]
linux/crypto/ciphers/des/asm/crypt586.pl [deleted file]
linux/crypto/ciphers/des/asm/des-586.pl [deleted file]
linux/crypto/ciphers/des/asm/des686.pl [deleted file]
linux/crypto/ciphers/des/asm/desboth.pl [deleted file]
linux/crypto/ciphers/des/asm/perlasm/cbc.pl [deleted file]
linux/crypto/ciphers/des/asm/perlasm/readme [deleted file]
linux/crypto/ciphers/des/asm/perlasm/x86asm.pl [deleted file]
linux/crypto/ciphers/des/asm/perlasm/x86ms.pl [deleted file]
linux/crypto/ciphers/des/asm/perlasm/x86unix.pl [deleted file]
linux/crypto/ciphers/des/asm/readme [deleted file]
linux/crypto/ciphers/des/cbc_enc.c [deleted file]
linux/crypto/ciphers/des/des.doc [deleted file]
linux/crypto/ciphers/des/des_crypt.man [deleted file]
linux/crypto/ciphers/des/des_enc.c [deleted file]
linux/crypto/ciphers/des/des_locl.h [deleted file]
linux/crypto/ciphers/des/des_opts.c [deleted file]
linux/crypto/ciphers/des/des_ver.h [deleted file]
linux/crypto/ciphers/des/destest.c [deleted file]
linux/crypto/ciphers/des/dx86unix.S [deleted file]
linux/crypto/ciphers/des/ecb_enc.c [deleted file]
linux/crypto/ciphers/des/fcrypt.c [deleted file]
linux/crypto/ciphers/des/fcrypt_b.c [deleted file]
linux/crypto/ciphers/des/options.txt [deleted file]
linux/crypto/ciphers/des/podd.h [deleted file]
linux/crypto/ciphers/des/set_key.c [deleted file]
linux/crypto/ciphers/des/sk.h [deleted file]
linux/crypto/ciphers/des/speed.c [deleted file]
linux/crypto/ciphers/des/spr.h [deleted file]
linux/include/crypto/des.h [deleted file]
linux/include/freeswan.h [deleted file]
linux/include/freeswan/ipcomp.h [deleted file]
linux/include/freeswan/ipsec_ah.h [deleted file]
linux/include/freeswan/ipsec_alg.h [deleted file]
linux/include/freeswan/ipsec_encap.h [deleted file]
linux/include/freeswan/ipsec_eroute.h [deleted file]
linux/include/freeswan/ipsec_errs.h [deleted file]
linux/include/freeswan/ipsec_esp.h [deleted file]
linux/include/freeswan/ipsec_ipe4.h [deleted file]
linux/include/freeswan/ipsec_kversion.h [deleted file]
linux/include/freeswan/ipsec_life.h [deleted file]
linux/include/freeswan/ipsec_md5h.h [deleted file]
linux/include/freeswan/ipsec_param.h [deleted file]
linux/include/freeswan/ipsec_policy.h [deleted file]
linux/include/freeswan/ipsec_proto.h [deleted file]
linux/include/freeswan/ipsec_radij.h [deleted file]
linux/include/freeswan/ipsec_rcv.h [deleted file]
linux/include/freeswan/ipsec_sa.h [deleted file]
linux/include/freeswan/ipsec_sha1.h [deleted file]
linux/include/freeswan/ipsec_stats.h [deleted file]
linux/include/freeswan/ipsec_tunnel.h [deleted file]
linux/include/freeswan/ipsec_xform.h [deleted file]
linux/include/freeswan/ipsec_xmit.h [deleted file]
linux/include/freeswan/radij.h [deleted file]
linux/include/mast.h [deleted file]
linux/include/pfkey.h [deleted file]
linux/include/pfkeyv2.h [deleted file]
linux/include/zlib/zlib.h [deleted file]
linux/include/zlib/zutil.h [deleted file]
linux/lib/libfreeswan/Makefile.objs [deleted file]
linux/lib/libfreeswan/addrtoa.c [deleted file]
linux/lib/libfreeswan/addrtot.c [deleted file]
linux/lib/libfreeswan/addrtypeof.c [deleted file]
linux/lib/libfreeswan/anyaddr.3 [deleted file]
linux/lib/libfreeswan/anyaddr.c [deleted file]
linux/lib/libfreeswan/atoaddr.3 [deleted file]
linux/lib/libfreeswan/atoaddr.c [deleted file]
linux/lib/libfreeswan/atoasr.3 [deleted file]
linux/lib/libfreeswan/atoasr.c [deleted file]
linux/lib/libfreeswan/atosa.3 [deleted file]
linux/lib/libfreeswan/atosa.c [deleted file]
linux/lib/libfreeswan/atosubnet.c [deleted file]
linux/lib/libfreeswan/atoul.3 [deleted file]
linux/lib/libfreeswan/atoul.c [deleted file]
linux/lib/libfreeswan/copyright.c [deleted file]
linux/lib/libfreeswan/datatot.c [deleted file]
linux/lib/libfreeswan/goodmask.3 [deleted file]
linux/lib/libfreeswan/goodmask.c [deleted file]
linux/lib/libfreeswan/initaddr.3 [deleted file]
linux/lib/libfreeswan/initaddr.c [deleted file]
linux/lib/libfreeswan/initsaid.c [deleted file]
linux/lib/libfreeswan/initsubnet.3 [deleted file]
linux/lib/libfreeswan/initsubnet.c [deleted file]
linux/lib/libfreeswan/internal.h [deleted file]
linux/lib/libfreeswan/keyblobtoid.3 [deleted file]
linux/lib/libfreeswan/keyblobtoid.c [deleted file]
linux/lib/libfreeswan/optionsfrom.3 [deleted file]
linux/lib/libfreeswan/optionsfrom.c [deleted file]
linux/lib/libfreeswan/pfkey_v2_build.c [deleted file]
linux/lib/libfreeswan/pfkey_v2_debug.c [deleted file]
linux/lib/libfreeswan/pfkey_v2_ext_bits.c [deleted file]
linux/lib/libfreeswan/pfkey_v2_parse.c [deleted file]
linux/lib/libfreeswan/portof.3 [deleted file]
linux/lib/libfreeswan/portof.c [deleted file]
linux/lib/libfreeswan/prng.3 [deleted file]
linux/lib/libfreeswan/prng.c [deleted file]
linux/lib/libfreeswan/rangetoa.c [deleted file]
linux/lib/libfreeswan/rangetosubnet.3 [deleted file]
linux/lib/libfreeswan/rangetosubnet.c [deleted file]
linux/lib/libfreeswan/sameaddr.3 [deleted file]
linux/lib/libfreeswan/sameaddr.c [deleted file]
linux/lib/libfreeswan/satoa.c [deleted file]
linux/lib/libfreeswan/satot.c [deleted file]
linux/lib/libfreeswan/subnetof.3 [deleted file]
linux/lib/libfreeswan/subnetof.c [deleted file]
linux/lib/libfreeswan/subnettoa.c [deleted file]
linux/lib/libfreeswan/subnettot.c [deleted file]
linux/lib/libfreeswan/subnettypeof.c [deleted file]
linux/lib/libfreeswan/ttoaddr.3 [deleted file]
linux/lib/libfreeswan/ttoaddr.c [deleted file]
linux/lib/libfreeswan/ttodata.3 [deleted file]
linux/lib/libfreeswan/ttodata.c [deleted file]
linux/lib/libfreeswan/ttoprotoport.c [deleted file]
linux/lib/libfreeswan/ttosa.3 [deleted file]
linux/lib/libfreeswan/ttosa.c [deleted file]
linux/lib/libfreeswan/ttosubnet.c [deleted file]
linux/lib/libfreeswan/ttoul.3 [deleted file]
linux/lib/libfreeswan/ttoul.c [deleted file]
linux/lib/libfreeswan/ultoa.c [deleted file]
linux/lib/libfreeswan/ultot.c [deleted file]
linux/lib/libfreeswan/version.3 [deleted file]
linux/lib/libfreeswan/version.in.c [deleted file]
linux/lib/zlib/Makefile [deleted file]
linux/lib/zlib/Makefile.objs [deleted file]
linux/lib/zlib/README [deleted file]
linux/lib/zlib/README.freeswan [deleted file]
linux/lib/zlib/adler32.c [deleted file]
linux/lib/zlib/deflate.c [deleted file]
linux/lib/zlib/deflate.h [deleted file]
linux/lib/zlib/infblock.c [deleted file]
linux/lib/zlib/infblock.h [deleted file]
linux/lib/zlib/infcodes.c [deleted file]
linux/lib/zlib/infcodes.h [deleted file]
linux/lib/zlib/inffast.c [deleted file]
linux/lib/zlib/inffast.h [deleted file]
linux/lib/zlib/inffixed.h [deleted file]
linux/lib/zlib/inflate.c [deleted file]
linux/lib/zlib/inftrees.c [deleted file]
linux/lib/zlib/inftrees.h [deleted file]
linux/lib/zlib/infutil.c [deleted file]
linux/lib/zlib/infutil.h [deleted file]
linux/lib/zlib/match586.S [deleted file]
linux/lib/zlib/match686.S [deleted file]
linux/lib/zlib/trees.c [deleted file]
linux/lib/zlib/trees.h [deleted file]
linux/lib/zlib/zconf.h [deleted file]
linux/lib/zlib/zutil.c [deleted file]
src/libfreeswan/.cvsignore [new file with mode: 0644]
src/libfreeswan/COPYING.LIB [new file with mode: 0644]
src/libfreeswan/Makefile [new file with mode: 0644]
src/libfreeswan/Makefile.kernel [new file with mode: 0644]
src/libfreeswan/README [new file with mode: 0644]
src/libfreeswan/libcrypto/include/cbc_generic.h [new file with mode: 0644]
src/libfreeswan/libcrypto/include/hmac_generic.h [new file with mode: 0644]
src/libfreeswan/libcrypto/include/md32_common.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/Makefile [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/aes.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/aes.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/aes_cbc.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/aes_cbc.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/aes_xcbc_mac.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/aes_xcbc_mac.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/asm/aes-i586.S [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/test_main.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libaes/test_main_mac.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/COPYRIGHT [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/INSTALL [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/Makefile [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/Makefile.ssl [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/README [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/VERSION [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/asm/bf-586.pl [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/asm/bf-686.pl [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/asm/readme [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/bf_enc.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/bf_locl.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/bf_pi.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/bf_skey.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libblowfish/blowfish.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libserpent/Makefile [new file with mode: 0644]
src/libfreeswan/libcrypto/libserpent/serpent.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libserpent/serpent.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libserpent/serpent_cbc.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libserpent/serpent_cbc.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libserpent/test_main.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libsha2/Makefile [new file with mode: 0644]
src/libfreeswan/libcrypto/libsha2/hmac_sha2.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libsha2/hmac_sha2.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libsha2/sha2.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libsha2/sha2.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libtwofish/Makefile [new file with mode: 0644]
src/libfreeswan/libcrypto/libtwofish/test_main.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libtwofish/twofish.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libtwofish/twofish.h [new file with mode: 0644]
src/libfreeswan/libcrypto/libtwofish/twofish_cbc.c [new file with mode: 0644]
src/libfreeswan/libcrypto/libtwofish/twofish_cbc.h [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/LICENSE [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/alpha.pl [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/cbc.pl [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/readme [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/version [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/x86asm.pl [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/x86ms.pl [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/x86nasm.pl [new file with mode: 0644]
src/libfreeswan/libcrypto/perlasm/x86unix.pl [new file with mode: 0644]
src/libfreeswan/libdes/.cvsignore [new file with mode: 0644]
src/libfreeswan/libdes/Makefile [new file with mode: 0644]
src/libfreeswan/libdes/des.h [new file with mode: 0644]
src/libfreeswan/libdes/des/COPYRIGHT [new file with mode: 0644]
src/libfreeswan/libdes/des/INSTALL [new file with mode: 0644]
src/libfreeswan/libdes/des/Makefile.objs [new file with mode: 0644]
src/libfreeswan/libdes/des/README [new file with mode: 0644]
src/libfreeswan/libdes/des/README.freeswan [new file with mode: 0644]
src/libfreeswan/libdes/des/VERSION [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/crypt586.pl [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/des-586.pl [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/des686.pl [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/desboth.pl [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/perlasm/cbc.pl [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/perlasm/readme [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/perlasm/x86asm.pl [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/perlasm/x86ms.pl [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/perlasm/x86unix.pl [new file with mode: 0644]
src/libfreeswan/libdes/des/asm/readme [new file with mode: 0644]
src/libfreeswan/libdes/des/cbc_enc.c [new file with mode: 0644]
src/libfreeswan/libdes/des/des.doc [new file with mode: 0644]
src/libfreeswan/libdes/des/des_crypt.man [new file with mode: 0644]
src/libfreeswan/libdes/des/des_enc.c [new file with mode: 0644]
src/libfreeswan/libdes/des/des_locl.h [new file with mode: 0644]
src/libfreeswan/libdes/des/des_opts.c [new file with mode: 0644]
src/libfreeswan/libdes/des/des_ver.h [new file with mode: 0644]
src/libfreeswan/libdes/des/destest.c [new file with mode: 0644]
src/libfreeswan/libdes/des/dx86unix.S [new file with mode: 0644]
src/libfreeswan/libdes/des/ecb_enc.c [new file with mode: 0644]
src/libfreeswan/libdes/des/fcrypt.c [new file with mode: 0644]
src/libfreeswan/libdes/des/fcrypt_b.c [new file with mode: 0644]
src/libfreeswan/libdes/des/options.txt [new file with mode: 0644]
src/libfreeswan/libdes/des/podd.h [new file with mode: 0644]
src/libfreeswan/libdes/des/set_key.c [new file with mode: 0644]
src/libfreeswan/libdes/des/sk.h [new file with mode: 0644]
src/libfreeswan/libdes/des/speed.c [new file with mode: 0644]
src/libfreeswan/libdes/des/spr.h [new file with mode: 0644]
src/libfreeswan/libfreeswan/.cvsignore [new file with mode: 0644]
src/libfreeswan/libfreeswan/Makefile [new file with mode: 0644]
src/libfreeswan/libfreeswan/Makefile.objs [new file with mode: 0644]
src/libfreeswan/libfreeswan/addrtoa.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/addrtot.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/addrtypeof.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/anyaddr.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/anyaddr.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/atoaddr.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/atoaddr.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/atoasr.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/atoasr.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/atosa.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/atosa.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/atosubnet.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/atoul.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/atoul.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/copyright.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/datatot.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/goodmask.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/goodmask.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/initaddr.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/initaddr.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/initsaid.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/initsubnet.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/initsubnet.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/internal.h [new file with mode: 0644]
src/libfreeswan/libfreeswan/keyblobtoid.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/keyblobtoid.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/optionsfrom.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/optionsfrom.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/pfkey_v2_build.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/pfkey_v2_debug.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/pfkey_v2_ext_bits.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/pfkey_v2_parse.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/portof.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/portof.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/prng.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/prng.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/rangetoa.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/rangetosubnet.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/rangetosubnet.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/sameaddr.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/sameaddr.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/satoa.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/satot.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/subnetof.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/subnetof.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/subnettoa.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/subnettot.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/subnettypeof.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttoaddr.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttoaddr.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttodata.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttodata.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttoprotoport.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttosa.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttosa.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttosubnet.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttoul.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/ttoul.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/ultoa.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/ultot.c [new file with mode: 0644]
src/libfreeswan/libfreeswan/version.3 [new file with mode: 0644]
src/libfreeswan/libfreeswan/version.in.c [new file with mode: 0644]
src/libfreeswan/libipsecpolicy/.cvsignore [new file with mode: 0644]
src/libfreeswan/libipsecpolicy/Makefile [new file with mode: 0644]
src/libfreeswan/libipsecpolicy/cgipolicy.c [new file with mode: 0644]
src/libfreeswan/libipsecpolicy/libipsecpolicy.h [new file with mode: 0644]
src/libfreeswan/libipsecpolicy/policyquery.c [new file with mode: 0644]
src/libfreeswan/libipsecpolicy/version.in.c [new file with mode: 0644]
src/libfreeswan/liblwres/Makefile [new file with mode: 0644]
src/libfreeswan/liblwres/api [new file with mode: 0644]
src/libfreeswan/liblwres/assert_p.h [new file with mode: 0644]
src/libfreeswan/liblwres/async.c [new file with mode: 0644]
src/libfreeswan/liblwres/config.h [new file with mode: 0644]
src/libfreeswan/liblwres/context.c [new file with mode: 0644]
src/libfreeswan/liblwres/context_p.h [new file with mode: 0644]
src/libfreeswan/liblwres/gai_strerror.c [new file with mode: 0644]
src/libfreeswan/liblwres/getaddrinfo.c [new file with mode: 0644]
src/libfreeswan/liblwres/gethost.c [new file with mode: 0644]
src/libfreeswan/liblwres/getipnode.c [new file with mode: 0644]
src/libfreeswan/liblwres/getnameinfo.c [new file with mode: 0644]
src/libfreeswan/liblwres/getrrset.c [new file with mode: 0644]
src/libfreeswan/liblwres/getrrset2.c [new file with mode: 0644]
src/libfreeswan/liblwres/herror.c [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/async.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/context.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/int.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/ipv6.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/lang.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/list.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/lwbuffer.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/lwpacket.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/lwres.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/netdb.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/netdb.h.in [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/platform.h [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/platform.h.in [new file with mode: 0644]
src/libfreeswan/liblwres/include/lwres/result.h [new file with mode: 0644]
src/libfreeswan/liblwres/lwbuffer.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwconfig.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwinetaton.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwinetntop.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwinetpton.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwpacket.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwres_gabn.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwres_gnba.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwres_grbn.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwres_noop.c [new file with mode: 0644]
src/libfreeswan/liblwres/lwresutil.c [new file with mode: 0644]
src/libfreeswan/liblwres/man/Makefile.in [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_buffer.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_buffer.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_buffer.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_config.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_config.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_config.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_context.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_context.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_context.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gabn.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gabn.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gabn.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gai_strerror.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gai_strerror.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gai_strerror.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getaddrinfo.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getaddrinfo.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getaddrinfo.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gethostent.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gethostent.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gethostent.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getipnode.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getipnode.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getipnode.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getnameinfo.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getnameinfo.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getnameinfo.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getrrsetbyname.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getrrsetbyname.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_getrrsetbyname.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gnba.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gnba.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_gnba.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_hstrerror.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_hstrerror.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_hstrerror.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_inetntop.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_inetntop.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_inetntop.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_noop.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_noop.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_noop.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_packet.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_packet.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_packet.html [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_resutil.3 [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_resutil.docbook [new file with mode: 0644]
src/libfreeswan/liblwres/man/lwres_resutil.html [new file with mode: 0644]
src/libfreeswan/liblwres/unix/include/lwres/net.h [new file with mode: 0644]
src/libfreeswan/liblwres/version.c [new file with mode: 0644]

diff --git a/lib/.cvsignore b/lib/.cvsignore
deleted file mode 100644 (file)
index aa84dc0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ktmp
-version.c
diff --git a/lib/COPYING.LIB b/lib/COPYING.LIB
deleted file mode 100644 (file)
index 92b8903..0000000
+++ /dev/null
@@ -1,481 +0,0 @@
-                 GNU LIBRARY GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
-                   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL.  It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-                           Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it.  You can use it for
-your libraries, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library.  If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-\f
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software.  To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
-  Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs.  This
-license, the GNU Library General Public License, applies to certain
-designated libraries.  This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
-  The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it.  Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program.  However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
-  Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries.  We
-concluded that weaker conditions might promote sharing better.
-
-  However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves.  This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them.  (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.)  The hope is that this
-will lead to faster development of free libraries.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, while the latter only
-works together with the library.
-
-  Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-\f
-                 GNU LIBRARY GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License").  Each licensee is
-addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-\f
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-\f
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-\f
-  6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    c) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    d) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-\f
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-\f
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-\f
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                           NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
-\f
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library 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.
-
-    This library 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 this library; if not, write to the Free
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/lib/Makefile b/lib/Makefile
deleted file mode 100644 (file)
index fa2b27b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Makefile for the KLIPS interface utilities
-# Copyright (C) 1998, 1999  Henry Spencer.
-# Copyright (C) 1999, 2000, 2001  Richard Guy Briggs
-# 
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
-# 
-# This program 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 General Public License
-# for more details.
-#
-# RCSID $Id: Makefile,v 1.1 2004/03/15 20:35:24 as Exp $
-
-FREESWANSRCDIR=..
-include ${FREESWANSRCDIR}/Makefile.inc
-
-SUBDIRS=libfreeswan libdes
-
-ifeq ($(USE_LWRES),true)
-SUBDIRS+=liblwres
-endif
-
-ifeq ($(USE_IPSECPOLICY),true)
-SUBDIRS+=libipsecpolicy
-endif
-
-def:
-       @echo "Please read doc/intro.html or INSTALL before running make"
-       @false
-
-# programs
-
-cleanall distclean mostlyclean realclean install programs checkprograms check clean spotless install_file_list:
-       @for d in $(SUBDIRS) ; \
-       do \
-               (cd $$d && $(MAKE) FREESWANSRCDIR=$(FREESWANSRCDIR)/.. $@ ) || exit 1; \
-       done; \
-
diff --git a/lib/Makefile.kernel b/lib/Makefile.kernel
deleted file mode 100644 (file)
index f32a4f0..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-# FreeS/WAN library
-# Copyright (C) 1998-2002  Henry Spencer.
-# 
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
-# 
-# This program 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 General Public License
-# for more details.
-#
-# RCSID $Id: Makefile.kernel,v 1.1 2004/03/15 20:35:24 as Exp $
-
-
-
-include ../Makefile.inc
-include ../Makefile.ver
-
-
-
-ifndef TOPDIR
-TOPDIR  := /usr/src/linux
-endif
-
-L_TARGET := libkernel.a
-
-obj-y := addrtoa.o datatot.o goodmask.o \
-       pfkey_v2_build.o pfkey_v2_debug.o pfkey_v2_ext_bits.o pfkey_v2_parse.o \
-       prng.o rangetoa.o satoa.o \
-       subnetof.o subnettoa.o ultoa.o version.o
-
-HDRS=freeswan.h internal.h
-
-EXTRA_CFLAGS += -I. $(KLIPSCOMPILE)
-
-EXTRA_CFLAGS += -Wall 
-#EXTRA_CFLAGS += -Wconversion 
-#EXTRA_CFLAGS += -Wmissing-prototypes 
-EXTRA_CFLAGS += -Wpointer-arith 
-#EXTRA_CFLAGS += -Wcast-qual 
-#EXTRA_CFLAGS += -Wmissing-declarations 
-EXTRA_CFLAGS += -Wstrict-prototypes
-#EXTRA_CFLAGS += -pedantic
-#EXTRA_CFLAGS += -W
-#EXTRA_CFLAGS += -Wwrite-strings 
-#EXTRA_CFLAGS += -Wbad-function-cast 
-
-active-objs     := $(sort $(obj-y) $(obj-m))
-L_OBJS          := $(obj-y)
-M_OBJS          := $(obj-m)
-MIX_OBJS        := $(filter $(export-objs), $(active-objs))
-
-include $(TOPDIR)/Rules.make
-
-$(obj-y):      $(HDRS)
-
-# build version.c using version number from Makefile.ver
-version.c:     version.in.c
-       sed '/"/s/xxx/$(IPSECVERSION)/' version.in.c >$@
-
-clean:
-       rm -f $(L_TARGET) *.o try* core *.core version.c
-       ( cd des && $(MAKE) clean )
diff --git a/lib/README b/lib/README
deleted file mode 100644 (file)
index 1834a87..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-These are general library functions used in many places in FreeS/WAN.
-
-They are under the GNU library license; see COPYING.LIB.
diff --git a/lib/libcrypto/include/cbc_generic.h b/lib/libcrypto/include/cbc_generic.h
deleted file mode 100644 (file)
index 0dd3a77..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-#ifndef _CBC_GENERIC_H
-#define _CBC_GENERIC_H
-/*
- * CBC macro helpers
- *
- * Author: JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
- * 
- * This program 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 General Public License
- * for more details.
- *
- */
-
-/*
- *     Heavily inspired in loop_AES
- */
-#define CBC_IMPL_BLK16(name, ctx_type, addr_type, enc_func, dec_func) \
-int name(ctx_type *ctx, const u_int8_t * in, u_int8_t * out, int ilen, const u_int8_t * iv, int encrypt) { \
-       int ret=ilen, pos; \
-       const u_int32_t *iv_i; \
-       if ((ilen) % 16) return 0; \
-       if (encrypt) { \
-               pos=0; \
-               while(pos<ilen) { \
-                       if (pos==0) \
-                               iv_i=(const u_int32_t*) iv; \
-                       else \
-                               iv_i=(const u_int32_t*) (out-16); \
-                       *((u_int32_t *)(&out[ 0])) = iv_i[0]^*((const u_int32_t *)(&in[ 0])); \
-                       *((u_int32_t *)(&out[ 4])) = iv_i[1]^*((const u_int32_t *)(&in[ 4])); \
-                       *((u_int32_t *)(&out[ 8])) = iv_i[2]^*((const u_int32_t *)(&in[ 8])); \
-                       *((u_int32_t *)(&out[12])) = iv_i[3]^*((const u_int32_t *)(&in[12])); \
-                       enc_func(ctx, (addr_type) out, (addr_type) out); \
-                       in+=16; \
-                       out+=16; \
-                       pos+=16; \
-               } \
-       } else { \
-               pos=ilen-16; \
-               in+=pos; \
-               out+=pos; \
-               while(pos>=0) { \
-                       dec_func(ctx, (const addr_type) in, (addr_type) out); \
-                       if (pos==0) \
-                               iv_i=(const u_int32_t*) (iv); \
-                       else \
-                               iv_i=(const u_int32_t*) (in-16); \
-                       *((u_int32_t *)(&out[ 0])) ^= iv_i[0]; \
-                       *((u_int32_t *)(&out[ 4])) ^= iv_i[1]; \
-                       *((u_int32_t *)(&out[ 8])) ^= iv_i[2]; \
-                       *((u_int32_t *)(&out[12])) ^= iv_i[3]; \
-                       in-=16; \
-                       out-=16; \
-                       pos-=16; \
-               } \
-       } \
-       return ret; \
-} 
-#define CBC_IMPL_BLK8(name, ctx_type, addr_type,  enc_func, dec_func) \
-int name(ctx_type *ctx, u_int8_t * in, u_int8_t * out, int ilen, const u_int8_t * iv, int encrypt) { \
-       int ret=ilen, pos; \
-       const u_int32_t *iv_i; \
-       if ((ilen) % 8) return 0; \
-       if (encrypt) { \
-               pos=0; \
-               while(pos<ilen) { \
-                       if (pos==0) \
-                               iv_i=(const u_int32_t*) iv; \
-                       else \
-                               iv_i=(const u_int32_t*) (out-8); \
-                       *((u_int32_t *)(&out[ 0])) = iv_i[0]^*((const u_int32_t *)(&in[ 0])); \
-                       *((u_int32_t *)(&out[ 4])) = iv_i[1]^*((const u_int32_t *)(&in[ 4])); \
-                       enc_func(ctx, (addr_type)out, (addr_type)out); \
-                       in+=8; \
-                       out+=8; \
-                       pos+=8; \
-               } \
-       } else { \
-               pos=ilen-8; \
-               in+=pos; \
-               out+=pos; \
-               while(pos>=0) { \
-                       dec_func(ctx, (const addr_type)in, (addr_type)out); \
-                       if (pos==0) \
-                               iv_i=(const u_int32_t*) (iv); \
-                       else \
-                               iv_i=(const u_int32_t*) (in-8); \
-                       *((u_int32_t *)(&out[ 0])) ^= iv_i[0]; \
-                       *((u_int32_t *)(&out[ 4])) ^= iv_i[1]; \
-                       in-=8; \
-                       out-=8; \
-                       pos-=8; \
-               } \
-       } \
-       return ret; \
-} 
-#define CBC_DECL(name, ctx_type) \
-int name(ctx_type *ctx, u_int8_t * in, u_int8_t * out, int ilen, const u_int8_t * iv, int encrypt)
-/*
-Eg.:
-CBC_IMPL_BLK16(AES_cbc_encrypt, aes_context, u_int8_t *, aes_encrypt, aes_decrypt);
-CBC_DECL(AES_cbc_encrypt, aes_context);
-*/
-#endif /* _CBC_GENERIC_H */
diff --git a/lib/libcrypto/include/hmac_generic.h b/lib/libcrypto/include/hmac_generic.h
deleted file mode 100644 (file)
index a749228..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _HMAC_GENERIC_H
-#define _HMAC_GENERIC_H
-/*
- * HMAC macro helpers
- *
- * Author: JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
- * 
- * This program 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 General Public License
- * for more details.
- *
- */
-
-#ifndef DIVUP
-#define DIVUP(x,y) ((x + y -1) / y) /* divide, rounding upwards */
-#endif
-#ifndef HMAC_IPAD
-#define                HMAC_IPAD       0x36
-#define                HMAC_OPAD       0x5C
-#endif
-#define HMAC_SET_KEY_IMPL(func_name, hctx_t, blocksize, func_init, func_update) \
-void func_name(hctx_t *hctx, const u_int8_t * key, int keylen) { \
-       int i;\
-       u_int8_t kb[blocksize];         \
-       for (i = 0; i < DIVUP(keylen*8, 8); i++) {      \
-               kb[i] = key[i] ^ HMAC_IPAD;     \
-       }                                       \
-       for (; i < blocksize; i++) {            \
-               kb[i] = HMAC_IPAD;              \
-       }                                       \
-       func_init(&hctx->ictx);                 \
-       func_update(&hctx->ictx, kb, blocksize);        \
-       for (i = 0; i < blocksize; i++) {       \
-               kb[i] ^= (HMAC_IPAD ^ HMAC_OPAD);       \
-       }                                       \
-       func_init(&hctx->octx);                 \
-       func_update(&hctx->octx, kb, blocksize);        \
-}
-#define HMAC_HASH_IMPL(func_name, hctx_t, ctx_t, ahlen, func_update, func_result ) \
-void func_name(hctx_t *hctx, const u_int8_t * dat, int len, u_int8_t * hash, int hashlen) {    \
-       ctx_t ctx;      \
-       ctx=hctx->ictx; \
-       if (dat) func_update(&ctx, dat, len);   \
-       if (hash) {                             \
-               u_int8_t hash_buf[ahlen];                       \
-               func_result(&ctx, hash_buf, ahlen);     \
-               ctx=hctx->octx;                         \
-               func_update(&ctx, hash_buf, ahlen);     \
-               func_result(&ctx, hash, hashlen);       \
-               memset(&ctx, 0, sizeof (ctx));          \
-               memset(&hash_buf, 0, sizeof (hash_buf));\
-       }                                       \
-}
-#endif /* _HMAC_GENERIC_H */
diff --git a/lib/libcrypto/include/md32_common.h b/lib/libcrypto/include/md32_common.h
deleted file mode 100644 (file)
index 1a404a4..0000000
+++ /dev/null
@@ -1,607 +0,0 @@
-/* crypto/md32_common.h */
-/* ====================================================================
- * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    licensing@OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
-
-/*
- * This is a generic 32 bit "collector" for message digest algorithms.
- * Whenever needed it collects input character stream into chunks of
- * 32 bit values and invokes a block function that performs actual hash
- * calculations.
- *
- * Porting guide.
- *
- * Obligatory macros:
- *
- * DATA_ORDER_IS_BIG_ENDIAN or DATA_ORDER_IS_LITTLE_ENDIAN
- *     this macro defines byte order of input stream.
- * HASH_CBLOCK
- *     size of a unit chunk HASH_BLOCK operates on.
- * HASH_LONG
- *     has to be at lest 32 bit wide, if it's wider, then
- *     HASH_LONG_LOG2 *has to* be defined along
- * HASH_CTX
- *     context structure that at least contains following
- *     members:
- *             typedef struct {
- *                     ...
- *                     HASH_LONG       Nl,Nh;
- *                     HASH_LONG       data[HASH_LBLOCK];
- *                     int             num;
- *                     ...
- *                     } HASH_CTX;
- * HASH_UPDATE
- *     name of "Update" function, implemented here.
- * HASH_TRANSFORM
- *     name of "Transform" function, implemented here.
- * HASH_FINAL
- *     name of "Final" function, implemented here.
- * HASH_BLOCK_HOST_ORDER
- *     name of "block" function treating *aligned* input message
- *     in host byte order, implemented externally.
- * HASH_BLOCK_DATA_ORDER
- *     name of "block" function treating *unaligned* input message
- *     in original (data) byte order, implemented externally (it
- *     actually is optional if data and host are of the same
- *     "endianess").
- * HASH_MAKE_STRING
- *     macro convering context variables to an ASCII hash string.
- *
- * Optional macros:
- *
- * B_ENDIAN or L_ENDIAN
- *     defines host byte-order.
- * HASH_LONG_LOG2
- *     defaults to 2 if not states otherwise.
- * HASH_LBLOCK
- *     assumed to be HASH_CBLOCK/4 if not stated otherwise.
- * HASH_BLOCK_DATA_ORDER_ALIGNED
- *     alternative "block" function capable of treating
- *     aligned input message in original (data) order,
- *     implemented externally.
- *
- * MD5 example:
- *
- *     #define DATA_ORDER_IS_LITTLE_ENDIAN
- *
- *     #define HASH_LONG               MD5_LONG
- *     #define HASH_LONG_LOG2          MD5_LONG_LOG2
- *     #define HASH_CTX                MD5_CTX
- *     #define HASH_CBLOCK             MD5_CBLOCK
- *     #define HASH_LBLOCK             MD5_LBLOCK
- *     #define HASH_UPDATE             MD5_Update
- *     #define HASH_TRANSFORM          MD5_Transform
- *     #define HASH_FINAL              MD5_Final
- *     #define HASH_BLOCK_HOST_ORDER   md5_block_host_order
- *     #define HASH_BLOCK_DATA_ORDER   md5_block_data_order
- *
- *                                     <appro@fy.chalmers.se>
- */
-
-#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN)
-#error "DATA_ORDER must be defined!"
-#endif
-
-#ifndef HASH_CBLOCK
-#error "HASH_CBLOCK must be defined!"
-#endif
-#ifndef HASH_LONG
-#error "HASH_LONG must be defined!"
-#endif
-#ifndef HASH_CTX
-#error "HASH_CTX must be defined!"
-#endif
-
-#ifndef HASH_UPDATE
-#error "HASH_UPDATE must be defined!"
-#endif
-#ifndef HASH_TRANSFORM
-#error "HASH_TRANSFORM must be defined!"
-#endif
-#ifndef HASH_FINAL
-#error "HASH_FINAL must be defined!"
-#endif
-
-#ifndef HASH_BLOCK_HOST_ORDER
-#error "HASH_BLOCK_HOST_ORDER must be defined!"
-#endif
-
-#if 0
-/*
- * Moved below as it's required only if HASH_BLOCK_DATA_ORDER_ALIGNED
- * isn't defined.
- */
-#ifndef HASH_BLOCK_DATA_ORDER
-#error "HASH_BLOCK_DATA_ORDER must be defined!"
-#endif
-#endif
-
-#ifndef HASH_LBLOCK
-#define HASH_LBLOCK    (HASH_CBLOCK/4)
-#endif
-
-#ifndef HASH_LONG_LOG2
-#define HASH_LONG_LOG2 2
-#endif
-
-/*
- * Engage compiler specific rotate intrinsic function if available.
- */
-#undef ROTATE
-#ifndef PEDANTIC
-# if defined(_MSC_VER)
-#  define ROTATE(a,n)  _lrotl(a,n)
-# elif defined(__MWERKS__)
-#  if defined(__POWERPC__)
-#   define ROTATE(a,n) __rlwinm(a,n,0,31)
-#  elif defined(__MC68K__)
-    /* Motorola specific tweak. <appro@fy.chalmers.se> */
-#   define ROTATE(a,n) ( n<24 ? __rol(a,n) : __ror(a,32-n) )
-#  else
-#   define ROTATE(a,n) __rol(a,n)
-#  endif
-# elif defined(__GNUC__) && __GNUC__>=2 && !defined(NO_ASM) && !defined(NO_INLINE_ASM)
-  /*
-   * Some GNU C inline assembler templates. Note that these are
-   * rotates by *constant* number of bits! But that's exactly
-   * what we need here...
-   *
-   *                                   <appro@fy.chalmers.se>
-   */
-#  if defined(__i386)
-#   define ROTATE(a,n) ({ register unsigned int ret;   \
-                               asm (                   \
-                               "roll %1,%0"            \
-                               : "=r"(ret)             \
-                               : "I"(n), "0"(a)        \
-                               : "cc");                \
-                          ret;                         \
-                       })
-#  elif defined(__powerpc) || defined(__ppc)
-#   define ROTATE(a,n) ({ register unsigned int ret;   \
-                               asm (                   \
-                               "rlwinm %0,%1,%2,0,31"  \
-                               : "=r"(ret)             \
-                               : "r"(a), "I"(n));      \
-                          ret;                         \
-                       })
-#  endif
-# endif
-
-/*
- * Engage compiler specific "fetch in reverse byte order"
- * intrinsic function if available.
- */
-# if defined(__GNUC__) && __GNUC__>=2 && !defined(NO_ASM) && !defined(NO_INLINE_ASM)
-  /* some GNU C inline assembler templates by <appro@fy.chalmers.se> */
-#  if defined(__i386) && !defined(I386_ONLY)
-#   define BE_FETCH32(a)       ({ register unsigned int l=(a);\
-                               asm (                   \
-                               "bswapl %0"             \
-                               : "=r"(l) : "0"(l));    \
-                         l;                            \
-                       })
-#  elif defined(__powerpc)
-#   define LE_FETCH32(a)       ({ register unsigned int l;     \
-                               asm (                   \
-                               "lwbrx %0,0,%1"         \
-                               : "=r"(l)               \
-                               : "r"(a));              \
-                          l;                           \
-                       })
-
-#  elif defined(__sparc) && defined(ULTRASPARC)
-#  define LE_FETCH32(a)        ({ register unsigned int l;             \
-                               asm (                           \
-                               "lda [%1]#ASI_PRIMARY_LITTLE,%0"\
-                               : "=r"(l)                       \
-                               : "r"(a));                      \
-                          l;                                   \
-                       })
-#  endif
-# endif
-#endif /* PEDANTIC */
-
-#if HASH_LONG_LOG2==2  /* Engage only if sizeof(HASH_LONG)== 4 */
-/* A nice byte order reversal from Wei Dai <weidai@eskimo.com> */
-#ifdef ROTATE
-/* 5 instructions with rotate instruction, else 9 */
-#define REVERSE_FETCH32(a,l)   (                                       \
-               l=*(const HASH_LONG *)(a),                              \
-               ((ROTATE(l,8)&0x00FF00FF)|(ROTATE((l&0x00FF00FF),24)))  \
-                               )
-#else
-/* 6 instructions with rotate instruction, else 8 */
-#define REVERSE_FETCH32(a,l)   (                               \
-               l=*(const HASH_LONG *)(a),                      \
-               l=(((l>>8)&0x00FF00FF)|((l&0x00FF00FF)<<8)),    \
-               ROTATE(l,16)                                    \
-                               )
-/*
- * Originally the middle line started with l=(((l&0xFF00FF00)>>8)|...
- * It's rewritten as above for two reasons:
- *     - RISCs aren't good at long constants and have to explicitely
- *       compose 'em with several (well, usually 2) instructions in a
- *       register before performing the actual operation and (as you
- *       already realized:-) having same constant should inspire the
- *       compiler to permanently allocate the only register for it;
- *     - most modern CPUs have two ALUs, but usually only one has
- *       circuitry for shifts:-( this minor tweak inspires compiler
- *       to schedule shift instructions in a better way...
- *
- *                             <appro@fy.chalmers.se>
- */
-#endif
-#endif
-
-#ifndef ROTATE
-#define ROTATE(a,n)     (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
-#endif
-
-/*
- * Make some obvious choices. E.g., HASH_BLOCK_DATA_ORDER_ALIGNED
- * and HASH_BLOCK_HOST_ORDER ought to be the same if input data
- * and host are of the same "endianess". It's possible to mask
- * this with blank #define HASH_BLOCK_DATA_ORDER though...
- *
- *                             <appro@fy.chalmers.se>
- */
-#if defined(B_ENDIAN)
-#  if defined(DATA_ORDER_IS_BIG_ENDIAN)
-#    if !defined(HASH_BLOCK_DATA_ORDER_ALIGNED) && HASH_LONG_LOG2==2
-#      define HASH_BLOCK_DATA_ORDER_ALIGNED    HASH_BLOCK_HOST_ORDER
-#    endif
-#  elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
-#    ifndef HOST_FETCH32
-#      ifdef LE_FETCH32
-#        define HOST_FETCH32(p,l)      LE_FETCH32(p)
-#      elif defined(REVERSE_FETCH32)
-#        define HOST_FETCH32(p,l)      REVERSE_FETCH32(p,l)
-#      endif
-#    endif
-#  endif
-#elif defined(L_ENDIAN)
-#  if defined(DATA_ORDER_IS_LITTLE_ENDIAN)
-#    if !defined(HASH_BLOCK_DATA_ORDER_ALIGNED) && HASH_LONG_LOG2==2
-#      define HASH_BLOCK_DATA_ORDER_ALIGNED    HASH_BLOCK_HOST_ORDER
-#    endif
-#  elif defined(DATA_ORDER_IS_BIG_ENDIAN)
-#    ifndef HOST_FETCH32
-#      ifdef BE_FETCH32
-#        define HOST_FETCH32(p,l)      BE_FETCH32(p)
-#      elif defined(REVERSE_FETCH32)
-#        define HOST_FETCH32(p,l)      REVERSE_FETCH32(p,l)
-#      endif
-#    endif
-#  endif
-#endif
-
-#if !defined(HASH_BLOCK_DATA_ORDER_ALIGNED)
-#ifndef HASH_BLOCK_DATA_ORDER
-#error "HASH_BLOCK_DATA_ORDER must be defined!"
-#endif
-#endif
-
-#if defined(DATA_ORDER_IS_BIG_ENDIAN)
-
-#define HOST_c2l(c,l)  (l =(((unsigned long)(*((c)++)))<<24),          \
-                        l|=(((unsigned long)(*((c)++)))<<16),          \
-                        l|=(((unsigned long)(*((c)++)))<< 8),          \
-                        l|=(((unsigned long)(*((c)++)))    ),          \
-                        l)
-#define HOST_p_c2l(c,l,n)      {                                       \
-                       switch (n) {                                    \
-                       case 0: l =((unsigned long)(*((c)++)))<<24;     \
-                       case 1: l|=((unsigned long)(*((c)++)))<<16;     \
-                       case 2: l|=((unsigned long)(*((c)++)))<< 8;     \
-                       case 3: l|=((unsigned long)(*((c)++)));         \
-                               } }
-#define HOST_p_c2l_p(c,l,sc,len) {                                     \
-                       switch (sc) {                                   \
-                       case 0: l =((unsigned long)(*((c)++)))<<24;     \
-                               if (--len == 0) break;                  \
-                       case 1: l|=((unsigned long)(*((c)++)))<<16;     \
-                               if (--len == 0) break;                  \
-                       case 2: l|=((unsigned long)(*((c)++)))<< 8;     \
-                               } }
-/* NOTE the pointer is not incremented at the end of this */
-#define HOST_c2l_p(c,l,n)      {                                       \
-                       l=0; (c)+=n;                                    \
-                       switch (n) {                                    \
-                       case 3: l =((unsigned long)(*(--(c))))<< 8;     \
-                       case 2: l|=((unsigned long)(*(--(c))))<<16;     \
-                       case 1: l|=((unsigned long)(*(--(c))))<<24;     \
-                               } }
-#define HOST_l2c(l,c)  (*((c)++)=(unsigned char)(((l)>>24)&0xff),      \
-                        *((c)++)=(unsigned char)(((l)>>16)&0xff),      \
-                        *((c)++)=(unsigned char)(((l)>> 8)&0xff),      \
-                        *((c)++)=(unsigned char)(((l)    )&0xff),      \
-                        l)
-
-#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
-
-#define HOST_c2l(c,l)  (l =(((unsigned long)(*((c)++)))    ),          \
-                        l|=(((unsigned long)(*((c)++)))<< 8),          \
-                        l|=(((unsigned long)(*((c)++)))<<16),          \
-                        l|=(((unsigned long)(*((c)++)))<<24),          \
-                        l)
-#define HOST_p_c2l(c,l,n)      {                                       \
-                       switch (n) {                                    \
-                       case 0: l =((unsigned long)(*((c)++)));         \
-                       case 1: l|=((unsigned long)(*((c)++)))<< 8;     \
-                       case 2: l|=((unsigned long)(*((c)++)))<<16;     \
-                       case 3: l|=((unsigned long)(*((c)++)))<<24;     \
-                               } }
-#define HOST_p_c2l_p(c,l,sc,len) {                                     \
-                       switch (sc) {                                   \
-                       case 0: l =((unsigned long)(*((c)++)));         \
-                               if (--len == 0) break;                  \
-                       case 1: l|=((unsigned long)(*((c)++)))<< 8;     \
-                               if (--len == 0) break;                  \
-                       case 2: l|=((unsigned long)(*((c)++)))<<16;     \
-                               } }
-/* NOTE the pointer is not incremented at the end of this */
-#define HOST_c2l_p(c,l,n)      {                                       \
-                       l=0; (c)+=n;                                    \
-                       switch (n) {                                    \
-                       case 3: l =((unsigned long)(*(--(c))))<<16;     \
-                       case 2: l|=((unsigned long)(*(--(c))))<< 8;     \
-                       case 1: l|=((unsigned long)(*(--(c))));         \
-                               } }
-#define HOST_l2c(l,c)  (*((c)++)=(unsigned char)(((l)    )&0xff),      \
-                        *((c)++)=(unsigned char)(((l)>> 8)&0xff),      \
-                        *((c)++)=(unsigned char)(((l)>>16)&0xff),      \
-                        *((c)++)=(unsigned char)(((l)>>24)&0xff),      \
-                        l)
-
-#endif
-
-/*
- * Time for some action:-)
- */
-
-void HASH_UPDATE (HASH_CTX *c, const void *data_, unsigned long len)
-       {
-       const unsigned char *data=data_;
-       register HASH_LONG * p;
-       register unsigned long l;
-       int sw,sc,ew,ec;
-
-       if (len==0) return;
-
-       l=(c->Nl+(len<<3))&0xffffffffL;
-       /* 95-05-24 eay Fixed a bug with the overflow handling, thanks to
-        * Wei Dai <weidai@eskimo.com> for pointing it out. */
-       if (l < c->Nl) /* overflow */
-               c->Nh++;
-       c->Nh+=(len>>29);
-       c->Nl=l;
-
-       if (c->num != 0)
-               {
-               p=c->data;
-               sw=c->num>>2;
-               sc=c->num&0x03;
-
-               if ((c->num+len) >= HASH_CBLOCK)
-                       {
-                       l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l;
-                       for (; sw<HASH_LBLOCK; sw++)
-                               {
-                               HOST_c2l(data,l); p[sw]=l;
-                               }
-                       HASH_BLOCK_HOST_ORDER (c,p,1);
-                       len-=(HASH_CBLOCK-c->num);
-                       c->num=0;
-                       /* drop through and do the rest */
-                       }
-               else
-                       {
-                       c->num+=len;
-                       if ((sc+len) < 4) /* ugly, add char's to a word */
-                               {
-                               l=p[sw]; HOST_p_c2l_p(data,l,sc,len); p[sw]=l;
-                               }
-                       else
-                               {
-                               ew=(c->num>>2);
-                               ec=(c->num&0x03);
-                               l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l;
-                               for (; sw < ew; sw++)
-                                       {
-                                       HOST_c2l(data,l); p[sw]=l;
-                                       }
-                               if (ec)
-                                       {
-                                       HOST_c2l_p(data,l,ec); p[sw]=l;
-                                       }
-                               }
-                       return;
-                       }
-               }
-
-       sw=len/HASH_CBLOCK;
-       if (sw > 0)
-               {
-#if defined(HASH_BLOCK_DATA_ORDER_ALIGNED)
-               /*
-                * Note that HASH_BLOCK_DATA_ORDER_ALIGNED gets defined
-                * only if sizeof(HASH_LONG)==4.
-                */
-               if ((((unsigned long)data)%4) == 0)
-                       {
-                       /* data is properly aligned so that we can cast it: */
-                       HASH_BLOCK_DATA_ORDER_ALIGNED (c,(HASH_LONG *)data,sw);
-                       sw*=HASH_CBLOCK;
-                       data+=sw;
-                       len-=sw;
-                       }
-               else
-#if !defined(HASH_BLOCK_DATA_ORDER)
-                       while (sw--)
-                               {
-                               memcpy (p=c->data,data,HASH_CBLOCK);
-                               HASH_BLOCK_DATA_ORDER_ALIGNED(c,p,1);
-                               data+=HASH_CBLOCK;
-                               len-=HASH_CBLOCK;
-                               }
-#endif
-#endif
-#if defined(HASH_BLOCK_DATA_ORDER)
-                       {
-                       HASH_BLOCK_DATA_ORDER(c,data,sw);
-                       sw*=HASH_CBLOCK;
-                       data+=sw;
-                       len-=sw;
-                       }
-#endif
-               }
-
-       if (len!=0)
-               {
-               p = c->data;
-               c->num = len;
-               ew=len>>2;      /* words to copy */
-               ec=len&0x03;
-               for (; ew; ew--,p++)
-                       {
-                       HOST_c2l(data,l); *p=l;
-                       }
-               HOST_c2l_p(data,l,ec);
-               *p=l;
-               }
-       }
-
-
-void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data)
-       {
-#if defined(HASH_BLOCK_DATA_ORDER_ALIGNED)
-       if ((((unsigned long)data)%4) == 0)
-               /* data is properly aligned so that we can cast it: */
-               HASH_BLOCK_DATA_ORDER_ALIGNED (c,(HASH_LONG *)data,1);
-       else
-#if !defined(HASH_BLOCK_DATA_ORDER)
-               {
-               memcpy (c->data,data,HASH_CBLOCK);
-               HASH_BLOCK_DATA_ORDER_ALIGNED (c,c->data,1);
-               }
-#endif
-#endif
-#if defined(HASH_BLOCK_DATA_ORDER)
-       HASH_BLOCK_DATA_ORDER (c,data,1);
-#endif
-       }
-
-
-void HASH_FINAL (unsigned char *md, HASH_CTX *c)
-       {
-       register HASH_LONG *p;
-       register unsigned long l;
-       register int i,j;
-       static const unsigned char end[4]={0x80,0x00,0x00,0x00};
-       const unsigned char *cp=end;
-
-       /* c->num should definitly have room for at least one more byte. */
-       p=c->data;
-       i=c->num>>2;
-       j=c->num&0x03;
-
-#if 0
-       /* purify often complains about the following line as an
-        * Uninitialized Memory Read.  While this can be true, the
-        * following p_c2l macro will reset l when that case is true.
-        * This is because j&0x03 contains the number of 'valid' bytes
-        * already in p[i].  If and only if j&0x03 == 0, the UMR will
-        * occur but this is also the only time p_c2l will do
-        * l= *(cp++) instead of l|= *(cp++)
-        * Many thanks to Alex Tang <altitude@cic.net> for pickup this
-        * 'potential bug' */
-#ifdef PURIFY
-       if (j==0) p[i]=0; /* Yeah, but that's not the way to fix it:-) */
-#endif
-       l=p[i];
-#else
-       l = (j==0) ? 0 : p[i];
-#endif
-       HOST_p_c2l(cp,l,j); p[i++]=l; /* i is the next 'undefined word' */
-
-       if (i>(HASH_LBLOCK-2)) /* save room for Nl and Nh */
-               {
-               if (i<HASH_LBLOCK) p[i]=0;
-               HASH_BLOCK_HOST_ORDER (c,p,1);
-               i=0;
-               }
-       for (; i<(HASH_LBLOCK-2); i++)
-               p[i]=0;
-
-#if   defined(DATA_ORDER_IS_BIG_ENDIAN)
-       p[HASH_LBLOCK-2]=c->Nh;
-       p[HASH_LBLOCK-1]=c->Nl;
-#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
-       p[HASH_LBLOCK-2]=c->Nl;
-       p[HASH_LBLOCK-1]=c->Nh;
-#endif
-       HASH_BLOCK_HOST_ORDER (c,p,1);
-
-#ifndef HASH_MAKE_STRING
-#error "HASH_MAKE_STRING must be defined!"
-#else
-       HASH_MAKE_STRING(c,md);
-#endif
-
-       c->num=0;
-       /* clear stuff, HASH_BLOCK may be leaving some stuff on the stack
-        * but I'm not worried :-)
-       memset((void *)c,0,sizeof(HASH_CTX));
-        */
-       }
diff --git a/lib/libcrypto/libaes/Makefile b/lib/libcrypto/libaes/Makefile
deleted file mode 100644 (file)
index 7e4cff6..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-CFLAGS=-O3 -fomit-frame-pointer -D__KERNEL__  -Wall  -Wcast-qual $(EXTRA_CFLAGS)
-INC=-I../include 
-
-AES_CORE_OBJ:=aes.o
-
-ASM-$(ARCH_ASM):=1
-ASM_X86:=$(ASM-i586)$(ASM-i686)
-ifneq ($(strip $(ASM_X86)),)
-AES_CORE_OBJ:= asm/aes-i586.o
-endif
-
-LIBOBJ := aes_xcbc_mac.o aes_cbc.o $(AES_CORE_OBJ)
-LDLIBS := -laes
-LDFLAGS := -L.
-
-BLIB := libaes.a
-
-L_TARGET := $(BLIB)
-
-.c.o:
-       $(CC) $(CPPFLAGS) $(CFLAGS) $(INC) -c $< -o $@
-
-.S.o:
-       $(CC) $(AFLAGS) -c $< -o $@
-
-$(BLIB): $(LIBOBJ)
-       /bin/rm -f $(BLIB)
-       ar cr $(BLIB) $(LIBOBJ)
-       -if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \
-       else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \
-       else exit 0; fi; fi
-
-testx: test_main_mac.o $(BLIB)
-       $(CC) -o $@ $^ 
-
-test: test_main.o $(BLIB)
-       $(CC) -o $@ $^ 
-
-clean:
-       rm -f *.[oa] asm/*.o core $(TARGET) test testx
diff --git a/lib/libcrypto/libaes/aes.c b/lib/libcrypto/libaes/aes.c
deleted file mode 100644 (file)
index 1748119..0000000
+++ /dev/null
@@ -1,1415 +0,0 @@
-// I retain copyright in this code but I encourage its free use provided
-// that I don't carry any responsibility for the results. I am especially 
-// happy to see it used in free and open source software. If you do use 
-// it I would appreciate an acknowledgement of its origin in the code or
-// the product that results and I would also appreciate knowing a little
-// about the use to which it is being put. I am grateful to Frank Yellin
-// for some ideas that are used in this implementation.
-//
-// Dr B. R. Gladman <brg@gladman.uk.net> 6th April 2001.
-//
-// This is an implementation of the AES encryption algorithm (Rijndael)
-// designed by Joan Daemen and Vincent Rijmen. This version is designed
-// to provide both fixed and dynamic block and key lengths and can also 
-// run with either big or little endian internal byte order (see aes.h). 
-// It inputs block and key lengths in bytes with the legal values being 
-// 16, 24 and 32.
-
-/*
- * Modified by Jari Ruusu,  May 1 2001
- *  - Fixed some compile warnings, code was ok but gcc warned anyway.
- *  - Changed basic types: byte -> unsigned char, word -> u_int32_t
- *  - Major name space cleanup: Names visible to outside now begin
- *    with "aes_" or "AES_". A lot of stuff moved from aes.h to aes.c
- *  - Removed C++ and DLL support as part of name space cleanup.
- *  - Eliminated unnecessary recomputation of tables. (actual bug fix)
- *  - Merged precomputed constant tables to aes.c file.
- *  - Removed data alignment restrictions for portability reasons.
- *  - Made block and key lengths accept bit count (128/192/256)
- *    as well byte count (16/24/32).
- *  - Removed all error checks. This change also eliminated the need
- *    to preinitialize the context struct to zero.
- *  - Removed some totally unused constants.
- */
-
-#include "aes.h"
-
-// CONFIGURATION OPTIONS (see also aes.h)
-//
-// 1.  Define UNROLL for full loop unrolling in encryption and decryption.
-// 2.  Define PARTIAL_UNROLL to unroll two loops in encryption and decryption.
-// 3.  Define FIXED_TABLES for compiled rather than dynamic tables.
-// 4.  Define FF_TABLES to use tables for field multiplies and inverses.
-//     Do not enable this without understanding stack space requirements.
-// 5.  Define ARRAYS to use arrays to hold the local state block. If this
-//     is not defined, individually declared 32-bit words are used.
-// 6.  Define FAST_VARIABLE if a high speed variable block implementation
-//     is needed (essentially three separate fixed block size code sequences)
-// 7.  Define either ONE_TABLE or FOUR_TABLES for a fast table driven 
-//     version using 1 table (2 kbytes of table space) or 4 tables (8
-//     kbytes of table space) for higher speed.
-// 8.  Define either ONE_LR_TABLE or FOUR_LR_TABLES for a further speed 
-//     increase by using tables for the last rounds but with more table
-//     space (2 or 8 kbytes extra).
-// 9.  If neither ONE_TABLE nor FOUR_TABLES is defined, a compact but 
-//     slower version is provided.
-// 10. If fast decryption key scheduling is needed define ONE_IM_TABLE
-//     or FOUR_IM_TABLES for higher speed (2 or 8 kbytes extra).
-
-#define UNROLL
-//#define PARTIAL_UNROLL
-
-#define FIXED_TABLES
-//#define FF_TABLES
-//#define ARRAYS
-#define FAST_VARIABLE
-
-//#define ONE_TABLE
-#define FOUR_TABLES
-
-//#define ONE_LR_TABLE
-#define FOUR_LR_TABLES
-
-//#define ONE_IM_TABLE
-#define FOUR_IM_TABLES
-
-#if defined(UNROLL) && defined (PARTIAL_UNROLL)
-#error both UNROLL and PARTIAL_UNROLL are defined
-#endif
-
-#if defined(ONE_TABLE) && defined (FOUR_TABLES)
-#error both ONE_TABLE and FOUR_TABLES are defined
-#endif
-
-#if defined(ONE_LR_TABLE) && defined (FOUR_LR_TABLES)
-#error both ONE_LR_TABLE and FOUR_LR_TABLES are defined
-#endif
-
-#if defined(ONE_IM_TABLE) && defined (FOUR_IM_TABLES)
-#error both ONE_IM_TABLE and FOUR_IM_TABLES are defined
-#endif
-
-#if defined(AES_BLOCK_SIZE) && AES_BLOCK_SIZE != 16 && AES_BLOCK_SIZE != 24 && AES_BLOCK_SIZE != 32
-#error an illegal block size has been specified
-#endif  
-
-// upr(x,n): rotates bytes within words by n positions, moving bytes 
-// to higher index positions with wrap around into low positions
-// ups(x,n): moves bytes by n positions to higher index positions in 
-// words but without wrap around
-// bval(x,n): extracts a byte from a word
-
-#define upr(x,n)        (((x) << 8 * (n)) | ((x) >> (32 - 8 * (n))))
-#define ups(x,n)        ((x) << 8 * (n))
-#define bval(x,n)       ((unsigned char)((x) >> 8 * (n)))
-#define bytes2word(b0, b1, b2, b3)  \
-        ((u_int32_t)(b3) << 24 | (u_int32_t)(b2) << 16 | (u_int32_t)(b1) << 8 | (b0))
-
-
-/* little endian processor without data alignment restrictions: AES_LE_OK */
-/* original code: i386 */
-#if defined(i386) || defined(_I386) || defined(__i386__) || defined(__i386) 
-#define        AES_LE_OK 1
-/* added (tested): alpha  --jjo */
-#elif defined(__alpha__)|| defined (__alpha)
-#define AES_LE_OK 1
-/* added (tested): ia64  --jjo */
-#elif defined(__ia64__)|| defined (__ia64)
-#define AES_LE_OK 1
-#endif
-
-#ifdef AES_LE_OK
-/* little endian processor without data alignment restrictions */
-#define word_in(x)      *(u_int32_t*)(x)
-#define const_word_in(x)      *(const u_int32_t*)(x)
-#define word_out(x,v)   *(u_int32_t*)(x) = (v)
-#define const_word_out(x,v)   *(const u_int32_t*)(x) = (v)
-#else
-/* slower but generic big endian or with data alignment restrictions */
-/* some additional "const" touches to stop "gcc -Wcast-qual" complains --jjo */
-#define word_in(x)      ((u_int32_t)(((unsigned char *)(x))[0])|((u_int32_t)(((unsigned char *)(x))[1])<<8)|((u_int32_t)(((unsigned char *)(x))[2])<<16)|((u_int32_t)(((unsigned char *)(x))[3])<<24))
-#define const_word_in(x)      ((const u_int32_t)(((const unsigned char *)(x))[0])|((const u_int32_t)(((const unsigned char *)(x))[1])<<8)|((const u_int32_t)(((const unsigned char *)(x))[2])<<16)|((const u_int32_t)(((const unsigned char *)(x))[3])<<24))
-#define word_out(x,v)   ((unsigned char *)(x))[0]=(v),((unsigned char *)(x))[1]=((v)>>8),((unsigned char *)(x))[2]=((v)>>16),((unsigned char *)(x))[3]=((v)>>24)
-#define const_word_out(x,v)   ((const unsigned char *)(x))[0]=(v),((const unsigned char *)(x))[1]=((v)>>8),((const unsigned char *)(x))[2]=((v)>>16),((const unsigned char *)(x))[3]=((v)>>24)
-#endif
-
-// Disable at least some poor combinations of options
-
-#if !defined(ONE_TABLE) && !defined(FOUR_TABLES)
-#define FIXED_TABLES
-#undef  UNROLL
-#undef  ONE_LR_TABLE
-#undef  FOUR_LR_TABLES
-#undef  ONE_IM_TABLE
-#undef  FOUR_IM_TABLES
-#elif !defined(FOUR_TABLES)
-#ifdef  FOUR_LR_TABLES
-#undef  FOUR_LR_TABLES
-#define ONE_LR_TABLE
-#endif
-#ifdef  FOUR_IM_TABLES
-#undef  FOUR_IM_TABLES
-#define ONE_IM_TABLE
-#endif
-#elif !defined(AES_BLOCK_SIZE)
-#if defined(UNROLL)
-#define PARTIAL_UNROLL
-#undef UNROLL
-#endif
-#endif
-
-// the finite field modular polynomial and elements
-
-#define ff_poly 0x011b
-#define ff_hi   0x80
-
-// multiply four bytes in GF(2^8) by 'x' {02} in parallel
-
-#define m1  0x80808080
-#define m2  0x7f7f7f7f
-#define m3  0x0000001b
-#define FFmulX(x)  ((((x) & m2) << 1) ^ ((((x) & m1) >> 7) * m3))
-
-// The following defines provide alternative definitions of FFmulX that might
-// give improved performance if a fast 32-bit multiply is not available. Note
-// that a temporary variable u needs to be defined where FFmulX is used.
-
-// #define FFmulX(x) (u = (x) & m1, u |= (u >> 1), ((x) & m2) << 1) ^ ((u >> 3) | (u >> 6)) 
-// #define m4  0x1b1b1b1b
-// #define FFmulX(x) (u = (x) & m1, ((x) & m2) << 1) ^ ((u - (u >> 7)) & m4) 
-
-// perform column mix operation on four bytes in parallel
-
-#define fwd_mcol(x) (f2 = FFmulX(x), f2 ^ upr(x ^ f2,3) ^ upr(x,2) ^ upr(x,1))
-
-#if defined(FIXED_TABLES)
-
-// the S-Box table
-
-static const unsigned char s_box[256] =
-{
-    0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
-    0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
-    0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
-    0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
-    0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc,
-    0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
-    0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a,
-    0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
-    0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0,
-    0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
-    0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b,
-    0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
-    0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85,
-    0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
-    0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5,
-    0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
-    0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17,
-    0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
-    0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88,
-    0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
-    0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c,
-    0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
-    0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9,
-    0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
-    0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6,
-    0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
-    0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e,
-    0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
-    0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94,
-    0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
-    0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68,
-    0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
-};
-
-// the inverse S-Box table
-
-static const unsigned char inv_s_box[256] =
-{
-    0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38,
-    0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
-    0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
-    0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,
-    0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d,
-    0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
-    0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2,
-    0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25,
-    0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16,
-    0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92,
-    0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda,
-    0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
-    0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a,
-    0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06,
-    0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02,
-    0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b,
-    0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea,
-    0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
-    0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85,
-    0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e,
-    0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89,
-    0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b,
-    0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20,
-    0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
-    0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31,
-    0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f,
-    0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d,
-    0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef,
-    0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0,
-    0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
-    0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26,
-    0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d
-};
-
-#define w0(p)          0x000000##p
-
-// Number of elements required in this table for different
-// block and key lengths is:
-//
-// Nk =      4  6  8
-//        ----------
-// Nb = 4 | 10  8  7
-//      6 | 19 12 11
-//      8 | 29 19 14
-//
-// this table can be a table of bytes if the key schedule
-// code is adjusted accordingly
-
-static const u_int32_t rcon_tab[29] =
-{
-    w0(01), w0(02), w0(04), w0(08),
-    w0(10), w0(20), w0(40), w0(80),
-    w0(1b), w0(36), w0(6c), w0(d8),
-    w0(ab), w0(4d), w0(9a), w0(2f),
-    w0(5e), w0(bc), w0(63), w0(c6),
-    w0(97), w0(35), w0(6a), w0(d4),
-    w0(b3), w0(7d), w0(fa), w0(ef),
-    w0(c5)
-};
-
-#undef  w0
-
-#define r0(p,q,r,s) 0x##p##q##r##s
-#define r1(p,q,r,s) 0x##q##r##s##p
-#define r2(p,q,r,s) 0x##r##s##p##q
-#define r3(p,q,r,s) 0x##s##p##q##r
-#define w0(p)          0x000000##p
-#define w1(p)        0x0000##p##00
-#define w2(p)        0x00##p##0000
-#define w3(p)        0x##p##000000
-
-#if defined(FIXED_TABLES) && (defined(ONE_TABLE) || defined(FOUR_TABLES)) 
-
-//  data for forward tables (other than last round)
-
-#define f_table \
-    r(a5,63,63,c6), r(84,7c,7c,f8), r(99,77,77,ee), r(8d,7b,7b,f6),\
-    r(0d,f2,f2,ff), r(bd,6b,6b,d6), r(b1,6f,6f,de), r(54,c5,c5,91),\
-    r(50,30,30,60), r(03,01,01,02), r(a9,67,67,ce), r(7d,2b,2b,56),\
-    r(19,fe,fe,e7), r(62,d7,d7,b5), r(e6,ab,ab,4d), r(9a,76,76,ec),\
-    r(45,ca,ca,8f), r(9d,82,82,1f), r(40,c9,c9,89), r(87,7d,7d,fa),\
-    r(15,fa,fa,ef), r(eb,59,59,b2), r(c9,47,47,8e), r(0b,f0,f0,fb),\
-    r(ec,ad,ad,41), r(67,d4,d4,b3), r(fd,a2,a2,5f), r(ea,af,af,45),\
-    r(bf,9c,9c,23), r(f7,a4,a4,53), r(96,72,72,e4), r(5b,c0,c0,9b),\
-    r(c2,b7,b7,75), r(1c,fd,fd,e1), r(ae,93,93,3d), r(6a,26,26,4c),\
-    r(5a,36,36,6c), r(41,3f,3f,7e), r(02,f7,f7,f5), r(4f,cc,cc,83),\
-    r(5c,34,34,68), r(f4,a5,a5,51), r(34,e5,e5,d1), r(08,f1,f1,f9),\
-    r(93,71,71,e2), r(73,d8,d8,ab), r(53,31,31,62), r(3f,15,15,2a),\
-    r(0c,04,04,08), r(52,c7,c7,95), r(65,23,23,46), r(5e,c3,c3,9d),\
-    r(28,18,18,30), r(a1,96,96,37), r(0f,05,05,0a), r(b5,9a,9a,2f),\
-    r(09,07,07,0e), r(36,12,12,24), r(9b,80,80,1b), r(3d,e2,e2,df),\
-    r(26,eb,eb,cd), r(69,27,27,4e), r(cd,b2,b2,7f), r(9f,75,75,ea),\
-    r(1b,09,09,12), r(9e,83,83,1d), r(74,2c,2c,58), r(2e,1a,1a,34),\
-    r(2d,1b,1b,36), r(b2,6e,6e,dc), r(ee,5a,5a,b4), r(fb,a0,a0,5b),\
-    r(f6,52,52,a4), r(4d,3b,3b,76), r(61,d6,d6,b7), r(ce,b3,b3,7d),\
-    r(7b,29,29,52), r(3e,e3,e3,dd), r(71,2f,2f,5e), r(97,84,84,13),\
-    r(f5,53,53,a6), r(68,d1,d1,b9), r(00,00,00,00), r(2c,ed,ed,c1),\
-    r(60,20,20,40), r(1f,fc,fc,e3), r(c8,b1,b1,79), r(ed,5b,5b,b6),\
-    r(be,6a,6a,d4), r(46,cb,cb,8d), r(d9,be,be,67), r(4b,39,39,72),\
-    r(de,4a,4a,94), r(d4,4c,4c,98), r(e8,58,58,b0), r(4a,cf,cf,85),\
-    r(6b,d0,d0,bb), r(2a,ef,ef,c5), r(e5,aa,aa,4f), r(16,fb,fb,ed),\
-    r(c5,43,43,86), r(d7,4d,4d,9a), r(55,33,33,66), r(94,85,85,11),\
-    r(cf,45,45,8a), r(10,f9,f9,e9), r(06,02,02,04), r(81,7f,7f,fe),\
-    r(f0,50,50,a0), r(44,3c,3c,78), r(ba,9f,9f,25), r(e3,a8,a8,4b),\
-    r(f3,51,51,a2), r(fe,a3,a3,5d), r(c0,40,40,80), r(8a,8f,8f,05),\
-    r(ad,92,92,3f), r(bc,9d,9d,21), r(48,38,38,70), r(04,f5,f5,f1),\
-    r(df,bc,bc,63), r(c1,b6,b6,77), r(75,da,da,af), r(63,21,21,42),\
-    r(30,10,10,20), r(1a,ff,ff,e5), r(0e,f3,f3,fd), r(6d,d2,d2,bf),\
-    r(4c,cd,cd,81), r(14,0c,0c,18), r(35,13,13,26), r(2f,ec,ec,c3),\
-    r(e1,5f,5f,be), r(a2,97,97,35), r(cc,44,44,88), r(39,17,17,2e),\
-    r(57,c4,c4,93), r(f2,a7,a7,55), r(82,7e,7e,fc), r(47,3d,3d,7a),\
-    r(ac,64,64,c8), r(e7,5d,5d,ba), r(2b,19,19,32), r(95,73,73,e6),\
-    r(a0,60,60,c0), r(98,81,81,19), r(d1,4f,4f,9e), r(7f,dc,dc,a3),\
-    r(66,22,22,44), r(7e,2a,2a,54), r(ab,90,90,3b), r(83,88,88,0b),\
-    r(ca,46,46,8c), r(29,ee,ee,c7), r(d3,b8,b8,6b), r(3c,14,14,28),\
-    r(79,de,de,a7), r(e2,5e,5e,bc), r(1d,0b,0b,16), r(76,db,db,ad),\
-    r(3b,e0,e0,db), r(56,32,32,64), r(4e,3a,3a,74), r(1e,0a,0a,14),\
-    r(db,49,49,92), r(0a,06,06,0c), r(6c,24,24,48), r(e4,5c,5c,b8),\
-    r(5d,c2,c2,9f), r(6e,d3,d3,bd), r(ef,ac,ac,43), r(a6,62,62,c4),\
-    r(a8,91,91,39), r(a4,95,95,31), r(37,e4,e4,d3), r(8b,79,79,f2),\
-    r(32,e7,e7,d5), r(43,c8,c8,8b), r(59,37,37,6e), r(b7,6d,6d,da),\
-    r(8c,8d,8d,01), r(64,d5,d5,b1), r(d2,4e,4e,9c), r(e0,a9,a9,49),\
-    r(b4,6c,6c,d8), r(fa,56,56,ac), r(07,f4,f4,f3), r(25,ea,ea,cf),\
-    r(af,65,65,ca), r(8e,7a,7a,f4), r(e9,ae,ae,47), r(18,08,08,10),\
-    r(d5,ba,ba,6f), r(88,78,78,f0), r(6f,25,25,4a), r(72,2e,2e,5c),\
-    r(24,1c,1c,38), r(f1,a6,a6,57), r(c7,b4,b4,73), r(51,c6,c6,97),\
-    r(23,e8,e8,cb), r(7c,dd,dd,a1), r(9c,74,74,e8), r(21,1f,1f,3e),\
-    r(dd,4b,4b,96), r(dc,bd,bd,61), r(86,8b,8b,0d), r(85,8a,8a,0f),\
-    r(90,70,70,e0), r(42,3e,3e,7c), r(c4,b5,b5,71), r(aa,66,66,cc),\
-    r(d8,48,48,90), r(05,03,03,06), r(01,f6,f6,f7), r(12,0e,0e,1c),\
-    r(a3,61,61,c2), r(5f,35,35,6a), r(f9,57,57,ae), r(d0,b9,b9,69),\
-    r(91,86,86,17), r(58,c1,c1,99), r(27,1d,1d,3a), r(b9,9e,9e,27),\
-    r(38,e1,e1,d9), r(13,f8,f8,eb), r(b3,98,98,2b), r(33,11,11,22),\
-    r(bb,69,69,d2), r(70,d9,d9,a9), r(89,8e,8e,07), r(a7,94,94,33),\
-    r(b6,9b,9b,2d), r(22,1e,1e,3c), r(92,87,87,15), r(20,e9,e9,c9),\
-    r(49,ce,ce,87), r(ff,55,55,aa), r(78,28,28,50), r(7a,df,df,a5),\
-    r(8f,8c,8c,03), r(f8,a1,a1,59), r(80,89,89,09), r(17,0d,0d,1a),\
-    r(da,bf,bf,65), r(31,e6,e6,d7), r(c6,42,42,84), r(b8,68,68,d0),\
-    r(c3,41,41,82), r(b0,99,99,29), r(77,2d,2d,5a), r(11,0f,0f,1e),\
-    r(cb,b0,b0,7b), r(fc,54,54,a8), r(d6,bb,bb,6d), r(3a,16,16,2c)
-
-//  data for inverse tables (other than last round)
-
-#define i_table \
-    r(50,a7,f4,51), r(53,65,41,7e), r(c3,a4,17,1a), r(96,5e,27,3a),\
-    r(cb,6b,ab,3b), r(f1,45,9d,1f), r(ab,58,fa,ac), r(93,03,e3,4b),\
-    r(55,fa,30,20), r(f6,6d,76,ad), r(91,76,cc,88), r(25,4c,02,f5),\
-    r(fc,d7,e5,4f), r(d7,cb,2a,c5), r(80,44,35,26), r(8f,a3,62,b5),\
-    r(49,5a,b1,de), r(67,1b,ba,25), r(98,0e,ea,45), r(e1,c0,fe,5d),\
-    r(02,75,2f,c3), r(12,f0,4c,81), r(a3,97,46,8d), r(c6,f9,d3,6b),\
-    r(e7,5f,8f,03), r(95,9c,92,15), r(eb,7a,6d,bf), r(da,59,52,95),\
-    r(2d,83,be,d4), r(d3,21,74,58), r(29,69,e0,49), r(44,c8,c9,8e),\
-    r(6a,89,c2,75), r(78,79,8e,f4), r(6b,3e,58,99), r(dd,71,b9,27),\
-    r(b6,4f,e1,be), r(17,ad,88,f0), r(66,ac,20,c9), r(b4,3a,ce,7d),\
-    r(18,4a,df,63), r(82,31,1a,e5), r(60,33,51,97), r(45,7f,53,62),\
-    r(e0,77,64,b1), r(84,ae,6b,bb), r(1c,a0,81,fe), r(94,2b,08,f9),\
-    r(58,68,48,70), r(19,fd,45,8f), r(87,6c,de,94), r(b7,f8,7b,52),\
-    r(23,d3,73,ab), r(e2,02,4b,72), r(57,8f,1f,e3), r(2a,ab,55,66),\
-    r(07,28,eb,b2), r(03,c2,b5,2f), r(9a,7b,c5,86), r(a5,08,37,d3),\
-    r(f2,87,28,30), r(b2,a5,bf,23), r(ba,6a,03,02), r(5c,82,16,ed),\
-    r(2b,1c,cf,8a), r(92,b4,79,a7), r(f0,f2,07,f3), r(a1,e2,69,4e),\
-    r(cd,f4,da,65), r(d5,be,05,06), r(1f,62,34,d1), r(8a,fe,a6,c4),\
-    r(9d,53,2e,34), r(a0,55,f3,a2), r(32,e1,8a,05), r(75,eb,f6,a4),\
-    r(39,ec,83,0b), r(aa,ef,60,40), r(06,9f,71,5e), r(51,10,6e,bd),\
-    r(f9,8a,21,3e), r(3d,06,dd,96), r(ae,05,3e,dd), r(46,bd,e6,4d),\
-    r(b5,8d,54,91), r(05,5d,c4,71), r(6f,d4,06,04), r(ff,15,50,60),\
-    r(24,fb,98,19), r(97,e9,bd,d6), r(cc,43,40,89), r(77,9e,d9,67),\
-    r(bd,42,e8,b0), r(88,8b,89,07), r(38,5b,19,e7), r(db,ee,c8,79),\
-    r(47,0a,7c,a1), r(e9,0f,42,7c), r(c9,1e,84,f8), r(00,00,00,00),\
-    r(83,86,80,09), r(48,ed,2b,32), r(ac,70,11,1e), r(4e,72,5a,6c),\
-    r(fb,ff,0e,fd), r(56,38,85,0f), r(1e,d5,ae,3d), r(27,39,2d,36),\
-    r(64,d9,0f,0a), r(21,a6,5c,68), r(d1,54,5b,9b), r(3a,2e,36,24),\
-    r(b1,67,0a,0c), r(0f,e7,57,93), r(d2,96,ee,b4), r(9e,91,9b,1b),\
-    r(4f,c5,c0,80), r(a2,20,dc,61), r(69,4b,77,5a), r(16,1a,12,1c),\
-    r(0a,ba,93,e2), r(e5,2a,a0,c0), r(43,e0,22,3c), r(1d,17,1b,12),\
-    r(0b,0d,09,0e), r(ad,c7,8b,f2), r(b9,a8,b6,2d), r(c8,a9,1e,14),\
-    r(85,19,f1,57), r(4c,07,75,af), r(bb,dd,99,ee), r(fd,60,7f,a3),\
-    r(9f,26,01,f7), r(bc,f5,72,5c), r(c5,3b,66,44), r(34,7e,fb,5b),\
-    r(76,29,43,8b), r(dc,c6,23,cb), r(68,fc,ed,b6), r(63,f1,e4,b8),\
-    r(ca,dc,31,d7), r(10,85,63,42), r(40,22,97,13), r(20,11,c6,84),\
-    r(7d,24,4a,85), r(f8,3d,bb,d2), r(11,32,f9,ae), r(6d,a1,29,c7),\
-    r(4b,2f,9e,1d), r(f3,30,b2,dc), r(ec,52,86,0d), r(d0,e3,c1,77),\
-    r(6c,16,b3,2b), r(99,b9,70,a9), r(fa,48,94,11), r(22,64,e9,47),\
-    r(c4,8c,fc,a8), r(1a,3f,f0,a0), r(d8,2c,7d,56), r(ef,90,33,22),\
-    r(c7,4e,49,87), r(c1,d1,38,d9), r(fe,a2,ca,8c), r(36,0b,d4,98),\
-    r(cf,81,f5,a6), r(28,de,7a,a5), r(26,8e,b7,da), r(a4,bf,ad,3f),\
-    r(e4,9d,3a,2c), r(0d,92,78,50), r(9b,cc,5f,6a), r(62,46,7e,54),\
-    r(c2,13,8d,f6), r(e8,b8,d8,90), r(5e,f7,39,2e), r(f5,af,c3,82),\
-    r(be,80,5d,9f), r(7c,93,d0,69), r(a9,2d,d5,6f), r(b3,12,25,cf),\
-    r(3b,99,ac,c8), r(a7,7d,18,10), r(6e,63,9c,e8), r(7b,bb,3b,db),\
-    r(09,78,26,cd), r(f4,18,59,6e), r(01,b7,9a,ec), r(a8,9a,4f,83),\
-    r(65,6e,95,e6), r(7e,e6,ff,aa), r(08,cf,bc,21), r(e6,e8,15,ef),\
-    r(d9,9b,e7,ba), r(ce,36,6f,4a), r(d4,09,9f,ea), r(d6,7c,b0,29),\
-    r(af,b2,a4,31), r(31,23,3f,2a), r(30,94,a5,c6), r(c0,66,a2,35),\
-    r(37,bc,4e,74), r(a6,ca,82,fc), r(b0,d0,90,e0), r(15,d8,a7,33),\
-    r(4a,98,04,f1), r(f7,da,ec,41), r(0e,50,cd,7f), r(2f,f6,91,17),\
-    r(8d,d6,4d,76), r(4d,b0,ef,43), r(54,4d,aa,cc), r(df,04,96,e4),\
-    r(e3,b5,d1,9e), r(1b,88,6a,4c), r(b8,1f,2c,c1), r(7f,51,65,46),\
-    r(04,ea,5e,9d), r(5d,35,8c,01), r(73,74,87,fa), r(2e,41,0b,fb),\
-    r(5a,1d,67,b3), r(52,d2,db,92), r(33,56,10,e9), r(13,47,d6,6d),\
-    r(8c,61,d7,9a), r(7a,0c,a1,37), r(8e,14,f8,59), r(89,3c,13,eb),\
-    r(ee,27,a9,ce), r(35,c9,61,b7), r(ed,e5,1c,e1), r(3c,b1,47,7a),\
-    r(59,df,d2,9c), r(3f,73,f2,55), r(79,ce,14,18), r(bf,37,c7,73),\
-    r(ea,cd,f7,53), r(5b,aa,fd,5f), r(14,6f,3d,df), r(86,db,44,78),\
-    r(81,f3,af,ca), r(3e,c4,68,b9), r(2c,34,24,38), r(5f,40,a3,c2),\
-    r(72,c3,1d,16), r(0c,25,e2,bc), r(8b,49,3c,28), r(41,95,0d,ff),\
-    r(71,01,a8,39), r(de,b3,0c,08), r(9c,e4,b4,d8), r(90,c1,56,64),\
-    r(61,84,cb,7b), r(70,b6,32,d5), r(74,5c,6c,48), r(42,57,b8,d0)
-
-// generate the required tables in the desired endian format
-
-#undef  r
-#define r   r0
-
-#if defined(ONE_TABLE)
-static const u_int32_t ft_tab[256] =
-    {   f_table };
-#elif defined(FOUR_TABLES)
-static const u_int32_t ft_tab[4][256] =
-{   {   f_table },
-#undef  r
-#define r   r1
-    {   f_table },
-#undef  r
-#define r   r2
-    {   f_table },
-#undef  r
-#define r   r3
-    {   f_table }
-};
-#endif
-
-#undef  r
-#define r   r0
-#if defined(ONE_TABLE)
-static const u_int32_t it_tab[256] =
-    {   i_table };
-#elif defined(FOUR_TABLES)
-static const u_int32_t it_tab[4][256] =
-{   {   i_table },
-#undef  r
-#define r   r1
-    {   i_table },
-#undef  r
-#define r   r2
-    {   i_table },
-#undef  r
-#define r   r3
-    {   i_table }
-};
-#endif
-
-#endif
-
-#if defined(FIXED_TABLES) && (defined(ONE_LR_TABLE) || defined(FOUR_LR_TABLES)) 
-
-//  data for inverse tables (last round)
-
-#define li_table    \
-    w(52), w(09), w(6a), w(d5), w(30), w(36), w(a5), w(38),\
-    w(bf), w(40), w(a3), w(9e), w(81), w(f3), w(d7), w(fb),\
-    w(7c), w(e3), w(39), w(82), w(9b), w(2f), w(ff), w(87),\
-    w(34), w(8e), w(43), w(44), w(c4), w(de), w(e9), w(cb),\
-    w(54), w(7b), w(94), w(32), w(a6), w(c2), w(23), w(3d),\
-    w(ee), w(4c), w(95), w(0b), w(42), w(fa), w(c3), w(4e),\
-    w(08), w(2e), w(a1), w(66), w(28), w(d9), w(24), w(b2),\
-    w(76), w(5b), w(a2), w(49), w(6d), w(8b), w(d1), w(25),\
-    w(72), w(f8), w(f6), w(64), w(86), w(68), w(98), w(16),\
-    w(d4), w(a4), w(5c), w(cc), w(5d), w(65), w(b6), w(92),\
-    w(6c), w(70), w(48), w(50), w(fd), w(ed), w(b9), w(da),\
-    w(5e), w(15), w(46), w(57), w(a7), w(8d), w(9d), w(84),\
-    w(90), w(d8), w(ab), w(00), w(8c), w(bc), w(d3), w(0a),\
-    w(f7), w(e4), w(58), w(05), w(b8), w(b3), w(45), w(06),\
-    w(d0), w(2c), w(1e), w(8f), w(ca), w(3f), w(0f), w(02),\
-    w(c1), w(af), w(bd), w(03), w(01), w(13), w(8a), w(6b),\
-    w(3a), w(91), w(11), w(41), w(4f), w(67), w(dc), w(ea),\
-    w(97), w(f2), w(cf), w(ce), w(f0), w(b4), w(e6), w(73),\
-    w(96), w(ac), w(74), w(22), w(e7), w(ad), w(35), w(85),\
-    w(e2), w(f9), w(37), w(e8), w(1c), w(75), w(df), w(6e),\
-    w(47), w(f1), w(1a), w(71), w(1d), w(29), w(c5), w(89),\
-    w(6f), w(b7), w(62), w(0e), w(aa), w(18), w(be), w(1b),\
-    w(fc), w(56), w(3e), w(4b), w(c6), w(d2), w(79), w(20),\
-    w(9a), w(db), w(c0), w(fe), w(78), w(cd), w(5a), w(f4),\
-    w(1f), w(dd), w(a8), w(33), w(88), w(07), w(c7), w(31),\
-    w(b1), w(12), w(10), w(59), w(27), w(80), w(ec), w(5f),\
-    w(60), w(51), w(7f), w(a9), w(19), w(b5), w(4a), w(0d),\
-    w(2d), w(e5), w(7a), w(9f), w(93), w(c9), w(9c), w(ef),\
-    w(a0), w(e0), w(3b), w(4d), w(ae), w(2a), w(f5), w(b0),\
-    w(c8), w(eb), w(bb), w(3c), w(83), w(53), w(99), w(61),\
-    w(17), w(2b), w(04), w(7e), w(ba), w(77), w(d6), w(26),\
-    w(e1), w(69), w(14), w(63), w(55), w(21), w(0c), w(7d),
-
-// generate the required tables in the desired endian format
-
-#undef  r
-#define r(p,q,r,s)  w0(q)
-#if defined(ONE_LR_TABLE)
-static const u_int32_t fl_tab[256] =
-    {   f_table     };
-#elif defined(FOUR_LR_TABLES)
-static const u_int32_t fl_tab[4][256] =
-{   {   f_table    },
-#undef  r
-#define r(p,q,r,s)   w1(q)
-    {   f_table    },
-#undef  r
-#define r(p,q,r,s)   w2(q)
-    {   f_table    },
-#undef  r
-#define r(p,q,r,s)   w3(q)
-    {   f_table    }
-};
-#endif
-
-#undef  w
-#define w   w0
-#if defined(ONE_LR_TABLE)
-static const u_int32_t il_tab[256] =
-    {   li_table    };
-#elif defined(FOUR_LR_TABLES)
-static const u_int32_t il_tab[4][256] =
-{   {   li_table    },
-#undef  w
-#define w   w1
-    {   li_table    },
-#undef  w
-#define w   w2
-    {   li_table    },
-#undef  w
-#define w   w3
-    {   li_table    }
-};
-#endif
-
-#endif
-
-#if defined(FIXED_TABLES) && (defined(ONE_IM_TABLE) || defined(FOUR_IM_TABLES)) 
-
-#define m_table \
-    r(00,00,00,00), r(0b,0d,09,0e), r(16,1a,12,1c), r(1d,17,1b,12),\
-    r(2c,34,24,38), r(27,39,2d,36), r(3a,2e,36,24), r(31,23,3f,2a),\
-    r(58,68,48,70), r(53,65,41,7e), r(4e,72,5a,6c), r(45,7f,53,62),\
-    r(74,5c,6c,48), r(7f,51,65,46), r(62,46,7e,54), r(69,4b,77,5a),\
-    r(b0,d0,90,e0), r(bb,dd,99,ee), r(a6,ca,82,fc), r(ad,c7,8b,f2),\
-    r(9c,e4,b4,d8), r(97,e9,bd,d6), r(8a,fe,a6,c4), r(81,f3,af,ca),\
-    r(e8,b8,d8,90), r(e3,b5,d1,9e), r(fe,a2,ca,8c), r(f5,af,c3,82),\
-    r(c4,8c,fc,a8), r(cf,81,f5,a6), r(d2,96,ee,b4), r(d9,9b,e7,ba),\
-    r(7b,bb,3b,db), r(70,b6,32,d5), r(6d,a1,29,c7), r(66,ac,20,c9),\
-    r(57,8f,1f,e3), r(5c,82,16,ed), r(41,95,0d,ff), r(4a,98,04,f1),\
-    r(23,d3,73,ab), r(28,de,7a,a5), r(35,c9,61,b7), r(3e,c4,68,b9),\
-    r(0f,e7,57,93), r(04,ea,5e,9d), r(19,fd,45,8f), r(12,f0,4c,81),\
-    r(cb,6b,ab,3b), r(c0,66,a2,35), r(dd,71,b9,27), r(d6,7c,b0,29),\
-    r(e7,5f,8f,03), r(ec,52,86,0d), r(f1,45,9d,1f), r(fa,48,94,11),\
-    r(93,03,e3,4b), r(98,0e,ea,45), r(85,19,f1,57), r(8e,14,f8,59),\
-    r(bf,37,c7,73), r(b4,3a,ce,7d), r(a9,2d,d5,6f), r(a2,20,dc,61),\
-    r(f6,6d,76,ad), r(fd,60,7f,a3), r(e0,77,64,b1), r(eb,7a,6d,bf),\
-    r(da,59,52,95), r(d1,54,5b,9b), r(cc,43,40,89), r(c7,4e,49,87),\
-    r(ae,05,3e,dd), r(a5,08,37,d3), r(b8,1f,2c,c1), r(b3,12,25,cf),\
-    r(82,31,1a,e5), r(89,3c,13,eb), r(94,2b,08,f9), r(9f,26,01,f7),\
-    r(46,bd,e6,4d), r(4d,b0,ef,43), r(50,a7,f4,51), r(5b,aa,fd,5f),\
-    r(6a,89,c2,75), r(61,84,cb,7b), r(7c,93,d0,69), r(77,9e,d9,67),\
-    r(1e,d5,ae,3d), r(15,d8,a7,33), r(08,cf,bc,21), r(03,c2,b5,2f),\
-    r(32,e1,8a,05), r(39,ec,83,0b), r(24,fb,98,19), r(2f,f6,91,17),\
-    r(8d,d6,4d,76), r(86,db,44,78), r(9b,cc,5f,6a), r(90,c1,56,64),\
-    r(a1,e2,69,4e), r(aa,ef,60,40), r(b7,f8,7b,52), r(bc,f5,72,5c),\
-    r(d5,be,05,06), r(de,b3,0c,08), r(c3,a4,17,1a), r(c8,a9,1e,14),\
-    r(f9,8a,21,3e), r(f2,87,28,30), r(ef,90,33,22), r(e4,9d,3a,2c),\
-    r(3d,06,dd,96), r(36,0b,d4,98), r(2b,1c,cf,8a), r(20,11,c6,84),\
-    r(11,32,f9,ae), r(1a,3f,f0,a0), r(07,28,eb,b2), r(0c,25,e2,bc),\
-    r(65,6e,95,e6), r(6e,63,9c,e8), r(73,74,87,fa), r(78,79,8e,f4),\
-    r(49,5a,b1,de), r(42,57,b8,d0), r(5f,40,a3,c2), r(54,4d,aa,cc),\
-    r(f7,da,ec,41), r(fc,d7,e5,4f), r(e1,c0,fe,5d), r(ea,cd,f7,53),\
-    r(db,ee,c8,79), r(d0,e3,c1,77), r(cd,f4,da,65), r(c6,f9,d3,6b),\
-    r(af,b2,a4,31), r(a4,bf,ad,3f), r(b9,a8,b6,2d), r(b2,a5,bf,23),\
-    r(83,86,80,09), r(88,8b,89,07), r(95,9c,92,15), r(9e,91,9b,1b),\
-    r(47,0a,7c,a1), r(4c,07,75,af), r(51,10,6e,bd), r(5a,1d,67,b3),\
-    r(6b,3e,58,99), r(60,33,51,97), r(7d,24,4a,85), r(76,29,43,8b),\
-    r(1f,62,34,d1), r(14,6f,3d,df), r(09,78,26,cd), r(02,75,2f,c3),\
-    r(33,56,10,e9), r(38,5b,19,e7), r(25,4c,02,f5), r(2e,41,0b,fb),\
-    r(8c,61,d7,9a), r(87,6c,de,94), r(9a,7b,c5,86), r(91,76,cc,88),\
-    r(a0,55,f3,a2), r(ab,58,fa,ac), r(b6,4f,e1,be), r(bd,42,e8,b0),\
-    r(d4,09,9f,ea), r(df,04,96,e4), r(c2,13,8d,f6), r(c9,1e,84,f8),\
-    r(f8,3d,bb,d2), r(f3,30,b2,dc), r(ee,27,a9,ce), r(e5,2a,a0,c0),\
-    r(3c,b1,47,7a), r(37,bc,4e,74), r(2a,ab,55,66), r(21,a6,5c,68),\
-    r(10,85,63,42), r(1b,88,6a,4c), r(06,9f,71,5e), r(0d,92,78,50),\
-    r(64,d9,0f,0a), r(6f,d4,06,04), r(72,c3,1d,16), r(79,ce,14,18),\
-    r(48,ed,2b,32), r(43,e0,22,3c), r(5e,f7,39,2e), r(55,fa,30,20),\
-    r(01,b7,9a,ec), r(0a,ba,93,e2), r(17,ad,88,f0), r(1c,a0,81,fe),\
-    r(2d,83,be,d4), r(26,8e,b7,da), r(3b,99,ac,c8), r(30,94,a5,c6),\
-    r(59,df,d2,9c), r(52,d2,db,92), r(4f,c5,c0,80), r(44,c8,c9,8e),\
-    r(75,eb,f6,a4), r(7e,e6,ff,aa), r(63,f1,e4,b8), r(68,fc,ed,b6),\
-    r(b1,67,0a,0c), r(ba,6a,03,02), r(a7,7d,18,10), r(ac,70,11,1e),\
-    r(9d,53,2e,34), r(96,5e,27,3a), r(8b,49,3c,28), r(80,44,35,26),\
-    r(e9,0f,42,7c), r(e2,02,4b,72), r(ff,15,50,60), r(f4,18,59,6e),\
-    r(c5,3b,66,44), r(ce,36,6f,4a), r(d3,21,74,58), r(d8,2c,7d,56),\
-    r(7a,0c,a1,37), r(71,01,a8,39), r(6c,16,b3,2b), r(67,1b,ba,25),\
-    r(56,38,85,0f), r(5d,35,8c,01), r(40,22,97,13), r(4b,2f,9e,1d),\
-    r(22,64,e9,47), r(29,69,e0,49), r(34,7e,fb,5b), r(3f,73,f2,55),\
-    r(0e,50,cd,7f), r(05,5d,c4,71), r(18,4a,df,63), r(13,47,d6,6d),\
-    r(ca,dc,31,d7), r(c1,d1,38,d9), r(dc,c6,23,cb), r(d7,cb,2a,c5),\
-    r(e6,e8,15,ef), r(ed,e5,1c,e1), r(f0,f2,07,f3), r(fb,ff,0e,fd),\
-    r(92,b4,79,a7), r(99,b9,70,a9), r(84,ae,6b,bb), r(8f,a3,62,b5),\
-    r(be,80,5d,9f), r(b5,8d,54,91), r(a8,9a,4f,83), r(a3,97,46,8d)
-
-#undef r
-#define r   r0
-
-#if defined(ONE_IM_TABLE)
-static const u_int32_t im_tab[256] =
-    {   m_table };
-#elif defined(FOUR_IM_TABLES)
-static const u_int32_t im_tab[4][256] =
-{   {   m_table },
-#undef  r
-#define r   r1
-    {   m_table },
-#undef  r
-#define r   r2
-    {   m_table },
-#undef  r
-#define r   r3
-    {   m_table }
-};
-#endif
-
-#endif
-
-#else
-
-static int tab_gen = 0;
-
-static unsigned char  s_box[256];            // the S box
-static unsigned char  inv_s_box[256];        // the inverse S box
-static u_int32_t  rcon_tab[AES_RC_LENGTH];   // table of round constants
-
-#if defined(ONE_TABLE)
-static u_int32_t  ft_tab[256];
-static u_int32_t  it_tab[256];
-#elif defined(FOUR_TABLES)
-static u_int32_t  ft_tab[4][256];
-static u_int32_t  it_tab[4][256];
-#endif
-
-#if defined(ONE_LR_TABLE)
-static u_int32_t  fl_tab[256];
-static u_int32_t  il_tab[256];
-#elif defined(FOUR_LR_TABLES)
-static u_int32_t  fl_tab[4][256];
-static u_int32_t  il_tab[4][256];
-#endif
-
-#if defined(ONE_IM_TABLE)
-static u_int32_t  im_tab[256];
-#elif defined(FOUR_IM_TABLES)
-static u_int32_t  im_tab[4][256];
-#endif
-
-// Generate the tables for the dynamic table option
-
-#if !defined(FF_TABLES)
-
-// It will generally be sensible to use tables to compute finite 
-// field multiplies and inverses but where memory is scarse this 
-// code might sometimes be better.
-
-// return 2 ^ (n - 1) where n is the bit number of the highest bit
-// set in x with x in the range 1 < x < 0x00000200.   This form is
-// used so that locals within FFinv can be bytes rather than words
-
-static unsigned char hibit(const u_int32_t x)
-{   unsigned char r = (unsigned char)((x >> 1) | (x >> 2));
-    
-    r |= (r >> 2);
-    r |= (r >> 4);
-    return (r + 1) >> 1;
-}
-
-// return the inverse of the finite field element x
-
-static unsigned char FFinv(const unsigned char x)
-{   unsigned char    p1 = x, p2 = 0x1b, n1 = hibit(x), n2 = 0x80, v1 = 1, v2 = 0;
-
-    if(x < 2) return x;
-
-    for(;;)
-    {
-        if(!n1) return v1;
-
-        while(n2 >= n1)
-        {   
-            n2 /= n1; p2 ^= p1 * n2; v2 ^= v1 * n2; n2 = hibit(p2);
-        }
-        
-        if(!n2) return v2;
-
-        while(n1 >= n2)
-        {   
-            n1 /= n2; p1 ^= p2 * n1; v1 ^= v2 * n1; n1 = hibit(p1);
-        }
-    }
-}
-
-// define the finite field multiplies required for Rijndael
-
-#define FFmul02(x)  ((((x) & 0x7f) << 1) ^ ((x) & 0x80 ? 0x1b : 0))
-#define FFmul03(x)  ((x) ^ FFmul02(x))
-#define FFmul09(x)  ((x) ^ FFmul02(FFmul02(FFmul02(x))))
-#define FFmul0b(x)  ((x) ^ FFmul02((x) ^ FFmul02(FFmul02(x))))
-#define FFmul0d(x)  ((x) ^ FFmul02(FFmul02((x) ^ FFmul02(x))))
-#define FFmul0e(x)  FFmul02((x) ^ FFmul02((x) ^ FFmul02(x)))
-
-#else
-
-#define FFinv(x)    ((x) ? pow[255 - log[x]]: 0)
-
-#define FFmul02(x) (x ? pow[log[x] + 0x19] : 0)
-#define FFmul03(x) (x ? pow[log[x] + 0x01] : 0)
-#define FFmul09(x) (x ? pow[log[x] + 0xc7] : 0)
-#define FFmul0b(x) (x ? pow[log[x] + 0x68] : 0)
-#define FFmul0d(x) (x ? pow[log[x] + 0xee] : 0)
-#define FFmul0e(x) (x ? pow[log[x] + 0xdf] : 0)
-
-#endif
-
-// The forward and inverse affine transformations used in the S-box
-
-#define fwd_affine(x) \
-    (w = (u_int32_t)x, w ^= (w<<1)^(w<<2)^(w<<3)^(w<<4), 0x63^(unsigned char)(w^(w>>8)))
-
-#define inv_affine(x) \
-    (w = (u_int32_t)x, w = (w<<1)^(w<<3)^(w<<6), 0x05^(unsigned char)(w^(w>>8)))
-
-static void gen_tabs(void)
-{   u_int32_t  i, w;
-
-#if defined(FF_TABLES)
-
-    unsigned char  pow[512], log[256];
-
-    // log and power tables for GF(2^8) finite field with
-    // 0x011b as modular polynomial - the simplest primitive
-    // root is 0x03, used here to generate the tables
-
-    i = 0; w = 1; 
-    do
-    {   
-        pow[i] = (unsigned char)w;
-        pow[i + 255] = (unsigned char)w;
-        log[w] = (unsigned char)i++;
-        w ^=  (w << 1) ^ (w & ff_hi ? ff_poly : 0);
-    }
-    while (w != 1);
-
-#endif
-
-    for(i = 0, w = 1; i < AES_RC_LENGTH; ++i)
-    {
-        rcon_tab[i] = bytes2word(w, 0, 0, 0);
-        w = (w << 1) ^ (w & ff_hi ? ff_poly : 0);
-    }
-
-    for(i = 0; i < 256; ++i)
-    {   unsigned char    b;
-
-        s_box[i] = b = fwd_affine(FFinv((unsigned char)i));
-
-        w = bytes2word(b, 0, 0, 0);
-#if defined(ONE_LR_TABLE)
-        fl_tab[i] = w;
-#elif defined(FOUR_LR_TABLES)
-        fl_tab[0][i] = w;
-        fl_tab[1][i] = upr(w,1);
-        fl_tab[2][i] = upr(w,2);
-        fl_tab[3][i] = upr(w,3);
-#endif
-        w = bytes2word(FFmul02(b), b, b, FFmul03(b));
-#if defined(ONE_TABLE)
-        ft_tab[i] = w;
-#elif defined(FOUR_TABLES)
-        ft_tab[0][i] = w;
-        ft_tab[1][i] = upr(w,1);
-        ft_tab[2][i] = upr(w,2);
-        ft_tab[3][i] = upr(w,3);
-#endif
-        inv_s_box[i] = b = FFinv(inv_affine((unsigned char)i));
-
-        w = bytes2word(b, 0, 0, 0);
-#if defined(ONE_LR_TABLE)
-        il_tab[i] = w;
-#elif defined(FOUR_LR_TABLES)
-        il_tab[0][i] = w;
-        il_tab[1][i] = upr(w,1);
-        il_tab[2][i] = upr(w,2);
-        il_tab[3][i] = upr(w,3);
-#endif
-        w = bytes2word(FFmul0e(b), FFmul09(b), FFmul0d(b), FFmul0b(b));
-#if defined(ONE_TABLE)
-        it_tab[i] = w;
-#elif defined(FOUR_TABLES)
-        it_tab[0][i] = w;
-        it_tab[1][i] = upr(w,1);
-        it_tab[2][i] = upr(w,2);
-        it_tab[3][i] = upr(w,3);
-#endif
-#if defined(ONE_IM_TABLE)
-        im_tab[b] = w;
-#elif defined(FOUR_IM_TABLES)
-        im_tab[0][b] = w;
-        im_tab[1][b] = upr(w,1);
-        im_tab[2][b] = upr(w,2);
-        im_tab[3][b] = upr(w,3);
-#endif
-
-    }
-}
-
-#endif
-
-#define no_table(x,box,vf,rf,c) bytes2word( \
-    box[bval(vf(x,0,c),rf(0,c))], \
-    box[bval(vf(x,1,c),rf(1,c))], \
-    box[bval(vf(x,2,c),rf(2,c))], \
-    box[bval(vf(x,3,c),rf(3,c))])
-
-#define one_table(x,op,tab,vf,rf,c) \
- (     tab[bval(vf(x,0,c),rf(0,c))] \
-  ^ op(tab[bval(vf(x,1,c),rf(1,c))],1) \
-  ^ op(tab[bval(vf(x,2,c),rf(2,c))],2) \
-  ^ op(tab[bval(vf(x,3,c),rf(3,c))],3))
-
-#define four_tables(x,tab,vf,rf,c) \
- (  tab[0][bval(vf(x,0,c),rf(0,c))] \
-  ^ tab[1][bval(vf(x,1,c),rf(1,c))] \
-  ^ tab[2][bval(vf(x,2,c),rf(2,c))] \
-  ^ tab[3][bval(vf(x,3,c),rf(3,c))])
-
-#define vf1(x,r,c)  (x)
-#define rf1(r,c)    (r)
-#define rf2(r,c)    ((r-c)&3)
-
-#if defined(FOUR_LR_TABLES)
-#define ls_box(x,c)     four_tables(x,fl_tab,vf1,rf2,c)
-#elif defined(ONE_LR_TABLE)
-#define ls_box(x,c)     one_table(x,upr,fl_tab,vf1,rf2,c)
-#else
-#define ls_box(x,c)     no_table(x,s_box,vf1,rf2,c)
-#endif
-
-#if defined(FOUR_IM_TABLES)
-#define inv_mcol(x)     four_tables(x,im_tab,vf1,rf1,0)
-#elif defined(ONE_IM_TABLE)
-#define inv_mcol(x)     one_table(x,upr,im_tab,vf1,rf1,0)
-#else
-#define inv_mcol(x) \
-    (f9 = (x),f2 = FFmulX(f9), f4 = FFmulX(f2), f8 = FFmulX(f4), f9 ^= f8, \
-    f2 ^= f4 ^ f8 ^ upr(f2 ^ f9,3) ^ upr(f4 ^ f9,2) ^ upr(f9,1))
-#endif
-
-// Subroutine to set the block size (if variable) in bytes, legal
-// values being 16, 24 and 32.
-
-#if defined(AES_BLOCK_SIZE)
-#define nc   (AES_BLOCK_SIZE / 4)
-#else
-#define nc   (cx->aes_Ncol)
-
-void aes_set_blk(aes_context *cx, int n_bytes)
-{
-#if !defined(FIXED_TABLES)
-    if(!tab_gen) { gen_tabs(); tab_gen = 1; }
-#endif
-
-    switch(n_bytes) {
-    case 32:        /* bytes */
-    case 256:       /* bits */
-        nc = 8;
-        break;
-    case 24:        /* bytes */
-    case 192:       /* bits */
-        nc = 6;
-        break;
-    case 16:        /* bytes */
-    case 128:       /* bits */
-    default:
-        nc = 4;
-        break;
-    }
-}
-
-#endif
-
-// Initialise the key schedule from the user supplied key. The key
-// length is now specified in bytes - 16, 24 or 32 as appropriate.
-// This corresponds to bit lengths of 128, 192 and 256 bits, and
-// to Nk values of 4, 6 and 8 respectively.
-
-#define mx(t,f) (*t++ = inv_mcol(*f),f++)
-#define cp(t,f) *t++ = *f++
-
-#if   AES_BLOCK_SIZE == 16
-#define cpy(d,s)    cp(d,s); cp(d,s); cp(d,s); cp(d,s)
-#define mix(d,s)    mx(d,s); mx(d,s); mx(d,s); mx(d,s)
-#elif AES_BLOCK_SIZE == 24
-#define cpy(d,s)    cp(d,s); cp(d,s); cp(d,s); cp(d,s); \
-                    cp(d,s); cp(d,s)
-#define mix(d,s)    mx(d,s); mx(d,s); mx(d,s); mx(d,s); \
-                    mx(d,s); mx(d,s)
-#elif AES_BLOCK_SIZE == 32
-#define cpy(d,s)    cp(d,s); cp(d,s); cp(d,s); cp(d,s); \
-                    cp(d,s); cp(d,s); cp(d,s); cp(d,s)
-#define mix(d,s)    mx(d,s); mx(d,s); mx(d,s); mx(d,s); \
-                    mx(d,s); mx(d,s); mx(d,s); mx(d,s)
-#else
-
-#define cpy(d,s) \
-switch(nc) \
-{   case 8: cp(d,s); cp(d,s); \
-    case 6: cp(d,s); cp(d,s); \
-    case 4: cp(d,s); cp(d,s); \
-            cp(d,s); cp(d,s); \
-}
-
-#define mix(d,s) \
-switch(nc) \
-{   case 8: mx(d,s); mx(d,s); \
-    case 6: mx(d,s); mx(d,s); \
-    case 4: mx(d,s); mx(d,s); \
-            mx(d,s); mx(d,s); \
-}
-
-#endif
-
-void aes_set_key(aes_context *cx, const unsigned char in_key[], int n_bytes, const int f)
-{   u_int32_t    *kf, *kt, rci;
-
-#if !defined(FIXED_TABLES)
-    if(!tab_gen) { gen_tabs(); tab_gen = 1; }
-#endif
-
-    switch(n_bytes) {
-    case 32:                    /* bytes */
-    case 256:                   /* bits */
-        cx->aes_Nkey = 8;
-        break;
-    case 24:                    /* bytes */
-    case 192:                   /* bits */
-        cx->aes_Nkey = 6;
-        break;
-    case 16:                    /* bytes */
-    case 128:                   /* bits */
-    default:
-        cx->aes_Nkey = 4;
-        break;
-    }
-
-    cx->aes_Nrnd = (cx->aes_Nkey > nc ? cx->aes_Nkey : nc) + 6; 
-
-    cx->aes_e_key[0] = const_word_in(in_key     );
-    cx->aes_e_key[1] = const_word_in(in_key +  4);
-    cx->aes_e_key[2] = const_word_in(in_key +  8);
-    cx->aes_e_key[3] = const_word_in(in_key + 12);
-
-    kf = cx->aes_e_key; 
-    kt = kf + nc * (cx->aes_Nrnd + 1) - cx->aes_Nkey; 
-    rci = 0;
-
-    switch(cx->aes_Nkey)
-    {
-    case 4: do
-            {   kf[4] = kf[0] ^ ls_box(kf[3],3) ^ rcon_tab[rci++];
-                kf[5] = kf[1] ^ kf[4];
-                kf[6] = kf[2] ^ kf[5];
-                kf[7] = kf[3] ^ kf[6];
-                kf += 4;
-            }
-            while(kf < kt);
-            break;
-
-    case 6: cx->aes_e_key[4] = const_word_in(in_key + 16);
-            cx->aes_e_key[5] = const_word_in(in_key + 20);
-            do
-            {   kf[ 6] = kf[0] ^ ls_box(kf[5],3) ^ rcon_tab[rci++];
-                kf[ 7] = kf[1] ^ kf[ 6];
-                kf[ 8] = kf[2] ^ kf[ 7];
-                kf[ 9] = kf[3] ^ kf[ 8];
-                kf[10] = kf[4] ^ kf[ 9];
-                kf[11] = kf[5] ^ kf[10];
-                kf += 6;
-            }
-            while(kf < kt);
-            break;
-
-    case 8: cx->aes_e_key[4] = const_word_in(in_key + 16);
-            cx->aes_e_key[5] = const_word_in(in_key + 20);
-            cx->aes_e_key[6] = const_word_in(in_key + 24);
-            cx->aes_e_key[7] = const_word_in(in_key + 28);
-            do
-            {   kf[ 8] = kf[0] ^ ls_box(kf[7],3) ^ rcon_tab[rci++];
-                kf[ 9] = kf[1] ^ kf[ 8];
-                kf[10] = kf[2] ^ kf[ 9];
-                kf[11] = kf[3] ^ kf[10];
-                kf[12] = kf[4] ^ ls_box(kf[11],0);
-                kf[13] = kf[5] ^ kf[12];
-                kf[14] = kf[6] ^ kf[13];
-                kf[15] = kf[7] ^ kf[14];
-                kf += 8;
-            }
-            while (kf < kt);
-            break;
-    }
-
-    if(!f)
-    {   u_int32_t    i;
-        
-        kt = cx->aes_d_key + nc * cx->aes_Nrnd;
-        kf = cx->aes_e_key;
-        
-        cpy(kt, kf); kt -= 2 * nc;
-
-        for(i = 1; i < cx->aes_Nrnd; ++i)
-        { 
-#if defined(ONE_TABLE) || defined(FOUR_TABLES)
-#if !defined(ONE_IM_TABLE) && !defined(FOUR_IM_TABLES)
-            u_int32_t    f2, f4, f8, f9;
-#endif
-            mix(kt, kf);
-#else
-            cpy(kt, kf);
-#endif
-            kt -= 2 * nc;
-        }
-        
-        cpy(kt, kf);
-    }
-}
-
-// y = output word, x = input word, r = row, c = column
-// for r = 0, 1, 2 and 3 = column accessed for row r
-
-#if defined(ARRAYS)
-#define s(x,c) x[c]
-#else
-#define s(x,c) x##c
-#endif
-
-// I am grateful to Frank Yellin for the following constructions
-// which, given the column (c) of the output state variable that
-// is being computed, return the input state variables which are
-// needed for each row (r) of the state
-
-// For the fixed block size options, compilers reduce these two 
-// expressions to fixed variable references. For variable block 
-// size code conditional clauses will sometimes be returned
-
-#define unused  77  // Sunset Strip
-
-#define fwd_var(x,r,c) \
- ( r==0 ?                      \
-    ( c==0 ? s(x,0) \
-    : c==1 ? s(x,1) \
-    : c==2 ? s(x,2) \
-    : c==3 ? s(x,3) \
-    : c==4 ? s(x,4) \
-    : c==5 ? s(x,5) \
-    : c==6 ? s(x,6) \
-    : s(x,7))          \
- : r==1 ?                      \
-    ( c==0 ? s(x,1) \
-    : c==1 ? s(x,2) \
-    : c==2 ? s(x,3) \
-    : c==3 ? nc==4 ? s(x,0) : s(x,4) \
-    : c==4 ? s(x,5) \
-    : c==5 ? nc==8 ? s(x,6) : s(x,0) \
-    : c==6 ? s(x,7) \
-    : s(x,0))          \
- : r==2 ?                      \
-    ( c==0 ? nc==8 ? s(x,3) : s(x,2) \
-    : c==1 ? nc==8 ? s(x,4) : s(x,3) \
-    : c==2 ? nc==4 ? s(x,0) : nc==8 ? s(x,5) : s(x,4) \
-    : c==3 ? nc==4 ? s(x,1) : nc==8 ? s(x,6) : s(x,5) \
-    : c==4 ? nc==8 ? s(x,7) : s(x,0) \
-    : c==5 ? nc==8 ? s(x,0) : s(x,1) \
-    : c==6 ? s(x,1) \
-    : s(x,2))          \
- :                                     \
-    ( c==0 ? nc==8 ? s(x,4) : s(x,3) \
-    : c==1 ? nc==4 ? s(x,0) : nc==8 ? s(x,5) : s(x,4) \
-    : c==2 ? nc==4 ? s(x,1) : nc==8 ? s(x,6) : s(x,5) \
-    : c==3 ? nc==4 ? s(x,2) : nc==8 ? s(x,7) : s(x,0) \
-    : c==4 ? nc==8 ? s(x,0) : s(x,1) \
-    : c==5 ? nc==8 ? s(x,1) : s(x,2) \
-    : c==6 ? s(x,2) \
-    : s(x,3)))
-
-#define inv_var(x,r,c) \
- ( r==0 ?                      \
-    ( c==0 ? s(x,0) \
-    : c==1 ? s(x,1) \
-    : c==2 ? s(x,2) \
-    : c==3 ? s(x,3) \
-    : c==4 ? s(x,4) \
-    : c==5 ? s(x,5) \
-    : c==6 ? s(x,6) \
-    : s(x,7))          \
- : r==1 ?                      \
-    ( c==0 ? nc==4 ? s(x,3) : nc==8 ? s(x,7) : s(x,5) \
-    : c==1 ? s(x,0) \
-    : c==2 ? s(x,1) \
-    : c==3 ? s(x,2) \
-    : c==4 ? s(x,3) \
-    : c==5 ? s(x,4) \
-    : c==6 ? s(x,5) \
-    : s(x,6))          \
- : r==2 ?                      \
-    ( c==0 ? nc==4 ? s(x,2) : nc==8 ? s(x,5) : s(x,4) \
-    : c==1 ? nc==4 ? s(x,3) : nc==8 ? s(x,6) : s(x,5) \
-    : c==2 ? nc==8 ? s(x,7) : s(x,0) \
-    : c==3 ? nc==8 ? s(x,0) : s(x,1) \
-    : c==4 ? nc==8 ? s(x,1) : s(x,2) \
-    : c==5 ? nc==8 ? s(x,2) : s(x,3) \
-    : c==6 ? s(x,3) \
-    : s(x,4))          \
- :                                     \
-    ( c==0 ? nc==4 ? s(x,1) : nc==8 ? s(x,4) : s(x,3) \
-    : c==1 ? nc==4 ? s(x,2) : nc==8 ? s(x,5) : s(x,4) \
-    : c==2 ? nc==4 ? s(x,3) : nc==8 ? s(x,6) : s(x,5) \
-    : c==3 ? nc==8 ? s(x,7) : s(x,0) \
-    : c==4 ? nc==8 ? s(x,0) : s(x,1) \
-    : c==5 ? nc==8 ? s(x,1) : s(x,2) \
-    : c==6 ? s(x,2) \
-    : s(x,3)))
-
-#define si(y,x,k,c) s(y,c) = const_word_in(x + 4 * c) ^ k[c]
-#define so(y,x,c)   word_out(y + 4 * c, s(x,c))
-
-#if defined(FOUR_TABLES)
-#define fwd_rnd(y,x,k,c)    s(y,c)= (k)[c] ^ four_tables(x,ft_tab,fwd_var,rf1,c)
-#define inv_rnd(y,x,k,c)    s(y,c)= (k)[c] ^ four_tables(x,it_tab,inv_var,rf1,c)
-#elif defined(ONE_TABLE)
-#define fwd_rnd(y,x,k,c)    s(y,c)= (k)[c] ^ one_table(x,upr,ft_tab,fwd_var,rf1,c)
-#define inv_rnd(y,x,k,c)    s(y,c)= (k)[c] ^ one_table(x,upr,it_tab,inv_var,rf1,c)
-#else
-#define fwd_rnd(y,x,k,c)    s(y,c) = fwd_mcol(no_table(x,s_box,fwd_var,rf1,c)) ^ (k)[c]
-#define inv_rnd(y,x,k,c)    s(y,c) = inv_mcol(no_table(x,inv_s_box,inv_var,rf1,c) ^ (k)[c])
-#endif
-
-#if defined(FOUR_LR_TABLES)
-#define fwd_lrnd(y,x,k,c)   s(y,c)= (k)[c] ^ four_tables(x,fl_tab,fwd_var,rf1,c)
-#define inv_lrnd(y,x,k,c)   s(y,c)= (k)[c] ^ four_tables(x,il_tab,inv_var,rf1,c)
-#elif defined(ONE_LR_TABLE)
-#define fwd_lrnd(y,x,k,c)   s(y,c)= (k)[c] ^ one_table(x,ups,fl_tab,fwd_var,rf1,c)
-#define inv_lrnd(y,x,k,c)   s(y,c)= (k)[c] ^ one_table(x,ups,il_tab,inv_var,rf1,c)
-#else
-#define fwd_lrnd(y,x,k,c)   s(y,c) = no_table(x,s_box,fwd_var,rf1,c) ^ (k)[c]
-#define inv_lrnd(y,x,k,c)   s(y,c) = no_table(x,inv_s_box,inv_var,rf1,c) ^ (k)[c]
-#endif
-
-#if AES_BLOCK_SIZE == 16
-
-#if defined(ARRAYS)
-#define locals(y,x)     x[4],y[4]
-#else
-#define locals(y,x)     x##0,x##1,x##2,x##3,y##0,y##1,y##2,y##3
-// the following defines prevent the compiler requiring the declaration
-// of generated but unused variables in the fwd_var and inv_var macros
-#define b04 unused
-#define b05 unused
-#define b06 unused
-#define b07 unused
-#define b14 unused
-#define b15 unused
-#define b16 unused
-#define b17 unused
-#endif
-#define l_copy(y, x)    s(y,0) = s(x,0); s(y,1) = s(x,1); \
-                        s(y,2) = s(x,2); s(y,3) = s(x,3);
-#define state_in(y,x,k) si(y,x,k,0); si(y,x,k,1); si(y,x,k,2); si(y,x,k,3)
-#define state_out(y,x)  so(y,x,0); so(y,x,1); so(y,x,2); so(y,x,3)
-#define round(rm,y,x,k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3)
-
-#elif AES_BLOCK_SIZE == 24
-
-#if defined(ARRAYS)
-#define locals(y,x)     x[6],y[6]
-#else
-#define locals(y,x)     x##0,x##1,x##2,x##3,x##4,x##5, \
-                        y##0,y##1,y##2,y##3,y##4,y##5
-#define b06 unused
-#define b07 unused
-#define b16 unused
-#define b17 unused
-#endif
-#define l_copy(y, x)    s(y,0) = s(x,0); s(y,1) = s(x,1); \
-                        s(y,2) = s(x,2); s(y,3) = s(x,3); \
-                        s(y,4) = s(x,4); s(y,5) = s(x,5);
-#define state_in(y,x,k) si(y,x,k,0); si(y,x,k,1); si(y,x,k,2); \
-                        si(y,x,k,3); si(y,x,k,4); si(y,x,k,5)
-#define state_out(y,x)  so(y,x,0); so(y,x,1); so(y,x,2); \
-                        so(y,x,3); so(y,x,4); so(y,x,5)
-#define round(rm,y,x,k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); \
-                        rm(y,x,k,3); rm(y,x,k,4); rm(y,x,k,5)
-#else
-
-#if defined(ARRAYS)
-#define locals(y,x)     x[8],y[8]
-#else
-#define locals(y,x)     x##0,x##1,x##2,x##3,x##4,x##5,x##6,x##7, \
-                        y##0,y##1,y##2,y##3,y##4,y##5,y##6,y##7
-#endif
-#define l_copy(y, x)    s(y,0) = s(x,0); s(y,1) = s(x,1); \
-                        s(y,2) = s(x,2); s(y,3) = s(x,3); \
-                        s(y,4) = s(x,4); s(y,5) = s(x,5); \
-                        s(y,6) = s(x,6); s(y,7) = s(x,7);
-
-#if AES_BLOCK_SIZE == 32
-
-#define state_in(y,x,k) si(y,x,k,0); si(y,x,k,1); si(y,x,k,2); si(y,x,k,3); \
-                        si(y,x,k,4); si(y,x,k,5); si(y,x,k,6); si(y,x,k,7)
-#define state_out(y,x)  so(y,x,0); so(y,x,1); so(y,x,2); so(y,x,3); \
-                        so(y,x,4); so(y,x,5); so(y,x,6); so(y,x,7)
-#define round(rm,y,x,k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3); \
-                        rm(y,x,k,4); rm(y,x,k,5); rm(y,x,k,6); rm(y,x,k,7)
-#else
-
-#define state_in(y,x,k) \
-switch(nc) \
-{   case 8: si(y,x,k,7); si(y,x,k,6); \
-    case 6: si(y,x,k,5); si(y,x,k,4); \
-    case 4: si(y,x,k,3); si(y,x,k,2); \
-            si(y,x,k,1); si(y,x,k,0); \
-}
-
-#define state_out(y,x) \
-switch(nc) \
-{   case 8: so(y,x,7); so(y,x,6); \
-    case 6: so(y,x,5); so(y,x,4); \
-    case 4: so(y,x,3); so(y,x,2); \
-            so(y,x,1); so(y,x,0); \
-}
-
-#if defined(FAST_VARIABLE)
-
-#define round(rm,y,x,k) \
-switch(nc) \
-{   case 8: rm(y,x,k,7); rm(y,x,k,6); \
-            rm(y,x,k,5); rm(y,x,k,4); \
-            rm(y,x,k,3); rm(y,x,k,2); \
-            rm(y,x,k,1); rm(y,x,k,0); \
-            break; \
-    case 6: rm(y,x,k,5); rm(y,x,k,4); \
-            rm(y,x,k,3); rm(y,x,k,2); \
-            rm(y,x,k,1); rm(y,x,k,0); \
-            break; \
-    case 4: rm(y,x,k,3); rm(y,x,k,2); \
-            rm(y,x,k,1); rm(y,x,k,0); \
-            break; \
-}
-#else
-
-#define round(rm,y,x,k) \
-switch(nc) \
-{   case 8: rm(y,x,k,7); rm(y,x,k,6); \
-    case 6: rm(y,x,k,5); rm(y,x,k,4); \
-    case 4: rm(y,x,k,3); rm(y,x,k,2); \
-            rm(y,x,k,1); rm(y,x,k,0); \
-}
-
-#endif
-
-#endif
-#endif
-
-void aes_encrypt(const aes_context *cx, const unsigned char in_blk[], unsigned char out_blk[])
-{   u_int32_t        locals(b0, b1);
-    const u_int32_t  *kp = cx->aes_e_key;
-
-#if !defined(ONE_TABLE) && !defined(FOUR_TABLES)
-    u_int32_t        f2;
-#endif
-
-    state_in(b0, in_blk, kp); kp += nc;
-
-#if defined(UNROLL)
-
-    switch(cx->aes_Nrnd)
-    {
-    case 14:    round(fwd_rnd,  b1, b0, kp         ); 
-                round(fwd_rnd,  b0, b1, kp + nc    ); kp += 2 * nc;
-    case 12:    round(fwd_rnd,  b1, b0, kp         ); 
-                round(fwd_rnd,  b0, b1, kp + nc    ); kp += 2 * nc;
-    case 10:    round(fwd_rnd,  b1, b0, kp         );             
-                round(fwd_rnd,  b0, b1, kp +     nc);
-                round(fwd_rnd,  b1, b0, kp + 2 * nc); 
-                round(fwd_rnd,  b0, b1, kp + 3 * nc);
-                round(fwd_rnd,  b1, b0, kp + 4 * nc); 
-                round(fwd_rnd,  b0, b1, kp + 5 * nc);
-                round(fwd_rnd,  b1, b0, kp + 6 * nc); 
-                round(fwd_rnd,  b0, b1, kp + 7 * nc);
-                round(fwd_rnd,  b1, b0, kp + 8 * nc);
-                round(fwd_lrnd, b0, b1, kp + 9 * nc);
-    }
-
-#elif defined(PARTIAL_UNROLL)
-    {   u_int32_t    rnd;
-
-        for(rnd = 0; rnd < (cx->aes_Nrnd >> 1) - 1; ++rnd)
-        {
-            round(fwd_rnd, b1, b0, kp); 
-            round(fwd_rnd, b0, b1, kp + nc); kp += 2 * nc;
-        }
-
-        round(fwd_rnd,  b1, b0, kp);
-        round(fwd_lrnd, b0, b1, kp + nc);
-    }
-#else
-    {   u_int32_t    rnd;
-
-        for(rnd = 0; rnd < cx->aes_Nrnd - 1; ++rnd)
-        {
-            round(fwd_rnd, b1, b0, kp); 
-            l_copy(b0, b1); kp += nc;
-        }
-
-        round(fwd_lrnd, b0, b1, kp);
-    }
-#endif
-
-    state_out(out_blk, b0);
-}
-
-void aes_decrypt(const aes_context *cx, const unsigned char in_blk[], unsigned char out_blk[])
-{   u_int32_t        locals(b0, b1);
-    const u_int32_t  *kp = cx->aes_d_key;
-
-#if !defined(ONE_TABLE) && !defined(FOUR_TABLES)
-    u_int32_t        f2, f4, f8, f9; 
-#endif
-
-    state_in(b0, in_blk, kp); kp += nc;
-
-#if defined(UNROLL)
-
-    switch(cx->aes_Nrnd)
-    {
-    case 14:    round(inv_rnd,  b1, b0, kp         );
-                round(inv_rnd,  b0, b1, kp + nc    ); kp += 2 * nc;
-    case 12:    round(inv_rnd,  b1, b0, kp         );
-                round(inv_rnd,  b0, b1, kp + nc    ); kp += 2 * nc;
-    case 10:    round(inv_rnd,  b1, b0, kp         );             
-                round(inv_rnd,  b0, b1, kp +     nc);
-                round(inv_rnd,  b1, b0, kp + 2 * nc); 
-                round(inv_rnd,  b0, b1, kp + 3 * nc);
-                round(inv_rnd,  b1, b0, kp + 4 * nc); 
-                round(inv_rnd,  b0, b1, kp + 5 * nc);
-                round(inv_rnd,  b1, b0, kp + 6 * nc); 
-                round(inv_rnd,  b0, b1, kp + 7 * nc);
-                round(inv_rnd,  b1, b0, kp + 8 * nc);
-                round(inv_lrnd, b0, b1, kp + 9 * nc);
-    }
-
-#elif defined(PARTIAL_UNROLL)
-    {   u_int32_t    rnd;
-
-        for(rnd = 0; rnd < (cx->aes_Nrnd >> 1) - 1; ++rnd)
-        {
-            round(inv_rnd, b1, b0, kp); 
-            round(inv_rnd, b0, b1, kp + nc); kp += 2 * nc;
-        }
-
-        round(inv_rnd,  b1, b0, kp);
-        round(inv_lrnd, b0, b1, kp + nc);
-    }
-#else
-    {   u_int32_t    rnd;
-
-        for(rnd = 0; rnd < cx->aes_Nrnd - 1; ++rnd)
-        {
-            round(inv_rnd, b1, b0, kp); 
-            l_copy(b0, b1); kp += nc;
-        }
-
-        round(inv_lrnd, b0, b1, kp);
-    }
-#endif
-
-    state_out(out_blk, b0);
-}
diff --git a/lib/libcrypto/libaes/aes.h b/lib/libcrypto/libaes/aes.h
deleted file mode 100644 (file)
index 4f1e3b3..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-// I retain copyright in this code but I encourage its free use provided
-// that I don't carry any responsibility for the results. I am especially 
-// happy to see it used in free and open source software. If you do use 
-// it I would appreciate an acknowledgement of its origin in the code or
-// the product that results and I would also appreciate knowing a little
-// about the use to which it is being put. I am grateful to Frank Yellin
-// for some ideas that are used in this implementation.
-//
-// Dr B. R. Gladman <brg@gladman.uk.net> 6th April 2001.
-//
-// This is an implementation of the AES encryption algorithm (Rijndael)
-// designed by Joan Daemen and Vincent Rijmen. This version is designed
-// to provide both fixed and dynamic block and key lengths and can also 
-// run with either big or little endian internal byte order (see aes.h). 
-// It inputs block and key lengths in bytes with the legal values being 
-// 16, 24 and 32.
-
-/*
- * Modified by Jari Ruusu,  May 1 2001
- *  - Fixed some compile warnings, code was ok but gcc warned anyway.
- *  - Changed basic types: byte -> unsigned char, word -> u_int32_t
- *  - Major name space cleanup: Names visible to outside now begin
- *    with "aes_" or "AES_". A lot of stuff moved from aes.h to aes.c
- *  - Removed C++ and DLL support as part of name space cleanup.
- *  - Eliminated unnecessary recomputation of tables. (actual bug fix)
- *  - Merged precomputed constant tables to aes.c file.
- *  - Removed data alignment restrictions for portability reasons.
- *  - Made block and key lengths accept bit count (128/192/256)
- *    as well byte count (16/24/32).
- *  - Removed all error checks. This change also eliminated the need
- *    to preinitialize the context struct to zero.
- *  - Removed some totally unused constants.
- */
-
-#ifndef _AES_H
-#define _AES_H
-
-#if defined(__linux__) && defined(__KERNEL__)
-#  include <linux/types.h>
-#else 
-#  include <sys/types.h>
-#endif
-
-// CONFIGURATION OPTIONS (see also aes.c)
-//
-// Define AES_BLOCK_SIZE to set the cipher block size (16, 24 or 32) or
-// leave this undefined for dynamically variable block size (this will
-// result in much slower code).
-// IMPORTANT NOTE: AES_BLOCK_SIZE is in BYTES (16, 24, 32 or undefined). If
-// left undefined a slower version providing variable block length is compiled
-
-#define AES_BLOCK_SIZE  16
-
-// The number of key schedule words for different block and key lengths
-// allowing for method of computation which requires the length to be a
-// multiple of the key length
-//
-// Nk =       4   6   8
-//        -------------
-// Nb = 4 |  60  60  64
-//      6 |  96  90  96
-//      8 | 120 120 120
-
-#if !defined(AES_BLOCK_SIZE) || (AES_BLOCK_SIZE == 32)
-#define AES_KS_LENGTH   120
-#define AES_RC_LENGTH    29
-#else
-#define AES_KS_LENGTH   4 * AES_BLOCK_SIZE
-#define AES_RC_LENGTH   (9 * AES_BLOCK_SIZE) / 8 - 8
-#endif
-
-typedef struct
-{
-    u_int32_t    aes_Nkey;      // the number of words in the key input block
-    u_int32_t    aes_Nrnd;      // the number of cipher rounds
-    u_int32_t    aes_e_key[AES_KS_LENGTH];   // the encryption key schedule
-    u_int32_t    aes_d_key[AES_KS_LENGTH];   // the decryption key schedule
-#if !defined(AES_BLOCK_SIZE)
-    u_int32_t    aes_Ncol;      // the number of columns in the cipher state
-#endif
-} aes_context;
-
-// THE CIPHER INTERFACE
-
-#if !defined(AES_BLOCK_SIZE)
-extern void aes_set_blk(aes_context *, const int);
-#endif
-extern void aes_set_key(aes_context *, const unsigned char [], const int, const int);
-extern void aes_encrypt(const aes_context *, const unsigned char [], unsigned char []);
-extern void aes_decrypt(const aes_context *, const unsigned char [], unsigned char []);
-
-// The block length inputs to aes_set_block and aes_set_key are in numbers
-// of bytes or bits.  The calls to subroutines must be made in the above
-// order but multiple calls can be made without repeating earlier calls
-// if their parameters have not changed.
-
-#endif  // _AES_H
diff --git a/lib/libcrypto/libaes/aes_cbc.c b/lib/libcrypto/libaes/aes_cbc.c
deleted file mode 100644 (file)
index 962dd1a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/types.h>
-#else
-#include <sys/types.h>
-#endif
-#include "aes_cbc.h"
-#include "cbc_generic.h"
-/* returns bool success */
-int AES_set_key(aes_context *aes_ctx, const u_int8_t *key, int keysize) {
-       aes_set_key(aes_ctx, key, keysize, 0);
-       return 1;       
-}
-CBC_IMPL_BLK16(AES_cbc_encrypt, aes_context, u_int8_t *, aes_encrypt, aes_decrypt);
diff --git a/lib/libcrypto/libaes/aes_cbc.h b/lib/libcrypto/libaes/aes_cbc.h
deleted file mode 100644 (file)
index 92f5d77..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Glue header */
-#include "aes.h"
-int AES_set_key(aes_context *aes_ctx, const u_int8_t * key, int keysize);
-int AES_cbc_encrypt(aes_context *ctx, const u_int8_t * in, u_int8_t * out, int ilen, const u_int8_t * iv, int encrypt);
diff --git a/lib/libcrypto/libaes/aes_xcbc_mac.c b/lib/libcrypto/libaes/aes_xcbc_mac.c
deleted file mode 100644 (file)
index 89d7bc0..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/types.h>
-#include <linux/kernel.h>
-#define DEBUG(x) 
-#else
-#include <stdio.h>
-#include <sys/types.h>
-#define DEBUG(x) x
-#endif
-
-#include "aes.h"
-#include "aes_xcbc_mac.h"
-
-int AES_xcbc_mac_set_key(aes_context_mac *ctxm, const u_int8_t *key, int keylen)
-{
-       int ret=1;
-       aes_block kn[3] = { 
-               { 0x01010101, 0x01010101, 0x01010101, 0x01010101 },
-               { 0x02020202, 0x02020202, 0x02020202, 0x02020202 },
-               { 0x03030303, 0x03030303, 0x03030303, 0x03030303 },
-       };
-       aes_set_key(&ctxm->ctx_k1, key, keylen, 0);
-       aes_encrypt(&ctxm->ctx_k1, (u_int8_t *) kn[0], (u_int8_t *) kn[0]);
-       aes_encrypt(&ctxm->ctx_k1, (u_int8_t *) kn[1], (u_int8_t *) ctxm->k2);
-       aes_encrypt(&ctxm->ctx_k1, (u_int8_t *) kn[2], (u_int8_t *) ctxm->k3);
-       aes_set_key(&ctxm->ctx_k1, (u_int8_t *) kn[0], 16, 0);
-       return ret;
-}
-static void do_pad_xor(u_int8_t *out, const u_int8_t *in, int len) {
-       int pos=0;
-       for (pos=1; pos <= 16; pos++, in++, out++) {
-               if (pos <= len)
-                       *out ^= *in;
-               if (pos > len) {
-                       DEBUG(printf("put 0x80 at pos=%d\n", pos));
-                       *out ^= 0x80;
-                       break;
-               }
-       }
-}
-static void xor_block(aes_block res, const aes_block op) {
-       res[0] ^= op[0];
-       res[1] ^= op[1];
-       res[2] ^= op[2];
-       res[3] ^= op[3];
-}
-int AES_xcbc_mac_hash(const aes_context_mac *ctxm, const u_int8_t * in, int ilen, u_int8_t hash[16]) {
-       int ret=ilen;
-       u_int32_t out[4] = { 0, 0, 0, 0 }; 
-       for (; ilen > 16 ; ilen-=16) {
-               xor_block(out, (const u_int32_t*) &in[0]);
-               aes_encrypt(&ctxm->ctx_k1, in, (u_int8_t *)&out[0]);
-               in+=16; 
-       }
-       do_pad_xor((u_int8_t *)&out, in, ilen);
-       if (ilen==16) {
-               DEBUG(printf("using k3\n"));
-               xor_block(out, ctxm->k3);
-       }
-       else 
-       {
-               DEBUG(printf("using k2\n"));
-               xor_block(out, ctxm->k2);
-       }
-       aes_encrypt(&ctxm->ctx_k1, (u_int8_t *)out, hash);
-       return ret;
-} 
diff --git a/lib/libcrypto/libaes/aes_xcbc_mac.h b/lib/libcrypto/libaes/aes_xcbc_mac.h
deleted file mode 100644 (file)
index baf438c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _AES_XCBC_MAC_H
-#define _AES_XCBC_MAC_H
-
-typedef u_int32_t aes_block[4];
-typedef struct {
-       aes_context ctx_k1;
-       aes_block k2;
-       aes_block k3;
-} aes_context_mac;
-int AES_xcbc_mac_set_key(aes_context_mac *ctxm, const u_int8_t *key, int keylen);
-int AES_xcbc_mac_hash(const aes_context_mac *ctxm, const u_int8_t * in, int ilen, u_int8_t hash[16]);
-#endif /* _AES_XCBC_MAC_H */
diff --git a/lib/libcrypto/libaes/asm/aes-i586.S b/lib/libcrypto/libaes/asm/aes-i586.S
deleted file mode 100644 (file)
index df19d0d..0000000
+++ /dev/null
@@ -1,892 +0,0 @@
-//
-// Copyright (c) 2001, Dr Brian Gladman <brg@gladman.uk.net>, Worcester, UK.
-// All rights reserved.
-//
-// TERMS
-//
-//  Redistribution and use in source and binary forms, with or without
-//  modification, are permitted subject to the following conditions:
-//
-//  1. Redistributions of source code must retain the above copyright
-//     notice, this list of conditions and the following disclaimer.
-//
-//  2. Redistributions in binary form must reproduce the above copyright
-//     notice, this list of conditions and the following disclaimer in the
-//     documentation and/or other materials provided with the distribution.
-//
-//  3. The copyright holder's name must not be used to endorse or promote
-//     any products derived from this software without his specific prior
-//     written permission.
-//
-//  This software is provided 'as is' with no express or implied warranties
-//  of correctness or fitness for purpose.
-
-// Modified by Jari Ruusu,  December 24 2001
-//  - Converted syntax to GNU CPP/assembler syntax
-//  - C programming interface converted back to "old" API
-//  - Minor portability cleanups and speed optimizations
-
-// An AES (Rijndael) implementation for the Pentium. This version only
-// implements the standard AES block length (128 bits, 16 bytes). This code
-// does not preserve the eax, ecx or edx registers or the artihmetic status
-// flags. However, the ebx, esi, edi, and ebp registers are preserved across
-// calls.
-
-// void aes_set_key(aes_context *cx, const unsigned char key[], const int key_len, const int f)
-// void aes_encrypt(const aes_context *cx, const unsigned char in_blk[], unsigned char out_blk[])
-// void aes_decrypt(const aes_context *cx, const unsigned char in_blk[], unsigned char out_blk[])
-
-#if defined(USE_UNDERLINE)
-# define aes_set_key _aes_set_key
-# define aes_encrypt _aes_encrypt
-# define aes_decrypt _aes_decrypt
-#endif
-#if !defined(ALIGN32BYTES)
-# define ALIGN32BYTES 32
-#endif
-
-       .file   "aes-i586.S"
-       .globl  aes_set_key
-       .globl  aes_encrypt
-       .globl  aes_decrypt
-
-#define tlen   1024    // length of each of 4 'xor' arrays (256 32-bit words)
-
-// offsets to parameters with one register pushed onto stack
-
-#define ctx    8       // AES context structure
-#define in_blk 12      // input byte array address parameter
-#define out_blk        16      // output byte array address parameter
-
-// offsets in context structure
-
-#define nkey   0       // key length, size 4
-#define nrnd   4       // number of rounds, size 4
-#define ekey   8       // encryption key schedule base address, size 256
-#define dkey   264     // decryption key schedule base address, size 256
-
-// This macro performs a forward encryption cycle. It is entered with
-// the first previous round column values in %eax, %ebx, %esi and %edi and
-// exits with the final values in the same registers.
-
-#define fwd_rnd(p1,p2)                  \
-       mov     %ebx,(%esp)             ;\
-       movzbl  %al,%edx                ;\
-       mov     %eax,%ecx               ;\
-       mov     p2(%ebp),%eax           ;\
-       mov     %edi,4(%esp)            ;\
-       mov     p2+12(%ebp),%edi        ;\
-       xor     p1(,%edx,4),%eax        ;\
-       movzbl  %ch,%edx                ;\
-       shr     $16,%ecx                ;\
-       mov     p2+4(%ebp),%ebx         ;\
-       xor     p1+tlen(,%edx,4),%edi   ;\
-       movzbl  %cl,%edx                ;\
-       movzbl  %ch,%ecx                ;\
-       xor     p1+3*tlen(,%ecx,4),%ebx ;\
-       mov     %esi,%ecx               ;\
-       mov     p1+2*tlen(,%edx,4),%esi ;\
-       movzbl  %cl,%edx                ;\
-       xor     p1(,%edx,4),%esi        ;\
-       movzbl  %ch,%edx                ;\
-       shr     $16,%ecx                ;\
-       xor     p1+tlen(,%edx,4),%ebx   ;\
-       movzbl  %cl,%edx                ;\
-       movzbl  %ch,%ecx                ;\
-       xor     p1+2*tlen(,%edx,4),%eax ;\
-       mov     (%esp),%edx             ;\
-       xor     p1+3*tlen(,%ecx,4),%edi ;\
-       movzbl  %dl,%ecx                ;\
-       xor     p2+8(%ebp),%esi         ;\
-       xor     p1(,%ecx,4),%ebx        ;\
-       movzbl  %dh,%ecx                ;\
-       shr     $16,%edx                ;\
-       xor     p1+tlen(,%ecx,4),%eax   ;\
-       movzbl  %dl,%ecx                ;\
-       movzbl  %dh,%edx                ;\
-       xor     p1+2*tlen(,%ecx,4),%edi ;\
-       mov     4(%esp),%ecx            ;\
-       xor     p1+3*tlen(,%edx,4),%esi ;\
-       movzbl  %cl,%edx                ;\
-       xor     p1(,%edx,4),%edi        ;\
-       movzbl  %ch,%edx                ;\
-       shr     $16,%ecx                ;\
-       xor     p1+tlen(,%edx,4),%esi   ;\
-       movzbl  %cl,%edx                ;\
-       movzbl  %ch,%ecx                ;\
-       xor     p1+2*tlen(,%edx,4),%ebx ;\
-       xor     p1+3*tlen(,%ecx,4),%eax
-
-// This macro performs an inverse encryption cycle. It is entered with
-// the first previous round column values in %eax, %ebx, %esi and %edi and
-// exits with the final values in the same registers.
-
-#define inv_rnd(p1,p2)                  \
-       movzbl  %al,%edx                ;\
-       mov     %ebx,(%esp)             ;\
-       mov     %eax,%ecx               ;\
-       mov     p2(%ebp),%eax           ;\
-       mov     %edi,4(%esp)            ;\
-       mov     p2+4(%ebp),%ebx         ;\
-       xor     p1(,%edx,4),%eax        ;\
-       movzbl  %ch,%edx                ;\
-       shr     $16,%ecx                ;\
-       mov     p2+12(%ebp),%edi        ;\
-       xor     p1+tlen(,%edx,4),%ebx   ;\
-       movzbl  %cl,%edx                ;\
-       movzbl  %ch,%ecx                ;\
-       xor     p1+3*tlen(,%ecx,4),%edi ;\
-       mov     %esi,%ecx               ;\
-       mov     p1+2*tlen(,%edx,4),%esi ;\
-       movzbl  %cl,%edx                ;\
-       xor     p1(,%edx,4),%esi        ;\
-       movzbl  %ch,%edx                ;\
-       shr     $16,%ecx                ;\
-       xor     p1+tlen(,%edx,4),%edi   ;\
-       movzbl  %cl,%edx                ;\
-       movzbl  %ch,%ecx                ;\
-       xor     p1+2*tlen(,%edx,4),%eax ;\
-       mov     (%esp),%edx             ;\
-       xor     p1+3*tlen(,%ecx,4),%ebx ;\
-       movzbl  %dl,%ecx                ;\
-       xor     p2+8(%ebp),%esi         ;\
-       xor     p1(,%ecx,4),%ebx        ;\
-       movzbl  %dh,%ecx                ;\
-       shr     $16,%edx                ;\
-       xor     p1+tlen(,%ecx,4),%esi   ;\
-       movzbl  %dl,%ecx                ;\
-       movzbl  %dh,%edx                ;\
-       xor     p1+2*tlen(,%ecx,4),%edi ;\
-       mov     4(%esp),%ecx            ;\
-       xor     p1+3*tlen(,%edx,4),%eax ;\
-       movzbl  %cl,%edx                ;\
-       xor     p1(,%edx,4),%edi        ;\
-       movzbl  %ch,%edx                ;\
-       shr     $16,%ecx                ;\
-       xor     p1+tlen(,%edx,4),%eax   ;\
-       movzbl  %cl,%edx                ;\
-       movzbl  %ch,%ecx                ;\
-       xor     p1+2*tlen(,%edx,4),%ebx ;\
-       xor     p1+3*tlen(,%ecx,4),%esi
-
-// AES (Rijndael) Encryption Subroutine
-
-       .text
-       .align  ALIGN32BYTES
-aes_encrypt:
-       push    %ebp
-       mov     ctx(%esp),%ebp          // pointer to context
-       mov     in_blk(%esp),%ecx
-       push    %ebx
-       push    %esi
-       push    %edi
-       mov     nrnd(%ebp),%edx         // number of rounds
-       lea     ekey+16(%ebp),%ebp      // key pointer
-
-// input four columns and xor in first round key
-
-       mov     (%ecx),%eax
-       mov     4(%ecx),%ebx
-       mov     8(%ecx),%esi
-       mov     12(%ecx),%edi
-       xor     -16(%ebp),%eax
-       xor     -12(%ebp),%ebx
-       xor     -8(%ebp),%esi
-       xor     -4(%ebp),%edi
-
-       sub     $8,%esp                 // space for register saves on stack
-
-       sub     $10,%edx
-       je      aes_15
-       add     $32,%ebp
-       sub     $2,%edx
-       je      aes_13
-       add     $32,%ebp
-
-       fwd_rnd(aes_ft_tab,-64)         // 14 rounds for 256-bit key
-       fwd_rnd(aes_ft_tab,-48)
-aes_13:        fwd_rnd(aes_ft_tab,-32)         // 12 rounds for 192-bit key
-       fwd_rnd(aes_ft_tab,-16)
-aes_15:        fwd_rnd(aes_ft_tab,0)           // 10 rounds for 128-bit key
-       fwd_rnd(aes_ft_tab,16)
-       fwd_rnd(aes_ft_tab,32)
-       fwd_rnd(aes_ft_tab,48)
-       fwd_rnd(aes_ft_tab,64)
-       fwd_rnd(aes_ft_tab,80)
-       fwd_rnd(aes_ft_tab,96)
-       fwd_rnd(aes_ft_tab,112)
-       fwd_rnd(aes_ft_tab,128)
-       fwd_rnd(aes_fl_tab,144)         // last round uses a different table
-
-// move final values to the output array.
-
-       mov     out_blk+20(%esp),%ebp
-       add     $8,%esp
-       mov     %eax,(%ebp)
-       mov     %ebx,4(%ebp)
-       mov     %esi,8(%ebp)
-       mov     %edi,12(%ebp)
-       pop     %edi
-       pop     %esi
-       pop     %ebx
-       pop     %ebp
-       ret
-
-
-// AES (Rijndael) Decryption Subroutine
-
-       .align  ALIGN32BYTES
-aes_decrypt:
-       push    %ebp
-       mov     ctx(%esp),%ebp          // pointer to context
-       mov     in_blk(%esp),%ecx
-       push    %ebx
-       push    %esi
-       push    %edi
-       mov     nrnd(%ebp),%edx         // number of rounds
-       lea     dkey+16(%ebp),%ebp      // key pointer
-
-// input four columns and xor in first round key
-
-       mov     (%ecx),%eax
-       mov     4(%ecx),%ebx
-       mov     8(%ecx),%esi
-       mov     12(%ecx),%edi
-       xor     -16(%ebp),%eax
-       xor     -12(%ebp),%ebx
-       xor     -8(%ebp),%esi
-       xor     -4(%ebp),%edi
-
-       sub     $8,%esp                 // space for register saves on stack
-
-       sub     $10,%edx
-       je      aes_25
-       add     $32,%ebp
-       sub     $2,%edx
-       je      aes_23
-       add     $32,%ebp
-
-       inv_rnd(aes_it_tab,-64)         // 14 rounds for 256-bit key
-       inv_rnd(aes_it_tab,-48)
-aes_23:        inv_rnd(aes_it_tab,-32)         // 12 rounds for 192-bit key
-       inv_rnd(aes_it_tab,-16)
-aes_25:        inv_rnd(aes_it_tab,0)           // 10 rounds for 128-bit key
-       inv_rnd(aes_it_tab,16)
-       inv_rnd(aes_it_tab,32)
-       inv_rnd(aes_it_tab,48)
-       inv_rnd(aes_it_tab,64)
-       inv_rnd(aes_it_tab,80)
-       inv_rnd(aes_it_tab,96)
-       inv_rnd(aes_it_tab,112)
-       inv_rnd(aes_it_tab,128)
-       inv_rnd(aes_il_tab,144)         // last round uses a different table
-
-// move final values to the output array.
-
-       mov     out_blk+20(%esp),%ebp
-       add     $8,%esp
-       mov     %eax,(%ebp)
-       mov     %ebx,4(%ebp)
-       mov     %esi,8(%ebp)
-       mov     %edi,12(%ebp)
-       pop     %edi
-       pop     %esi
-       pop     %ebx
-       pop     %ebp
-       ret
-
-// AES (Rijndael) Key Schedule Subroutine
-
-// input/output parameters
-
-#define aes_cx 12      // AES context
-#define in_key 16      // key input array address
-#define key_ln 20      // key length, bytes (16,24,32) or bits (128,192,256)
-#define ed_flg 24      // 0=create both encr/decr keys, 1=create encr key only
-
-// offsets for locals
-
-#define cnt    -4
-#define kpf    -8
-#define slen   8
-
-// This macro performs a column mixing operation on an input 32-bit
-// word to give a 32-bit result. It uses each of the 4 bytes in the
-// the input column to index 4 different tables of 256 32-bit words
-// that are xored together to form the output value.
-
-#define mix_col(p1)                     \
-       movzbl  %bl,%ecx                ;\
-       mov     p1(,%ecx,4),%eax        ;\
-       movzbl  %bh,%ecx                ;\
-       ror     $16,%ebx                ;\
-       xor     p1+tlen(,%ecx,4),%eax   ;\
-       movzbl  %bl,%ecx                ;\
-       xor     p1+2*tlen(,%ecx,4),%eax ;\
-       movzbl  %bh,%ecx                ;\
-       xor     p1+3*tlen(,%ecx,4),%eax
-
-// Key Schedule Macros
-
-#define ksc4(p1)                        \
-       rol     $24,%ebx                ;\
-       mix_col(aes_fl_tab)             ;\
-       ror     $8,%ebx                 ;\
-       xor     4*p1+aes_rcon_tab,%eax  ;\
-       xor     %eax,%esi               ;\
-       xor     %esi,%ebp               ;\
-       mov     %esi,16*p1(%edi)        ;\
-       mov     %ebp,16*p1+4(%edi)      ;\
-       xor     %ebp,%edx               ;\
-       xor     %edx,%ebx               ;\
-       mov     %edx,16*p1+8(%edi)      ;\
-       mov     %ebx,16*p1+12(%edi)
-
-#define ksc6(p1)                        \
-       rol     $24,%ebx                ;\
-       mix_col(aes_fl_tab)             ;\
-       ror     $8,%ebx                 ;\
-       xor     4*p1+aes_rcon_tab,%eax  ;\
-       xor     24*p1-24(%edi),%eax     ;\
-       mov     %eax,24*p1(%edi)        ;\
-       xor     24*p1-20(%edi),%eax     ;\
-       mov     %eax,24*p1+4(%edi)      ;\
-       xor     %eax,%esi               ;\
-       xor     %esi,%ebp               ;\
-       mov     %esi,24*p1+8(%edi)      ;\
-       mov     %ebp,24*p1+12(%edi)     ;\
-       xor     %ebp,%edx               ;\
-       xor     %edx,%ebx               ;\
-       mov     %edx,24*p1+16(%edi)     ;\
-       mov     %ebx,24*p1+20(%edi)
-
-#define ksc8(p1)                        \
-       rol     $24,%ebx                ;\
-       mix_col(aes_fl_tab)             ;\
-       ror     $8,%ebx                 ;\
-       xor     4*p1+aes_rcon_tab,%eax  ;\
-       xor     32*p1-32(%edi),%eax     ;\
-       mov     %eax,32*p1(%edi)        ;\
-       xor     32*p1-28(%edi),%eax     ;\
-       mov     %eax,32*p1+4(%edi)      ;\
-       xor     32*p1-24(%edi),%eax     ;\
-       mov     %eax,32*p1+8(%edi)      ;\
-       xor     32*p1-20(%edi),%eax     ;\
-       mov     %eax,32*p1+12(%edi)     ;\
-       push    %ebx                    ;\
-       mov     %eax,%ebx               ;\
-       mix_col(aes_fl_tab)             ;\
-       pop     %ebx                    ;\
-       xor     %eax,%esi               ;\
-       xor     %esi,%ebp               ;\
-       mov     %esi,32*p1+16(%edi)     ;\
-       mov     %ebp,32*p1+20(%edi)     ;\
-       xor     %ebp,%edx               ;\
-       xor     %edx,%ebx               ;\
-       mov     %edx,32*p1+24(%edi)     ;\
-       mov     %ebx,32*p1+28(%edi)
-
-       .align  ALIGN32BYTES
-aes_set_key:
-       pushfl
-       push    %ebp
-       mov     %esp,%ebp
-       sub     $slen,%esp
-       push    %ebx
-       push    %esi
-       push    %edi
-
-       mov     aes_cx(%ebp),%edx       // edx -> AES context
-
-       mov     key_ln(%ebp),%ecx       // key length
-       cmpl    $128,%ecx
-       jb      aes_30
-       shr     $3,%ecx
-aes_30:        cmpl    $32,%ecx
-       je      aes_32
-       cmpl    $24,%ecx
-       je      aes_32
-       mov     $16,%ecx
-aes_32:        shr     $2,%ecx
-       mov     %ecx,nkey(%edx)
-
-       lea     6(%ecx),%eax            // 10/12/14 for 4/6/8 32-bit key length
-       mov     %eax,nrnd(%edx)
-
-       mov     in_key(%ebp),%esi       // key input array
-       lea     ekey(%edx),%edi         // key position in AES context
-       cld
-       push    %ebp
-       mov     %ecx,%eax               // save key length in eax
-       rep ;   movsl                   // words in the key schedule
-       mov     -4(%esi),%ebx           // put some values in registers
-       mov     -8(%esi),%edx           // to allow faster code
-       mov     -12(%esi),%ebp
-       mov     -16(%esi),%esi
-
-       cmpl    $4,%eax                 // jump on key size
-       je      aes_36
-       cmpl    $6,%eax
-       je      aes_35
-
-       ksc8(0)
-       ksc8(1)
-       ksc8(2)
-       ksc8(3)
-       ksc8(4)
-       ksc8(5)
-       ksc8(6)
-       jmp     aes_37
-aes_35:        ksc6(0)
-       ksc6(1)
-       ksc6(2)
-       ksc6(3)
-       ksc6(4)
-       ksc6(5)
-       ksc6(6)
-       ksc6(7)
-       jmp     aes_37
-aes_36:        ksc4(0)
-       ksc4(1)
-       ksc4(2)
-       ksc4(3)
-       ksc4(4)
-       ksc4(5)
-       ksc4(6)
-       ksc4(7)
-       ksc4(8)
-       ksc4(9)
-aes_37:        pop     %ebp
-       mov     aes_cx(%ebp),%edx       // edx -> AES context
-       cmpl    $0,ed_flg(%ebp)
-       jne     aes_39
-
-// compile decryption key schedule from encryption schedule - reverse
-// order and do mix_column operation on round keys except first and last
-
-       mov     nrnd(%edx),%eax         // kt = cx->d_key + nc * cx->Nrnd
-       shl     $2,%eax
-       lea     dkey(%edx,%eax,4),%edi
-       lea     ekey(%edx),%esi         // kf = cx->e_key
-
-       movsl                           // copy first round key (unmodified)
-       movsl
-       movsl
-       movsl
-       sub     $32,%edi
-       movl    $1,cnt(%ebp)
-aes_38:                                        // do mix column on each column of
-       lodsl                           // each round key
-       mov     %eax,%ebx
-       mix_col(aes_im_tab)
-       stosl
-       lodsl
-       mov     %eax,%ebx
-       mix_col(aes_im_tab)
-       stosl
-       lodsl
-       mov     %eax,%ebx
-       mix_col(aes_im_tab)
-       stosl
-       lodsl
-       mov     %eax,%ebx
-       mix_col(aes_im_tab)
-       stosl
-       sub     $32,%edi
-
-       incl    cnt(%ebp)
-       mov     cnt(%ebp),%eax
-       cmp     nrnd(%edx),%eax
-       jb      aes_38
-
-       movsl                           // copy last round key (unmodified)
-       movsl
-       movsl
-       movsl
-aes_39:        pop     %edi
-       pop     %esi
-       pop     %ebx
-       mov     %ebp,%esp
-       pop     %ebp
-       popfl
-       ret
-
-
-// finite field multiplies by {02}, {04} and {08}
-
-#define f2(x)  ((x<<1)^(((x>>7)&1)*0x11b))
-#define f4(x)  ((x<<2)^(((x>>6)&1)*0x11b)^(((x>>6)&2)*0x11b))
-#define f8(x)  ((x<<3)^(((x>>5)&1)*0x11b)^(((x>>5)&2)*0x11b)^(((x>>5)&4)*0x11b))
-
-// finite field multiplies required in table generation
-
-#define f3(x)  (f2(x) ^ x)
-#define f9(x)  (f8(x) ^ x)
-#define fb(x)  (f8(x) ^ f2(x) ^ x)
-#define fd(x)  (f8(x) ^ f4(x) ^ x)
-#define fe(x)  (f8(x) ^ f4(x) ^ f2(x))
-
-// These defines generate the forward table entries
-
-#define u0(x)  ((f3(x) << 24) | (x << 16) | (x << 8) | f2(x))
-#define u1(x)  ((x << 24) | (x << 16) | (f2(x) << 8) | f3(x))
-#define u2(x)  ((x << 24) | (f2(x) << 16) | (f3(x) << 8) | x)
-#define u3(x)  ((f2(x) << 24) | (f3(x) << 16) | (x << 8) | x)
-
-// These defines generate the inverse table entries
-
-#define v0(x)  ((fb(x) << 24) | (fd(x) << 16) | (f9(x) << 8) | fe(x))
-#define v1(x)  ((fd(x) << 24) | (f9(x) << 16) | (fe(x) << 8) | fb(x))
-#define v2(x)  ((f9(x) << 24) | (fe(x) << 16) | (fb(x) << 8) | fd(x))
-#define v3(x)  ((fe(x) << 24) | (fb(x) << 16) | (fd(x) << 8) | f9(x))
-
-// These defines generate entries for the last round tables
-
-#define w0(x)  (x)
-#define w1(x)  (x <<  8)
-#define w2(x)  (x << 16)
-#define w3(x)  (x << 24)
-
-// macro to generate inverse mix column tables (needed for the key schedule)
-
-#define im_data0(p1) \
-       .long   p1(0x00),p1(0x01),p1(0x02),p1(0x03),p1(0x04),p1(0x05),p1(0x06),p1(0x07) ;\
-       .long   p1(0x08),p1(0x09),p1(0x0a),p1(0x0b),p1(0x0c),p1(0x0d),p1(0x0e),p1(0x0f) ;\
-       .long   p1(0x10),p1(0x11),p1(0x12),p1(0x13),p1(0x14),p1(0x15),p1(0x16),p1(0x17) ;\
-       .long   p1(0x18),p1(0x19),p1(0x1a),p1(0x1b),p1(0x1c),p1(0x1d),p1(0x1e),p1(0x1f)
-#define im_data1(p1) \
-       .long   p1(0x20),p1(0x21),p1(0x22),p1(0x23),p1(0x24),p1(0x25),p1(0x26),p1(0x27) ;\
-       .long   p1(0x28),p1(0x29),p1(0x2a),p1(0x2b),p1(0x2c),p1(0x2d),p1(0x2e),p1(0x2f) ;\
-       .long   p1(0x30),p1(0x31),p1(0x32),p1(0x33),p1(0x34),p1(0x35),p1(0x36),p1(0x37) ;\
-       .long   p1(0x38),p1(0x39),p1(0x3a),p1(0x3b),p1(0x3c),p1(0x3d),p1(0x3e),p1(0x3f)
-#define im_data2(p1) \
-       .long   p1(0x40),p1(0x41),p1(0x42),p1(0x43),p1(0x44),p1(0x45),p1(0x46),p1(0x47) ;\
-       .long   p1(0x48),p1(0x49),p1(0x4a),p1(0x4b),p1(0x4c),p1(0x4d),p1(0x4e),p1(0x4f) ;\
-       .long   p1(0x50),p1(0x51),p1(0x52),p1(0x53),p1(0x54),p1(0x55),p1(0x56),p1(0x57) ;\
-       .long   p1(0x58),p1(0x59),p1(0x5a),p1(0x5b),p1(0x5c),p1(0x5d),p1(0x5e),p1(0x5f)
-#define im_data3(p1) \
-       .long   p1(0x60),p1(0x61),p1(0x62),p1(0x63),p1(0x64),p1(0x65),p1(0x66),p1(0x67) ;\
-       .long   p1(0x68),p1(0x69),p1(0x6a),p1(0x6b),p1(0x6c),p1(0x6d),p1(0x6e),p1(0x6f) ;\
-       .long   p1(0x70),p1(0x71),p1(0x72),p1(0x73),p1(0x74),p1(0x75),p1(0x76),p1(0x77) ;\
-       .long   p1(0x78),p1(0x79),p1(0x7a),p1(0x7b),p1(0x7c),p1(0x7d),p1(0x7e),p1(0x7f)
-#define im_data4(p1) \
-       .long   p1(0x80),p1(0x81),p1(0x82),p1(0x83),p1(0x84),p1(0x85),p1(0x86),p1(0x87) ;\
-       .long   p1(0x88),p1(0x89),p1(0x8a),p1(0x8b),p1(0x8c),p1(0x8d),p1(0x8e),p1(0x8f) ;\
-       .long   p1(0x90),p1(0x91),p1(0x92),p1(0x93),p1(0x94),p1(0x95),p1(0x96),p1(0x97) ;\
-       .long   p1(0x98),p1(0x99),p1(0x9a),p1(0x9b),p1(0x9c),p1(0x9d),p1(0x9e),p1(0x9f)
-#define im_data5(p1) \
-       .long   p1(0xa0),p1(0xa1),p1(0xa2),p1(0xa3),p1(0xa4),p1(0xa5),p1(0xa6),p1(0xa7) ;\
-       .long   p1(0xa8),p1(0xa9),p1(0xaa),p1(0xab),p1(0xac),p1(0xad),p1(0xae),p1(0xaf) ;\
-       .long   p1(0xb0),p1(0xb1),p1(0xb2),p1(0xb3),p1(0xb4),p1(0xb5),p1(0xb6),p1(0xb7) ;\
-       .long   p1(0xb8),p1(0xb9),p1(0xba),p1(0xbb),p1(0xbc),p1(0xbd),p1(0xbe),p1(0xbf)
-#define im_data6(p1) \
-       .long   p1(0xc0),p1(0xc1),p1(0xc2),p1(0xc3),p1(0xc4),p1(0xc5),p1(0xc6),p1(0xc7) ;\
-       .long   p1(0xc8),p1(0xc9),p1(0xca),p1(0xcb),p1(0xcc),p1(0xcd),p1(0xce),p1(0xcf) ;\
-       .long   p1(0xd0),p1(0xd1),p1(0xd2),p1(0xd3),p1(0xd4),p1(0xd5),p1(0xd6),p1(0xd7) ;\
-       .long   p1(0xd8),p1(0xd9),p1(0xda),p1(0xdb),p1(0xdc),p1(0xdd),p1(0xde),p1(0xdf)
-#define im_data7(p1) \
-       .long   p1(0xe0),p1(0xe1),p1(0xe2),p1(0xe3),p1(0xe4),p1(0xe5),p1(0xe6),p1(0xe7) ;\
-       .long   p1(0xe8),p1(0xe9),p1(0xea),p1(0xeb),p1(0xec),p1(0xed),p1(0xee),p1(0xef) ;\
-       .long   p1(0xf0),p1(0xf1),p1(0xf2),p1(0xf3),p1(0xf4),p1(0xf5),p1(0xf6),p1(0xf7) ;\
-       .long   p1(0xf8),p1(0xf9),p1(0xfa),p1(0xfb),p1(0xfc),p1(0xfd),p1(0xfe),p1(0xff)
-
-// S-box data - 256 entries
-
-#define sb_data0(p1) \
-       .long   p1(0x63),p1(0x7c),p1(0x77),p1(0x7b),p1(0xf2),p1(0x6b),p1(0x6f),p1(0xc5) ;\
-       .long   p1(0x30),p1(0x01),p1(0x67),p1(0x2b),p1(0xfe),p1(0xd7),p1(0xab),p1(0x76) ;\
-       .long   p1(0xca),p1(0x82),p1(0xc9),p1(0x7d),p1(0xfa),p1(0x59),p1(0x47),p1(0xf0) ;\
-       .long   p1(0xad),p1(0xd4),p1(0xa2),p1(0xaf),p1(0x9c),p1(0xa4),p1(0x72),p1(0xc0)
-#define sb_data1(p1) \
-       .long   p1(0xb7),p1(0xfd),p1(0x93),p1(0x26),p1(0x36),p1(0x3f),p1(0xf7),p1(0xcc) ;\
-       .long   p1(0x34),p1(0xa5),p1(0xe5),p1(0xf1),p1(0x71),p1(0xd8),p1(0x31),p1(0x15) ;\
-       .long   p1(0x04),p1(0xc7),p1(0x23),p1(0xc3),p1(0x18),p1(0x96),p1(0x05),p1(0x9a) ;\
-       .long   p1(0x07),p1(0x12),p1(0x80),p1(0xe2),p1(0xeb),p1(0x27),p1(0xb2),p1(0x75)
-#define sb_data2(p1) \
-       .long   p1(0x09),p1(0x83),p1(0x2c),p1(0x1a),p1(0x1b),p1(0x6e),p1(0x5a),p1(0xa0) ;\
-       .long   p1(0x52),p1(0x3b),p1(0xd6),p1(0xb3),p1(0x29),p1(0xe3),p1(0x2f),p1(0x84) ;\
-       .long   p1(0x53),p1(0xd1),p1(0x00),p1(0xed),p1(0x20),p1(0xfc),p1(0xb1),p1(0x5b) ;\
-       .long   p1(0x6a),p1(0xcb),p1(0xbe),p1(0x39),p1(0x4a),p1(0x4c),p1(0x58),p1(0xcf)
-#define sb_data3(p1) \
-       .long   p1(0xd0),p1(0xef),p1(0xaa),p1(0xfb),p1(0x43),p1(0x4d),p1(0x33),p1(0x85) ;\
-       .long   p1(0x45),p1(0xf9),p1(0x02),p1(0x7f),p1(0x50),p1(0x3c),p1(0x9f),p1(0xa8) ;\
-       .long   p1(0x51),p1(0xa3),p1(0x40),p1(0x8f),p1(0x92),p1(0x9d),p1(0x38),p1(0xf5) ;\
-       .long   p1(0xbc),p1(0xb6),p1(0xda),p1(0x21),p1(0x10),p1(0xff),p1(0xf3),p1(0xd2)
-#define sb_data4(p1) \
-       .long   p1(0xcd),p1(0x0c),p1(0x13),p1(0xec),p1(0x5f),p1(0x97),p1(0x44),p1(0x17) ;\
-       .long   p1(0xc4),p1(0xa7),p1(0x7e),p1(0x3d),p1(0x64),p1(0x5d),p1(0x19),p1(0x73) ;\
-       .long   p1(0x60),p1(0x81),p1(0x4f),p1(0xdc),p1(0x22),p1(0x2a),p1(0x90),p1(0x88) ;\
-       .long   p1(0x46),p1(0xee),p1(0xb8),p1(0x14),p1(0xde),p1(0x5e),p1(0x0b),p1(0xdb)
-#define sb_data5(p1) \
-       .long   p1(0xe0),p1(0x32),p1(0x3a),p1(0x0a),p1(0x49),p1(0x06),p1(0x24),p1(0x5c) ;\
-       .long   p1(0xc2),p1(0xd3),p1(0xac),p1(0x62),p1(0x91),p1(0x95),p1(0xe4),p1(0x79) ;\
-       .long   p1(0xe7),p1(0xc8),p1(0x37),p1(0x6d),p1(0x8d),p1(0xd5),p1(0x4e),p1(0xa9) ;\
-       .long   p1(0x6c),p1(0x56),p1(0xf4),p1(0xea),p1(0x65),p1(0x7a),p1(0xae),p1(0x08)
-#define sb_data6(p1) \
-       .long   p1(0xba),p1(0x78),p1(0x25),p1(0x2e),p1(0x1c),p1(0xa6),p1(0xb4),p1(0xc6) ;\
-       .long   p1(0xe8),p1(0xdd),p1(0x74),p1(0x1f),p1(0x4b),p1(0xbd),p1(0x8b),p1(0x8a) ;\
-       .long   p1(0x70),p1(0x3e),p1(0xb5),p1(0x66),p1(0x48),p1(0x03),p1(0xf6),p1(0x0e) ;\
-       .long   p1(0x61),p1(0x35),p1(0x57),p1(0xb9),p1(0x86),p1(0xc1),p1(0x1d),p1(0x9e)
-#define sb_data7(p1) \
-       .long   p1(0xe1),p1(0xf8),p1(0x98),p1(0x11),p1(0x69),p1(0xd9),p1(0x8e),p1(0x94) ;\
-       .long   p1(0x9b),p1(0x1e),p1(0x87),p1(0xe9),p1(0xce),p1(0x55),p1(0x28),p1(0xdf) ;\
-       .long   p1(0x8c),p1(0xa1),p1(0x89),p1(0x0d),p1(0xbf),p1(0xe6),p1(0x42),p1(0x68) ;\
-       .long   p1(0x41),p1(0x99),p1(0x2d),p1(0x0f),p1(0xb0),p1(0x54),p1(0xbb),p1(0x16)
-
-// Inverse S-box data - 256 entries
-
-#define ib_data0(p1) \
-       .long   p1(0x52),p1(0x09),p1(0x6a),p1(0xd5),p1(0x30),p1(0x36),p1(0xa5),p1(0x38) ;\
-       .long   p1(0xbf),p1(0x40),p1(0xa3),p1(0x9e),p1(0x81),p1(0xf3),p1(0xd7),p1(0xfb) ;\
-       .long   p1(0x7c),p1(0xe3),p1(0x39),p1(0x82),p1(0x9b),p1(0x2f),p1(0xff),p1(0x87) ;\
-       .long   p1(0x34),p1(0x8e),p1(0x43),p1(0x44),p1(0xc4),p1(0xde),p1(0xe9),p1(0xcb)
-#define ib_data1(p1) \
-       .long   p1(0x54),p1(0x7b),p1(0x94),p1(0x32),p1(0xa6),p1(0xc2),p1(0x23),p1(0x3d) ;\
-       .long   p1(0xee),p1(0x4c),p1(0x95),p1(0x0b),p1(0x42),p1(0xfa),p1(0xc3),p1(0x4e) ;\
-       .long   p1(0x08),p1(0x2e),p1(0xa1),p1(0x66),p1(0x28),p1(0xd9),p1(0x24),p1(0xb2) ;\
-       .long   p1(0x76),p1(0x5b),p1(0xa2),p1(0x49),p1(0x6d),p1(0x8b),p1(0xd1),p1(0x25)
-#define ib_data2(p1) \
-       .long   p1(0x72),p1(0xf8),p1(0xf6),p1(0x64),p1(0x86),p1(0x68),p1(0x98),p1(0x16) ;\
-       .long   p1(0xd4),p1(0xa4),p1(0x5c),p1(0xcc),p1(0x5d),p1(0x65),p1(0xb6),p1(0x92) ;\
-       .long   p1(0x6c),p1(0x70),p1(0x48),p1(0x50),p1(0xfd),p1(0xed),p1(0xb9),p1(0xda) ;\
-       .long   p1(0x5e),p1(0x15),p1(0x46),p1(0x57),p1(0xa7),p1(0x8d),p1(0x9d),p1(0x84)
-#define ib_data3(p1) \
-       .long   p1(0x90),p1(0xd8),p1(0xab),p1(0x00),p1(0x8c),p1(0xbc),p1(0xd3),p1(0x0a) ;\
-       .long   p1(0xf7),p1(0xe4),p1(0x58),p1(0x05),p1(0xb8),p1(0xb3),p1(0x45),p1(0x06) ;\
-       .long   p1(0xd0),p1(0x2c),p1(0x1e),p1(0x8f),p1(0xca),p1(0x3f),p1(0x0f),p1(0x02) ;\
-       .long   p1(0xc1),p1(0xaf),p1(0xbd),p1(0x03),p1(0x01),p1(0x13),p1(0x8a),p1(0x6b)
-#define ib_data4(p1) \
-       .long   p1(0x3a),p1(0x91),p1(0x11),p1(0x41),p1(0x4f),p1(0x67),p1(0xdc),p1(0xea) ;\
-       .long   p1(0x97),p1(0xf2),p1(0xcf),p1(0xce),p1(0xf0),p1(0xb4),p1(0xe6),p1(0x73) ;\
-       .long   p1(0x96),p1(0xac),p1(0x74),p1(0x22),p1(0xe7),p1(0xad),p1(0x35),p1(0x85) ;\
-       .long   p1(0xe2),p1(0xf9),p1(0x37),p1(0xe8),p1(0x1c),p1(0x75),p1(0xdf),p1(0x6e)
-#define ib_data5(p1) \
-       .long   p1(0x47),p1(0xf1),p1(0x1a),p1(0x71),p1(0x1d),p1(0x29),p1(0xc5),p1(0x89) ;\
-       .long   p1(0x6f),p1(0xb7),p1(0x62),p1(0x0e),p1(0xaa),p1(0x18),p1(0xbe),p1(0x1b) ;\
-       .long   p1(0xfc),p1(0x56),p1(0x3e),p1(0x4b),p1(0xc6),p1(0xd2),p1(0x79),p1(0x20) ;\
-       .long   p1(0x9a),p1(0xdb),p1(0xc0),p1(0xfe),p1(0x78),p1(0xcd),p1(0x5a),p1(0xf4)
-#define ib_data6(p1) \
-       .long   p1(0x1f),p1(0xdd),p1(0xa8),p1(0x33),p1(0x88),p1(0x07),p1(0xc7),p1(0x31) ;\
-       .long   p1(0xb1),p1(0x12),p1(0x10),p1(0x59),p1(0x27),p1(0x80),p1(0xec),p1(0x5f) ;\
-       .long   p1(0x60),p1(0x51),p1(0x7f),p1(0xa9),p1(0x19),p1(0xb5),p1(0x4a),p1(0x0d) ;\
-       .long   p1(0x2d),p1(0xe5),p1(0x7a),p1(0x9f),p1(0x93),p1(0xc9),p1(0x9c),p1(0xef)
-#define ib_data7(p1) \
-       .long   p1(0xa0),p1(0xe0),p1(0x3b),p1(0x4d),p1(0xae),p1(0x2a),p1(0xf5),p1(0xb0) ;\
-       .long   p1(0xc8),p1(0xeb),p1(0xbb),p1(0x3c),p1(0x83),p1(0x53),p1(0x99),p1(0x61) ;\
-       .long   p1(0x17),p1(0x2b),p1(0x04),p1(0x7e),p1(0xba),p1(0x77),p1(0xd6),p1(0x26) ;\
-       .long   p1(0xe1),p1(0x69),p1(0x14),p1(0x63),p1(0x55),p1(0x21),p1(0x0c),p1(0x7d)
-
-// The rcon_table (needed for the key schedule)
-//
-// Here is original Dr Brian Gladman's source code:
-//     _rcon_tab:
-//     %assign x   1
-//     %rep 29
-//         dd  x
-//     %assign x f2(x)
-//     %endrep
-//
-// Here is precomputed output (it's more portable this way):
-
-       .align  ALIGN32BYTES
-aes_rcon_tab:
-       .long   0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80
-       .long   0x1b,0x36,0x6c,0xd8,0xab,0x4d,0x9a,0x2f
-       .long   0x5e,0xbc,0x63,0xc6,0x97,0x35,0x6a,0xd4
-       .long   0xb3,0x7d,0xfa,0xef,0xc5
-
-// The forward xor tables
-
-       .align  ALIGN32BYTES
-aes_ft_tab:
-       sb_data0(u0)
-       sb_data1(u0)
-       sb_data2(u0)
-       sb_data3(u0)
-       sb_data4(u0)
-       sb_data5(u0)
-       sb_data6(u0)
-       sb_data7(u0)
-
-       sb_data0(u1)
-       sb_data1(u1)
-       sb_data2(u1)
-       sb_data3(u1)
-       sb_data4(u1)
-       sb_data5(u1)
-       sb_data6(u1)
-       sb_data7(u1)
-
-       sb_data0(u2)
-       sb_data1(u2)
-       sb_data2(u2)
-       sb_data3(u2)
-       sb_data4(u2)
-       sb_data5(u2)
-       sb_data6(u2)
-       sb_data7(u2)
-
-       sb_data0(u3)
-       sb_data1(u3)
-       sb_data2(u3)
-       sb_data3(u3)
-       sb_data4(u3)
-       sb_data5(u3)
-       sb_data6(u3)
-       sb_data7(u3)
-
-       .align  ALIGN32BYTES
-aes_fl_tab:
-       sb_data0(w0)
-       sb_data1(w0)
-       sb_data2(w0)
-       sb_data3(w0)
-       sb_data4(w0)
-       sb_data5(w0)
-       sb_data6(w0)
-       sb_data7(w0)
-
-       sb_data0(w1)
-       sb_data1(w1)
-       sb_data2(w1)
-       sb_data3(w1)
-       sb_data4(w1)
-       sb_data5(w1)
-       sb_data6(w1)
-       sb_data7(w1)
-
-       sb_data0(w2)
-       sb_data1(w2)
-       sb_data2(w2)
-       sb_data3(w2)
-       sb_data4(w2)
-       sb_data5(w2)
-       sb_data6(w2)
-       sb_data7(w2)
-
-       sb_data0(w3)
-       sb_data1(w3)
-       sb_data2(w3)
-       sb_data3(w3)
-       sb_data4(w3)
-       sb_data5(w3)
-       sb_data6(w3)
-       sb_data7(w3)
-
-// The inverse xor tables
-
-       .align  ALIGN32BYTES
-aes_it_tab:
-       ib_data0(v0)
-       ib_data1(v0)
-       ib_data2(v0)
-       ib_data3(v0)
-       ib_data4(v0)
-       ib_data5(v0)
-       ib_data6(v0)
-       ib_data7(v0)
-
-       ib_data0(v1)
-       ib_data1(v1)
-       ib_data2(v1)
-       ib_data3(v1)
-       ib_data4(v1)
-       ib_data5(v1)
-       ib_data6(v1)
-       ib_data7(v1)
-
-       ib_data0(v2)
-       ib_data1(v2)
-       ib_data2(v2)
-       ib_data3(v2)
-       ib_data4(v2)
-       ib_data5(v2)
-       ib_data6(v2)
-       ib_data7(v2)
-
-       ib_data0(v3)
-       ib_data1(v3)
-       ib_data2(v3)
-       ib_data3(v3)
-       ib_data4(v3)
-       ib_data5(v3)
-       ib_data6(v3)
-       ib_data7(v3)
-
-       .align  ALIGN32BYTES
-aes_il_tab:
-       ib_data0(w0)
-       ib_data1(w0)
-       ib_data2(w0)
-       ib_data3(w0)
-       ib_data4(w0)
-       ib_data5(w0)
-       ib_data6(w0)
-       ib_data7(w0)
-
-       ib_data0(w1)
-       ib_data1(w1)
-       ib_data2(w1)
-       ib_data3(w1)
-       ib_data4(w1)
-       ib_data5(w1)
-       ib_data6(w1)
-       ib_data7(w1)
-
-       ib_data0(w2)
-       ib_data1(w2)
-       ib_data2(w2)
-       ib_data3(w2)
-       ib_data4(w2)
-       ib_data5(w2)
-       ib_data6(w2)
-       ib_data7(w2)
-
-       ib_data0(w3)
-       ib_data1(w3)
-       ib_data2(w3)
-       ib_data3(w3)
-       ib_data4(w3)
-       ib_data5(w3)
-       ib_data6(w3)
-       ib_data7(w3)
-
-// The inverse mix column tables
-
-       .align  ALIGN32BYTES
-aes_im_tab:
-       im_data0(v0)
-       im_data1(v0)
-       im_data2(v0)
-       im_data3(v0)
-       im_data4(v0)
-       im_data5(v0)
-       im_data6(v0)
-       im_data7(v0)
-
-       im_data0(v1)
-       im_data1(v1)
-       im_data2(v1)
-       im_data3(v1)
-       im_data4(v1)
-       im_data5(v1)
-       im_data6(v1)
-       im_data7(v1)
-
-       im_data0(v2)
-       im_data1(v2)
-       im_data2(v2)
-       im_data3(v2)
-       im_data4(v2)
-       im_data5(v2)
-       im_data6(v2)
-       im_data7(v2)
-
-       im_data0(v3)
-       im_data1(v3)
-       im_data2(v3)
-       im_data3(v3)
-       im_data4(v3)
-       im_data5(v3)
-       im_data6(v3)
-       im_data7(v3)
diff --git a/lib/libcrypto/libaes/test_main.c b/lib/libcrypto/libaes/test_main.c
deleted file mode 100644 (file)
index 5fd4599..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include "aes_cbc.h"
-#define AES_BLOCK_SIZE 16
-#define KEY_SIZE       128     /* bits */
-#define KEY            "1234567890123456"
-#define STR            "hola guaso como estaisss ... 012"
-#define STRSZ          (sizeof(STR)-1)
-
-#define EMT_AESCBC_BLKLEN AES_BLOCK_SIZE
-#define AES_CONTEXT_T  aes_context
-#define EMT_ESPAES_KEY_SZ 16
-int pretty_print(const unsigned char *buf, int count) {
-       int i=0;
-       for (;i<count;i++) {
-               if (i%8==0) putchar(' ');
-               if (i%16==0) putchar('\n');
-               printf ("%02hhx ", buf[i]);
-       }
-       putchar('\n');
-       return i;
-}
-//#define SIZE STRSZ/2
-#define SIZE STRSZ
-int main() {
-       int ret;
-       char buf0[SIZE+1], buf1[SIZE+1];
-       char IV[AES_BLOCK_SIZE]="\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0";
-       aes_context ac; 
-       AES_set_key(&ac, KEY, KEY_SIZE);
-       //pretty_print((char *)&ac.aes_e_key, sizeof(ac.aes_e_key));
-       memset(buf0, 0, sizeof (buf0));
-       memset(buf1, 0, sizeof (buf1));
-       ret=AES_cbc_encrypt(&ac, STR, buf0, SIZE, IV, 1);
-       pretty_print(buf0, SIZE);
-       printf("size=%d ret=%d\n%s\n", SIZE, ret, buf0);
-       ret=AES_cbc_encrypt(&ac, buf0, buf1, SIZE, IV, 0);
-       printf("size=%d ret=%d\n%s\n", SIZE, ret, buf1);
-       return 0;
-}
diff --git a/lib/libcrypto/libaes/test_main_mac.c b/lib/libcrypto/libaes/test_main_mac.c
deleted file mode 100644 (file)
index eea47dc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <string.h>
-#include "aes.h"
-#include "aes_xcbc_mac.h"
-#define STR "Hola guasssso c|mo estais ...012"  
-void print_hash(const __u8 *hash) {
-       printf("%08x %08x %08x %08x\n", 
-                       *(__u32*)(&hash[0]), 
-                       *(__u32*)(&hash[4]), 
-                       *(__u32*)(&hash[8]), 
-                       *(__u32*)(&hash[12]));
-}
-int main(int argc, char *argv[]) {
-       aes_block key= { 0xdeadbeef, 0xceedcaca, 0xcafebabe, 0xff010204 };
-       __u8  hash[16];
-       char *str = argv[1];
-       aes_context_mac ctx;
-       if (str==NULL) {
-               fprintf(stderr, "pasame el str\n");
-               return 255;
-       }
-       AES_xcbc_mac_set_key(&ctx, (__u8 *)&key, sizeof(key));
-       AES_xcbc_mac_hash(&ctx, str, strlen(str), hash);
-       print_hash(hash);
-       str[2]='x';
-       AES_xcbc_mac_hash(&ctx, str, strlen(str), hash);
-       print_hash(hash);
-       return 0;
-}
diff --git a/lib/libcrypto/libblowfish/COPYRIGHT b/lib/libcrypto/libblowfish/COPYRIGHT
deleted file mode 100644 (file)
index 6857223..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
-All rights reserved.
-
-This package is an Blowfish implementation written
-by Eric Young (eay@cryptsoft.com).
-
-This library is free for commercial and non-commercial use as long as
-the following conditions are aheared to.  The following conditions
-apply to all code found in this distribution.
-
-Copyright remains Eric Young's, and as such any Copyright notices in
-the code are not to be removed.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
-   must display the following acknowledgement:
-   This product includes software developed by Eric Young (eay@cryptsoft.com)
-
-THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-The license and distribution terms for any publically available version or
-derivative of this code cannot be changed.  i.e. this code cannot simply be
-copied and put under another distrubution license
-[including the GNU Public License.]
-
-The reason behind this being stated in this direct manner is past
-experience in code simply being copied and the attribution removed
-from it and then being distributed as part of other packages. This
-implementation was a non-trivial and unpaid effort.
diff --git a/lib/libcrypto/libblowfish/INSTALL b/lib/libcrypto/libblowfish/INSTALL
deleted file mode 100644 (file)
index 3b25923..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-This Eric Young's blowfish implementation, taken from his SSLeay library
-and made available as a separate library.
-The version number (0.7.2m) is the SSLeay version that this library was
-taken from.
-To build, just unpack and type make.
-If you are not using gcc, edit the Makefile.
-If you are compiling for an x86 box, try the assembler (it needs improving).
-There are also some compile time options that can improve performance,
-these are documented in the Makefile.
-eric 15-Apr-1997
diff --git a/lib/libcrypto/libblowfish/Makefile b/lib/libcrypto/libblowfish/Makefile
deleted file mode 100644 (file)
index 6272404..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-#
-# SSLeay/crypto/blowfish/Makefile
-#
-
-DIR=   bf
-TOP=   ../..
-CC=    cc
-CPP=   $(CC) -E
-INC=-I ../include 
-CFLAG=-g -D__KERNEL__ -I/usr/src/linux/include
-INSTALL_PREFIX=
-OPENSSLDIR=     /usr/local/ssl
-INSTALLTOP=/usr/local/ssl
-MAKE=          make -f Makefile.ssl
-MAKEDEPEND=    $(TOP)/util/domd $(TOP)
-MAKEFILE=      Makefile.ssl
-AR=            ar r
-RANLIB=                ranlib
-PERL=          perl
-
-CFLAGS= $(INC) $(CFLAG)
-
-.c.o:
-       $(CC) $(CPPFLAGS) $(CFLAGS) $(INC) -c $< -o $@
-
-BF_ASM-i586 := bf-586.pl
-BF_ASM-i686 := bf-686.pl
-BF_ENC := bf_enc.o
-
-ASM-$(ARCH_ASM):=1
-ASM_X86:=$(ASM-i586)$(ASM-i686)
-ifneq ($(strip $(ASM_X86)),)
-       BF_ENC= asm/bx86-elf.o
-       BF_ASM= $(BF_ASM-$(ARCH_ASM))
-endif
-
-
-GENERAL=Makefile
-TEST=bftest.c
-APPS=
-
-LIB=libblowfish.a
-LIBSRC=bf_skey.c bf_enc.c 
-LIBOBJ=bf_skey.o $(BF_ENC)
-
-SRC= $(LIBSRC)
-
-EXHEADER= blowfish.h
-HEADER=        bf_pi.h bf_locl.h $(EXHEADER)
-
-ALL=    $(GENERAL) $(SRC) $(HEADER)
-
-#top:
-#      (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
-
-all:   lib
-
-lib:   $(LIB)
-
-$(LIB):        $(LIBOBJ)
-       $(AR) $(LIB) $(LIBOBJ)
-       $(RANLIB) $(LIB)
-
-# elf
-asm/bx86-elf.o: asm/bx86unix.cpp
-       $(CPP) -DELF -x c asm/bx86unix.cpp | as -o asm/bx86-elf.o
-
-# solaris
-asm/bx86-sol.o: asm/bx86unix.cpp
-       $(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
-       as -o asm/bx86-sol.o asm/bx86-sol.s
-       rm -f asm/bx86-sol.s
-
-# a.out
-asm/bx86-out.o: asm/bx86unix.cpp
-       $(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o
-
-# bsdi
-asm/bx86bsdi.o: asm/bx86unix.cpp
-       $(CPP) -DBSDI asm/bx86unix.cpp | sed 's/ :/:/' | as -o asm/bx86bsdi.o
-
-asm/bx86unix.cpp: asm/$(BF_ASM) ../perlasm/x86asm.pl ../perlasm/cbc.pl
-       (cd asm; $(PERL) $(BF_ASM) cpp $(PROCESSOR) >bx86unix.cpp)
-
-files:
-       $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
-
-links:
-       @$(TOP)/util/point.sh Makefile.ssl Makefile
-       @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
-       @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
-       @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
-
-install: installs
-
-installs:
-       @for i in $(EXHEADER) ; \
-       do  \
-       (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
-       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
-       done;
-
-tags:
-       ctags $(SRC)
-
-tests:
-
-lint:
-       lint -DLINT $(INCLUDES) $(SRC)>fluff
-
-depend:
-       $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
-
-dclean:
-       $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
-       mv -f Makefile.new $(MAKEFILE)
-
-clean:
-       rm -f asm/bx86unix.cpp *.o asm/*.o *.obj $(LIB) tags core .pure .nfs* *.old *.bak fluff
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/lib/libcrypto/libblowfish/Makefile.ssl b/lib/libcrypto/libblowfish/Makefile.ssl
deleted file mode 100644 (file)
index adc9eec..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#
-# SSLeay/crypto/blowfish/Makefile
-#
-
-DIR=   bf
-TOP=   ../..
-CC=    cc
-CPP=   $(CC) -E
-INCLUDES=
-CFLAG=-g
-INSTALL_PREFIX=
-OPENSSLDIR=     /usr/local/ssl
-INSTALLTOP=/usr/local/ssl
-MAKE=          make -f Makefile.ssl
-MAKEDEPEND=    $(TOP)/util/domd $(TOP)
-MAKEFILE=      Makefile.ssl
-AR=            ar r
-
-BF_ENC=                bf_enc.o
-# or use
-#DES_ENC=      bx86-elf.o
-
-CFLAGS= $(INCLUDES) $(CFLAG)
-
-GENERAL=Makefile
-TEST=bftest.c
-APPS=
-
-LIB=$(TOP)/libcrypto.a
-LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c 
-LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
-
-SRC= $(LIBSRC)
-
-EXHEADER= blowfish.h
-HEADER=        bf_pi.h bf_locl.h $(EXHEADER)
-
-ALL=    $(GENERAL) $(SRC) $(HEADER)
-
-top:
-       (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
-
-all:   lib
-
-lib:   $(LIBOBJ)
-       $(AR) $(LIB) $(LIBOBJ)
-       $(RANLIB) $(LIB)
-       @touch lib
-
-# elf
-asm/bx86-elf.o: asm/bx86unix.cpp
-       $(CPP) -DELF -x c asm/bx86unix.cpp | as -o asm/bx86-elf.o
-
-# solaris
-asm/bx86-sol.o: asm/bx86unix.cpp
-       $(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
-       as -o asm/bx86-sol.o asm/bx86-sol.s
-       rm -f asm/bx86-sol.s
-
-# a.out
-asm/bx86-out.o: asm/bx86unix.cpp
-       $(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o
-
-# bsdi
-asm/bx86bsdi.o: asm/bx86unix.cpp
-       $(CPP) -DBSDI asm/bx86unix.cpp | sed 's/ :/:/' | as -o asm/bx86bsdi.o
-
-asm/bx86unix.cpp: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
-       (cd asm; $(PERL) bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp)
-
-files:
-       $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
-
-links:
-       @$(TOP)/util/point.sh Makefile.ssl Makefile
-       @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
-       @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
-       @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
-
-install: installs
-
-installs:
-       @for i in $(EXHEADER) ; \
-       do  \
-       (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
-       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
-       done;
-
-tags:
-       ctags $(SRC)
-
-tests:
-
-lint:
-       lint -DLINT $(INCLUDES) $(SRC)>fluff
-
-depend:
-       $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
-
-dclean:
-       $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
-       mv -f Makefile.new $(MAKEFILE)
-
-clean:
-       rm -f asm/bx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-bf_cfb64.o: ../../include/openssl/blowfish.h
-bf_cfb64.o: ../../include/openssl/opensslconf.h bf_locl.h
-bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/opensslconf.h
-bf_ecb.o: ../../include/openssl/opensslv.h bf_locl.h
-bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/opensslconf.h
-bf_enc.o: bf_locl.h
-bf_ofb64.o: ../../include/openssl/blowfish.h
-bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h
-bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/opensslconf.h
-bf_skey.o: bf_locl.h bf_pi.h
diff --git a/lib/libcrypto/libblowfish/README b/lib/libcrypto/libblowfish/README
deleted file mode 100644 (file)
index f2712fd..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-This is a quick packaging up of my blowfish code into a library.
-It has been lifted from SSLeay.
-The copyright notices seem a little harsh because I have not spent the
-time to rewrite the conditions from the normal SSLeay ones.
-
-Basically if you just want to play with the library, not a problem.
-
-eric 15-Apr-1997
diff --git a/lib/libcrypto/libblowfish/VERSION b/lib/libcrypto/libblowfish/VERSION
deleted file mode 100644 (file)
index be99585..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-The version numbers will follow my SSL implementation
-
-0.7.2r - Some reasonable default compiler options from 
-       Peter Gutman <pgut001@cs.auckland.ac.nz>
-
-0.7.2m - the first release
diff --git a/lib/libcrypto/libblowfish/asm/bf-586.pl b/lib/libcrypto/libblowfish/asm/bf-586.pl
deleted file mode 100644 (file)
index f00f3f4..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/perl
-
-push(@INC,"perlasm","../../perlasm");
-require "x86asm.pl";
-require "cbc.pl";
-
-&asm_init($ARGV[0],"bf-586.pl",$ARGV[$#ARGV] eq "386");
-
-$BF_ROUNDS=16;
-$BF_OFF=($BF_ROUNDS+2)*4;
-$L="edi";
-$R="esi";
-$P="ebp";
-$tmp1="eax";
-$tmp2="ebx";
-$tmp3="ecx";
-$tmp4="edx";
-
-&BF_encrypt("BF_encrypt",1);
-&BF_encrypt("BF_decrypt",0);
-&cbc("BF_cbc_encrypt","BF_encrypt","BF_decrypt",1,4,5,3,-1,-1);
-&asm_finish();
-
-sub BF_encrypt
-       {
-       local($name,$enc)=@_;
-
-       &function_begin_B($name,"");
-
-       &comment("");
-
-       &push("ebp");
-       &push("ebx");
-       &mov($tmp2,&wparam(0));
-       &mov($P,&wparam(1));
-       &push("esi");
-       &push("edi");
-
-       &comment("Load the 2 words");
-       &mov($L,&DWP(0,$tmp2,"",0));
-       &mov($R,&DWP(4,$tmp2,"",0));
-
-       &xor(   $tmp1,  $tmp1);
-
-       # encrypting part
-
-       if ($enc)
-               {
-                &mov($tmp2,&DWP(0,$P,"",0));
-               &xor(   $tmp3,  $tmp3);
-
-               &xor($L,$tmp2);
-               for ($i=0; $i<$BF_ROUNDS; $i+=2)
-                       {
-                       &comment("");
-                       &comment("Round $i");
-                       &BF_ENCRYPT($i+1,$R,$L,$P,$tmp1,$tmp2,$tmp3,$tmp4,1);
-
-                       &comment("");
-                       &comment("Round ".sprintf("%d",$i+1));
-                       &BF_ENCRYPT($i+2,$L,$R,$P,$tmp1,$tmp2,$tmp3,$tmp4,1);
-                       }
-               # &mov($tmp1,&wparam(0)); In last loop
-               &mov($tmp4,&DWP(($BF_ROUNDS+1)*4,$P,"",0));
-               }
-       else
-               {
-                &mov($tmp2,&DWP(($BF_ROUNDS+1)*4,$P,"",0));
-               &xor(   $tmp3,  $tmp3);
-
-               &xor($L,$tmp2);
-               for ($i=$BF_ROUNDS; $i>0; $i-=2)
-                       {
-                       &comment("");
-                       &comment("Round $i");
-                       &BF_ENCRYPT($i,$R,$L,$P,$tmp1,$tmp2,$tmp3,$tmp4,0);
-                       &comment("");
-                       &comment("Round ".sprintf("%d",$i-1));
-                       &BF_ENCRYPT($i-1,$L,$R,$P,$tmp1,$tmp2,$tmp3,$tmp4,0);
-                       }
-               # &mov($tmp1,&wparam(0)); In last loop
-               &mov($tmp4,&DWP(0,$P,"",0));
-               }
-
-       &xor($R,$tmp4);
-       &mov(&DWP(4,$tmp1,"",0),$L);
-
-       &mov(&DWP(0,$tmp1,"",0),$R);
-       &function_end($name);
-       }
-
-sub BF_ENCRYPT
-       {
-       local($i,$L,$R,$P,$tmp1,$tmp2,$tmp3,$tmp4,$enc)=@_;
-
-       &mov(   $tmp4,          &DWP(&n2a($i*4),$P,"",0)); # for next round
-
-       &mov(   $tmp2,          $R);
-       &xor(   $L,             $tmp4);
-
-       &shr(   $tmp2,          16);
-       &mov(   $tmp4,          $R);
-
-       &movb(  &LB($tmp1),     &HB($tmp2));    # A
-       &and(   $tmp2,          0xff);          # B
-
-       &movb(  &LB($tmp3),     &HB($tmp4));    # C
-       &and(   $tmp4,          0xff);          # D
-
-       &mov(   $tmp1,          &DWP(&n2a($BF_OFF+0x0000),$P,$tmp1,4));
-       &mov(   $tmp2,          &DWP(&n2a($BF_OFF+0x0400),$P,$tmp2,4));
-
-       &add(   $tmp2,          $tmp1);
-       &mov(   $tmp1,          &DWP(&n2a($BF_OFF+0x0800),$P,$tmp3,4));
-
-       &xor(   $tmp2,          $tmp1);
-       &mov(   $tmp4,          &DWP(&n2a($BF_OFF+0x0C00),$P,$tmp4,4));
-
-       &add(   $tmp2,          $tmp4);
-       if (($enc && ($i != 16)) || ((!$enc) && ($i != 1)))
-               { &xor( $tmp1,          $tmp1); }
-       else
-               {
-               &comment("Load parameter 0 ($i) enc=$enc");
-               &mov($tmp1,&wparam(0));
-               } # In last loop
-
-       &xor(   $L,             $tmp2);
-       # delay
-       }
-
-sub n2a
-       {
-       sprintf("%d",$_[0]);
-       }
-
diff --git a/lib/libcrypto/libblowfish/asm/bf-686.pl b/lib/libcrypto/libblowfish/asm/bf-686.pl
deleted file mode 100644 (file)
index 9222f5e..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/perl
-
-push(@INC,"perlasm","../../perlasm");
-require "x86asm.pl";
-require "cbc.pl";
-
-&asm_init($ARGV[0],"bf-686.pl");
-
-$BF_ROUNDS=16;
-$BF_OFF=($BF_ROUNDS+2)*4;
-$L="ecx";
-$R="edx";
-$P="edi";
-$tot="esi";
-$tmp1="eax";
-$tmp2="ebx";
-$tmp3="ebp";
-
-&des_encrypt("BF_encrypt",1);
-&des_encrypt("BF_decrypt",0);
-&cbc("BF_cbc_encrypt","BF_encrypt","BF_decrypt",1,4,5,3,-1,-1);
-
-&asm_finish();
-
-&file_end();
-
-sub des_encrypt
-       {
-       local($name,$enc)=@_;
-
-       &function_begin($name,"");
-
-       &comment("");
-       &comment("Load the 2 words");
-       &mov("eax",&wparam(0));
-       &mov($L,&DWP(0,"eax","",0));
-       &mov($R,&DWP(4,"eax","",0));
-
-       &comment("");
-       &comment("P pointer, s and enc flag");
-       &mov($P,&wparam(1));
-
-       &xor(   $tmp1,  $tmp1);
-       &xor(   $tmp2,  $tmp2);
-
-       # encrypting part
-
-       if ($enc)
-               {
-               &xor($L,&DWP(0,$P,"",0));
-               for ($i=0; $i<$BF_ROUNDS; $i+=2)
-                       {
-                       &comment("");
-                       &comment("Round $i");
-                       &BF_ENCRYPT($i+1,$R,$L,$P,$tot,$tmp1,$tmp2,$tmp3);
-
-                       &comment("");
-                       &comment("Round ".sprintf("%d",$i+1));
-                       &BF_ENCRYPT($i+2,$L,$R,$P,$tot,$tmp1,$tmp2,$tmp3);
-                       }
-               &xor($R,&DWP(($BF_ROUNDS+1)*4,$P,"",0));
-
-               &mov("eax",&wparam(0));
-               &mov(&DWP(0,"eax","",0),$R);
-               &mov(&DWP(4,"eax","",0),$L);
-               &function_end_A($name);
-               }
-       else
-               {
-               &xor($L,&DWP(($BF_ROUNDS+1)*4,$P,"",0));
-               for ($i=$BF_ROUNDS; $i>0; $i-=2)
-                       {
-                       &comment("");
-                       &comment("Round $i");
-                       &BF_ENCRYPT($i,$R,$L,$P,$tot,$tmp1,$tmp2,$tmp3);
-                       &comment("");
-                       &comment("Round ".sprintf("%d",$i-1));
-                       &BF_ENCRYPT($i-1,$L,$R,$P,$tot,$tmp1,$tmp2,$tmp3);
-                       }
-               &xor($R,&DWP(0,$P,"",0));
-
-               &mov("eax",&wparam(0));
-               &mov(&DWP(0,"eax","",0),$R);
-               &mov(&DWP(4,"eax","",0),$L);
-               &function_end_A($name);
-               }
-
-       &function_end_B($name);
-       }
-
-sub BF_ENCRYPT
-       {
-       local($i,$L,$R,$P,$tot,$tmp1,$tmp2,$tmp3)=@_;
-
-       &rotr(  $R,             16);
-       &mov(   $tot,           &DWP(&n2a($i*4),$P,"",0));
-
-       &movb(  &LB($tmp1),     &HB($R));
-       &movb(  &LB($tmp2),     &LB($R));
-
-       &rotr(  $R,             16);
-       &xor(   $L,             $tot);
-
-       &mov(   $tot,           &DWP(&n2a($BF_OFF+0x0000),$P,$tmp1,4));
-       &mov(   $tmp3,          &DWP(&n2a($BF_OFF+0x0400),$P,$tmp2,4));
-
-       &movb(  &LB($tmp1),     &HB($R));
-       &movb(  &LB($tmp2),     &LB($R));
-
-       &add(   $tot,           $tmp3);
-       &mov(   $tmp1,          &DWP(&n2a($BF_OFF+0x0800),$P,$tmp1,4)); # delay
-
-       &xor(   $tot,           $tmp1);
-       &mov(   $tmp3,          &DWP(&n2a($BF_OFF+0x0C00),$P,$tmp2,4));
-
-       &add(   $tot,           $tmp3);
-       &xor(   $tmp1,          $tmp1);
-
-       &xor(   $L,             $tot);                                  
-       # delay
-       }
-
-sub n2a
-       {
-       sprintf("%d",$_[0]);
-       }
-
diff --git a/lib/libcrypto/libblowfish/asm/readme b/lib/libcrypto/libblowfish/asm/readme
deleted file mode 100644 (file)
index 2385fa3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-There are blowfish assembler generation scripts.
-bf-586.pl version is for the pentium and
-bf-686.pl is my original version, which is faster on the pentium pro.
-
-When using a bf-586.pl, the pentium pro/II is %8 slower than using
-bf-686.pl.  When using a bf-686.pl, the pentium is %16 slower
-than bf-586.pl
-
-So the default is bf-586.pl
-
diff --git a/lib/libcrypto/libblowfish/bf_enc.c b/lib/libcrypto/libblowfish/bf_enc.c
deleted file mode 100644 (file)
index aa6c798..0000000
+++ /dev/null
@@ -1,306 +0,0 @@
-/* crypto/bf/bf_enc.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#include "blowfish.h"
-#include "bf_locl.h"
-
-/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
- * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
- * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
- */
-
-#if (BF_ROUNDS != 16) && (BF_ROUNDS != 20)
-#error If you set BF_ROUNDS to some value other than 16 or 20, you will have \
-to modify the code.
-#endif
-
-void BF_encrypt(BF_LONG *data, const BF_KEY *key)
-       {
-#ifndef BF_PTR2
-       const BF_LONG *p,*s;
-       BF_LONG l,r;
-
-       p=key->P;
-       s= &(key->S[0]);
-       l=data[0];
-       r=data[1];
-
-       l^=p[0];
-       BF_ENC(r,l,s,p[ 1]);
-       BF_ENC(l,r,s,p[ 2]);
-       BF_ENC(r,l,s,p[ 3]);
-       BF_ENC(l,r,s,p[ 4]);
-       BF_ENC(r,l,s,p[ 5]);
-       BF_ENC(l,r,s,p[ 6]);
-       BF_ENC(r,l,s,p[ 7]);
-       BF_ENC(l,r,s,p[ 8]);
-       BF_ENC(r,l,s,p[ 9]);
-       BF_ENC(l,r,s,p[10]);
-       BF_ENC(r,l,s,p[11]);
-       BF_ENC(l,r,s,p[12]);
-       BF_ENC(r,l,s,p[13]);
-       BF_ENC(l,r,s,p[14]);
-       BF_ENC(r,l,s,p[15]);
-       BF_ENC(l,r,s,p[16]);
-#if BF_ROUNDS == 20
-       BF_ENC(r,l,s,p[17]);
-       BF_ENC(l,r,s,p[18]);
-       BF_ENC(r,l,s,p[19]);
-       BF_ENC(l,r,s,p[20]);
-#endif
-       r^=p[BF_ROUNDS+1];
-
-       data[1]=l&0xffffffffL;
-       data[0]=r&0xffffffffL;
-#else
-       BF_LONG l,r,t,*k;
-
-       l=data[0];
-       r=data[1];
-       k=(BF_LONG*)key;
-
-       l^=k[0];
-       BF_ENC(r,l,k, 1);
-       BF_ENC(l,r,k, 2);
-       BF_ENC(r,l,k, 3);
-       BF_ENC(l,r,k, 4);
-       BF_ENC(r,l,k, 5);
-       BF_ENC(l,r,k, 6);
-       BF_ENC(r,l,k, 7);
-       BF_ENC(l,r,k, 8);
-       BF_ENC(r,l,k, 9);
-       BF_ENC(l,r,k,10);
-       BF_ENC(r,l,k,11);
-       BF_ENC(l,r,k,12);
-       BF_ENC(r,l,k,13);
-       BF_ENC(l,r,k,14);
-       BF_ENC(r,l,k,15);
-       BF_ENC(l,r,k,16);
-#if BF_ROUNDS == 20
-       BF_ENC(r,l,k,17);
-       BF_ENC(l,r,k,18);
-       BF_ENC(r,l,k,19);
-       BF_ENC(l,r,k,20);
-#endif
-       r^=k[BF_ROUNDS+1];
-
-       data[1]=l&0xffffffffL;
-       data[0]=r&0xffffffffL;
-#endif
-       }
-
-#ifndef BF_DEFAULT_OPTIONS
-
-void BF_decrypt(BF_LONG *data, const BF_KEY *key)
-       {
-#ifndef BF_PTR2
-       const BF_LONG *p,*s;
-       BF_LONG l,r;
-
-       p=key->P;
-       s= &(key->S[0]);
-       l=data[0];
-       r=data[1];
-
-       l^=p[BF_ROUNDS+1];
-#if BF_ROUNDS == 20
-       BF_ENC(r,l,s,p[20]);
-       BF_ENC(l,r,s,p[19]);
-       BF_ENC(r,l,s,p[18]);
-       BF_ENC(l,r,s,p[17]);
-#endif
-       BF_ENC(r,l,s,p[16]);
-       BF_ENC(l,r,s,p[15]);
-       BF_ENC(r,l,s,p[14]);
-       BF_ENC(l,r,s,p[13]);
-       BF_ENC(r,l,s,p[12]);
-       BF_ENC(l,r,s,p[11]);
-       BF_ENC(r,l,s,p[10]);
-       BF_ENC(l,r,s,p[ 9]);
-       BF_ENC(r,l,s,p[ 8]);
-       BF_ENC(l,r,s,p[ 7]);
-       BF_ENC(r,l,s,p[ 6]);
-       BF_ENC(l,r,s,p[ 5]);
-       BF_ENC(r,l,s,p[ 4]);
-       BF_ENC(l,r,s,p[ 3]);
-       BF_ENC(r,l,s,p[ 2]);
-       BF_ENC(l,r,s,p[ 1]);
-       r^=p[0];
-
-       data[1]=l&0xffffffffL;
-       data[0]=r&0xffffffffL;
-#else
-       BF_LONG l,r,t,*k;
-
-       l=data[0];
-       r=data[1];
-       k=(BF_LONG *)key;
-
-       l^=k[BF_ROUNDS+1];
-#if BF_ROUNDS == 20
-       BF_ENC(r,l,k,20);
-       BF_ENC(l,r,k,19);
-       BF_ENC(r,l,k,18);
-       BF_ENC(l,r,k,17);
-#endif
-       BF_ENC(r,l,k,16);
-       BF_ENC(l,r,k,15);
-       BF_ENC(r,l,k,14);
-       BF_ENC(l,r,k,13);
-       BF_ENC(r,l,k,12);
-       BF_ENC(l,r,k,11);
-       BF_ENC(r,l,k,10);
-       BF_ENC(l,r,k, 9);
-       BF_ENC(r,l,k, 8);
-       BF_ENC(l,r,k, 7);
-       BF_ENC(r,l,k, 6);
-       BF_ENC(l,r,k, 5);
-       BF_ENC(r,l,k, 4);
-       BF_ENC(l,r,k, 3);
-       BF_ENC(r,l,k, 2);
-       BF_ENC(l,r,k, 1);
-       r^=k[0];
-
-       data[1]=l&0xffffffffL;
-       data[0]=r&0xffffffffL;
-#endif
-       }
-
-void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
-            const BF_KEY *schedule, unsigned char *ivec, int encrypt)
-       {
-       BF_LONG tin0,tin1;
-       BF_LONG tout0,tout1,xor0,xor1;
-       long l=length;
-       BF_LONG tin[2];
-
-       if (encrypt)
-               {
-               n2l(ivec,tout0);
-               n2l(ivec,tout1);
-               ivec-=8;
-               for (l-=8; l>=0; l-=8)
-                       {
-                       n2l(in,tin0);
-                       n2l(in,tin1);
-                       tin0^=tout0;
-                       tin1^=tout1;
-                       tin[0]=tin0;
-                       tin[1]=tin1;
-                       BF_encrypt(tin,schedule);
-                       tout0=tin[0];
-                       tout1=tin[1];
-                       l2n(tout0,out);
-                       l2n(tout1,out);
-                       }
-               if (l != -8)
-                       {
-                       n2ln(in,tin0,tin1,l+8);
-                       tin0^=tout0;
-                       tin1^=tout1;
-                       tin[0]=tin0;
-                       tin[1]=tin1;
-                       BF_encrypt(tin,schedule);
-                       tout0=tin[0];
-                       tout1=tin[1];
-                       l2n(tout0,out);
-                       l2n(tout1,out);
-                       }
-               l2n(tout0,ivec);
-               l2n(tout1,ivec);
-               }
-       else
-               {
-               n2l(ivec,xor0);
-               n2l(ivec,xor1);
-               ivec-=8;
-               for (l-=8; l>=0; l-=8)
-                       {
-                       n2l(in,tin0);
-                       n2l(in,tin1);
-                       tin[0]=tin0;
-                       tin[1]=tin1;
-                       BF_decrypt(tin,schedule);
-                       tout0=tin[0]^xor0;
-                       tout1=tin[1]^xor1;
-                       l2n(tout0,out);
-                       l2n(tout1,out);
-                       xor0=tin0;
-                       xor1=tin1;
-                       }
-               if (l != -8)
-                       {
-                       n2l(in,tin0);
-                       n2l(in,tin1);
-                       tin[0]=tin0;
-                       tin[1]=tin1;
-                       BF_decrypt(tin,schedule);
-                       tout0=tin[0]^xor0;
-                       tout1=tin[1]^xor1;
-                       l2nn(tout0,tout1,out,l+8);
-                       xor0=tin0;
-                       xor1=tin1;
-                       }
-               l2n(xor0,ivec);
-               l2n(xor1,ivec);
-               }
-       tin0=tin1=tout0=tout1=xor0=xor1=0;
-       tin[0]=tin[1]=0;
-       }
-
-#endif
diff --git a/lib/libcrypto/libblowfish/bf_locl.h b/lib/libcrypto/libblowfish/bf_locl.h
deleted file mode 100644 (file)
index 283bf4c..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-/* crypto/bf/bf_locl.h */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_BF_LOCL_H
-#define HEADER_BF_LOCL_H
-
-#undef c2l
-#define c2l(c,l)       (l =((unsigned long)(*((c)++)))    , \
-                        l|=((unsigned long)(*((c)++)))<< 8L, \
-                        l|=((unsigned long)(*((c)++)))<<16L, \
-                        l|=((unsigned long)(*((c)++)))<<24L)
-
-/* NOTE - c is not incremented as per c2l */
-#undef c2ln
-#define c2ln(c,l1,l2,n)        { \
-                       c+=n; \
-                       l1=l2=0; \
-                       switch (n) { \
-                       case 8: l2 =((unsigned long)(*(--(c))))<<24L; \
-                       case 7: l2|=((unsigned long)(*(--(c))))<<16L; \
-                       case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \
-                       case 5: l2|=((unsigned long)(*(--(c))));     \
-                       case 4: l1 =((unsigned long)(*(--(c))))<<24L; \
-                       case 3: l1|=((unsigned long)(*(--(c))))<<16L; \
-                       case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \
-                       case 1: l1|=((unsigned long)(*(--(c))));     \
-                               } \
-                       }
-
-#undef l2c
-#define l2c(l,c)       (*((c)++)=(unsigned char)(((l)     )&0xff), \
-                        *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
-                        *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
-                        *((c)++)=(unsigned char)(((l)>>24L)&0xff))
-
-/* NOTE - c is not incremented as per l2c */
-#undef l2cn
-#define l2cn(l1,l2,c,n)        { \
-                       c+=n; \
-                       switch (n) { \
-                       case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \
-                       case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \
-                       case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \
-                       case 5: *(--(c))=(unsigned char)(((l2)     )&0xff); \
-                       case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \
-                       case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \
-                       case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \
-                       case 1: *(--(c))=(unsigned char)(((l1)     )&0xff); \
-                               } \
-                       }
-
-/* NOTE - c is not incremented as per n2l */
-#define n2ln(c,l1,l2,n)        { \
-                       c+=n; \
-                       l1=l2=0; \
-                       switch (n) { \
-                       case 8: l2 =((unsigned long)(*(--(c))))    ; \
-                       case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
-                       case 6: l2|=((unsigned long)(*(--(c))))<<16; \
-                       case 5: l2|=((unsigned long)(*(--(c))))<<24; \
-                       case 4: l1 =((unsigned long)(*(--(c))))    ; \
-                       case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
-                       case 2: l1|=((unsigned long)(*(--(c))))<<16; \
-                       case 1: l1|=((unsigned long)(*(--(c))))<<24; \
-                               } \
-                       }
-
-/* NOTE - c is not incremented as per l2n */
-#define l2nn(l1,l2,c,n)        { \
-                       c+=n; \
-                       switch (n) { \
-                       case 8: *(--(c))=(unsigned char)(((l2)    )&0xff); \
-                       case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
-                       case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
-                       case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
-                       case 4: *(--(c))=(unsigned char)(((l1)    )&0xff); \
-                       case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
-                       case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
-                       case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
-                               } \
-                       }
-
-#undef n2l
-#define n2l(c,l)        (l =((unsigned long)(*((c)++)))<<24L, \
-                         l|=((unsigned long)(*((c)++)))<<16L, \
-                         l|=((unsigned long)(*((c)++)))<< 8L, \
-                         l|=((unsigned long)(*((c)++))))
-
-#undef l2n
-#define l2n(l,c)        (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
-                         *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
-                         *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
-                         *((c)++)=(unsigned char)(((l)     )&0xff))
-
-/* This is actually a big endian algorithm, the most significant byte
- * is used to lookup array 0 */
-
-#if defined(BF_PTR2)
-
-/*
- * This is basically a special Intel version. Point is that Intel
- * doesn't have many registers, but offers a reach choice of addressing
- * modes. So we spare some registers by directly traversing BF_KEY
- * structure and hiring the most decorated addressing mode. The code
- * generated by EGCS is *perfectly* competitive with assembler
- * implementation!
- */
-#define BF_ENC(LL,R,KEY,Pi) (\
-       LL^=KEY[Pi], \
-       t=  KEY[BF_ROUNDS+2 +   0 + ((R>>24)&0xFF)], \
-       t+= KEY[BF_ROUNDS+2 + 256 + ((R>>16)&0xFF)], \
-       t^= KEY[BF_ROUNDS+2 + 512 + ((R>>8 )&0xFF)], \
-       t+= KEY[BF_ROUNDS+2 + 768 + ((R    )&0xFF)], \
-       LL^=t \
-       )
-
-#elif defined(BF_PTR)
-
-#ifndef BF_LONG_LOG2
-#define BF_LONG_LOG2  2       /* default to BF_LONG being 32 bits */
-#endif
-#define BF_M  (0xFF<<BF_LONG_LOG2)
-#define BF_0  (24-BF_LONG_LOG2)
-#define BF_1  (16-BF_LONG_LOG2)
-#define BF_2  ( 8-BF_LONG_LOG2)
-#define BF_3  BF_LONG_LOG2 /* left shift */
-
-/*
- * This is normally very good on RISC platforms where normally you
- * have to explicitly "multiply" array index by sizeof(BF_LONG)
- * in order to calculate the effective address. This implementation
- * excuses CPU from this extra work. Power[PC] uses should have most
- * fun as (R>>BF_i)&BF_M gets folded into a single instruction, namely
- * rlwinm. So let'em double-check if their compiler does it.
- */
-
-#define BF_ENC(LL,R,S,P) ( \
-       LL^=P, \
-       LL^= (((*(BF_LONG *)((unsigned char *)&(S[  0])+((R>>BF_0)&BF_M))+ \
-               *(BF_LONG *)((unsigned char *)&(S[256])+((R>>BF_1)&BF_M)))^ \
-               *(BF_LONG *)((unsigned char *)&(S[512])+((R>>BF_2)&BF_M)))+ \
-               *(BF_LONG *)((unsigned char *)&(S[768])+((R<<BF_3)&BF_M))) \
-       )
-#else
-
-/*
- * This is a *generic* version. Seem to perform best on platforms that
- * offer explicit support for extraction of 8-bit nibbles preferably
- * complemented with "multiplying" of array index by sizeof(BF_LONG).
- * For the moment of this writing the list comprises Alpha CPU featuring
- * extbl and s[48]addq instructions.
- */
-
-#define BF_ENC(LL,R,S,P) ( \
-       LL^=P, \
-       LL^=((( S[       ((int)(R>>24)&0xff)] + \
-               S[0x0100+((int)(R>>16)&0xff)])^ \
-               S[0x0200+((int)(R>> 8)&0xff)])+ \
-               S[0x0300+((int)(R    )&0xff)])&0xffffffffL \
-       )
-#endif
-
-#endif
diff --git a/lib/libcrypto/libblowfish/bf_pi.h b/lib/libcrypto/libblowfish/bf_pi.h
deleted file mode 100644 (file)
index 9949513..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/* crypto/bf/bf_pi.h */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-static const BF_KEY bf_init= {
-       {
-       0x243f6a88L, 0x85a308d3L, 0x13198a2eL, 0x03707344L,
-       0xa4093822L, 0x299f31d0L, 0x082efa98L, 0xec4e6c89L,
-       0x452821e6L, 0x38d01377L, 0xbe5466cfL, 0x34e90c6cL,
-       0xc0ac29b7L, 0xc97c50ddL, 0x3f84d5b5L, 0xb5470917L,
-       0x9216d5d9L, 0x8979fb1b
-       },{
-       0xd1310ba6L, 0x98dfb5acL, 0x2ffd72dbL, 0xd01adfb7L, 
-       0xb8e1afedL, 0x6a267e96L, 0xba7c9045L, 0xf12c7f99L, 
-       0x24a19947L, 0xb3916cf7L, 0x0801f2e2L, 0x858efc16L, 
-       0x636920d8L, 0x71574e69L, 0xa458fea3L, 0xf4933d7eL, 
-       0x0d95748fL, 0x728eb658L, 0x718bcd58L, 0x82154aeeL, 
-       0x7b54a41dL, 0xc25a59b5L, 0x9c30d539L, 0x2af26013L, 
-       0xc5d1b023L, 0x286085f0L, 0xca417918L, 0xb8db38efL, 
-       0x8e79dcb0L, 0x603a180eL, 0x6c9e0e8bL, 0xb01e8a3eL, 
-       0xd71577c1L, 0xbd314b27L, 0x78af2fdaL, 0x55605c60L, 
-       0xe65525f3L, 0xaa55ab94L, 0x57489862L, 0x63e81440L, 
-       0x55ca396aL, 0x2aab10b6L, 0xb4cc5c34L, 0x1141e8ceL, 
-       0xa15486afL, 0x7c72e993L, 0xb3ee1411L, 0x636fbc2aL, 
-       0x2ba9c55dL, 0x741831f6L, 0xce5c3e16L, 0x9b87931eL, 
-       0xafd6ba33L, 0x6c24cf5cL, 0x7a325381L, 0x28958677L, 
-       0x3b8f4898L, 0x6b4bb9afL, 0xc4bfe81bL, 0x66282193L, 
-       0x61d809ccL, 0xfb21a991L, 0x487cac60L, 0x5dec8032L, 
-       0xef845d5dL, 0xe98575b1L, 0xdc262302L, 0xeb651b88L, 
-       0x23893e81L, 0xd396acc5L, 0x0f6d6ff3L, 0x83f44239L, 
-       0x2e0b4482L, 0xa4842004L, 0x69c8f04aL, 0x9e1f9b5eL, 
-       0x21c66842L, 0xf6e96c9aL, 0x670c9c61L, 0xabd388f0L, 
-       0x6a51a0d2L, 0xd8542f68L, 0x960fa728L, 0xab5133a3L, 
-       0x6eef0b6cL, 0x137a3be4L, 0xba3bf050L, 0x7efb2a98L, 
-       0xa1f1651dL, 0x39af0176L, 0x66ca593eL, 0x82430e88L, 
-       0x8cee8619L, 0x456f9fb4L, 0x7d84a5c3L, 0x3b8b5ebeL, 
-       0xe06f75d8L, 0x85c12073L, 0x401a449fL, 0x56c16aa6L, 
-       0x4ed3aa62L, 0x363f7706L, 0x1bfedf72L, 0x429b023dL, 
-       0x37d0d724L, 0xd00a1248L, 0xdb0fead3L, 0x49f1c09bL, 
-       0x075372c9L, 0x80991b7bL, 0x25d479d8L, 0xf6e8def7L, 
-       0xe3fe501aL, 0xb6794c3bL, 0x976ce0bdL, 0x04c006baL, 
-       0xc1a94fb6L, 0x409f60c4L, 0x5e5c9ec2L, 0x196a2463L, 
-       0x68fb6fafL, 0x3e6c53b5L, 0x1339b2ebL, 0x3b52ec6fL, 
-       0x6dfc511fL, 0x9b30952cL, 0xcc814544L, 0xaf5ebd09L, 
-       0xbee3d004L, 0xde334afdL, 0x660f2807L, 0x192e4bb3L, 
-       0xc0cba857L, 0x45c8740fL, 0xd20b5f39L, 0xb9d3fbdbL, 
-       0x5579c0bdL, 0x1a60320aL, 0xd6a100c6L, 0x402c7279L, 
-       0x679f25feL, 0xfb1fa3ccL, 0x8ea5e9f8L, 0xdb3222f8L, 
-       0x3c7516dfL, 0xfd616b15L, 0x2f501ec8L, 0xad0552abL, 
-       0x323db5faL, 0xfd238760L, 0x53317b48L, 0x3e00df82L, 
-       0x9e5c57bbL, 0xca6f8ca0L, 0x1a87562eL, 0xdf1769dbL, 
-       0xd542a8f6L, 0x287effc3L, 0xac6732c6L, 0x8c4f5573L, 
-       0x695b27b0L, 0xbbca58c8L, 0xe1ffa35dL, 0xb8f011a0L, 
-       0x10fa3d98L, 0xfd2183b8L, 0x4afcb56cL, 0x2dd1d35bL, 
-       0x9a53e479L, 0xb6f84565L, 0xd28e49bcL, 0x4bfb9790L, 
-       0xe1ddf2daL, 0xa4cb7e33L, 0x62fb1341L, 0xcee4c6e8L, 
-       0xef20cadaL, 0x36774c01L, 0xd07e9efeL, 0x2bf11fb4L, 
-       0x95dbda4dL, 0xae909198L, 0xeaad8e71L, 0x6b93d5a0L, 
-       0xd08ed1d0L, 0xafc725e0L, 0x8e3c5b2fL, 0x8e7594b7L, 
-       0x8ff6e2fbL, 0xf2122b64L, 0x8888b812L, 0x900df01cL, 
-       0x4fad5ea0L, 0x688fc31cL, 0xd1cff191L, 0xb3a8c1adL, 
-       0x2f2f2218L, 0xbe0e1777L, 0xea752dfeL, 0x8b021fa1L, 
-       0xe5a0cc0fL, 0xb56f74e8L, 0x18acf3d6L, 0xce89e299L, 
-       0xb4a84fe0L, 0xfd13e0b7L, 0x7cc43b81L, 0xd2ada8d9L, 
-       0x165fa266L, 0x80957705L, 0x93cc7314L, 0x211a1477L, 
-       0xe6ad2065L, 0x77b5fa86L, 0xc75442f5L, 0xfb9d35cfL, 
-       0xebcdaf0cL, 0x7b3e89a0L, 0xd6411bd3L, 0xae1e7e49L, 
-       0x00250e2dL, 0x2071b35eL, 0x226800bbL, 0x57b8e0afL, 
-       0x2464369bL, 0xf009b91eL, 0x5563911dL, 0x59dfa6aaL, 
-       0x78c14389L, 0xd95a537fL, 0x207d5ba2L, 0x02e5b9c5L, 
-       0x83260376L, 0x6295cfa9L, 0x11c81968L, 0x4e734a41L, 
-       0xb3472dcaL, 0x7b14a94aL, 0x1b510052L, 0x9a532915L, 
-       0xd60f573fL, 0xbc9bc6e4L, 0x2b60a476L, 0x81e67400L, 
-       0x08ba6fb5L, 0x571be91fL, 0xf296ec6bL, 0x2a0dd915L, 
-       0xb6636521L, 0xe7b9f9b6L, 0xff34052eL, 0xc5855664L, 
-       0x53b02d5dL, 0xa99f8fa1L, 0x08ba4799L, 0x6e85076aL, 
-       0x4b7a70e9L, 0xb5b32944L, 0xdb75092eL, 0xc4192623L, 
-       0xad6ea6b0L, 0x49a7df7dL, 0x9cee60b8L, 0x8fedb266L, 
-       0xecaa8c71L, 0x699a17ffL, 0x5664526cL, 0xc2b19ee1L, 
-       0x193602a5L, 0x75094c29L, 0xa0591340L, 0xe4183a3eL, 
-       0x3f54989aL, 0x5b429d65L, 0x6b8fe4d6L, 0x99f73fd6L, 
-       0xa1d29c07L, 0xefe830f5L, 0x4d2d38e6L, 0xf0255dc1L, 
-       0x4cdd2086L, 0x8470eb26L, 0x6382e9c6L, 0x021ecc5eL, 
-       0x09686b3fL, 0x3ebaefc9L, 0x3c971814L, 0x6b6a70a1L, 
-       0x687f3584L, 0x52a0e286L, 0xb79c5305L, 0xaa500737L, 
-       0x3e07841cL, 0x7fdeae5cL, 0x8e7d44ecL, 0x5716f2b8L, 
-       0xb03ada37L, 0xf0500c0dL, 0xf01c1f04L, 0x0200b3ffL, 
-       0xae0cf51aL, 0x3cb574b2L, 0x25837a58L, 0xdc0921bdL, 
-       0xd19113f9L, 0x7ca92ff6L, 0x94324773L, 0x22f54701L, 
-       0x3ae5e581L, 0x37c2dadcL, 0xc8b57634L, 0x9af3dda7L, 
-       0xa9446146L, 0x0fd0030eL, 0xecc8c73eL, 0xa4751e41L, 
-       0xe238cd99L, 0x3bea0e2fL, 0x3280bba1L, 0x183eb331L, 
-       0x4e548b38L, 0x4f6db908L, 0x6f420d03L, 0xf60a04bfL, 
-       0x2cb81290L, 0x24977c79L, 0x5679b072L, 0xbcaf89afL, 
-       0xde9a771fL, 0xd9930810L, 0xb38bae12L, 0xdccf3f2eL, 
-       0x5512721fL, 0x2e6b7124L, 0x501adde6L, 0x9f84cd87L, 
-       0x7a584718L, 0x7408da17L, 0xbc9f9abcL, 0xe94b7d8cL, 
-       0xec7aec3aL, 0xdb851dfaL, 0x63094366L, 0xc464c3d2L, 
-       0xef1c1847L, 0x3215d908L, 0xdd433b37L, 0x24c2ba16L, 
-       0x12a14d43L, 0x2a65c451L, 0x50940002L, 0x133ae4ddL, 
-       0x71dff89eL, 0x10314e55L, 0x81ac77d6L, 0x5f11199bL, 
-       0x043556f1L, 0xd7a3c76bL, 0x3c11183bL, 0x5924a509L, 
-       0xf28fe6edL, 0x97f1fbfaL, 0x9ebabf2cL, 0x1e153c6eL, 
-       0x86e34570L, 0xeae96fb1L, 0x860e5e0aL, 0x5a3e2ab3L, 
-       0x771fe71cL, 0x4e3d06faL, 0x2965dcb9L, 0x99e71d0fL, 
-       0x803e89d6L, 0x5266c825L, 0x2e4cc978L, 0x9c10b36aL, 
-       0xc6150ebaL, 0x94e2ea78L, 0xa5fc3c53L, 0x1e0a2df4L, 
-       0xf2f74ea7L, 0x361d2b3dL, 0x1939260fL, 0x19c27960L, 
-       0x5223a708L, 0xf71312b6L, 0xebadfe6eL, 0xeac31f66L, 
-       0xe3bc4595L, 0xa67bc883L, 0xb17f37d1L, 0x018cff28L, 
-       0xc332ddefL, 0xbe6c5aa5L, 0x65582185L, 0x68ab9802L, 
-       0xeecea50fL, 0xdb2f953bL, 0x2aef7dadL, 0x5b6e2f84L, 
-       0x1521b628L, 0x29076170L, 0xecdd4775L, 0x619f1510L, 
-       0x13cca830L, 0xeb61bd96L, 0x0334fe1eL, 0xaa0363cfL, 
-       0xb5735c90L, 0x4c70a239L, 0xd59e9e0bL, 0xcbaade14L, 
-       0xeecc86bcL, 0x60622ca7L, 0x9cab5cabL, 0xb2f3846eL, 
-       0x648b1eafL, 0x19bdf0caL, 0xa02369b9L, 0x655abb50L, 
-       0x40685a32L, 0x3c2ab4b3L, 0x319ee9d5L, 0xc021b8f7L, 
-       0x9b540b19L, 0x875fa099L, 0x95f7997eL, 0x623d7da8L, 
-       0xf837889aL, 0x97e32d77L, 0x11ed935fL, 0x16681281L, 
-       0x0e358829L, 0xc7e61fd6L, 0x96dedfa1L, 0x7858ba99L, 
-       0x57f584a5L, 0x1b227263L, 0x9b83c3ffL, 0x1ac24696L, 
-       0xcdb30aebL, 0x532e3054L, 0x8fd948e4L, 0x6dbc3128L, 
-       0x58ebf2efL, 0x34c6ffeaL, 0xfe28ed61L, 0xee7c3c73L, 
-       0x5d4a14d9L, 0xe864b7e3L, 0x42105d14L, 0x203e13e0L, 
-       0x45eee2b6L, 0xa3aaabeaL, 0xdb6c4f15L, 0xfacb4fd0L, 
-       0xc742f442L, 0xef6abbb5L, 0x654f3b1dL, 0x41cd2105L, 
-       0xd81e799eL, 0x86854dc7L, 0xe44b476aL, 0x3d816250L, 
-       0xcf62a1f2L, 0x5b8d2646L, 0xfc8883a0L, 0xc1c7b6a3L, 
-       0x7f1524c3L, 0x69cb7492L, 0x47848a0bL, 0x5692b285L, 
-       0x095bbf00L, 0xad19489dL, 0x1462b174L, 0x23820e00L, 
-       0x58428d2aL, 0x0c55f5eaL, 0x1dadf43eL, 0x233f7061L, 
-       0x3372f092L, 0x8d937e41L, 0xd65fecf1L, 0x6c223bdbL, 
-       0x7cde3759L, 0xcbee7460L, 0x4085f2a7L, 0xce77326eL, 
-       0xa6078084L, 0x19f8509eL, 0xe8efd855L, 0x61d99735L, 
-       0xa969a7aaL, 0xc50c06c2L, 0x5a04abfcL, 0x800bcadcL, 
-       0x9e447a2eL, 0xc3453484L, 0xfdd56705L, 0x0e1e9ec9L, 
-       0xdb73dbd3L, 0x105588cdL, 0x675fda79L, 0xe3674340L, 
-       0xc5c43465L, 0x713e38d8L, 0x3d28f89eL, 0xf16dff20L, 
-       0x153e21e7L, 0x8fb03d4aL, 0xe6e39f2bL, 0xdb83adf7L, 
-&nbs