netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, netdev@vger.kernel.org
Subject: [RFC] [PATCH 6/7] ah: Remove obsolete code
Date: Thu, 16 Jul 2009 13:20:40 +0200	[thread overview]
Message-ID: <20090716112040.GV20288@secunet.com> (raw)
In-Reply-To: <20090716111548.GP20288@secunet.com>

ah4 and ah6 are converted to ahash now, so we can remove the
code for the obsolete hash algorithm.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 include/net/ah.h |   29 +++--------------------------
 1 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/include/net/ah.h b/include/net/ah.h
index 7ac5221..7573a71 100644
--- a/include/net/ah.h
+++ b/include/net/ah.h
@@ -1,44 +1,21 @@
 #ifndef _NET_AH_H
 #define _NET_AH_H
 
-#include <linux/crypto.h>
-#include <net/xfrm.h>
+#include <linux/skbuff.h>
 
 /* This is the maximum truncated ICV length that we know of. */
 #define MAX_AH_AUTH_LEN	12
 
+struct crypto_ahash;
+
 struct ah_data
 {
-	u8			*work_icv;
 	int			icv_full_len;
 	int			icv_trunc_len;
 
-	struct crypto_hash	*tfm;
 	struct crypto_ahash	*ahash;
 };
 
-static inline int ah_mac_digest(struct ah_data *ahp, struct sk_buff *skb,
-				u8 *auth_data)
-{
-	struct hash_desc desc;
-	int err;
-
-	desc.tfm = ahp->tfm;
-	desc.flags = 0;
-
-	memset(auth_data, 0, ahp->icv_trunc_len);
-	err = crypto_hash_init(&desc);
-	if (unlikely(err))
-		goto out;
-	err = skb_icv_walk(skb, &desc, 0, skb->len, crypto_hash_update);
-	if (unlikely(err))
-		goto out;
-	err = crypto_hash_final(&desc, ahp->work_icv);
-
-out:
-	return err;
-}

  parent reply	other threads:[~2009-07-16 11:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16 11:15 [RFC] [PATCH 0/7] IPsec: convert to ahash Steffen Klassert
2009-07-16 11:16 ` [RFC] [PATCH 1/7] esp: Add an additional scatterlist entry for the assoc data Steffen Klassert
2009-07-16 11:17 ` [RFC] [PATCH 2/7] crypto: authenc - convert to ahash Steffen Klassert
2009-07-17 17:03   ` David Miller
2009-07-20  6:26     ` Steffen Klassert
2009-07-20  6:55       ` Herbert Xu
2009-07-20  7:57         ` Steffen Klassert
2009-07-20  8:21           ` Herbert Xu
2009-07-20  8:36             ` Steffen Klassert
2009-07-20  8:50               ` Herbert Xu
2009-07-16 11:18 ` [RFC] [PATCH 3/7] ah: Add struct crypto_ahash to ah_data Steffen Klassert
2009-07-16 11:19 ` [RFC] [PATCH 4/7] ah4: convert to ahash Steffen Klassert
2009-07-21  6:53   ` Herbert Xu
2009-07-16 11:19 ` [RFC] [PATCH 5/7] ah6: " Steffen Klassert
2009-07-16 11:20 ` Steffen Klassert [this message]
2009-07-16 11:21 ` [RFC] [PATCH 7/7] xfrm: remove skb_icv_walk Steffen Klassert
2009-07-16 15:46 ` [RFC] [PATCH 0/7] IPsec: convert to ahash Herbert Xu
2009-07-17  6:11   ` Steffen Klassert
2009-07-17  7:42   ` Steffen Klassert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090716112040.GV20288@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).