From: David Laight <David.Laight@ACULAB.COM>
To: "'Jason A. Donenfeld'" <Jason@zx2c4.com>,
Ard Biesheuvel <ardb@kernel.org>
Cc: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Network Development" <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Jean-Philippe Aumasson" <jeanphilippe.aumasson@gmail.com>,
"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>,
bpf <bpf@vger.kernel.org>
Subject: RE: [PATCH RFC v1 1/3] bpf: move from sha1 to blake2s in tag calculation
Date: Fri, 14 Jan 2022 15:59:21 +0000 [thread overview]
Message-ID: <13d51088799746469d26a442fb3c6fd5@AcuMS.aculab.com> (raw)
In-Reply-To: <CAHmME9oa8dAeRQfgj-U00gUtVOJ_CTGwtyBxUB4=8+XO_fFjNQ@mail.gmail.com>
From: Jason A. Donenfeld
> Sent: 14 January 2022 15:21
>
> On Fri, Jan 14, 2022 at 4:08 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> > Yeah, so the issue is that, at *some* point, SHA-1 is going to have to
> > go. So it would be helpful if Alexei could clarify *why* he doesn't
> > see this as a problem. The fact that it is broken means that it is no
> > longer intractable to forge collisions, which likley means that SHA-1
> > no longer fulfills the task that you wanted it to do in the first
> > place.
>
> I think the reason that Alexei doesn't think that the SHA-1 choice
> really matters is because the result is being truncated to 64-bits, so
> collisions are easy anyway...
Which probably means that SHA-1 is complete overkill and something
much simpler could have been used instead.
Is the buffer even big enough to have ever warranted the massive
unrolling of the sha-1 function.
(I suspect that just destroys the I-cache on most cpu.)
The IPv6 address case seems even more insane - how many bytes
are actually being hashed.
The unrolled loop is only likely to be sane for large (megabyte)
buffers.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2022-01-14 15:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220112131204.800307-1-Jason@zx2c4.com>
[not found] ` <20220112131204.800307-2-Jason@zx2c4.com>
2022-01-12 22:56 ` [PATCH RFC v1 1/3] bpf: move from sha1 to blake2s in tag calculation Toke Høiland-Jørgensen
2022-01-13 1:33 ` Alexei Starovoitov
2022-01-13 12:27 ` Jason A. Donenfeld
2022-01-13 22:45 ` Alexei Starovoitov
2022-01-14 8:33 ` Geert Uytterhoeven
2022-01-14 14:12 ` Jason A. Donenfeld
2022-01-14 15:08 ` Ard Biesheuvel
2022-01-14 15:20 ` Jason A. Donenfeld
2022-01-14 15:36 ` Geert Uytterhoeven
2022-01-14 15:59 ` David Laight [this message]
2022-01-14 16:19 ` Alexei Starovoitov
2022-01-14 16:34 ` Jason A. Donenfeld
2022-01-14 23:04 ` Jeffrey Walton
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=13d51088799746469d26a442fb3c6fd5@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=Jason@zx2c4.com \
--cc=alexei.starovoitov@gmail.com \
--cc=ardb@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=herbert@gondor.apana.org.au \
--cc=jeanphilippe.aumasson@gmail.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.com \
/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).