From 2e8d65602946b9d03bca0f21c40cd6ed8501b70d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 19 Oct 2017 23:13:28 +0200 Subject: [PATCH] Move precomputed table where it's actually used --- .../crypto_core/curve25519/ref10/curve25519_ref10.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c b/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c index e0e562ba..15dc371d 100644 --- a/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +++ b/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c @@ -1395,10 +1395,6 @@ slide_vartime(signed char *r, const unsigned char *a) } } -static const ge_precomp Bi[8] = { -#include "base2.h" -}; - /* 37095705934669439343138083508754565189542113879843219016388785533085940283555 */ static const fe d = { -10913610, 13857413, -15372611, 6949391, 114729, @@ -1735,6 +1731,9 @@ void ge_double_scalarmult_vartime(ge_p2 *r, const unsigned char *a, const ge_p3 *A, const unsigned char *b) { + static const ge_precomp Bi[8] = { +#include "base2.h" + }; signed char aslide[256]; signed char bslide[256]; ge_cached Ai[8]; /* A,3A,5A,7A,9A,11A,13A,15A */