Skip to content

RFC IPsec: convert to ahash

Steffen Klassert linux-crypto lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7esp: Add an additional scatterlist entry for the assoc datanet/ipv4/esp4.c net/ipv6/esp6.c+36 -120 replies
2/7crypto: authenc - convert to ahashcrypto/authenc.c+150 -657 replies
3/7ah: Add struct crypto_ahash to ah_datainclude/net/ah.h+1 -00 replies
4/7ah4: convert to ahashnet/ipv4/ah4.c+236 -591 reply
5/7ah6: convert to ahashnet/ipv6/ah6.c+272 -800 replies
6/7ah: Remove obsolete codeinclude/net/ah.h+3 -250 replies
7/7xfrm: remove skb_icv_walkinclude/net/xfrm.h net/xfrm/xfrm_algo.c+0 -800 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC] [PATCH 0/7] IPsec: convert to ahash

This patchset converts IPsec over to the new ahash interface. The pachset applies to cryptodev-2.6. I was able to test the synchronous codepaths, the asynchronous ones are untested.

I'm still somewhat unhappy with the ahash version of authenc, but I decided to post anyway as a base for discussion.

Since the calls to the hash algorithms can now return asynchronous, I'd like to avoid multiple calls to the hash update functions. I'd rather like to do all the hashing with one call to crypto_ahash_digest(). As it is, this requires chaining of all the involved scatterlists. Since we still can't use sg_chain() to chain up the lists, I added an additional scatterlist entry to the scatterlist of the assoc data (esp) to be able to chain later in the crypto layer. To keep compatibility I set the termination bit at the first entry and remove it later in authenc. In fact to rely on this additional entry and just to remove the termintation bit later makes me a bit nervous and I'm not sure whether this is acceptable, so better ideas are very welcome.

Steffen