All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stephan Müller" <smueller@chronox.de>
To: David Howells <dhowells@redhat.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Simo Sorce <simo@redhat.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: Adding SHAKE hash algorithms to SHA-3
Date: Fri, 19 Sep 2025 17:49:46 +0200	[thread overview]
Message-ID: <2775306.XAFRqVoOGU@graviton.chronox.de> (raw)
In-Reply-To: <31fa6cb0a6b72b9ceed9bd925d86ad92b78b5bdf.camel@redhat.com>

Am Freitag, 19. September 2025, 15:57:05 Mitteleuropäische Sommerzeit schrieb 
Simo Sorce:

Hi Simo,

> We are probably not interested in the HashML-DSA variant, so you should
> probably ignore that part of the specification for now.
> It is easy to implement on top of Pure ML-DSA if you allow the caller
> to specify and externally composed mu.

The key is to have a dedicated function for the Verify.Internal function which 
is wrapped by the pure/prehash API, for example as done in [1]. This way you 
can first have a pure implementation followed, if necessary, by a prehash API 
without changing the actual algorithm, e.g with [2] and [3] where those two 
would be the actual API to be exported.

The question on external Mu, however, is a bit more tricky: it requires the 
injection of a variable that is used in one processing step of 
Verify.Internal. That variable comes from the caller, but somehow needs to be 
transported to the internal - for example by [4].

[1] https://github.com/smuellerDD/leancrypto/blob/master/ml-dsa/src/
dilithium_signature_impl.h#L888

[2] https://github.com/smuellerDD/leancrypto/blob/master/ml-dsa/src/
dilithium_signature_impl.h#L947

[3] https://github.com/smuellerDD/leancrypto/blob/master/ml-dsa/src/
dilithium_signature_impl.h#L906

[4] https://github.com/smuellerDD/leancrypto/blob/master/ml-dsa/src/
dilithium_signature_impl.h#L784

Ciao
Stephan



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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15  8:30 Adding SHAKE hash algorithms to SHA-3 David Howells
2025-09-15 12:00 ` Herbert Xu
2025-09-15 20:48   ` David Howells
2025-09-15 22:10     ` Eric Biggers
2025-09-19  6:41   ` David Howells
2025-09-19 13:57     ` Simo Sorce
2025-09-19 15:49       ` Stephan Müller [this message]

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=2775306.XAFRqVoOGU@graviton.chronox.de \
    --to=smueller@chronox.de \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@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 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.