Skip to content

RFC remove remaining users of SHA-1

Jason A. Donenfeld bpf linux-crypto lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest3 patches 2 repliesIn review
  2. v1 RFC3 patches 35 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bpf: move from sha1 to blake2s in tag calculationkernel/bpf/core.c+4 -352 replies
2/3ipv6: move from sha1 to blake2s in address calculationnet/ipv6/addrconf.c+14 -420 replies
3/3crypto: sha1_generic - import lib/sha1.c locallycrypto/sha1_generic.c include/crypto/sha1.h lib/Makefile +1 more+183 -2150 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH RFC v2 0/3] remove remaining users of SHA-1

Hi,

There are currently two remaining users of SHA-1 left in the kernel: bpf tag generation, and ipv6 address calculation. In an effort to reduce code size and rid ourselves of insecure primitives, this RFC patchset moves to using the more secure BLAKE2s function. I wanted to get your feedback on how feasible this patchset is, and if there is some remaining attachment to SHA-1, why exactly, and what could be done to mitigate it. Rather than sending a mailing list post just asking, "what do you think?" I figured it'd be easier to send this as an RFC patchset, so you see specifically what I mean.

Version 2 makes the ipv6 handling a bit cleaner and fixes a build warning from the last commit. Since this is just an RFC-for-discussion, there's not technically a need to be sending this, but from the looks of it, a real solution here might involve a bit more heavy lifting, so I wanted to at least get my latest on the list in case others want to play around with solutions in this space too. Also, the original recipient list was too narrow, so this v2 expands that a bit.

Thoughts? Comments?

Thanks,
Jason

Cc Alexei Starovoitov <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Ard Biesheuvel <[email protected]>
Cc Erik Kline <[email protected]>
Cc Fernando Gont <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Hannes Frederic Sowa <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Jean-Philippe Aumasson <[email protected]>
Cc Lorenzo Colitti <[email protected]>

Jason A. Donenfeld (3):
bpf: move from sha1 to blake2s in tag calculation
ipv6: move from sha1 to blake2s in address calculation
crypto: sha1_generic - import lib/sha1.c locally

 crypto/sha1_generic.c | 182 +++++++++++++++++++++++++++++++++++++
 include/crypto/sha1.h |  10 ---
 kernel/bpf/core.c     |  39 +-------
 lib/Makefile          |   2 +-
 lib/sha1.c            | 204 ------------------------------------------
 net/ipv6/addrconf.c   |  56 +++---------
 6 files changed, 201 insertions(+), 292 deletions(-)
 delete mode 100644 lib/sha1.c
Signature · 1 line
2.34.1