+Mon Nov 5 23:07:58 EET 2007 Pekka Riikonen <priikone@silcnet.org>
+
+ * Zero tail of CTR mode IV in IV Included mode. Change does
+ not cause compatibility issues. Affected file is
+ lib/silcske/silcske.c.
+
Mon Nov 5 22:24:25 EET 2007 Pekka Riikonen <priikone@silcnet.org>
* Fixed CTR mode rekey. Affected file is lib/silcske/silcske.c.
SilcHmac *ret_hmac_receive,
SilcHash *ret_hash)
{
- unsigned char iv[32];
+ unsigned char iv[SILC_HASH_MAXLEN];
SilcBool iv_included = (prop->flags & SILC_SKE_SP_FLAG_IV_INCLUDED);
/* Allocate ciphers to be used in the communication */
silc_hash_make(prop->hash, keymat->receive_iv, 8, iv);
if (!iv_included)
memcpy(iv + 4, keymat->receive_iv, 8);
+ else
+ memset(iv + 4, 0, 12);
}
silc_cipher_set_iv(*ret_send_key, iv);
silc_hash_make(prop->hash, keymat->send_iv, 8, iv);
if (!iv_included)
memcpy(iv + 4, keymat->send_iv, 8);
+ else
+ memset(iv + 4, 0, 12);
}
silc_cipher_set_iv(*ret_receive_key, iv);
silc_hash_make(prop->hash, keymat->send_iv, 8, iv);
if (!iv_included)
memcpy(iv + 4, keymat->send_iv, 8);
+ else
+ memset(iv + 4, 0, 12);
}
silc_cipher_set_iv(*ret_send_key, iv);
silc_hash_make(prop->hash, keymat->receive_iv, 8, iv);
if (!iv_included)
memcpy(iv + 4, keymat->receive_iv, 8);
+ else
+ memset(iv + 4, 0, 12);
}
silc_cipher_set_iv(*ret_receive_key, iv);