summaryrefslogtreecommitdiff
path: root/twofish.c
diff options
context:
space:
mode:
authorRuud de Rooij <ruud@debian.org>1999-03-12 17:26:49 +0100
committerNiels Möller <nisse@lysator.liu.se>1999-03-12 17:26:49 +0100
commitc1f9522d91bfd8c711cbdab7bd2dd1ce3522a7b6 (patch)
treee422931269d6e92949a1c4d4ae224e578499d28b /twofish.c
parent02f8d55181970f2a46e39b1b3798eebf81fd2c15 (diff)
downloadnettle-c1f9522d91bfd8c711cbdab7bd2dd1ce3522a7b6.tar.gz
* src/symmetric/twofish.c: Buglet fix by Ruud.
Rev: src/symmetric/twofish.c:1.4
Diffstat (limited to 'twofish.c')
-rw-r--r--twofish.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/twofish.c b/twofish.c
index 9945a2fa..3837c3f3 100644
--- a/twofish.c
+++ b/twofish.c
@@ -411,9 +411,7 @@ twofish_setup(TWOFISH_context * context, size_t keysize, const UINT8 *key)
keysize = 32;
memcpy(key_copy, key, keysize);
- /* FIXME: This truncates the key if it is not a multiple of 4 octets.
- * Is this really indended? */
- bytes_to_words(m, key_copy, keysize/4);
+ bytes_to_words(m, key_copy, (keysize + 3)/4);
if (keysize <= 16)
k = 2;