Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/crypto: mldsa: Clarify the documentation for mldsa_verify() slightly

mldsa_verify() implements ML-DSA.Verify with ctx='', so document this
more explicitly. Remove the one-liner comment above mldsa_verify()
which was somewhat misleading.

Reviewed-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20260202221552.174341-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

+3 -2
+3 -1
include/crypto/mldsa.h
··· 39 39 * otherwise -EBADMSG will be returned. 40 40 * 41 41 * This verifies a signature using pure ML-DSA with the specified parameter set. 42 - * The context string is assumed to be empty. 42 + * The context string is assumed to be empty. This corresponds to FIPS 204 43 + * Algorithm 3 "ML-DSA.Verify" with the ctx parameter set to the empty string 44 + * and the lengths of the signature and key given explicitly by the caller. 43 45 * 44 46 * Context: Might sleep 45 47 *
-1
lib/crypto/mldsa.c
··· 525 525 return pos; 526 526 } 527 527 528 - /* Reference: FIPS 204 Section 6.3 "ML-DSA Verifying (Internal)" */ 529 528 int mldsa_verify(enum mldsa_alg alg, const u8 *sig, size_t sig_len, 530 529 const u8 *msg, size_t msg_len, const u8 *pk, size_t pk_len) 531 530 {