added support for AES counter mode in ESP

proposal keywords: aes128ctr aes192ctr aes256ctr
This commit is contained in:
Martin Willi
2009-04-27 12:16:52 +00:00
parent 3bf7c2491f
commit 18eef5d6b6
3 changed files with 7 additions and 3 deletions
+3 -2
View File
@@ -415,17 +415,18 @@ static bool derive_child_keys(private_keymat_t *this,
/* to bytes */
enc_size /= 8;
/* CCM/GCM needs additional bytes */
/* CCM/GCM/CTR needs additional bytes */
switch (enc_alg)
{
case ENCR_AES_CCM_ICV8:
case ENCR_AES_CCM_ICV12:
case ENCR_AES_CCM_ICV16:
enc_size += 3;
break;
break;
case ENCR_AES_GCM_ICV8:
case ENCR_AES_GCM_ICV12:
case ENCR_AES_GCM_ICV16:
case ENCR_AES_CTR:
enc_size += 4;
break;
default: