Skip to content

Commit

Permalink
xfrm: Fix key lengths for rfc3686(ctr(aes))
Browse files Browse the repository at this point in the history
Fix the min and max bit lengths for AES-CTR (RFC3686) keys.
The number of bits in key spec is the key length (128/256)
plus 32 bits of nonce.

This change takes care of the "Invalid key length" errors
reported by setkey when specifying 288 bit keys for aes-ctr.

Signed-off-by: Tushar Gohad <[email protected]>
Acked-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Tushar Gohad authored and davem330 committed Jul 29, 2011
1 parent 55f9c40 commit 4203223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/xfrm/xfrm_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ static struct xfrm_algo_desc ealg_list[] = {
.desc = {
.sadb_alg_id = SADB_X_EALG_AESCTR,
.sadb_alg_ivlen = 8,
.sadb_alg_minbits = 128,
.sadb_alg_maxbits = 256
.sadb_alg_minbits = 160,
.sadb_alg_maxbits = 288
}
},
};
Expand Down

0 comments on commit 4203223

Please sign in to comment.