summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-05-30 15:16:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-05-31 05:35:34 +0200
commit415c1c27d4cd2e3ab7954b56c141c0429d097ddf (patch)
tree09a2379a435037978945b75c9a31e17a5286868e
parentcurve25519: actually, do some things on heap sometimes (diff)
downloadwireguard-monolithic-historical-415c1c27d4cd2e3ab7954b56c141c0429d097ddf.tar.xz
wireguard-monolithic-historical-415c1c27d4cd2e3ab7954b56c141c0429d097ddf.zip
curve25519: align the basepoint to 32 bytes
-rw-r--r--src/crypto/curve25519.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/curve25519.c b/src/crypto/curve25519.c
index 09245a3..032f275 100644
--- a/src/crypto/curve25519.c
+++ b/src/crypto/curve25519.c
@@ -523,7 +523,7 @@ bool curve25519(u8 mypublic[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_P
bool curve25519_generate_public(u8 pub[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_POINT_SIZE])
{
- static const u8 basepoint[CURVE25519_POINT_SIZE] = { 9 };
+ static const u8 basepoint[CURVE25519_POINT_SIZE] __aligned(32) = { 9 };
#ifdef CONFIG_X86_64
if (curve25519_use_avx && irq_fpu_usable()) {
kernel_fpu_begin();
@@ -1511,7 +1511,7 @@ bool curve25519(u8 mypublic[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_P
#endif
bool curve25519_generate_public(u8 pub[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_POINT_SIZE])
{
- static const u8 basepoint[CURVE25519_POINT_SIZE] = { 9 };
+ static const u8 basepoint[CURVE25519_POINT_SIZE] __aligned(32) = { 9 };
return curve25519(pub, secret, basepoint);
}
#endif