xfrm: Fix key lengths for rfc3686(ctr(aes))
authorTushar Gohad <tgohad@mvista.com>
Thu, 28 Jul 2011 10:36:20 +0000 (10:36 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Aug 2011 01:31:39 +0000 (18:31 -0700)
commit3b9dfc69a292c4397815756bb404f2cda44ae7de
tree36eff860b800c75175532b8d87ff506a650f08ff
parentd98630f19f4880bfdb170231ef9f0ba781ecc850
xfrm: Fix key lengths for rfc3686(ctr(aes))

[ Upstream commit 4203223a1aed862b4445fdcd260d6139603a51d9 ]

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 <tgohad@mvista.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/xfrm/xfrm_algo.c