]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/crypto: mldsa: Add FIPS cryptographic algorithm self-test
authorEric Biggers <ebiggers@kernel.org>
Wed, 7 Jan 2026 04:42:15 +0000 (20:42 -0800)
committerEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:07:50 +0000 (11:07 -0800)
commit959a634ebcda02e0add101024a5793323d66cda5
tree9a2c4d84d695a137b0a47e165db382bc36da26f2
parent0d92c555320ad34e67523063e32630cfad13af5f
lib/crypto: mldsa: Add FIPS cryptographic algorithm self-test

Since ML-DSA is FIPS-approved, add the boot-time self-test which is
apparently required.

Just add a test vector manually for now, borrowed from
lib/crypto/tests/mldsa-testvecs.h (where in turn it's borrowed from
leancrypto).  The SHA-* FIPS test vectors are generated by
scripts/crypto/gen-fips-testvecs.py instead, but the common Python
libraries don't support ML-DSA yet.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20260107044215.109930-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/fips-mldsa.h [new file with mode: 0644]
lib/crypto/mldsa.c