Re: [2.6 patch] __inet6_csk_dst_store(): fix check-after-use

2007-10-14 Thread Noriaki TAKAMIYA
Hi,

 Mon, 15 Oct 2007 11:45:10 +0900
 [Subject: Re: [2.6 patch] __inet6_csk_dst_store(): fix check-after-use]
 Masahide NAKAMURA [EMAIL PROTECTED] wrote...

 
 On Sun, 14 Oct 2007 19:52:12 +0200
 Adrian Bunk [EMAIL PROTECTED] wrote:
 
  The Coverity checker spotted that we have already oops'ed if dst
  was NULL.
  
  Since dst being NULL doesn't seem to be possible at this point this 
  patch removes the NULL check.
  
  Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
 
 Agreed.
 
 Acked-by: Masahide NAKAMURA [EMAIL PROTECTED]

  I also agreed.
  
Acked-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

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


Re: net-26.24 broken with XFRM off

2007-09-06 Thread Noriaki TAKAMIYA
Hi,

 Thu, 6 Sep 2007 10:13:26 +0200
 [Subject: Re: net-26.24 broken with XFRM off]
 Eric Dumazet [EMAIL PROTECTED] wrote...

 Hi Divy
 
 I believe this problem is known.
 
 Please check http://marc.info/?l=linux-netdevm=118881627028135w=2 

  I'm sorry not to check more precisely.

  As Eric said, this issue should be fixed by the patch attached in
  the following mail.

  Regards,

 Mon, 03 Sep 2007 19:43:51 +0900
 [Subject: Re: [-mm patch] IPV6 must select XFRM]
 Masahide NAKAMURA [EMAIL PROTECTED] wrote...

 Thank you for catching this. the issue is caused with patch
 [IPV6] XFRM: Fix connected socket to use transformation.
 which I sent to netdev.
 (a85d5450ddeb959bdf9e4603f9c06e9d79217cfa on net-2.6.24).
 
 I'd prefer to modify the original patch to use ifdef CONFIG_XFRM
 than changing kernel config depends. Does it make sense?
 
 Please review the attached patch.
 
 -- 
 Masahide NAKAMURA
--
Noriaki TAKAMIYA
-
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


Re: [PATCH net-2.6.22] [IPV6] FIB6RULE: Find source address during looking up route.

2007-03-27 Thread Noriaki TAKAMIYA
Hi,

 Wed, 28 Mar 2007 12:49:40 +0900 (JST)
 [Subject: Re: [PATCH net-2.6.22] [IPV6] FIB6RULE: Find source address during 
 looking up route.]
 YOSHIFUJI Hideaki / 吉藤英明 [EMAIL PROTECTED] wrote...

  Out of curiosity, what sort of rules would have this flag set?
  The majority of lookups don't provide a valid source address.
  This new address search could become very expensive, because
  none of the results are cached.
 
 This flags is used for Mobile IPv6.
 
 Well, for non-connected sockets on hosts, yes,
 the process might not be light-weight.
 But, on routers, or once the socket is connected,
 source address should be always set.

  Even if you set the rule which has the condition regarding as the
  source address, this rule is not selected for the first packet
  because the source address is not chosen yet.

  This fix is required to do source address based routing using
  fib6_rules.

#Even if the same routing with subtrees, the same problem is caused.

  Regards,

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


[IPROUTE][IP]: enabled to manipulate the flags of IFA_F_HOMEADDRESS or IFA_F_NODAD from ip.

2007-03-07 Thread Noriaki TAKAMIYA
Hi, 

  This patch enables ip command to add IFA_F_HOMEADDRESS and
  IFA_F_NODAD flags while adding the IPv6 address.

Signed-off-by: Noriaki TAKAMIYA[EMAIL PROTECTED]
Signed-off-by: Masahide NAKAMURA [EMAIL PROTECTED]

---
 ip/ipaddress.c |   23 ++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index cae1fcd..98effa3 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -61,6 +61,7 @@ static void usage(void)
iplink_usage();
}
fprintf(stderr, Usage: ip addr {add|change|replace} IFADDR dev STRING 
[ LIFETIME ]\n);
+   fprintf(stderr,   
[ CONFFLAG-LIST]\n);
fprintf(stderr,ip addr del IFADDR dev STRING\n);
fprintf(stderr,ip addr {show|flush} [ dev STRING ] [ scope 
SCOPE-ID ]\n);
fprintf(stderr, [ to PREFIX ] [ FLAG-LIST 
] [ label PATTERN ]\n);
@@ -70,7 +71,9 @@ static void usage(void)
fprintf(stderr, SCOPE-ID := [ host | link | global | NUMBER ]\n);
fprintf(stderr, FLAG-LIST := [ FLAG-LIST ] FLAG\n);
fprintf(stderr, FLAG  := [ permanent | dynamic | secondary | primary 
|\n);
-   fprintf(stderr,tentative | deprecated ]\n);
+   fprintf(stderr,tentative | deprecated | CONFFLAG-LIST 
]\n);
+   fprintf(stderr, CONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\n);
+   fprintf(stderr, CONFFLAG  := [ home | nodad ]\n);
fprintf(stderr, LIFETIME := [ valid_lft LFT ] [ preferred_lft LFT 
]\n);
fprintf(stderr, LFT := forever | SECONDS\n);
 
@@ -427,6 +430,14 @@ int print_addrinfo(const struct sockaddr
ifa-ifa_flags = ~IFA_F_DEPRECATED;
fprintf(fp, deprecated );
}
+   if (ifa-ifa_flagsIFA_F_HOMEADDRESS) {
+   ifa-ifa_flags = ~IFA_F_HOMEADDRESS;
+   fprintf(fp, home );
+   }
+   if (ifa-ifa_flagsIFA_F_NODAD) {
+   ifa-ifa_flags = ~IFA_F_NODAD;
+   fprintf(fp, nodad );
+   }
if (!(ifa-ifa_flagsIFA_F_PERMANENT)) {
fprintf(fp, dynamic );
} else
@@ -567,6 +578,12 @@ int ipaddr_list_or_flush(int argc, char
} else if (strcmp(*argv, deprecated) == 0) {
filter.flags |= IFA_F_DEPRECATED;
filter.flagmask |= IFA_F_DEPRECATED;
+   } else if (strcmp(*argv, home) == 0) {
+   filter.flags |= IFA_F_HOMEADDRESS;
+   filter.flagmask |= IFA_F_HOMEADDRESS;
+   } else if (strcmp(*argv, nodad) == 0) {
+   filter.flags |= IFA_F_NODAD;
+   filter.flagmask |= IFA_F_NODAD;
} else if (strcmp(*argv, label) == 0) {
NEXT_ARG();
filter.label = *argv;
@@ -844,6 +861,10 @@ int ipaddr_modify(int cmd, int flags, in
preferred_lftp = *argv;
if (set_lifetime(preferred_lft, *argv))
invarg(preferred_lft value, *argv);
+   } else if (strcmp(*argv, home) == 0) {
+   req.ifa.ifa_flags |= IFA_F_HOMEADDRESS;
+   } else if (strcmp(*argv, nodad) == 0) {
+   req.ifa.ifa_flags |= IFA_F_NODAD;
} else {
if (strcmp(*argv, local) == 0) {
NEXT_ARG();
-- 
Noriaki TAKAMIYA
-
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


Re: [RFC][PATCH][IPSEC][2/3] IPv6 over IPv4 IPsec tunnel

2007-02-19 Thread Noriaki TAKAMIYA
Hi,

  More fix is needed for __xfrm6_bundle_create().

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]
Acked-by: Masahide NAKAMURA [EMAIL PROTECTED]
  
--
  fixed to set fl_tunnel.fl6_src correctly in xfrm6_bundle_create().

---
 net/ipv6/xfrm6_policy.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index b1133f2..d8a585b 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -189,7 +189,7 @@ __xfrm6_bundle_create(struct xfrm_policy
case AF_INET6:
ipv6_addr_copy(fl_tunnel.fl6_dst, 
__xfrm6_bundle_addr_remote(xfrm[i], fl-fl6_dst));
 
-   ipv6_addr_copy(fl_tunnel.fl6_src, 
__xfrm6_bundle_addr_remote(xfrm[i], fl-fl6_src));
+   ipv6_addr_copy(fl_tunnel.fl6_src, 
__xfrm6_bundle_addr_local(xfrm[i], fl-fl6_src));
break;
default:
BUG_ON(1);
-- 
Noriaki TAKAMIYA
-
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


Re: [PATCH] [IPV6] fixed the size of the netlink message notified by inet6_rt_notify().

2007-01-18 Thread Noriaki TAKAMIYA
Hi,

 Wed, 17 Jan 2007 13:33:22 +0100
 [Subject: Re: [PATCH] [IPV6] fixed the size of the netlink message notified 
 by inet6_rt_notify().]
 Patrick McHardy [EMAIL PROTECTED] wrote...

 Somewhat related: I have this patch for 2.6.21 to get rid of the
 BUG_ON()s.

  I think the problem is the return value of inet6_rt_notify() is less
  than expected.

--
Noriaki TAKAMIYA
-
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] [IPV6] fixed the size of the netlink message notified by inet6_rt_notify().

2007-01-15 Thread Noriaki TAKAMIYA
Hi,

  I think the return value of rt6_nlmsg_size() should includes the
  amount of RTA_METRICS.

  Regards,

---
 net/ipv6/route.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 8c3d568..5f0043c 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2017,6 +2017,7 @@ static inline size_t rt6_nlmsg_size(void
   + nla_total_size(4) /* RTA_IIF */
   + nla_total_size(4) /* RTA_OIF */
   + nla_total_size(4) /* RTA_PRIORITY */
+  + RTAX_MAX * nla_total_size(4) /* RTA_METRICS */
   + nla_total_size(sizeof(struct rta_cacheinfo));
 }
 
-- 
1.4.4

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


Re: [PATCH] [IPV6] fixed the size of the netlink message notified by inet6_rt_notify().

2007-01-15 Thread Noriaki TAKAMIYA
Hi,

  I'm sorry to re-send...

  I think the return value of rt6_nlmsg_size() should includes the
  amount of RTA_METRICS.

  Regards,

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]
---
 net/ipv6/route.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 8c3d568..5f0043c 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2017,6 +2017,7 @@ static inline size_t rt6_nlmsg_size(void
   + nla_total_size(4) /* RTA_IIF */
   + nla_total_size(4) /* RTA_OIF */
   + nla_total_size(4) /* RTA_PRIORITY */
+  + RTAX_MAX * nla_total_size(4) /* RTA_METRICS */
   + nla_total_size(sizeof(struct rta_cacheinfo));
 }
 
-- 
1.4.4

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


Re: [PATCH 2/2] [IPV6] RAW: Add checksum default defines for mobility header.

2006-12-26 Thread Noriaki TAKAMIYA
Hi,

 Wed, 27 Dec 2006 13:57:23 +0900
 [Subject: Re: [PATCH 2/2] [IPV6] RAW: Add checksum default defines for 
 mobility header.] 
 Masahide NAKAMURA [EMAIL PROTECTED] wrote

  Anyway, we have 4 options.
  
  1. IPV6_CHECKSUM default for IPPROTO_MH == 4
 omit checksumming in mip6_mh_filter()
  2. IPV6_CHECKSUM default for IPPROTO_MH == -1
 omit checksumming in mip6_mh_filter()
  3. IPV6_CHECKSUM for IPPROTO_MH == 4
 always perform checksumming in mip6_mh_filter()
  4. IPV6_CHECKSUM default for IPPROTO_MH == -1
 always perform checksumming in mip6_mh_filter()
  
  Current behavior is 4, but it is not appropriate.
  I guess 1 is the way to go.
 
 I would like to have 1, too.

  I think 1. is suitable.

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


Re: [PATCH 2/6] [CRYPTO] added the code of Camellia cipher algorithm.

2006-10-22 Thread Noriaki TAKAMIYA
Hi,

 Sun, 22 Oct 2006 15:09:54 +1000
 [Subject: Re: [PATCH 2/6] [CRYPTO] added the code of Camellia cipher 
 algorithm.]
 Herbert Xu [EMAIL PROTECTED] wrote...

 On Wed, Oct 18, 2006 at 07:16:47AM +, Noriaki TAKAMIYA wrote:
 
  +static int
  +camellia_set_key(struct crypto_tfm *tfm, const u8 *in_key,
  +unsigned int key_len, u32 *flags)
 
 Ugh, this doesn't compile with the current tree since the flags
 field no longer exists for set_key.  I've fixed it up in my tree.

  The tree I referred might be little bit old...

  Thank you for your fix.

  Regards,

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


Re: [PATCH 0/6] Changeset of Camellia cipher algorithm.

2006-10-22 Thread Noriaki TAKAMIYA
Hi,

 Sun, 22 Oct 2006 15:07:47 +1000
 [Subject: Re: [PATCH 0/6] Changeset of Camellia cipher algorithm.]
 Herbert Xu [EMAIL PROTECTED] wrote

 On Wed, Oct 18, 2006 at 07:15:10AM +, Noriaki TAKAMIYA wrote:
  
  [PATCH 1/6] [CRYPTO] added Kconfig entry for Camellia.
  [PATCH 2/6] [CRYPTO] added the code of Camellia cipher algorithm.
  [PATCH 3/6] [CRYPTO] added the testing code of Camellia cipher algorithm.
  [PATCH 4/6] [IPSEC] added the definition of Camellia cipher algorithm.
  [PATCH 5/6] [IPSEC] added the entry of Camellia cipher algorithm to 
  ealg_list[].
  [PATCH 6/6] [CRYPTO] added the developer of Camellia cipher algorithm.
 
 I've applied all the patches to cryptodev-2.6.  Thanks!

  Thank you!

--
Noriaki TAKAMIYA
-
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 0/6] Changeset of Camellia cipher algorithm.

2006-10-18 Thread Noriaki TAKAMIYA
Hi,

  This set of the patches enables to use of the Camellia cipher
  algorithm for the ESP encryption.

  Git tree is also available on camellia20061017 branch at:
  git://git.skbuff.net/gitroot/takamiya/camellia20061017

  The following patches are available for the top of davem's net-2.6
  and herbert's cryptodev-2.6 trees.

  Thank you.

HEADLINES
-

[PATCH 1/6] [CRYPTO] added Kconfig entry for Camellia.
[PATCH 2/6] [CRYPTO] added the code of Camellia cipher algorithm.
[PATCH 3/6] [CRYPTO] added the testing code of Camellia cipher algorithm.
[PATCH 4/6] [IPSEC] added the definition of Camellia cipher algorithm.
[PATCH 5/6] [IPSEC] added the entry of Camellia cipher algorithm to ealg_list[].
[PATCH 6/6] [CRYPTO] added the developer of Camellia cipher algorithm.

DIFFSTAT


 Documentation/crypto/api-intro.txt |5 
 crypto/Kconfig |   15 
 crypto/Makefile|1 
 crypto/camellia.c  | 1802 -
 crypto/tcrypt.c|   43 
 crypto/tcrypt.h|  166 +++
 include/linux/pfkeyv2.h|2 
 net/xfrm/xfrm_algo.c   |   18 
 8 files changed, 2045 insertions(+), 7 deletions(-)

CHANGESETS
--

commit 80a5df8127311212e99bd64103771de19c5908dd
Author: Noriaki TAKAMIYA [EMAIL PROTECTED]
Date:   Tue Oct 17 01:51:40 2006 +0900

[CRYPTO] added the developer of Camellia cipher algorithm.

This patch adds the developer of Camellia cipher algorithm.

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

commit 2253254f5a802c1cc8a5fc367fae911172f28846
Author: Noriaki TAKAMIYA [EMAIL PROTECTED]
Date:   Tue Oct 17 01:47:32 2006 +0900

[IPSEC] added the entry of Camellia cipher algorithm to ealg_list[].

This patch adds the entry of Camellia cipher algorithm to ealg_list[].

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

commit 1b6712cdb8fd31482d7e7da56e5f602357ec4aa4
Author: Noriaki TAKAMIYA [EMAIL PROTECTED]
Date:   Tue Oct 17 01:45:24 2006 +0900

[IPSEC] added the definition of Camellia cipher algorithm.

This patch adds the definitions used by pfkeyv2 interface for Camellia 
cipher
algorithm.

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

commit e86050d8fbd04b1ace9c121ce90799c8210925be
Author: Noriaki TAKAMIYA [EMAIL PROTECTED]
Date:   Tue Oct 17 01:43:14 2006 +0900

[CRYPTO] added the testing code of Camellia cipher algorithm.

This patch adds the code of Camellia code for testing module.

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

commit db41e54cb7081b4cd034378f17b8f8225586e2e2
Author: Noriaki TAKAMIYA [EMAIL PROTECTED]
Date:   Tue Oct 17 01:34:15 2006 +0900

[CRYPTO] added the code of Camellia cipher algorithm.

This patch adds the main code of Camellia cipher algorithm.

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

commit 01b0c3898fdf1cb4da8cdf5577e58328ecb11e4e
Author: Noriaki TAKAMIYA [EMAIL PROTECTED]
Date:   Tue Oct 17 01:31:35 2006 +0900

[CRYPTO] added Kconfig entry for Camellia.

This patch adds the Kconfig entry for Camellia.

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

--
Noriaki TAKAMIYA
-
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 4/6] [IPSEC] added the definition of Camellia cipher algorithm.

2006-10-18 Thread Noriaki TAKAMIYA

This patch adds the definitions used by pfkeyv2 interface for Camellia
cipher algorithm.

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

---

 include/linux/pfkeyv2.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

1b6712cdb8fd31482d7e7da56e5f602357ec4aa4
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h
index d5dd471..b16e474 100644
--- a/include/linux/pfkeyv2.h
+++ b/include/linux/pfkeyv2.h
@@ -296,6 +296,7 @@ #define SADB_X_EALG_CASTCBC 6
 #define SADB_X_EALG_BLOWFISHCBC7
 #define SADB_EALG_NULL 11
 #define SADB_X_EALG_AESCBC 12
+#define SADB_X_EALG_CAMELLIACBC22
 #define SADB_EALG_MAX   253 /* last EALG */
 /* private allocations should use 249-255 (RFC2407) */
 #define SADB_X_EALG_SERPENTCBC  252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */
-- 
Noriaki TAKAMIYA

-
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/6] [CRYPTO] added Kconfig entry for Camellia.

2006-10-18 Thread Noriaki TAKAMIYA
Hi, 

  This patch adds the Kconfig entry for Camellia.

  Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

---

 crypto/Kconfig |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)

01b0c3898fdf1cb4da8cdf5577e58328ecb11e4e
diff --git a/crypto/Kconfig b/crypto/Kconfig
index cbae839..19858ee 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -424,6 +424,20 @@ config CRYPTO_CRC32C
  See Castagnoli93.  This implementation uses lib/libcrc32c.
   Module will be crc32c.
 
+config CRYPTO_CAMELLIA
+  tristate Camellia cipher algorithms
+  depends on CRYPTO
+  help
+   Camellia cipher algorithms module.
+
+Camellia is a symmetric key block cipher developed jointly 
+at NTT and Mitsubishi Electric Corporation. 
+
+The Camellia specifies three key sizes: 128, 192 and 256 bits   
+
+See also:
+https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html
+
 config CRYPTO_TEST
tristate Testing module
depends on m
-- 
Noriaki TAKAMIYA
-
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 6/6] [CRYPTO] added the developer of Camellia cipher algorithm.

2006-10-18 Thread Noriaki TAKAMIYA

This patch adds the developer of Camellia cipher algorithm.

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

---

 Documentation/crypto/api-intro.txt |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

80a5df8127311212e99bd64103771de19c5908dd
diff --git a/Documentation/crypto/api-intro.txt 
b/Documentation/crypto/api-intro.txt
index 5a03a28..e41a79a 100644
--- a/Documentation/crypto/api-intro.txt
+++ b/Documentation/crypto/api-intro.txt
@@ -193,6 +193,7 @@ Original developers of the crypto algori
   Kartikey Mahendra Bhatt (CAST6)
   Jon Oberheide (ARC4)
   Jouni Malinen (Michael MIC)
+  NTT(Nippon Telegraph and Telephone Corporation) (Camellia)
 
 SHA1 algorithm contributors:
   Jean-Francois Dive
@@ -246,6 +247,9 @@ Tiger algorithm contributors:
 VIA PadLock contributors:
   Michal Ludvig
 
+Camellia algorithm contributors:
+  NTT(Nippon Telegraph and Telephone Corporation) (Camellia)
+
 Generic scatterwalk code by Adam J. Richter [EMAIL PROTECTED]
 
 Please send any credits updates or corrections to:
-- 
Noriaki TAKAMIYA

-
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 3/6] [CRYPTO] added the testing code of Camellia cipher algorithm.

2006-10-18 Thread Noriaki TAKAMIYA

This patch adds the code of Camellia code for testing module.

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

---

 crypto/tcrypt.c |   43 ++
 crypto/tcrypt.h |  165 +++
 2 files changed, 207 insertions(+), 1 deletions(-)

e86050d8fbd04b1ace9c121ce90799c8210925be
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index b48d011..a9976a0 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -71,7 +71,8 @@ static char *check[] = {
des, md5, des3_ede, rot13, sha1, sha256, blowfish,
twofish, serpent, sha384, sha512, md4, aes, cast6,
arc4, michael_mic, deflate, crc32c, tea, xtea,
-   khazad, wp512, wp384, wp256, tnepres, xeta, NULL
+   khazad, wp512, wp384, wp256, tnepres, xeta, camellia, 
+   NULL
 };
 
 static void hexdump(unsigned char *buf, unsigned int len)
@@ -960,6 +961,20 @@ static void do_test(void)
test_cipher(ecb(xeta), DECRYPT, xeta_dec_tv_template,
XETA_DEC_TEST_VECTORS);
 
+   //CAMELLIA
+   test_cipher (ecb(camellia), ENCRYPT,
+camellia_enc_tv_template,
+CAMELLIA_ENC_TEST_VECTORS);
+   test_cipher (ecb(camellia), DECRYPT,
+camellia_dec_tv_template,
+CAMELLIA_DEC_TEST_VECTORS);
+   test_cipher (cbc(camellia), ENCRYPT,
+camellia_cbc_enc_tv_template,
+CAMELLIA_CBC_ENC_TEST_VECTORS);
+   test_cipher (cbc(camellia), DECRYPT,
+camellia_cbc_dec_tv_template,
+CAMELLIA_CBC_DEC_TEST_VECTORS);
+
test_hash(sha384, sha384_tv_template, SHA384_TEST_VECTORS);
test_hash(sha512, sha512_tv_template, SHA512_TEST_VECTORS);
test_hash(wp512, wp512_tv_template, WP512_TEST_VECTORS);
@@ -1166,6 +1181,21 @@ static void do_test(void)
XETA_DEC_TEST_VECTORS);
break;
 
+   case 31:
+   test_cipher (ecb(camellia), ENCRYPT,
+camellia_enc_tv_template,
+CAMELLIA_ENC_TEST_VECTORS);
+   test_cipher (ecb(camellia), DECRYPT,
+camellia_dec_tv_template,
+CAMELLIA_DEC_TEST_VECTORS);
+   test_cipher (cbc(camellia), ENCRYPT,
+camellia_cbc_enc_tv_template,
+CAMELLIA_CBC_ENC_TEST_VECTORS);
+   test_cipher (cbc(camellia), DECRYPT,
+camellia_cbc_dec_tv_template,
+CAMELLIA_CBC_DEC_TEST_VECTORS);
+   break;
+
case 100:
test_hash(hmac(md5), hmac_md5_tv_template,
  HMAC_MD5_TEST_VECTORS);
@@ -1245,6 +1275,17 @@ static void do_test(void)
  des_speed_template);
break;
 
+   case 205:
+   test_cipher_speed(ecb(camellia), ENCRYPT, sec, NULL, 0,
+   camellia_speed_template);
+   test_cipher_speed(ecb(camellia), DECRYPT, sec, NULL, 0,
+   camellia_speed_template);
+   test_cipher_speed(cbc(camellia), ENCRYPT, sec, NULL, 0,
+   camellia_speed_template);
+   test_cipher_speed(cbc(camellia), DECRYPT, sec, NULL, 0,
+   camellia_speed_template);
+   break;
+
case 300:
/* fall through */
 
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index a40c441..3c7d46f 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -2744,6 +2744,150 @@ static struct cipher_testvec xeta_dec_tv
 };
 
 /*
+ * CAMELLIA test vectors.
+ */
+#define CAMELLIA_ENC_TEST_VECTORS 3
+#define CAMELLIA_DEC_TEST_VECTORS 3
+#define CAMELLIA_CBC_ENC_TEST_VECTORS 2
+#define CAMELLIA_CBC_DEC_TEST_VECTORS 2
+
+static struct cipher_testvec camellia_enc_tv_template[] = {
+   { 
+   .key= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+   0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+   .klen   = 16,
+   .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+   0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+   .ilen   = 16,
+   .result = { 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73,
+   0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 },
+   .rlen   = 16,
+   }, {
+   .key= { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+   0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
+   0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
+   .klen   = 24,
+   .input

[PATCH 5/6] [IPSEC] added the entry of Camellia cipher algorithm to ealg_list[].

2006-10-18 Thread Noriaki TAKAMIYA

This patch adds the entry of Camellia cipher algorithm to ealg_list[].

Signed-off-by: Noriaki TAKAMIYA [EMAIL PROTECTED]

---

 net/xfrm/xfrm_algo.c |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)

2253254f5a802c1cc8a5fc367fae911172f28846
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 5a0dbeb..583292d 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -249,6 +249,23 @@ static struct xfrm_algo_desc ealg_list[]
 }
 },
 {
+   .name = cbc(camellia),
+.compat = camellia,
+
+   .uinfo = {
+   .encr = {
+   .blockbits = 128,
+   .defkeybits = 128,
+   }
+   },
+   .desc = {
+   .sadb_alg_id = SADB_X_EALG_CAMELLIACBC,
+   .sadb_alg_ivlen = 8,
+   .sadb_alg_minbits = 128,
+   .sadb_alg_maxbits = 256
+   }
+},
+{
 .name = cbc(twofish),
 .compat = twofish,
  
-- 
Noriaki TAKAMIYA

-
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


Re: [FYI]: Introduction of the support for RFC4312(The Camellia Cipher Algorithm)

2006-10-14 Thread Noriaki TAKAMIYA
Hi, Dag,

 Fri, 13 Oct 2006 10:07:03 +0200
 [Subject: Re: [FYI]: Introduction of the support for RFC4312(The Camellia 
 Cipher Algorithm)]
 Dag Arne Osvik [EMAIL PROTECTED] wrote...

 I'm cc'ing linux-crypto and netdev so you don't get more questions about
 this.

  The mails I sent included Japanese characters, so it wasn't available.

  Thank you for your cc'ing.

  Regards,

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


[FYI]: Introduction of the support for RFC4312(The Camellia Cipher Algorithm)

2006-10-12 Thread Noriaki TAKAMIYA
Hi all,

  This is Takamiya, from NTT Software.

  NTT has released the code of the new cipher algorithm, which is
  specified in RFC4312(The Camellia Cipher Algorithm)

  Please see
  http://info.isl.ntt.co.jp/crypt/eng/camellia/source_s.html .

  The above patch is available for the version of 2.6.18.

  We started to prepare the patch against the cryptodev-2.6 tree, and
  will submit it in the few weeks.

  Best regards.

P.S.
  The patches to use camellia algorithm from ipsec-tools is also
  available on the above URL, and it will be merged into the
  ipsec-tools, too.

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


Re: [RFC] [IPV6] ADDRCONF: Lifetime handling fixes

2006-07-27 Thread Noriaki TAKAMIYA
Hi,

  This is Takamiya, from USAGI Project.

 Thu, 27 Jul 2006 11:28:02 +0100
 [Subject: Re: [RFC] [IPV6] ADDRCONF: Lifetime handling fixes] wrote...
 Hugo Santos [EMAIL PROTECTED] wrote...

  +   ifp = ipv6_get_ifaddr(pfx, dev, 1);
  +   if (ifp == NULL)
  +   return -ENOENT;
  +
  +   if (!valid_lft || (prefered_lft  valid_lft))
  +   return -EINVAL;
 ^^^
 
Unreleased ifp? This test should go before ipv6_get_ifaddr.

  That's right. Thanks.

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