Re: [PATCH 1/1]: Add support for aes-ctr to ipsec

2008-02-01 Thread Herbert Xu
On Thu, Jan 31, 2008 at 10:59:28AM -0600, Joy Latten wrote:
 Very sorry, re-posting as first patch was incomplete.
 
 The below patch allows IPsec to use CTR mode with
 AES encryption algorithm. Tested this using setkey
 in ipsec-tools.
 
 regards,
 Joy
 
 
 Signed-off-by: Joy Latten [EMAIL PROTECTED]

Acked-by: Herbert Xu [EMAIL PROTECTED]

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/1]: Add support for aes-ctr to ipsec

2008-01-31 Thread Joy Latten
Very sorry, re-posting as first patch was incomplete.

The below patch allows IPsec to use CTR mode with
AES encryption algorithm. Tested this using setkey
in ipsec-tools.

regards,
Joy


Signed-off-by: Joy Latten [EMAIL PROTECTED]

--

diff -urpN net-2.6.25/include/linux/pfkeyv2.h 
net-2.6.25.patch/include/linux/pfkeyv2.h
--- net-2.6.25/include/linux/pfkeyv2.h  2008-01-29 11:48:00.0 -0600
+++ net-2.6.25.patch/include/linux/pfkeyv2.h2008-01-29 13:43:59.0 
-0600
@@ -298,6 +298,7 @@ struct sadb_x_sec_ctx {
 #define SADB_X_EALG_BLOWFISHCBC7
 #define SADB_EALG_NULL 11
 #define SADB_X_EALG_AESCBC 12
+#define SADB_X_EALG_AESCTR 13
 #define SADB_X_EALG_CAMELLIACBC22
 #define SADB_EALG_MAX   253 /* last EALG */
 /* private allocations should use 249-255 (RFC2407) */
diff -urpN net-2.6.25/net/xfrm/xfrm_algo.c net-2.6.25.patch/net/xfrm/xfrm_algo.c
--- net-2.6.25/net/xfrm/xfrm_algo.c 2008-01-29 11:48:03.0 -0600
+++ net-2.6.25.patch/net/xfrm/xfrm_algo.c   2008-01-29 13:42:43.0 
-0600
@@ -300,6 +300,23 @@ static struct xfrm_algo_desc ealg_list[]
.sadb_alg_maxbits = 256
}
 },
+{
+   .name = rfc3686(ctr(aes)),
+
+   .uinfo = {
+   .encr = {
+   .blockbits = 128,
+   .defkeybits = 160, /* 128-bit key + 32-bit nonce */
+   }
+   },
+
+   .desc = {
+   .sadb_alg_id = SADB_X_EALG_AESCTR,
+   .sadb_alg_ivlen = 8,
+   .sadb_alg_minbits = 128,
+   .sadb_alg_maxbits = 256
+   }
+},
 };
 
 static struct xfrm_algo_desc calg_list[] = {
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html