[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251106192016.GA3318@quark>
Date: Thu, 6 Nov 2025 11:20:16 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
Luis Chamberlain <mcgrof@...nel.org>,
Petr Pavlu <petr.pavlu@...e.com>,
Daniel Gomez <da.gomez@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
"Jason A . Donenfeld" <Jason@...c4.com>,
Ard Biesheuvel <ardb@...nel.org>,
Stephan Mueller <smueller@...onox.de>,
Lukas Wunner <lukas@...ner.de>,
Ignat Korchagin <ignat@...udflare.com>,
linux-crypto@...r.kernel.org, keyrings@...r.kernel.org,
linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/8] crypto: Add ML-DSA/Dilithium verify support
On Thu, Nov 06, 2025 at 05:44:46PM +0000, David Howells wrote:
> The interface to this code is through the crypto_sig API as the PKCS#7 code
> wants to use that rather than calling it directly. As such, I've placed it
> in crypto/ rather than lib/crypto/. Only the verification hooks are
> implemented; the signing hooks return an error.
As I mentioned before
(https://lore.kernel.org/linux-crypto/20250613170456.GA1284@sol/), this
code should go in lib/crypto/. There seems to be a clean API in
crypto/ml_dsa/dilithium.h already. Just make that the library API.
If "crypto_sig" support is really needed too, then put that in
crypto/ml-dsa.c, built on top of the library API. It's not clear the
crypto_sig support is very useful, though. For one, you had to add
ML-DSA specific logic to the calling code anyway (see "pkcs7: Allow the
signing algo to calculate the digest itself").
- Eric
Powered by blists - more mailing lists