Skip to content

Commit

Permalink
del: IV size for AES-KW
Browse files Browse the repository at this point in the history
  • Loading branch information
kentakayama committed Jul 15, 2024
1 parent eb0ee9f commit dc47589
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/t_cose_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,18 @@ bits_iv_alg(int32_t cose_algorithm_id)
switch(cose_algorithm_id) {
case T_COSE_ALGORITHM_A128GCM:
case T_COSE_ALGORITHM_A192GCM:
case T_COSE_ALGORITHM_A256GCM: return 96;
case T_COSE_ALGORITHM_A256GCM:
return 96; /* 12 bytes, 4.1 of RFC 9053 */
case T_COSE_ALGORITHM_AES128CCM_16_128:
case T_COSE_ALGORITHM_A128KW:
case T_COSE_ALGORITHM_AES256CCM_16_128:
return 104; /* 13 bytes, 4.2 of RFC 9053 */
case T_COSE_ALGORITHM_A128CTR:
case T_COSE_ALGORITHM_A128CBC:
case T_COSE_ALGORITHM_A192CTR:
case T_COSE_ALGORITHM_A192CBC:
case T_COSE_ALGORITHM_A256CTR:
case T_COSE_ALGORITHM_A256CBC: return 128;
case T_COSE_ALGORITHM_A192KW: return 192;
case T_COSE_ALGORITHM_AES256CCM_16_128:
case T_COSE_ALGORITHM_A256KW: return 256;
case T_COSE_ALGORITHM_A256CBC:
return 128; /* 16 bytes, the same length of the AES block size */
default: return UINT32_MAX;
}
}
Expand Down

0 comments on commit dc47589

Please sign in to comment.