1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

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

This commit is contained in:
Mounir IDRASSI
2014-09-27 16:04:07 +02:00
parent 411e8599f3
commit 0178a6d33f
6 changed files with 16 additions and 20 deletions

View File

@@ -369,7 +369,7 @@ static u4byte mds_rem(u4byte p0, u4byte p1)
/* initialise the key schedule from the user supplied key */
u4byte *twofish_set_key(TwofishInstance *instance, const u4byte in_key[], const u4byte key_len)
u4byte *twofish_set_key(TwofishInstance *instance, const u4byte in_key[])
{ u4byte i, a, b, me_key[4], mo_key[4];
u4byte *l_key, *s_key;
@@ -390,7 +390,7 @@ u4byte *twofish_set_key(TwofishInstance *instance, const u4byte in_key[], const
}
#endif
instance->k_len = key_len / 64; /* 2, 3 or 4 */
instance->k_len = 4;
for(i = 0; i < instance->k_len; ++i)
{