From: Eric Biggers <ebiggers@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Ard Biesheuvel <ardb@kernel.org>,
Stephan Mueller <smueller@chronox.de>,
Lukas Wunner <lukas@wunner.de>,
Ignat Korchagin <ignat@cloudflare.com>,
linux-crypto@vger.kernel.org, keyrings@vger.kernel.org,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/8] crypto: Add ML-DSA/Dilithium verify support
Date: Thu, 6 Nov 2025 11:20:16 -0800 [thread overview]
Message-ID: <20251106192016.GA3318@quark> (raw)
In-Reply-To: <20251106174456.31818-3-dhowells@redhat.com>
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
next prev parent reply other threads:[~2025-11-06 19:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 17:44 [PATCH v7 0/8] lib/crypto: Add ML-DSA signing David Howells
2025-11-06 17:44 ` [PATCH v7 1/8] crypto: Add support for shake256 through crypto_shash David Howells
2025-11-06 17:44 ` [PATCH v7 2/8] crypto: Add ML-DSA/Dilithium verify support David Howells
2025-11-06 19:20 ` Eric Biggers [this message]
2025-11-07 10:34 ` David Howells
2025-11-12 14:55 ` David Howells
2025-11-06 17:44 ` [PATCH v7 3/8] crypto: Add ML-DSA-44 pure rejection test vectors as a kunit test David Howells
2025-11-06 17:44 ` [PATCH v7 4/8] crypto: Add ML-DSA-65 " David Howells
2025-11-06 17:44 ` [PATCH v7 5/8] crypto: Add ML-DSA-87 " David Howells
2025-11-06 17:44 ` [PATCH v7 6/8] pkcs7: Allow the signing algo to calculate the digest itself David Howells
2025-11-06 17:44 ` [PATCH v7 7/8] pkcs7, x509: Add ML-DSA support David Howells
2025-11-07 10:05 ` [PATCH v7 8/8] modsign: Enable ML-DSA module signing David Howells
2025-11-09 19:42 ` Elliott, Robert (Servers)
2025-11-07 18:32 ` [PATCH v7 0/8] lib/crypto: Add ML-DSA signing Stefan Berger
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=20251106192016.GA3318@quark \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=da.gomez@kernel.org \
--cc=dhowells@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=ignat@cloudflare.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--cc=smueller@chronox.de \
/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).