Skip to content

Commit ffd42b6

Browse files
author
Eric Biggers
committed
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>
1 parent fbfeca7 commit ffd42b6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

include/crypto/mldsa.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ enum mldsa_alg {
3939
* otherwise -EBADMSG will be returned.
4040
*
4141
* 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.
4345
*
4446
* Context: Might sleep
4547
*

lib/crypto/mldsa.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ static size_t encode_w1(u8 out[MAX_W1_ENCODED_LEN],
525525
return pos;
526526
}
527527

528-
/* Reference: FIPS 204 Section 6.3 "ML-DSA Verifying (Internal)" */
529528
int mldsa_verify(enum mldsa_alg alg, const u8 *sig, size_t sig_len,
530529
const u8 *msg, size_t msg_len, const u8 *pk, size_t pk_len)
531530
{

0 commit comments

Comments
 (0)