Re: [PATCH v13 01/12] crypto: Add ML-DSA crypto_sig support

Eric Biggers
2026-01-20T20:52:51Z

On Tue, Jan 20, 2026 at 02:50:47PM +0000, David Howells wrote:
> +config CRYPTO_MLDSA
> + tristate "ML-DSA (Module-Lattice-Based Digital Signature Algorithm)"
> + select CRYPTO_SIG
> + select CRYPTO_LIB_MLDSA
> + select CRYPTO_LIB_SHA3
> + help
> + ML-DSA (Module-Lattice-Based Digital Signature Algorithm) (FIPS-204).

The selection of CRYPTO_LIB_SHA3 is unnecessary.

> +struct crypto_mldsa_ctx {
> + u8 pk[MAX(MAX(MLDSA44_PUBLIC_KEY_SIZE,
> + MLDSA65_PUBLIC_KEY_SIZE),
> + MLDSA87_PUBLIC_KEY_SIZE)];
> + unsigned int pk_len;
> + enum mldsa_alg strength;
> + u8 key_set;
> +};

'key_set' should have type 'bool'. Or just use pk_len == 0 to mean the
key hasn't been set yet.

- Eric