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
