diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-09-27 16:04:07 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-11-08 23:23:37 +0100 |
commit | 0178a6d33ff6afc7d0305619d3d250235ae55d09 (patch) | |
tree | 5c0cdc28b7ff07b02de5f05f70f16a46416f97b6 /src/Common | |
parent | 411e8599f39a601b26429b3d1183488c413eb21b (diff) | |
download | VeraCrypt-0178a6d33ff6afc7d0305619d3d250235ae55d09.tar.gz VeraCrypt-0178a6d33ff6afc7d0305619d3d250235ae55d09.zip |
Optimize code space and solve the Serpent issue (https://sourceforge.net/p/veracrypt/discussion/technical/thread/fb09633a/#6406) by removing key length parameter from serpent_set_key and twofish_set_key
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/Crypto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c index f57bea44..a63bc954 100644 --- a/src/Common/Crypto.c +++ b/src/Common/Crypto.c @@ -119,11 +119,11 @@ int CipherInit (int cipher, unsigned char *key, unsigned __int8 *ks) break;
case SERPENT:
- serpent_set_key (key, CipherGetKeySize(SERPENT) * 8, ks);
+ serpent_set_key (key, ks);
break;
case TWOFISH:
- twofish_set_key ((TwofishInstance *)ks, (const u4byte *)key, CipherGetKeySize(TWOFISH) * 8);
+ twofish_set_key ((TwofishInstance *)ks, (const u4byte *)key);
break;
default:
@@ -972,9 +972,9 @@ int EAInit (int ea, unsigned char *key, unsigned __int8 *ks) return ERR_CIPHER_INIT_FAILURE;
#elif defined (TC_WINDOWS_BOOT_SERPENT)
- serpent_set_key (key, 32 * 8, ks);
+ serpent_set_key (key, ks);
#elif defined (TC_WINDOWS_BOOT_TWOFISH)
- twofish_set_key ((TwofishInstance *)ks, (const u4byte *)key, 32 * 8);
+ twofish_set_key ((TwofishInstance *)ks, (const u4byte *)key);
#endif
return ERR_SUCCESS;
}
|