summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/sysctl.36
-rw-r--r--lib/libssl/src/crypto/engine/eng_cryptodev.c1
-rw-r--r--lib/libssl/src/crypto/engine/hw_cryptodev.c1
-rw-r--r--regress/sbin/ipsecctl/sa11.in5
-rw-r--r--regress/sbin/ipsecctl/sa11.ok6
-rw-r--r--regress/sbin/ipsecctl/sa18.in4
-rw-r--r--regress/sbin/ipsecctl/sa18.ok6
-rw-r--r--regress/sbin/ipsecctl/sa21.in5
-rw-r--r--regress/sbin/ipsecctl/sa21.ok6
-rw-r--r--regress/sbin/ipsecctl/sa23.in5
-rw-r--r--regress/sbin/ipsecctl/sa23.ok6
-rw-r--r--regress/sbin/ipsecctl/sa6.in4
-rw-r--r--regress/sbin/ipsecctl/sa6.ok6
-rw-r--r--regress/sbin/ipsecctl/sa9.in5
-rw-r--r--regress/sbin/ipsecctl/sa9.ok6
-rw-r--r--sbin/ipsecctl/ipsec.conf.511
-rw-r--r--sbin/ipsecctl/ipsecctl.h4
-rw-r--r--sbin/ipsecctl/parse.y3
-rw-r--r--sbin/ipsecctl/pfkdump.c6
-rw-r--r--sbin/ipsecctl/pfkey.c5
-rw-r--r--share/man/man4/crypto.45
-rw-r--r--share/man/man9/crypto.95
-rw-r--r--sys/conf/files3
-rw-r--r--sys/crypto/cryptodev.c6
-rw-r--r--sys/crypto/cryptodev.h4
-rw-r--r--sys/crypto/cryptosoft.c9
-rw-r--r--sys/crypto/skipjack.c259
-rw-r--r--sys/crypto/skipjack.h18
-rw-r--r--sys/crypto/xform.c55
-rw-r--r--sys/crypto/xform.h3
-rw-r--r--sys/net/pfkeyv2.c8
-rw-r--r--sys/net/pfkeyv2.h5
-rw-r--r--sys/net/pfkeyv2_convert.c6
-rw-r--r--sys/netinet/ip_esp.c6
-rw-r--r--sys/netinet/ip_ipsp.h3
35 files changed, 28 insertions, 468 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index 446ea9d11e1..0b026e9674d 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sysctl.3,v 1.198 2010/08/19 18:14:14 kettenis Exp $
+.\" $OpenBSD: sysctl.3,v 1.199 2010/10/06 22:19:20 mikeb Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: August 19 2010 $
+.Dd $Mdocdate: October 6 2010 $
.Dt SYSCTL 3
.Os
.Sh NAME
@@ -1400,7 +1400,7 @@ Such security associations can occur as a result of a process having
requested some security level through
.Xr setsockopt 2 ,
or as a result of dynamic VPN entries.
-Supported values are aes, des, 3des, blowfish, cast128, and skipjack.
+Supported values are aes, des, 3des, blowfish and cast128.
If set to any other value, it is left to the key management daemons to
select an encryption algorithm for the security association.
The default value is aes.
diff --git a/lib/libssl/src/crypto/engine/eng_cryptodev.c b/lib/libssl/src/crypto/engine/eng_cryptodev.c
index f04c79151b2..10b3856b4e1 100644
--- a/lib/libssl/src/crypto/engine/eng_cryptodev.c
+++ b/lib/libssl/src/crypto/engine/eng_cryptodev.c
@@ -151,7 +151,6 @@ static struct {
{ CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, },
{ CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, },
{ CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, },
- { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, },
{ 0, NID_undef, 0, 0, },
};
diff --git a/lib/libssl/src/crypto/engine/hw_cryptodev.c b/lib/libssl/src/crypto/engine/hw_cryptodev.c
index b90f24576c9..03022f2fd39 100644
--- a/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -147,7 +147,6 @@ static struct dev_crypto_cipher ciphers[] = {
{ CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, },
{ CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, },
{ CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, },
- { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, },
{ 0, NID_undef, 0, 0, },
};
diff --git a/regress/sbin/ipsecctl/sa11.in b/regress/sbin/ipsecctl/sa11.in
index 8abf099739b..003f797dc94 100644
--- a/regress/sbin/ipsecctl/sa11.in
+++ b/regress/sbin/ipsecctl/sa11.in
@@ -35,8 +35,3 @@ esp transport from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef:0xbeef8ead \
enc null \
auth hmac-sha1 \
authkey file "DIR/ak160:DIR/ak160"
-esp transport from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef:0xbeef9ead \
- enc skipjack \
- auth hmac-sha1 \
- authkey file "DIR/ak160:DIR/ak160" \
- enckey file "DIR/ek80:DIR/ek80"
diff --git a/regress/sbin/ipsecctl/sa11.ok b/regress/sbin/ipsecctl/sa11.ok
index bb7a460dc71..e36a9a64276 100644
--- a/regress/sbin/ipsecctl/sa11.ok
+++ b/regress/sbin/ipsecctl/sa11.ok
@@ -44,9 +44,3 @@ esp transport from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
esp transport from 2.2.2.2 to 1.1.1.8 spi 0xbeef8ead auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-esp transport from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
-esp transport from 2.2.2.2 to 1.1.1.9 spi 0xbeef9ead auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
diff --git a/regress/sbin/ipsecctl/sa18.in b/regress/sbin/ipsecctl/sa18.in
index 12fdc997c80..bb46f29d697 100644
--- a/regress/sbin/ipsecctl/sa18.in
+++ b/regress/sbin/ipsecctl/sa18.in
@@ -28,7 +28,3 @@ esp from 3ffe::7 to 3ffe::10 spi 0x7eadbeef:0xbeef7ead auth hmac-sha1 \
esp from 3ffe::8 to 3ffe::10 spi 0x8eadbeef:0xbeef8ead auth hmac-sha1 \
enc null \
authkey file "DIR/ak160:DIR/ak160"
-esp from 3ffe::9 to 3ffe::10 spi 0x9eadbeef:0xbeef9ead auth hmac-sha1 \
- enc skipjack \
- authkey file "DIR/ak160:DIR/ak160" \
- enckey file "DIR/ek80:DIR/ek80"
diff --git a/regress/sbin/ipsecctl/sa18.ok b/regress/sbin/ipsecctl/sa18.ok
index 31d24d7d1e3..fcd33b66376 100644
--- a/regress/sbin/ipsecctl/sa18.ok
+++ b/regress/sbin/ipsecctl/sa18.ok
@@ -44,9 +44,3 @@ esp tunnel from 3ffe::8 to 3ffe::10 spi 0x8eadbeef auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
esp tunnel from 3ffe::10 to 3ffe::8 spi 0xbeef8ead auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-esp tunnel from 3ffe::9 to 3ffe::10 spi 0x9eadbeef auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
-esp tunnel from 3ffe::10 to 3ffe::9 spi 0xbeef9ead auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
diff --git a/regress/sbin/ipsecctl/sa21.in b/regress/sbin/ipsecctl/sa21.in
index 807bd49bb31..63c8b64f6ad 100644
--- a/regress/sbin/ipsecctl/sa21.in
+++ b/regress/sbin/ipsecctl/sa21.in
@@ -35,8 +35,3 @@ esp from 3ffe::8 to 3ffe::10 spi 0x8eadbeef:0xbeef8ead \
enc null \
auth hmac-sha1 \
authkey file "DIR/ak160:DIR/ak160"
-esp from 3ffe::9 to 3ffe::10 spi 0x9eadbeef:0xbeef9ead \
- enc skipjack \
- auth hmac-sha1 \
- authkey file "DIR/ak160:DIR/ak160" \
- enckey file "DIR/ek80:DIR/ek80"
diff --git a/regress/sbin/ipsecctl/sa21.ok b/regress/sbin/ipsecctl/sa21.ok
index 31d24d7d1e3..fcd33b66376 100644
--- a/regress/sbin/ipsecctl/sa21.ok
+++ b/regress/sbin/ipsecctl/sa21.ok
@@ -44,9 +44,3 @@ esp tunnel from 3ffe::8 to 3ffe::10 spi 0x8eadbeef auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
esp tunnel from 3ffe::10 to 3ffe::8 spi 0xbeef8ead auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-esp tunnel from 3ffe::9 to 3ffe::10 spi 0x9eadbeef auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
-esp tunnel from 3ffe::10 to 3ffe::9 spi 0xbeef9ead auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
diff --git a/regress/sbin/ipsecctl/sa23.in b/regress/sbin/ipsecctl/sa23.in
index 2b7667b7735..528d88cb488 100644
--- a/regress/sbin/ipsecctl/sa23.in
+++ b/regress/sbin/ipsecctl/sa23.in
@@ -35,8 +35,3 @@ esp transport from 3ffe::8 to 3ffe::10 spi 0x8eadbeef:0xbeef8ead \
enc null \
auth hmac-sha1 \
authkey file "DIR/ak160:DIR/ak160"
-esp transport from 3ffe::9 to 3ffe::10 spi 0x9eadbeef:0xbeef9ead \
- enc skipjack \
- auth hmac-sha1 \
- authkey file "DIR/ak160:DIR/ak160" \
- enckey file "DIR/ek80:DIR/ek80"
diff --git a/regress/sbin/ipsecctl/sa23.ok b/regress/sbin/ipsecctl/sa23.ok
index 12d04750785..ad2832d7730 100644
--- a/regress/sbin/ipsecctl/sa23.ok
+++ b/regress/sbin/ipsecctl/sa23.ok
@@ -44,9 +44,3 @@ esp transport from 3ffe::8 to 3ffe::10 spi 0x8eadbeef auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
esp transport from 3ffe::10 to 3ffe::8 spi 0xbeef8ead auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-esp transport from 3ffe::9 to 3ffe::10 spi 0x9eadbeef auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
-esp transport from 3ffe::10 to 3ffe::9 spi 0xbeef9ead auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
diff --git a/regress/sbin/ipsecctl/sa6.in b/regress/sbin/ipsecctl/sa6.in
index 2867b98f380..aa9b4d21b02 100644
--- a/regress/sbin/ipsecctl/sa6.in
+++ b/regress/sbin/ipsecctl/sa6.in
@@ -28,7 +28,3 @@ esp from 1.1.1.7 to 2.2.2.2 spi 0x7eadbeef:0xbeef7ead auth hmac-sha1 \
esp from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef:0xbeef8ead auth hmac-sha1 \
enc null \
authkey file "DIR/ak160:DIR/ak160"
-esp from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef:0xbeef9ead auth hmac-sha1 \
- enc skipjack \
- authkey file "DIR/ak160:DIR/ak160" \
- enckey file "DIR/ek80:DIR/ek80"
diff --git a/regress/sbin/ipsecctl/sa6.ok b/regress/sbin/ipsecctl/sa6.ok
index 677ca933976..51a53803e97 100644
--- a/regress/sbin/ipsecctl/sa6.ok
+++ b/regress/sbin/ipsecctl/sa6.ok
@@ -44,9 +44,3 @@ esp tunnel from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
esp tunnel from 2.2.2.2 to 1.1.1.8 spi 0xbeef8ead auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-esp tunnel from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
-esp tunnel from 2.2.2.2 to 1.1.1.9 spi 0xbeef9ead auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
diff --git a/regress/sbin/ipsecctl/sa9.in b/regress/sbin/ipsecctl/sa9.in
index edbac916aba..cbe9c59eb0d 100644
--- a/regress/sbin/ipsecctl/sa9.in
+++ b/regress/sbin/ipsecctl/sa9.in
@@ -35,11 +35,6 @@ esp from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef:0xbeef8ead \
enc null \
auth hmac-sha1 \
authkey file "DIR/ak160:DIR/ak160"
-esp from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef:0xbeef9ead \
- enc skipjack \
- auth hmac-sha1 \
- authkey file "DIR/ak160:DIR/ak160" \
- enckey file "DIR/ek80:DIR/ek80"
esp from 1.1.1.10 to 2.2.2.2 spi 0xaeadbeef:0xbeefaead \
enc null \
auth hmac-sha1 \
diff --git a/regress/sbin/ipsecctl/sa9.ok b/regress/sbin/ipsecctl/sa9.ok
index 3737c0e26dc..99f4ae10c6a 100644
--- a/regress/sbin/ipsecctl/sa9.ok
+++ b/regress/sbin/ipsecctl/sa9.ok
@@ -44,12 +44,6 @@ esp tunnel from 1.1.1.8 to 2.2.2.2 spi 0x8eadbeef auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
esp tunnel from 2.2.2.2 to 1.1.1.8 spi 0xbeef8ead auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-esp tunnel from 1.1.1.9 to 2.2.2.2 spi 0x9eadbeef auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
-esp tunnel from 2.2.2.2 to 1.1.1.9 spi 0xbeef9ead auth hmac-sha1 enc skipjack \
- authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
- enckey 0xeeeeeeeeeeeeeeeeeeee
esp tunnel from 1.1.1.10 to 2.2.2.2 spi 0xaeadbeef auth hmac-sha1 enc null \
authkey 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
esp tunnel from 2.2.2.2 to 1.1.1.10 spi 0xbeefaead auth hmac-sha1 enc null \
diff --git a/sbin/ipsecctl/ipsec.conf.5 b/sbin/ipsecctl/ipsec.conf.5
index d8b28704309..4d3557d1184 100644
--- a/sbin/ipsecctl/ipsec.conf.5
+++ b/sbin/ipsecctl/ipsec.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ipsec.conf.5,v 1.129 2010/09/23 11:43:51 mikeb Exp $
+.\" $OpenBSD: ipsec.conf.5,v 1.130 2010/10/06 22:19:20 mikeb Exp $
.\"
.\" Copyright (c) 2004 Mathieu Sauve-Frankel All rights reserved.
.\"
@@ -22,7 +22,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 23 2010 $
+.Dd $Mdocdate: October 6 2010 $
.Dt IPSEC.CONF 5
.Os
.Sh NAME
@@ -620,14 +620,11 @@ keyword:
.It Li aes-256-gmac Ta "288 bits" Ta "[phase 2 only]"
.It Li blowfish Ta "160 bits"
.It Li cast Ta "128 bits"
-.It Li skipjack Ta "80 bits"
.It Li null Ta "(none)" Ta "[phase 2 only]"
.El
.Pp
-Use of DES or Skipjack as an encryption algorithm is not recommended
-(except for backwards compatibility) due to their short key length.
-Furthermore, attacks on Skipjack have shown severe weaknesses
-in its structure.
+Use of DES as an encryption algorithm is not recommended
+(except for backwards compatibility) due to its short key length.
.Pp
DES requires 8 bytes to form a 56-bit key and 3DES requires 24 bytes
to form its 168-bit key.
diff --git a/sbin/ipsecctl/ipsecctl.h b/sbin/ipsecctl/ipsecctl.h
index d0d88109eda..b88b07ab525 100644
--- a/sbin/ipsecctl/ipsecctl.h
+++ b/sbin/ipsecctl/ipsecctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsecctl.h,v 1.60 2010/09/22 14:04:09 mikeb Exp $ */
+/* $OpenBSD: ipsecctl.h,v 1.61 2010/10/06 22:19:20 mikeb Exp $ */
/*
* Copyright (c) 2004, 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org>
*
@@ -66,7 +66,7 @@ enum {
ENCXF_AES_128, ENCXF_AES_192, ENCXF_AES_256, ENCXF_AESCTR,
ENCXF_AES_128_GCM, ENCXF_AES_192_GCM, ENCXF_AES_256_GCM,
ENCXF_AES_128_GMAC, ENCXF_AES_192_GMAC, ENCXF_AES_256_GMAC,
- ENCXF_BLOWFISH, ENCXF_CAST128, ENCXF_NULL, ENCXF_SKIPJACK
+ ENCXF_BLOWFISH, ENCXF_CAST128, ENCXF_NULL
};
enum {
COMPXF_UNKNOWN, COMPXF_DEFLATE, COMPXF_LZS
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y
index 0afe1c29767..d978faa9606 100644
--- a/sbin/ipsecctl/parse.y
+++ b/sbin/ipsecctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.149 2010/09/22 14:04:09 mikeb Exp $ */
+/* $OpenBSD: parse.y,v 1.150 2010/10/06 22:19:20 mikeb Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -116,7 +116,6 @@ const struct ipsec_xf encxfs[] = {
{ "blowfish", ENCXF_BLOWFISH, 5, 56, 0 },
{ "cast128", ENCXF_CAST128, 5, 16, 0 },
{ "null", ENCXF_NULL, 0, 0, 0 },
- { "skipjack", ENCXF_SKIPJACK, 10, 10, 0 },
{ NULL, 0, 0, 0, 0 },
};
diff --git a/sbin/ipsecctl/pfkdump.c b/sbin/ipsecctl/pfkdump.c
index 8c502d0b85c..6c9cfff01de 100644
--- a/sbin/ipsecctl/pfkdump.c
+++ b/sbin/ipsecctl/pfkdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkdump.c,v 1.28 2010/09/22 14:04:09 mikeb Exp $ */
+/* $OpenBSD: pfkdump.c,v 1.29 2010/10/06 22:19:20 mikeb Exp $ */
/*
* Copyright (c) 2003 Markus Friedl. All rights reserved.
@@ -184,7 +184,6 @@ struct idname enc_types[] = {
{ SADB_EALG_NULL, "null", NULL },
{ SADB_X_EALG_RC4, "rc4", NULL },
{ SADB_X_EALG_RC5, "rc5", NULL },
- { SADB_X_EALG_SKIPJACK, "skipjack", NULL },
{ 0, NULL, NULL }
};
@@ -748,9 +747,6 @@ pfkey_print_sa(struct sadb_msg *msg, int opts)
case SADB_EALG_NULL:
xfs.encxf = &encxfs[ENCXF_NULL];
break;
- case SADB_X_EALG_SKIPJACK:
- xfs.encxf = &encxfs[ENCXF_SKIPJACK];
- break;
}
}
if (sa->sadb_sa_auth) {
diff --git a/sbin/ipsecctl/pfkey.c b/sbin/ipsecctl/pfkey.c
index ad8dc2c14ad..0c134162419 100644
--- a/sbin/ipsecctl/pfkey.c
+++ b/sbin/ipsecctl/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.50 2010/09/22 14:04:09 mikeb Exp $ */
+/* $OpenBSD: pfkey.c,v 1.51 2010/10/06 22:19:20 mikeb Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
* Copyright (c) 2003, 2004 Markus Friedl <markus@openbsd.org>
@@ -515,9 +515,6 @@ pfkey_sa(int sd, u_int8_t satype, u_int8_t action, u_int32_t spi,
case ENCXF_NULL:
sa.sadb_sa_encrypt = SADB_EALG_NULL;
break;
- case ENCXF_SKIPJACK:
- sa.sadb_sa_encrypt = SADB_X_EALG_SKIPJACK;
- break;
default:
warnx("unsupported encryption algorithm %d",
xfs->encxf->id);
diff --git a/share/man/man4/crypto.4 b/share/man/man4/crypto.4
index fea33500803..95cc7e1b7e6 100644
--- a/share/man/man4/crypto.4
+++ b/share/man/man4/crypto.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: crypto.4,v 1.14 2008/06/09 16:16:35 djm Exp $
+.\" $OpenBSD: crypto.4,v 1.15 2010/10/06 22:19:20 mikeb Exp $
.\"
.\" Copyright (c) 2001 Theo de Raadt
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 9 2008 $
+.Dd $Mdocdate: October 6 2010 $
.Dt CRYPTO 4
.Os
.Sh NAME
@@ -73,7 +73,6 @@ asymmetric cryptographic features are potentially available from
.It CRYPTO_3DES_CBC
.It CRYPTO_BLF_CBC
.It CRYPTO_CAST_CBC
-.It CRYPTO_SKIPJACK_CBC
.It CRYPTO_MD5_HMAC
.It CRYPTO_SHA1_HMAC
.It CRYPTO_RIPEMD160_HMAC
diff --git a/share/man/man9/crypto.9 b/share/man/man9/crypto.9
index e13fbf4b415..f9463abac72 100644
--- a/share/man/man9/crypto.9
+++ b/share/man/man9/crypto.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: crypto.9,v 1.32 2010/07/18 07:59:40 jmc Exp $
+.\" $OpenBSD: crypto.9,v 1.33 2010/10/06 22:19:20 mikeb Exp $
.\"
.\" The author of this man page is Angelos D. Keromytis (angelos@cis.upenn.edu)
.\"
@@ -15,7 +15,7 @@
.\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
.\" PURPOSE.
.\"
-.Dd $Mdocdate: July 18 2010 $
+.Dd $Mdocdate: October 6 2010 $
.Dt CRYPTO 9
.Os
.Sh NAME
@@ -165,7 +165,6 @@ CRYPTO_DES_CBC
CRYPTO_3DES_CBC
CRYPTO_BLF_CBC
CRYPTO_CAST_CBC
-CRYPTO_SKIPJACK_CBC
CRYPTO_MD5_HMAC
CRYPTO_SHA1_HMAC
CRYPTO_RIPEMD160_HMAC
diff --git a/sys/conf/files b/sys/conf/files
index 4f1538d8628..ad9b07f8ea5 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1,4 +1,4 @@
-# $OpenBSD: files,v 1.503 2010/09/22 13:03:48 claudio Exp $
+# $OpenBSD: files,v 1.504 2010/10/06 22:19:20 mikeb Exp $
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -885,7 +885,6 @@ file crypto/sha1.c (inet & ipsec) | crypto | carp | wlan
file crypto/sha2.c (inet & ipsec) | crypto | wlan
file crypto/blf.c (inet & ipsec) | crypto | vnd
file crypto/cast.c (inet & ipsec) | crypto
-file crypto/skipjack.c (inet & ipsec) | crypto
file crypto/ecb_enc.c (inet & ipsec) | crypto
file crypto/set_key.c (inet & ipsec) | crypto
file crypto/ecb3_enc.c (inet & ipsec) | crypto
diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c
index 7796e6ff3c7..f94eff769b5 100644
--- a/sys/crypto/cryptodev.c
+++ b/sys/crypto/cryptodev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptodev.c,v 1.73 2010/07/21 18:44:01 deraadt Exp $ */
+/* $OpenBSD: cryptodev.c,v 1.74 2010/10/06 22:19:20 mikeb Exp $ */
/*
* Copyright (c) 2001 Theo de Raadt
@@ -44,7 +44,6 @@
#include <crypto/sha1.h>
#include <crypto/rmd160.h>
#include <crypto/cast.h>
-#include <crypto/skipjack.h>
#include <crypto/blf.h>
#include <crypto/cryptodev.h>
#include <crypto/xform.h>
@@ -166,9 +165,6 @@ cryptof_ioctl(struct file *fp, u_long cmd, caddr_t data, struct proc *p)
case CRYPTO_CAST_CBC:
txform = &enc_xform_cast5;
break;
- case CRYPTO_SKIPJACK_CBC:
- txform = &enc_xform_skipjack;
- break;
case CRYPTO_AES_CBC:
txform = &enc_xform_rijndael128;
break;
diff --git a/sys/crypto/cryptodev.h b/sys/crypto/cryptodev.h
index 02606577ee9..c21aa6e29f2 100644
--- a/sys/crypto/cryptodev.h
+++ b/sys/crypto/cryptodev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptodev.h,v 1.52 2010/09/22 11:54:23 mikeb Exp $ */
+/* $OpenBSD: cryptodev.h,v 1.53 2010/10/06 22:19:20 mikeb Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -74,7 +74,6 @@
#define DES_BLOCK_LEN 8
#define DES3_BLOCK_LEN 8
#define BLOWFISH_BLOCK_LEN 8
-#define SKIPJACK_BLOCK_LEN 8
#define CAST128_BLOCK_LEN 8
#define RIJNDAEL128_BLOCK_LEN 16
#define EALG_MAX_BLOCK_LEN 16 /* Keep this updated */
@@ -86,7 +85,6 @@
#define CRYPTO_3DES_CBC 2
#define CRYPTO_BLF_CBC 3
#define CRYPTO_CAST_CBC 4
-#define CRYPTO_SKIPJACK_CBC 5
#define CRYPTO_MD5_HMAC 6
#define CRYPTO_SHA1_HMAC 7
#define CRYPTO_RIPEMD160_HMAC 8
diff --git a/sys/crypto/cryptosoft.c b/sys/crypto/cryptosoft.c
index 7006afb968b..394aa4bd378 100644
--- a/sys/crypto/cryptosoft.c
+++ b/sys/crypto/cryptosoft.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptosoft.c,v 1.56 2010/10/06 10:00:59 mikeb Exp $ */
+/* $OpenBSD: cryptosoft.c,v 1.57 2010/10/06 22:19:20 mikeb Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -31,7 +31,6 @@
#include <crypto/sha1.h>
#include <crypto/rmd160.h>
#include <crypto/cast.h>
-#include <crypto/skipjack.h>
#include <crypto/blf.h>
#include <crypto/cryptodev.h>
#include <crypto/cryptosoft.h>
@@ -784,9 +783,6 @@ swcr_newsession(u_int32_t *sid, struct cryptoini *cri)
case CRYPTO_CAST_CBC:
txf = &enc_xform_cast5;
goto enccommon;
- case CRYPTO_SKIPJACK_CBC:
- txf = &enc_xform_skipjack;
- goto enccommon;
case CRYPTO_RIJNDAEL128_CBC:
txf = &enc_xform_rijndael128;
goto enccommon;
@@ -985,7 +981,6 @@ swcr_freesession(u_int64_t tid)
case CRYPTO_3DES_CBC:
case CRYPTO_BLF_CBC:
case CRYPTO_CAST_CBC:
- case CRYPTO_SKIPJACK_CBC:
case CRYPTO_RIJNDAEL128_CBC:
case CRYPTO_AES_CTR:
case CRYPTO_AES_XTS:
@@ -1110,7 +1105,6 @@ swcr_process(struct cryptop *crp)
case CRYPTO_3DES_CBC:
case CRYPTO_BLF_CBC:
case CRYPTO_CAST_CBC:
- case CRYPTO_SKIPJACK_CBC:
case CRYPTO_RIJNDAEL128_CBC:
case CRYPTO_AES_CTR:
case CRYPTO_AES_XTS:
@@ -1183,7 +1177,6 @@ swcr_init(void)
algs[CRYPTO_3DES_CBC] = CRYPTO_ALG_FLAG_SUPPORTED;
algs[CRYPTO_BLF_CBC] = CRYPTO_ALG_FLAG_SUPPORTED;
algs[CRYPTO_CAST_CBC] = CRYPTO_ALG_FLAG_SUPPORTED;
- algs[CRYPTO_SKIPJACK_CBC] = CRYPTO_ALG_FLAG_SUPPORTED;
algs[CRYPTO_MD5_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED;
algs[CRYPTO_SHA1_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED;
algs[CRYPTO_RIPEMD160_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED;
diff --git a/sys/crypto/skipjack.c b/sys/crypto/skipjack.c
deleted file mode 100644
index 45e1d83327a..00000000000
--- a/sys/crypto/skipjack.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/* $OpenBSD: skipjack.c,v 1.4 2006/03/23 15:32:03 mickey Exp $ */
-
-/*
- * Further optimized test implementation of SKIPJACK algorithm
- * Mark Tillotson <markt@chaos.org.uk>, 25 June 98
- * Optimizations suit RISC (lots of registers) machine best.
- *
- * based on unoptimized implementation of
- * Panu Rissanen <bande@lut.fi> 960624
- *
- * SKIPJACK and KEA Algorithm Specifications
- * Version 2.0
- * 29 May 1998
-*/
-
-#include <sys/param.h>
-#include <crypto/skipjack.h>
-#include <sys/malloc.h>
-
-static const u_int8_t ftable[0x100] =
-{
- 0xa3, 0xd7, 0x09, 0x83, 0xf8, 0x48, 0xf6, 0xf4,
- 0xb3, 0x21, 0x15, 0x78, 0x99, 0xb1, 0xaf, 0xf9,
- 0xe7, 0x2d, 0x4d, 0x8a, 0xce, 0x4c, 0xca, 0x2e,
- 0x52, 0x95, 0xd9, 0x1e, 0x4e, 0x38, 0x44, 0x28,
- 0x0a, 0xdf, 0x02, 0xa0, 0x17, 0xf1, 0x60, 0x68,
- 0x12, 0xb7, 0x7a, 0xc3, 0xe9, 0xfa, 0x3d, 0x53,
- 0x96, 0x84, 0x6b, 0xba, 0xf2, 0x63, 0x9a, 0x19,
- 0x7c, 0xae, 0xe5, 0xf5, 0xf7, 0x16, 0x6a, 0xa2,
- 0x39, 0xb6, 0x7b, 0x0f, 0xc1, 0x93, 0x81, 0x1b,
- 0xee, 0xb4, 0x1a, 0xea, 0xd0, 0x91, 0x2f, 0xb8,
- 0x55, 0xb9, 0xda, 0x85, 0x3f, 0x41, 0xbf, 0xe0,
- 0x5a, 0x58, 0x80, 0x5f, 0x66, 0x0b, 0xd8, 0x90,
- 0x35, 0xd5, 0xc0, 0xa7, 0x33, 0x06, 0x65, 0x69,
- 0x45, 0x00, 0x94, 0x56, 0x6d, 0x98, 0x9b, 0x76,
- 0x97, 0xfc, 0xb2, 0xc2, 0xb0, 0xfe, 0xdb, 0x20,
- 0xe1, 0xeb, 0xd6, 0xe4, 0xdd, 0x47, 0x4a, 0x1d,
- 0x42, 0xed, 0x9e, 0x6e, 0x49, 0x3c, 0xcd, 0x43,
- 0x27, 0xd2, 0x07, 0xd4, 0xde, 0xc7, 0x67, 0x18,
- 0x89, 0xcb, 0x30, 0x1f, 0x8d, 0xc6, 0x8f, 0xaa,
- 0xc8, 0x74, 0xdc, 0xc9, 0x5d, 0x5c, 0x31, 0xa4,
- 0x70, 0x88, 0x61, 0x2c, 0x9f, 0x0d, 0x2b, 0x87,
- 0x50, 0x82, 0x54, 0x64, 0x26, 0x7d, 0x03, 0x40,
- 0x34, 0x4b, 0x1c, 0x73, 0xd1, 0xc4, 0xfd, 0x3b,
- 0xcc, 0xfb, 0x7f, 0xab, 0xe6, 0x3e, 0x5b, 0xa5,
- 0xad, 0x04, 0x23, 0x9c, 0x14, 0x51, 0x22, 0xf0,
- 0x29, 0x79, 0x71, 0x7e, 0xff, 0x8c, 0x0e, 0xe2,
- 0x0c, 0xef, 0xbc, 0x72, 0x75, 0x6f, 0x37, 0xa1,
- 0xec, 0xd3, 0x8e, 0x62, 0x8b, 0x86, 0x10, 0xe8,
- 0x08, 0x77, 0x11, 0xbe, 0x92, 0x4f, 0x24, 0xc5,
- 0x32, 0x36, 0x9d, 0xcf, 0xf3, 0xa6, 0xbb, 0xac,
- 0x5e, 0x6c, 0xa9, 0x13, 0x57, 0x25, 0xb5, 0xe3,
- 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46
-};
-
-/*
- * For each key byte generate a table to represent the function
- * ftable [in ^ keybyte]
- *
- * These tables used to save an XOR in each stage of the G-function
- * the tables are hopefully pointed to by register allocated variables
- * k0, k1..k9
- */
-void
-subkey_table_gen (u_int8_t *key, u_int8_t **key_tables)
-{
- int i, k;
-
- for (k = 0; k < 10; k++) {
- u_int8_t key_byte = key [k];
- u_int8_t * table = (u_int8_t *) malloc(0x100, M_CRYPTO_DATA,
- M_WAITOK);
- key_tables [k] = table;
- for (i = 0; i < 0x100; i++)
- table [i] = ftable [i ^ key_byte];
- }
-}
-
-
-#define g(k0, k1, k2, k3, ih, il, oh, ol) \
-{ \
- oh = k##k0 [il] ^ ih; \
- ol = k##k1 [oh] ^ il; \
- oh = k##k2 [ol] ^ oh; \
- ol = k##k3 [oh] ^ ol; \
-}
-
-#define g0(ih, il, oh, ol) g(0, 1, 2, 3, ih, il, oh, ol)
-#define g4(ih, il, oh, ol) g(4, 5, 6, 7, ih, il, oh, ol)
-#define g8(ih, il, oh, ol) g(8, 9, 0, 1, ih, il, oh, ol)
-#define g2(ih, il, oh, ol) g(2, 3, 4, 5, ih, il, oh, ol)
-#define g6(ih, il, oh, ol) g(6, 7, 8, 9, ih, il, oh, ol)
-
-
-#define g_inv(k0, k1, k2, k3, ih, il, oh, ol) \
-{ \
- ol = k##k3 [ih] ^ il; \
- oh = k##k2 [ol] ^ ih; \
- ol = k##k1 [oh] ^ ol; \
- oh = k##k0 [ol] ^ oh; \
-}
-
-
-#define g0_inv(ih, il, oh, ol) g_inv(0, 1, 2, 3, ih, il, oh, ol)
-#define g4_inv(ih, il, oh, ol) g_inv(4, 5, 6, 7, ih, il, oh, ol)
-#define g8_inv(ih, il, oh, ol) g_inv(8, 9, 0, 1, ih, il, oh, ol)
-#define g2_inv(ih, il, oh, ol) g_inv(2, 3, 4, 5, ih, il, oh, ol)
-#define g6_inv(ih, il, oh, ol) g_inv(6, 7, 8, 9, ih, il, oh, ol)
-
-/* optimized version of Skipjack algorithm
- *
- * the appropriate g-function is inlined for each round
- *
- * the data movement is minimized by rotating the names of the
- * variables w1..w4, not their contents (saves 3 moves per round)
- *
- * the loops are completely unrolled (needed to staticize choice of g)
- *
- * compiles to about 470 instructions on a Sparc (gcc -O)
- * which is about 58 instructions per byte, 14 per round.
- * gcc seems to leave in some unnecessary and with 0xFF operations
- * but only in the latter part of the functions. Perhaps it
- * runs out of resources to properly optimize long inlined function?
- * in theory should get about 11 instructions per round, not 14
- */
-
-void
-skipjack_forwards(u_int8_t *plain, u_int8_t *cipher, u_int8_t **key_tables)
-{
- u_int8_t wh1 = plain[0]; u_int8_t wl1 = plain[1];
- u_int8_t wh2 = plain[2]; u_int8_t wl2 = plain[3];
- u_int8_t wh3 = plain[4]; u_int8_t wl3 = plain[5];
- u_int8_t wh4 = plain[6]; u_int8_t wl4 = plain[7];
-
- u_int8_t * k0 = key_tables [0];
- u_int8_t * k1 = key_tables [1];
- u_int8_t * k2 = key_tables [2];
- u_int8_t * k3 = key_tables [3];
- u_int8_t * k4 = key_tables [4];
- u_int8_t * k5 = key_tables [5];
- u_int8_t * k6 = key_tables [6];
- u_int8_t * k7 = key_tables [7];
- u_int8_t * k8 = key_tables [8];
- u_int8_t * k9 = key_tables [9];
-
- /* first 8 rounds */
- g0 (wh1,wl1, wh1,wl1); wl4 ^= wl1 ^ 1; wh4 ^= wh1;
- g4 (wh4,wl4, wh4,wl4); wl3 ^= wl4 ^ 2; wh3 ^= wh4;
- g8 (wh3,wl3, wh3,wl3); wl2 ^= wl3 ^ 3; wh2 ^= wh3;
- g2 (wh2,wl2, wh2,wl2); wl1 ^= wl2 ^ 4; wh1 ^= wh2;
- g6 (wh1,wl1, wh1,wl1); wl4 ^= wl1 ^ 5; wh4 ^= wh1;
- g0 (wh4,wl4, wh4,wl4); wl3 ^= wl4 ^ 6; wh3 ^= wh4;
- g4 (wh3,wl3, wh3,wl3); wl2 ^= wl3 ^ 7; wh2 ^= wh3;
- g8 (wh2,wl2, wh2,wl2); wl1 ^= wl2 ^ 8; wh1 ^= wh2;
-
- /* second 8 rounds */
- wh2 ^= wh1; wl2 ^= wl1 ^ 9 ; g2 (wh1,wl1, wh1,wl1);
- wh1 ^= wh4; wl1 ^= wl4 ^ 10; g6 (wh4,wl4, wh4,wl4);
- wh4 ^= wh3; wl4 ^= wl3 ^ 11; g0 (wh3,wl3, wh3,wl3);
- wh3 ^= wh2; wl3 ^= wl2 ^ 12; g4 (wh2,wl2, wh2,wl2);
- wh2 ^= wh1; wl2 ^= wl1 ^ 13; g8 (wh1,wl1, wh1,wl1);
- wh1 ^= wh4; wl1 ^= wl4 ^ 14; g2 (wh4,wl4, wh4,wl4);
- wh4 ^= wh3; wl4 ^= wl3 ^ 15; g6 (wh3,wl3, wh3,wl3);
- wh3 ^= wh2; wl3 ^= wl2 ^ 16; g0 (wh2,wl2, wh2,wl2);
-
- /* third 8 rounds */
- g4 (wh1,wl1, wh1,wl1); wl4 ^= wl1 ^ 17; wh4 ^= wh1;
- g8 (wh4,wl4, wh4,wl4); wl3 ^= wl4 ^ 18; wh3 ^= wh4;
- g2 (wh3,wl3, wh3,wl3); wl2 ^= wl3 ^ 19; wh2 ^= wh3;
- g6 (wh2,wl2, wh2,wl2); wl1 ^= wl2 ^ 20; wh1 ^= wh2;
- g0 (wh1,wl1, wh1,wl1); wl4 ^= wl1 ^ 21; wh4 ^= wh1;
- g4 (wh4,wl4, wh4,wl4); wl3 ^= wl4 ^ 22; wh3 ^= wh4;
- g8 (wh3,wl3, wh3,wl3); wl2 ^= wl3 ^ 23; wh2 ^= wh3;
- g2 (wh2,wl2, wh2,wl2); wl1 ^= wl2 ^ 24; wh1 ^= wh2;
-
- /* last 8 rounds */
- wh2 ^= wh1; wl2 ^= wl1 ^ 25; g6 (wh1,wl1, wh1,wl1);
- wh1 ^= wh4; wl1 ^= wl4 ^ 26; g0 (wh4,wl4, wh4,wl4);
- wh4 ^= wh3; wl4 ^= wl3 ^ 27; g4 (wh3,wl3, wh3,wl3);
- wh3 ^= wh2; wl3 ^= wl2 ^ 28; g8 (wh2,wl2, wh2,wl2);
- wh2 ^= wh1; wl2 ^= wl1 ^ 29; g2 (wh1,wl1, wh1,wl1);
- wh1 ^= wh4; wl1 ^= wl4 ^ 30; g6 (wh4,wl4, wh4,wl4);
- wh4 ^= wh3; wl4 ^= wl3 ^ 31; g0 (wh3,wl3, wh3,wl3);
- wh3 ^= wh2; wl3 ^= wl2 ^ 32; g4 (wh2,wl2, wh2,wl2);
-
- /* pack into byte vector */
- cipher [0] = wh1; cipher [1] = wl1;
- cipher [2] = wh2; cipher [3] = wl2;
- cipher [4] = wh3; cipher [5] = wl3;
- cipher [6] = wh4; cipher [7] = wl4;
-}
-
-
-void
-skipjack_backwards (u_int8_t *cipher, u_int8_t *plain, u_int8_t **key_tables)
-{
- /* setup 4 16-bit portions */
- u_int8_t wh1 = cipher[0]; u_int8_t wl1 = cipher[1];
- u_int8_t wh2 = cipher[2]; u_int8_t wl2 = cipher[3];
- u_int8_t wh3 = cipher[4]; u_int8_t wl3 = cipher[5];
- u_int8_t wh4 = cipher[6]; u_int8_t wl4 = cipher[7];
-
- u_int8_t * k0 = key_tables [0];
- u_int8_t * k1 = key_tables [1];
- u_int8_t * k2 = key_tables [2];
- u_int8_t * k3 = key_tables [3];
- u_int8_t * k4 = key_tables [4];
- u_int8_t * k5 = key_tables [5];
- u_int8_t * k6 = key_tables [6];
- u_int8_t * k7 = key_tables [7];
- u_int8_t * k8 = key_tables [8];
- u_int8_t * k9 = key_tables [9];
-
- /* first 8 rounds */
- g4_inv (wh2,wl2, wh2,wl2); wl3 ^= wl2 ^ 32; wh3 ^= wh2;
- g0_inv (wh3,wl3, wh3,wl3); wl4 ^= wl3 ^ 31; wh4 ^= wh3;
- g6_inv (wh4,wl4, wh4,wl4); wl1 ^= wl4 ^ 30; wh1 ^= wh4;
- g2_inv (wh1,wl1, wh1,wl1); wl2 ^= wl1 ^ 29; wh2 ^= wh1;
- g8_inv (wh2,wl2, wh2,wl2); wl3 ^= wl2 ^ 28; wh3 ^= wh2;
- g4_inv (wh3,wl3, wh3,wl3); wl4 ^= wl3 ^ 27; wh4 ^= wh3;
- g0_inv (wh4,wl4, wh4,wl4); wl1 ^= wl4 ^ 26; wh1 ^= wh4;
- g6_inv (wh1,wl1, wh1,wl1); wl2 ^= wl1 ^ 25; wh2 ^= wh1;
-
- /* second 8 rounds */
- wh1 ^= wh2; wl1 ^= wl2 ^ 24; g2_inv (wh2,wl2, wh2,wl2);
- wh2 ^= wh3; wl2 ^= wl3 ^ 23; g8_inv (wh3,wl3, wh3,wl3);
- wh3 ^= wh4; wl3 ^= wl4 ^ 22; g4_inv (wh4,wl4, wh4,wl4);
- wh4 ^= wh1; wl4 ^= wl1 ^ 21; g0_inv (wh1,wl1, wh1,wl1);
- wh1 ^= wh2; wl1 ^= wl2 ^ 20; g6_inv (wh2,wl2, wh2,wl2);
- wh2 ^= wh3; wl2 ^= wl3 ^ 19; g2_inv (wh3,wl3, wh3,wl3);
- wh3 ^= wh4; wl3 ^= wl4 ^ 18; g8_inv (wh4,wl4, wh4,wl4);
- wh4 ^= wh1; wl4 ^= wl1 ^ 17; g4_inv (wh1,wl1, wh1,wl1);
-
- /* third 8 rounds */
- g0_inv (wh2,wl2, wh2,wl2); wl3 ^= wl2 ^ 16; wh3 ^= wh2;
- g6_inv (wh3,wl3, wh3,wl3); wl4 ^= wl3 ^ 15; wh4 ^= wh3;
- g2_inv (wh4,wl4, wh4,wl4); wl1 ^= wl4 ^ 14; wh1 ^= wh4;
- g8_inv (wh1,wl1, wh1,wl1); wl2 ^= wl1 ^ 13; wh2 ^= wh1;
- g4_inv (wh2,wl2, wh2,wl2); wl3 ^= wl2 ^ 12; wh3 ^= wh2;
- g0_inv (wh3,wl3, wh3,wl3); wl4 ^= wl3 ^ 11; wh4 ^= wh3;
- g6_inv (wh4,wl4, wh4,wl4); wl1 ^= wl4 ^ 10; wh1 ^= wh4;
- g2_inv (wh1,wl1, wh1,wl1); wl2 ^= wl1 ^ 9; wh2 ^= wh1;
-
- /* last 8 rounds */
- wh1 ^= wh2; wl1 ^= wl2 ^ 8; g8_inv (wh2,wl2, wh2,wl2);
- wh2 ^= wh3; wl2 ^= wl3 ^ 7; g4_inv (wh3,wl3, wh3,wl3);
- wh3 ^= wh4; wl3 ^= wl4 ^ 6; g0_inv (wh4,wl4, wh4,wl4);
- wh4 ^= wh1; wl4 ^= wl1 ^ 5; g6_inv (wh1,wl1, wh1,wl1);
- wh1 ^= wh2; wl1 ^= wl2 ^ 4; g2_inv (wh2,wl2, wh2,wl2);
- wh2 ^= wh3; wl2 ^= wl3 ^ 3; g8_inv (wh3,wl3, wh3,wl3);
- wh3 ^= wh4; wl3 ^= wl4 ^ 2; g4_inv (wh4,wl4, wh4,wl4);
- wh4 ^= wh1; wl4 ^= wl1 ^ 1; g0_inv (wh1,wl1, wh1,wl1);
-
- /* pack into byte vector */
- plain [0] = wh1; plain [1] = wl1;
- plain [2] = wh2; plain [3] = wl2;
- plain [4] = wh3; plain [5] = wl3;
- plain [6] = wh4; plain [7] = wl4;
-}
diff --git a/sys/crypto/skipjack.h b/sys/crypto/skipjack.h
deleted file mode 100644
index 9f25755b718..00000000000
--- a/sys/crypto/skipjack.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* $OpenBSD: skipjack.h,v 1.4 2006/03/23 15:32:03 mickey Exp $ */
-
-/*
- * Further optimized test implementation of SKIPJACK algorithm
- * Mark Tillotson <markt@chaos.org.uk>, 25 June 98
- * Optimizations suit RISC (lots of registers) machine best.
- *
- * based on unoptimized implementation of
- * Panu Rissanen <bande@lut.fi> 960624
- *
- * SKIPJACK and KEA Algorithm Specifications
- * Version 2.0
- * 29 May 1998
-*/
-
-extern void skipjack_forwards(u_int8_t *plain, u_int8_t *cipher, u_int8_t **key);
-extern void skipjack_backwards(u_int8_t *cipher, u_int8_t *plain, u_int8_t **key);
-extern void subkey_table_gen(u_int8_t *key, u_int8_t **key_tables);
diff --git a/sys/crypto/xform.c b/sys/crypto/xform.c
index fb59c5f78e3..daacd682737 100644
--- a/sys/crypto/xform.c
+++ b/sys/crypto/xform.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xform.c,v 1.39 2010/09/22 11:54:23 mikeb Exp $ */
+/* $OpenBSD: xform.c,v 1.40 2010/10/06 22:19:20 mikeb Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -55,7 +55,6 @@
#include <crypto/rmd160.h>
#include <crypto/blf.h>
#include <crypto/cast.h>
-#include <crypto/skipjack.h>
#include <crypto/rijndael.h>
#include <crypto/cryptodev.h>
#include <crypto/xform.h>
@@ -70,7 +69,6 @@ int des1_setkey(u_int8_t **, u_int8_t *, int);
int des3_setkey(u_int8_t **, u_int8_t *, int);
int blf_setkey(u_int8_t **, u_int8_t *, int);
int cast5_setkey(u_int8_t **, u_int8_t *, int);
-int skipjack_setkey(u_int8_t **, u_int8_t *, int);
int rijndael128_setkey(u_int8_t **, u_int8_t *, int);
int aes_ctr_setkey(u_int8_t **, u_int8_t *, int);
int aes_xts_setkey(u_int8_t **, u_int8_t *, int);
@@ -80,7 +78,6 @@ void des1_encrypt(caddr_t, u_int8_t *);
void des3_encrypt(caddr_t, u_int8_t *);
void blf_encrypt(caddr_t, u_int8_t *);
void cast5_encrypt(caddr_t, u_int8_t *);
-void skipjack_encrypt(caddr_t, u_int8_t *);
void rijndael128_encrypt(caddr_t, u_int8_t *);
void null_encrypt(caddr_t, u_int8_t *);
void aes_xts_encrypt(caddr_t, u_int8_t *);
@@ -89,7 +86,6 @@ void des1_decrypt(caddr_t, u_int8_t *);
void des3_decrypt(caddr_t, u_int8_t *);
void blf_decrypt(caddr_t, u_int8_t *);
void cast5_decrypt(caddr_t, u_int8_t *);
-void skipjack_decrypt(caddr_t, u_int8_t *);
void rijndael128_decrypt(caddr_t, u_int8_t *);
void null_decrypt(caddr_t, u_int8_t *);
void aes_xts_decrypt(caddr_t, u_int8_t *);
@@ -100,7 +96,6 @@ void des1_zerokey(u_int8_t **);
void des3_zerokey(u_int8_t **);
void blf_zerokey(u_int8_t **);
void cast5_zerokey(u_int8_t **);
-void skipjack_zerokey(u_int8_t **);
void rijndael128_zerokey(u_int8_t **);
void aes_ctr_zerokey(u_int8_t **);
void aes_xts_zerokey(u_int8_t **);
@@ -166,16 +161,6 @@ struct enc_xform enc_xform_cast5 = {
NULL
};
-struct enc_xform enc_xform_skipjack = {
- CRYPTO_SKIPJACK_CBC, "Skipjack",
- 8, 8, 10, 10,
- skipjack_encrypt,
- skipjack_decrypt,
- skipjack_setkey,
- skipjack_zerokey,
- NULL
-};
-
struct enc_xform enc_xform_rijndael128 = {
CRYPTO_RIJNDAEL128_CBC, "Rijndael-128/AES",
16, 16, 16, 32,
@@ -520,44 +505,6 @@ cast5_zerokey(u_int8_t **sched)
}
void
-skipjack_encrypt(caddr_t key, u_int8_t *blk)
-{
- skipjack_forwards(blk, blk, (u_int8_t **) key);
-}
-
-void
-skipjack_decrypt(caddr_t key, u_int8_t *blk)
-{
- skipjack_backwards(blk, blk, (u_int8_t **) key);
-}
-
-int
-skipjack_setkey(u_int8_t **sched, u_int8_t *key, int len)
-{
- *sched = malloc(10 * sizeof(u_int8_t *), M_CRYPTO_DATA, M_WAITOK |
- M_ZERO);
- subkey_table_gen(key, (u_int8_t **) *sched);
-
- return 0;
-}
-
-void
-skipjack_zerokey(u_int8_t **sched)
-{
- int k;
-
- for (k = 0; k < 10; k++) {
- if (((u_int8_t **)(*sched))[k]) {
- bzero(((u_int8_t **)(*sched))[k], 0x100);
- free(((u_int8_t **)(*sched))[k], M_CRYPTO_DATA);
- }
- }
- bzero(*sched, 10 * sizeof(u_int8_t *));
- free(*sched, M_CRYPTO_DATA);
- *sched = NULL;
-}
-
-void
rijndael128_encrypt(caddr_t key, u_int8_t *blk)
{
rijndael_encrypt((rijndael_ctx *) key, (u_char *) blk, (u_char *) blk);
diff --git a/sys/crypto/xform.h b/sys/crypto/xform.h
index 0e873819a32..c147850e41b 100644
--- a/sys/crypto/xform.h
+++ b/sys/crypto/xform.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xform.h,v 1.21 2010/09/22 11:54:23 mikeb Exp $ */
+/* $OpenBSD: xform.h,v 1.22 2010/10/06 22:19:20 mikeb Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -78,7 +78,6 @@ extern struct enc_xform enc_xform_des;
extern struct enc_xform enc_xform_3des;
extern struct enc_xform enc_xform_blf;
extern struct enc_xform enc_xform_cast5;
-extern struct enc_xform enc_xform_skipjack;
extern struct enc_xform enc_xform_rijndael128;
extern struct enc_xform enc_xform_aes_ctr;
extern struct enc_xform enc_xform_aes_gcm;
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index 9827f5d9409..72a26ab4432 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.c,v 1.122 2010/09/27 17:28:34 deraadt Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.123 2010/10/06 22:19:20 mikeb Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -107,7 +107,6 @@ static const struct sadb_alg ealgs[] = {
{ SADB_EALG_3DESCBC, 64, 192, 192 },
{ SADB_X_EALG_BLF, 64, 40, BLF_MAXKEYLEN * 8},
{ SADB_X_EALG_CAST, 64, 40, 128},
- { SADB_X_EALG_SKIPJACK, 64, 80, 80},
{ SADB_X_EALG_AES, 128, 128, 256},
{ SADB_X_EALG_AESCTR, 128, 128 + 32, 256 + 32}
};
@@ -2070,11 +2069,6 @@ pfkeyv2_acquire(struct ipsec_policy *ipo, union sockaddr_union *gw,
sadb_comb->sadb_comb_encrypt = SADB_X_EALG_BLF;
sadb_comb->sadb_comb_encrypt_minbits = 40;
sadb_comb->sadb_comb_encrypt_maxbits = BLF_MAXKEYLEN * 8;
- } else if (!strncasecmp(ipsec_def_enc, "skipjack",
- sizeof("skipjack"))) {
- sadb_comb->sadb_comb_encrypt = SADB_X_EALG_SKIPJACK;
- sadb_comb->sadb_comb_encrypt_minbits = 80;
- sadb_comb->sadb_comb_encrypt_maxbits = 80;
} else if (!strncasecmp(ipsec_def_enc, "cast128",
sizeof("cast128"))) {
sadb_comb->sadb_comb_encrypt = SADB_X_EALG_CAST;
diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h
index cb9eabedf98..641b9ff3405 100644
--- a/sys/net/pfkeyv2.h
+++ b/sys/net/pfkeyv2.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.h,v 1.59 2010/09/22 12:48:52 mikeb Exp $ */
+/* $OpenBSD: pfkeyv2.h,v 1.60 2010/10/06 22:19:20 mikeb Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) January 1998
*
@@ -322,8 +322,7 @@ struct sadb_x_tap {
#define SADB_X_EALG_AESGCM12 19
#define SADB_X_EALG_AESGCM16 20
#define SADB_X_EALG_AESGMAC 21
-#define SADB_X_EALG_SKIPJACK 249
-#define SADB_EALG_MAX 249
+#define SADB_EALG_MAX 21
#define SADB_X_CALG_NONE 0
#define SADB_X_CALG_OUI 1
diff --git a/sys/net/pfkeyv2_convert.c b/sys/net/pfkeyv2_convert.c
index 4f3c2d52c40..8de7fdadc56 100644
--- a/sys/net/pfkeyv2_convert.c
+++ b/sys/net/pfkeyv2_convert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2_convert.c,v 1.33 2010/09/22 12:48:52 mikeb Exp $ */
+/* $OpenBSD: pfkeyv2_convert.c,v 1.34 2010/10/06 22:19:20 mikeb Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@keromytis.org)
*
@@ -270,10 +270,6 @@ export_sa(void **p, struct tdb *tdb)
case CRYPTO_BLF_CBC:
sadb_sa->sadb_sa_encrypt = SADB_X_EALG_BLF;
break;
-
- case CRYPTO_SKIPJACK_CBC:
- sadb_sa->sadb_sa_encrypt = SADB_X_EALG_SKIPJACK;
- break;
}
}
diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c
index d16c0e0afec..5a3cfcbe55b 100644
--- a/sys/netinet/ip_esp.c
+++ b/sys/netinet/ip_esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.c,v 1.113 2010/09/23 16:33:48 mikeb Exp $ */
+/* $OpenBSD: ip_esp.c,v 1.114 2010/10/06 22:19:20 mikeb Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -147,10 +147,6 @@ esp_init(struct tdb *tdbp, struct xformsw *xsp, struct ipsecinit *ii)
txform = &enc_xform_cast5;
break;
- case SADB_X_EALG_SKIPJACK:
- txform = &enc_xform_skipjack;
- break;
-
default:
DPRINTF(("esp_init(): unsupported encryption algorithm %d specified\n", ii->ii_encalg));
return EINVAL;
diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h
index e2521bbfc48..0e9b8a1c22f 100644
--- a/sys/netinet/ip_ipsp.h
+++ b/sys/netinet/ip_ipsp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.h,v 1.145 2010/09/23 16:34:09 mikeb Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.146 2010/10/06 22:19:20 mikeb Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -475,7 +475,6 @@ extern struct enc_xform enc_xform_des;
extern struct enc_xform enc_xform_3des;
extern struct enc_xform enc_xform_blf;
extern struct enc_xform enc_xform_cast5;
-extern struct enc_xform enc_xform_skipjack;
extern struct auth_hash auth_hash_hmac_md5_96;
extern struct auth_hash auth_hash_hmac_sha1_96;