Skip to content

Commit

Permalink
fix: IV size for AES-GCM
Browse files Browse the repository at this point in the history
  • Loading branch information
kentakayama committed Jul 15, 2024
1 parent 1eeef3b commit eb0ee9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/t_cose_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,20 @@ uint32_t
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_AES128CCM_16_128:
case T_COSE_ALGORITHM_A128KW:
case T_COSE_ALGORITHM_A128GCM:
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:
case T_COSE_ALGORITHM_A192GCM: return 192;
case T_COSE_ALGORITHM_A192KW: return 192;
case T_COSE_ALGORITHM_AES256CCM_16_128:
case T_COSE_ALGORITHM_A256KW:
case T_COSE_ALGORITHM_A256GCM: return 256;
case T_COSE_ALGORITHM_A256KW: return 256;
default: return UINT32_MAX;
}
}
Expand Down

0 comments on commit eb0ee9f

Please sign in to comment.