netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfrm: Fix key lengths for rfc3686(ctr(aes))
@ 2011-07-28 20:36 Tushar Gohad
  2011-07-29  0:05 ` Herbert Xu
  2011-07-29  1:25 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Tushar Gohad @ 2011-07-28 20:36 UTC (permalink / raw)
  To: Joy Latten, Herbert Xu; +Cc: netdev, tgohad


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>
---
  net/xfrm/xfrm_algo.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 58064d9..791ab2e 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -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
  	}
  },
  };
-- 
1.6.3.3.202.g91879


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfrm: Fix key lengths for rfc3686(ctr(aes))
  2011-07-28 20:36 [PATCH] xfrm: Fix key lengths for rfc3686(ctr(aes)) Tushar Gohad
@ 2011-07-29  0:05 ` Herbert Xu
  2011-07-29  1:25 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2011-07-29  0:05 UTC (permalink / raw)
  To: Tushar Gohad; +Cc: Joy Latten, netdev

On Thu, Jul 28, 2011 at 01:36:20PM -0700, Tushar Gohad wrote:
>
> 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>

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfrm: Fix key lengths for rfc3686(ctr(aes))
  2011-07-28 20:36 [PATCH] xfrm: Fix key lengths for rfc3686(ctr(aes)) Tushar Gohad
  2011-07-29  0:05 ` Herbert Xu
@ 2011-07-29  1:25 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2011-07-29  1:25 UTC (permalink / raw)
  To: tgohad; +Cc: latten, herbert, netdev

From: Tushar Gohad <tgohad@mvista.com>
Date: Thu, 28 Jul 2011 13:36:20 -0700 (MST)

> 
> 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>

APplied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-29  1:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28 20:36 [PATCH] xfrm: Fix key lengths for rfc3686(ctr(aes)) Tushar Gohad
2011-07-29  0:05 ` Herbert Xu
2011-07-29  1:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).