summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-11-02 16:04:49 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-11-02 16:04:49 -0800
commitb2e7a7bbc127534b73936a505237f08758552252 (patch)
tree0966f4ecf99893462fc90465904eea2c98ce0e01 /include
parent6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 (diff)
parent01ad209f122b7c173477bd60c7997564f9c65961 (diff)
Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux
Pull crypto library fixes from Eric Biggers: - Disable the MIPS64 Octeon optimized SHA-1, SHA-256, and SHA-512 code on little-endian kernels, since it doesn't work correctly on them - Remove the PowerPC optimized Poly1305 code. It's already been marked as BROKEN for over a year due to not working in softirq context, but it turns out some of the Poly1305 math is incorrect too - A few robustness improvements for the ML-DSA code * tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: lib/crypto: mldsa: Add __must_check to mldsa_verify() lib/crypto: mldsa: Explicitly check that 'alg' is a valid value lib/crypto: mldsa: Check pk_len before doing pointer arithmetic lib/crypto: powerpc/poly1305: Remove BROKEN implementation lib/crypto: mips: Disable Octeon SHA code on little-endian kernels
Diffstat (limited to 'include')
-rw-r--r--include/crypto/mldsa.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/crypto/mldsa.h b/include/crypto/mldsa.h
index 3ef2676787c9..b156f166a141 100644
--- a/include/crypto/mldsa.h
+++ b/include/crypto/mldsa.h
@@ -48,11 +48,13 @@ enum mldsa_alg {
* Return:
* * 0 if the signature is valid
* * -EBADMSG if the signature and/or public key is malformed
+ * * -EINVAL if @alg is not a valid value
* * -EKEYREJECTED if the signature is invalid but otherwise well-formed
* * -ENOMEM if out of memory so the validity of the signature is unknown
*/
-int mldsa_verify(enum mldsa_alg alg, const u8 *sig, size_t sig_len,
- const u8 *msg, size_t msg_len, const u8 *pk, size_t pk_len);
+int __must_check mldsa_verify(enum mldsa_alg alg, const u8 *sig, size_t sig_len,
+ const u8 *msg, size_t msg_len, const u8 *pk,
+ size_t pk_len);
#if IS_ENABLED(CONFIG_CRYPTO_LIB_MLDSA_KUNIT_TEST)
/* Internal function, exposed only for unit testing */