android_kernel_motorola_sm6375/lib/crypto
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Arnd Bergmann 0369ef0a00
UPSTREAM: crypto: poly1305 - fix poly1305_core_setkey() declaration
gcc-11 points out a mismatch between the declaration and the definition
of poly1305_core_setkey():

lib/crypto/poly1305-donna32.c:13:67: error: argument 2 of type ‘const u8[16]’ {aka ‘const unsigned char[16]’} with mismatched bound [-Werror=array-parameter=]
   13 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 raw_key[16])
      |                                                          ~~~~~~~~~^~~~~~~~~~~
In file included from lib/crypto/poly1305-donna32.c:11:
include/crypto/internal/poly1305.h:21:68: note: previously declared as ‘const u8 *’ {aka ‘const unsigned char *’}
   21 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 *raw_key);

This is harmless in principle, as the calling conventions are the same,
but the more specific prototype allows better type checking in the
caller.

Change the declaration to match the actual function definition.
The poly1305_simd_init() is a bit suspicious here, as it previously
had a 32-byte argument type, but looks like it needs to take the
16-byte POLY1305_BLOCK_SIZE array instead.

Fixes: 1c08a104360f ("crypto: poly1305 - add new 32 and 64-bit generic versions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 8d195e7a8ada68928f2aedb2c18302a4518fe68e)
Bug: 187129171
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I72d0d5ed55f41ca53dbf16a3cad83a9216e85fdf
2025-09-24 12:16:39 +02:00
..
aes.c
arc4.c
blake2s-generic.c
blake2s-selftest.c
blake2s.c
chacha.c
chacha20poly1305-selftest.c UPSTREAM: crypto: arm64/chacha - correctly walk through blocks 2025-09-24 12:16:33 +02:00
chacha20poly1305.c UPSTREAM: crypto: lib/chacha20poly1305 - Add missing function declaration 2025-09-24 12:16:33 +02:00
curve25519-fiat32.c UPSTREAM: crypto: lib/curve25519 - work around Clang stack spilling issue 2025-09-24 12:16:31 +02:00
curve25519-generic.c UPSTREAM: crypto: curve25519 - Fix selftest build error 2025-09-24 12:16:32 +02:00
curve25519-hacl64.c
curve25519-selftest.c UPSTREAM: crypto: lib/curve25519 - re-add selftests 2025-09-24 12:16:32 +02:00
curve25519.c UPSTREAM: crypto: curve25519 - Fix selftest build error 2025-09-24 12:16:32 +02:00
des.c
Kconfig UPSTREAM: crypto: x86/poly1305 - wire up faster implementations for kernel 2025-09-24 12:16:32 +02:00
libchacha.c
Makefile UPSTREAM: crypto: curve25519 - Fix selftest build error 2025-09-24 12:16:32 +02:00
poly1305-donna32.c UPSTREAM: crypto: poly1305 - fix poly1305_core_setkey() declaration 2025-09-24 12:16:39 +02:00
poly1305-donna64.c UPSTREAM: crypto: poly1305 - fix poly1305_core_setkey() declaration 2025-09-24 12:16:39 +02:00
poly1305.c UPSTREAM: crypto: poly1305 - fix poly1305_core_setkey() declaration 2025-09-24 12:16:39 +02:00
sha256.c crypto: lib/sha256 - add sha256() function 2025-09-24 12:16:37 +02:00