summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-11-17 04:07:06 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-11-17 04:07:06 +0000
commitfc2a8fa9ef8f4f2965cbf28fa06d8124b6e00de2 (patch)
tree14cac47079a1c0384de538826602f4938611cbf3
parent0d350435604346cacde1197af1e7c22c7418cecd (diff)
*HMAC96->*HMAC
-rw-r--r--sys/crypto/crypto.h6
-rw-r--r--sys/crypto/cryptosoft.c32
-rw-r--r--sys/crypto/xform.c8
3 files changed, 23 insertions, 23 deletions
diff --git a/sys/crypto/crypto.h b/sys/crypto/crypto.h
index e3c218b7ade..b37026f3f9a 100644
--- a/sys/crypto/crypto.h
+++ b/sys/crypto/crypto.h
@@ -52,9 +52,9 @@
#define CRYPTO_BLF_CBC 3
#define CRYPTO_CAST_CBC 4
#define CRYPTO_SKIPJACK_CBC 5
-#define CRYPTO_MD5_HMAC96 6
-#define CRYPTO_SHA1_HMAC96 7
-#define CRYPTO_RIPEMD160_HMAC96 8
+#define CRYPTO_MD5_HMAC 6
+#define CRYPTO_SHA1_HMAC 7
+#define CRYPTO_RIPEMD160_HMAC 8
#define CRYPTO_MD5_KPDK 9
#define CRYPTO_SHA1_KPDK 10
#define CRYPTO_RIJNDAEL128_CBC 11 /* 128 bit blocksize */
diff --git a/sys/crypto/cryptosoft.c b/sys/crypto/cryptosoft.c
index 1435d8f9005..770259768e0 100644
--- a/sys/crypto/cryptosoft.c
+++ b/sys/crypto/cryptosoft.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptosoft.c,v 1.16 2000/11/09 14:26:24 art Exp $ */
+/* $OpenBSD: cryptosoft.c,v 1.17 2000/11/17 04:07:05 angelos Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -338,9 +338,9 @@ swcr_authcompute(struct cryptodesc *crd, struct swcr_data *sw,
switch (sw->sw_alg)
{
- case CRYPTO_MD5_HMAC96:
- case CRYPTO_SHA1_HMAC96:
- case CRYPTO_RIPEMD160_HMAC96:
+ case CRYPTO_MD5_HMAC:
+ case CRYPTO_SHA1_HMAC:
+ case CRYPTO_RIPEMD160_HMAC:
if (sw->sw_octx == NULL)
return EINVAL;
@@ -481,15 +481,15 @@ swcr_newsession(u_int32_t *sid, struct cryptoini *cri)
get_random_bytes((*swd)->sw_iv, txf->blocksize);
break;
- case CRYPTO_MD5_HMAC96:
+ case CRYPTO_MD5_HMAC:
axf = &auth_hash_hmac_md5_96;
goto authcommon;
- case CRYPTO_SHA1_HMAC96:
+ case CRYPTO_SHA1_HMAC:
axf = &auth_hash_hmac_sha1_96;
goto authcommon;
- case CRYPTO_RIPEMD160_HMAC96:
+ case CRYPTO_RIPEMD160_HMAC:
axf = &auth_hash_hmac_ripemd_160_96;
authcommon:
@@ -618,9 +618,9 @@ swcr_freesession(u_int64_t tid)
free(swd->sw_iv, M_XDATA);
break;
- case CRYPTO_MD5_HMAC96:
- case CRYPTO_SHA1_HMAC96:
- case CRYPTO_RIPEMD160_HMAC96:
+ case CRYPTO_MD5_HMAC:
+ case CRYPTO_SHA1_HMAC:
+ case CRYPTO_RIPEMD160_HMAC:
axf = swd->sw_axf;
if (swd->sw_ictx)
@@ -732,9 +732,9 @@ swcr_process(struct cryptop *crp)
goto done;
break;
- case CRYPTO_MD5_HMAC96:
- case CRYPTO_SHA1_HMAC96:
- case CRYPTO_RIPEMD160_HMAC96:
+ case CRYPTO_MD5_HMAC:
+ case CRYPTO_SHA1_HMAC:
+ case CRYPTO_RIPEMD160_HMAC:
case CRYPTO_MD5_KPDK:
case CRYPTO_SHA1_KPDK:
if ((crp->crp_etype = swcr_authcompute(crd, sw, crp->crp_buf,
@@ -780,9 +780,9 @@ swcr_init(void)
crypto_register(swcr_id, CRYPTO_BLF_CBC, NULL, NULL, NULL);
crypto_register(swcr_id, CRYPTO_CAST_CBC, NULL, NULL, NULL);
crypto_register(swcr_id, CRYPTO_SKIPJACK_CBC, NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_MD5_HMAC96, NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_SHA1_HMAC96, NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_RIPEMD160_HMAC96, NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_MD5_HMAC, NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_SHA1_HMAC, NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_RIPEMD160_HMAC, NULL, NULL, NULL);
crypto_register(swcr_id, CRYPTO_MD5_KPDK, NULL, NULL, NULL);
crypto_register(swcr_id, CRYPTO_SHA1_KPDK, NULL, NULL, NULL);
crypto_register(swcr_id, CRYPTO_RIJNDAEL128_CBC, NULL, NULL, NULL);
diff --git a/sys/crypto/xform.c b/sys/crypto/xform.c
index 861614580a3..11b811e254b 100644
--- a/sys/crypto/xform.c
+++ b/sys/crypto/xform.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xform.c,v 1.3 2000/10/09 22:17:30 angelos Exp $ */
+/* $OpenBSD: xform.c,v 1.4 2000/11/17 04:07:05 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -151,7 +151,7 @@ struct enc_xform enc_xform_rijndael128 =
/* Authentication instances */
struct auth_hash auth_hash_hmac_md5_96 =
{
- CRYPTO_MD5_HMAC96, "HMAC-MD5-96",
+ CRYPTO_MD5_HMAC, "HMAC-MD5",
16, 16, 12, sizeof(MD5_CTX),
(void (*) (void *)) MD5Init, MD5Update_int,
(void (*) (u_int8_t *, void *)) MD5Final
@@ -159,7 +159,7 @@ struct auth_hash auth_hash_hmac_md5_96 =
struct auth_hash auth_hash_hmac_sha1_96 =
{
- CRYPTO_SHA1_HMAC96, "HMAC-SHA1-96",
+ CRYPTO_SHA1_HMAC, "HMAC-SHA1",
20, 20, 12, sizeof(SHA1_CTX),
(void (*) (void *)) SHA1Init, SHA1Update_int,
(void (*) (u_int8_t *, void *)) SHA1Final
@@ -167,7 +167,7 @@ struct auth_hash auth_hash_hmac_sha1_96 =
struct auth_hash auth_hash_hmac_ripemd_160_96 =
{
- CRYPTO_RIPEMD160_HMAC96, "HMAC-RIPEMD-160-96",
+ CRYPTO_RIPEMD160_HMAC, "HMAC-RIPEMD-160",
20, 20, 12, sizeof(RMD160_CTX),
(void (*)(void *)) RMD160Init, RMD160Update_int,
(void (*)(u_int8_t *, void *)) RMD160Final