All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sandy Harris <sandyinchina@gmail.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	"Ted Ts'o" <tytso@mit.edu>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	John Denker <jsd@av8n.com>
Subject: Re: RFC random(4) We don't need no steenking ...
Date: Fri, 28 Jan 2022 08:12:20 +0800	[thread overview]
Message-ID: <CACXcFmkTiiS3M5B6RtyG=oD9+CqncFR6kQX1SZHvVNshVe=vKQ@mail.gmail.com> (raw)
In-Reply-To: <YfLtrrB+140KkiN0@sol.localdomain>

Eric Biggers <ebiggers@kernel.org> wrote:

> On Thu, Jan 27, 2022 at 05:04:07PM +0800, Sandy Harris wrote:
> > Current code in extract_buf() declares a local struct blake2s_state,
> > calls blake2s_init() which uses initialisation constants
>
> Which is good, because BLAKE2s is defined to use certain constants.  If
> different constants were used, then it wouldn't be BLAKE2s anymore, but rather
> some homebrew crypto with unknown security properties (like the old "SHA-1" that
> wasn't really SHA-1).

That's a reasonable argument & something very similar applies to
chacha usage. I do not think it holds water, though, since we
would still use the blake & chacha transforms. Even in blake,
every iteration except the first applies the transform to
arbitrary somewhat random data.

> > and moves data into the chacha state with memcpy().
>
> It's actually XOR'd in.  Please take a closer look at crng_reseed().

You are correct.

  reply	other threads:[~2022-01-28  0:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  9:04 RFC random(4) We don't need no steenking Sandy Harris
2022-01-27 19:08 ` Eric Biggers
2022-01-28  0:12   ` Sandy Harris [this message]
2022-01-28  0:39     ` Jason A. Donenfeld

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='CACXcFmkTiiS3M5B6RtyG=oD9+CqncFR6kQX1SZHvVNshVe=vKQ@mail.gmail.com' \
    --to=sandyinchina@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jsd@av8n.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.