Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys -remove references to crypto/arc4/arc4.* -- the code isn...



details:   https://anonhg.NetBSD.org/src/rev/1abc6671e1fe
branches:  trunk
changeset: 765257:1abc6671e1fe
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon May 23 15:37:35 2011 +0000

description:
-remove references to crypto/arc4/arc4.* -- the code isn't used
 anywhere afaics
 (The confusion comes probably from use of arc4random() at various places,
  but this lives in libkern and doesn't share code with the former.)
-g/c non-implementation of arc4 encryption in swcrypto(4)
-remove special casing of ARC4 in crypto(4) -- the point is that it
 doesn't use an IV, and this fact is made explicit by the new "ivsize"
 property of xforms

diffstat:

 sys/conf/files                    |   4 ++--
 sys/dev/pci/if_iwi.c              |   6 ++----
 sys/net80211/ieee80211_crypto.c   |   5 ++---
 sys/opencrypto/cryptodev.c        |   8 ++++----
 sys/opencrypto/cryptosoft_xform.c |  13 ++-----------
 5 files changed, 12 insertions(+), 24 deletions(-)

diffs (141 lines):

diff -r 8d1ddf2d5cfe -r 1abc6671e1fe sys/conf/files
--- a/sys/conf/files    Mon May 23 15:23:24 2011 +0000
+++ b/sys/conf/files    Mon May 23 15:37:35 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files,v 1.1014 2011/05/23 06:50:17 mrg Exp $
+#      $NetBSD: files,v 1.1015 2011/05/23 15:37:35 drochner Exp $
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
 version        20100430
@@ -386,7 +386,7 @@
 define ieee1394
 define token
 define sppp
-define wlan: arc4, rijndael
+define wlan: rijndael
 define crypto
 
 # devices ARPing IPv4 pull this in:
diff -r 8d1ddf2d5cfe -r 1abc6671e1fe sys/dev/pci/if_iwi.c
--- a/sys/dev/pci/if_iwi.c      Mon May 23 15:23:24 2011 +0000
+++ b/sys/dev/pci/if_iwi.c      Mon May 23 15:37:35 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwi.c,v 1.86 2011/01/31 00:01:07 christos Exp $  */
+/*     $NetBSD: if_iwi.c,v 1.87 2011/05/23 15:37:36 drochner Exp $  */
 /*     $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $     */
 
 /*-
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.86 2011/01/31 00:01:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.87 2011/05/23 15:37:36 drochner Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -65,8 +65,6 @@
 #include <netinet/in_var.h>
 #include <netinet/ip.h>
 
-#include <crypto/arc4/arc4.h>
-
 #include <dev/pci/if_iwireg.h>
 #include <dev/pci/if_iwivar.h>
 
diff -r 8d1ddf2d5cfe -r 1abc6671e1fe sys/net80211/ieee80211_crypto.c
--- a/sys/net80211/ieee80211_crypto.c   Mon May 23 15:23:24 2011 +0000
+++ b/sys/net80211/ieee80211_crypto.c   Mon May 23 15:37:35 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ieee80211_crypto.c,v 1.14 2006/11/16 01:33:40 christos Exp $   */
+/*     $NetBSD: ieee80211_crypto.c,v 1.15 2011/05/23 15:37:36 drochner Exp $   */
 /*-
  * Copyright (c) 2001 Atsushi Onoe
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
 __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.12 2005/08/08 18:46:35 sam Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_crypto.c,v 1.14 2006/11/16 01:33:40 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_crypto.c,v 1.15 2011/05/23 15:37:36 drochner Exp $");
 #endif
 
 #include "opt_inet.h"
@@ -73,7 +73,6 @@
 #include <net/if_ether.h>
 #endif
 
-#include <crypto/arc4/arc4.h>  /* XXX unneeded? */
 static int _ieee80211_crypto_delkey(struct ieee80211com *,
                struct ieee80211_key *);
 
diff -r 8d1ddf2d5cfe -r 1abc6671e1fe sys/opencrypto/cryptodev.c
--- a/sys/opencrypto/cryptodev.c        Mon May 23 15:23:24 2011 +0000
+++ b/sys/opencrypto/cryptodev.c        Mon May 23 15:37:35 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptodev.c,v 1.61 2011/05/23 15:22:57 drochner Exp $ */
+/*     $NetBSD: cryptodev.c,v 1.62 2011/05/23 15:37:36 drochner Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $        */
 /*     $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $   */
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.61 2011/05/23 15:22:57 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.62 2011/05/23 15:37:36 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -580,7 +580,7 @@
                        error = EINVAL;
                        goto bail;
                }
-               if (cse->cipher == CRYPTO_ARC4) { /* XXX use flag? */
+               if (cse->txform->ivsize == 0) {
                        error = EINVAL;
                        goto bail;
                }
@@ -591,7 +591,7 @@
                crde->crd_flags |= CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT;
                crde->crd_skip = 0;
        } else if (crde) {
-               if (cse->cipher == CRYPTO_ARC4) { /* XXX use flag? */
+               if (cse->txform->ivsize == 0) {
                        crde->crd_skip = 0;
                } else {
                        if (!(crde->crd_flags & CRD_F_ENCRYPT))
diff -r 8d1ddf2d5cfe -r 1abc6671e1fe sys/opencrypto/cryptosoft_xform.c
--- a/sys/opencrypto/cryptosoft_xform.c Mon May 23 15:23:24 2011 +0000
+++ b/sys/opencrypto/cryptosoft_xform.c Mon May 23 15:37:35 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptosoft_xform.c,v 1.18 2011/05/23 13:51:10 drochner Exp $ */
+/*     $NetBSD: cryptosoft_xform.c,v 1.19 2011/05/23 15:37:36 drochner Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $    */
 /*     $OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $     */
 
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.18 2011/05/23 13:51:10 drochner Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.19 2011/05/23 15:37:36 drochner Exp $");
 
 #include <crypto/blowfish/blowfish.h>
 #include <crypto/cast128/cast128.h>
@@ -211,15 +211,6 @@
        aes_ctr_reinit
 };
 
-static const struct swcr_enc_xform swcr_enc_xform_arc4 = {
-       &enc_xform_arc4,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL
-};
-
 static const struct swcr_enc_xform swcr_enc_xform_camellia = {
        &enc_xform_camellia,
        cml_encrypt,



Home | Main Index | Thread Index | Old Index