From: ian Date: Tue, 10 Sep 2002 20:53:38 +0000 (+0000) Subject: Ripped out a lot of crap. Now it compiles and passes the test vectors. X-Git-Tag: debian/1.1.1~155 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=commitdiff_plain;h=74f92ed9563e6fd9e3b7a871e73f73e1ca7cd145;hp=ca480b9b4773b6ea6be7627e8857d6034d1d5849;ds=sidebyside Ripped out a lot of crap. Now it compiles and passes the test vectors. --- diff --git a/base/troglodyte-Makefile b/base/troglodyte-Makefile index cdcebde..0737bbb 100644 --- a/base/troglodyte-Makefile +++ b/base/troglodyte-Makefile @@ -16,6 +16,9 @@ OBJS= tables.o \ parse.o HDRS= hbytes.h \ + serpent.h \ + md5.h \ + sha1.h \ $(AUTO_HDRS) AUTO_HDRS= tables.h diff --git a/crypto/algtables.c b/crypto/algtables.c index 7729986..7a651f0 100644 --- a/crypto/algtables.c +++ b/crypto/algtables.c @@ -38,23 +38,23 @@ static void alg_serpent_l_byteswap_block(Byte *b) { } static void alg_serpent_makekey(void *schedule, const Byte *key, int keylen) { - serpent_makekey(schedule, keylen*8, key); + serpent_makekey(schedule, key, keylen); } static void alg_serpent_encrypt(const void *sch, const void *in, void *out) { - serpent_encrypt(sch, in, out); + serpent_encrypt(in, out, sch); } static void alg_serpent_decrypt(const void *sch, const void *in, void *out) { - serpent_decrypt(sch, in, out); + serpent_decrypt(in, out, sch); } const BlockCipherAlgInfo blockcipheralginfos[]= { - { "serpent-l", 16, sizeof(struct SerpentKeyInstance), 16,32, + { "serpent-l", 16, sizeof(SerpentKeySchedule), 16,32, alg_serpent_l_byteswap_block, { alg_serpent_makekey, alg_serpent_encrypt }, { alg_serpent_makekey, alg_serpent_decrypt } }, - { "serpent-b", 16, sizeof(struct SerpentKeyInstance), 16,32, + { "serpent-b", 16, sizeof(SerpentKeySchedule), 16,32, alg_serpent_b_byteswap_block, { alg_serpent_makekey, alg_serpent_encrypt }, { alg_serpent_makekey, alg_serpent_decrypt } },