[PATCH 0/2] lib/crypto: Use size_t lengths for Poly1305 and ChaCha
Eric Biggers
ebiggers at kernel.org
Wed Oct 14 08:26:02 PDT 2026
This series upgrades the Poly1305 and ChaCha functions to use size_t
lengths, matching the rest of the crypto library.
It also fixes the (not currently reached) handling of lengths above
S32_MAX bytes, and (not currently known to matter in practice) the
assembly functions depending on unspecified high register bits.
This more comprehensively addresses the issues identified in
https://lore.kernel.org/r/20261012-libcrypto-4gib-lengths-v1-0-ea566c129a2e@genproof.com
This series is targeting libcrypto-next.
Eric Biggers (2):
lib/crypto: poly1305: Use size_t length
lib/crypto: chacha: Use size_t length
include/crypto/chacha.h | 6 ++--
include/crypto/internal/poly1305.h | 4 +--
include/crypto/poly1305.h | 4 +--
lib/crypto/arm/chacha-scalar-core.S | 2 +-
lib/crypto/arm/chacha.h | 14 ++++-----
lib/crypto/arm/poly1305.h | 8 +++---
lib/crypto/arm64/chacha.h | 10 +++----
lib/crypto/arm64/poly1305.h | 6 ++--
lib/crypto/chacha.c | 8 +++---
lib/crypto/mips/chacha.h | 5 ++--
lib/crypto/mips/poly1305.h | 2 +-
lib/crypto/poly1305-donna32.c | 2 +-
lib/crypto/poly1305-donna64.c | 2 +-
lib/crypto/poly1305.c | 10 +++----
lib/crypto/powerpc/chacha-p10le-8x.S | 2 +-
lib/crypto/powerpc/chacha.h | 10 +++----
lib/crypto/powerpc/poly1305-p10le_64.S | 23 ++++++++-------
lib/crypto/powerpc/poly1305.h | 8 ++++--
lib/crypto/riscv/chacha.h | 6 ++--
lib/crypto/riscv/poly1305.h | 2 +-
lib/crypto/s390/chacha.h | 2 +-
lib/crypto/x86/chacha.h | 40 +++++++++++++-------------
lib/crypto/x86/poly1305.h | 4 +--
23 files changed, 91 insertions(+), 89 deletions(-)
base-commit: 40f47fa10a1d19c74f48a13d97b2eb19d5fb938d
--
2.56.0
More information about the linux-riscv
mailing list