Linux cryptographic layer development
 help / color / mirror / Atom feed
From: "Stephan Müller" <smueller@chronox.de>
To: Simo Sorce <simo@redhat.com>, David Howells <dhowells@redhat.com>
Cc: dhowells@redhat.com, Eric Biggers <ebiggers@kernel.org>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	linux-crypto@vger.kernel.org, keyrings@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/crypto: Add SHA3-224, SHA3-256, SHA3-384, SHA-512, SHAKE128, SHAKE256
Date: Fri, 19 Sep 2025 17:40:53 +0200	[thread overview]
Message-ID: <2400141.9o76ZdvQCi@graviton.chronox.de> (raw)
In-Reply-To: <3878472.1758296076@warthog.procyon.org.uk>

Am Freitag, 19. September 2025, 17:34:36 Mitteleuropäische Sommerzeit schrieb 
David Howells:

Hi David,

> Simo Sorce <simo@redhat.com> wrote:
> > I strongly suggest creating a test vector where multiple absorb and
> > squeeze operations are done in intermixed order, and then use that test
> > vector in your Kunit tests to ensure changes to the code do not break
> > this fundamental property of the keccak sponge algorithm.
> 
> I'm putting such a beast in the module init function at least.
> 
> Annoyingly, Eric's hash-test-template.h makes some unwarranted assumptions
> about the hashes it is testing - such as the final function zeroing out the
> hash struct.

If it is of help, here is such test that I use:

https://github.com/smuellerDD/leancrypto/blob/master/hash/tests/
shake_squeeze_more_tester.c#L92

Ciao
Stephan



  reply	other threads:[~2025-09-19 15:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18 22:07 [PATCH] lib/crypto: Add SHA3-224, SHA3-256, SHA3-384, SHA-512, SHAKE128, SHAKE256 David Howells
2025-09-19  2:42 ` Stephan Müller
2025-09-19  6:17   ` David Howells
2025-09-19 13:59     ` Simo Sorce
2025-09-19 15:34       ` David Howells
2025-09-19 15:40         ` Stephan Müller [this message]
2025-09-19 10:10 ` kernel test robot
2025-09-19 10:20 ` kernel test robot
2025-09-19 11:33 ` kernel test robot

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=2400141.9o76ZdvQCi@graviton.chronox.de \
    --to=smueller@chronox.de \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simo@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