X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=crypto%2Falgtables.c;fp=crypto%2Falgtables.c;h=7a651f06aa66e0a9d90529dea2ea7dd564fbd413;hp=772998685653abca1dff7c11db107b66e8915e0b;hb=74f92ed9563e6fd9e3b7a871e73f73e1ca7cd145;hpb=ca480b9b4773b6ea6be7627e8857d6034d1d5849 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 } },