aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/zinc/curve25519
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-25 16:26:03 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-25 16:26:03 +0200
commit0759480c5be307ee78acd93ad6eda8800701c870 (patch)
tree541dc42c4d1c39a84253eb9effd84c4ed3261052 /src/crypto/zinc/curve25519
parentchacha20: add bounds checking to selftests (diff)
downloadwireguard-monolithic-historical-0759480c5be307ee78acd93ad6eda8800701c870.tar.xz
wireguard-monolithic-historical-0759480c5be307ee78acd93ad6eda8800701c870.zip
curve25519-hacl64: reduce stack usage under KASAN
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'src/crypto/zinc/curve25519')
-rw-r--r--src/crypto/zinc/curve25519/curve25519-hacl64.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/crypto/zinc/curve25519/curve25519-hacl64.h b/src/crypto/zinc/curve25519/curve25519-hacl64.h
index c7b2924..598be44 100644
--- a/src/crypto/zinc/curve25519/curve25519-hacl64.h
+++ b/src/crypto/zinc/curve25519/curve25519-hacl64.h
@@ -182,8 +182,7 @@ static __always_inline void fmul_mul_shift_reduce_(u128 *output, u64 *input,
static __always_inline void fmul_fmul(u64 *output, u64 *input, u64 *input21)
{
- u64 tmp[5];
- memcpy(tmp, input, 5 * sizeof(*input));
+ u64 tmp[5] = { input[0], input[1], input[2], input[3], input[4] };
{
u128 b4;
u128 b0;