summaryrefslogtreecommitdiffhomepage
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
commit8d099b6482bbfac252f0fb182549711166acf9dc (patch)
tree01f2ba3b87925ae1f95287a8390ad5525623e8db
parenta068d2a3e63dd47662d682b56d3be9099f096176 (diff)
curve25519: align the basepoint to 32 bytes
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-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