diff options
-rw-r--r-- | src/lib/pubkey/ed25519/ge.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/pubkey/ed25519/ge.cpp b/src/lib/pubkey/ed25519/ge.cpp index 4c78223b2..ec22fa179 100644 --- a/src/lib/pubkey/ed25519/ge.cpp +++ b/src/lib/pubkey/ed25519/ge.cpp @@ -2029,7 +2029,7 @@ inline void select(ge_precomp* t, int8_t b) { const uint8_t bnegative = negative(b); - const uint8_t babs = b - (((-static_cast<int>(bnegative)) & b) * 2); + const uint8_t babs = b - ((-static_cast<int>(bnegative) & b) * 2); const int32_t neg_mask = equal32(bnegative, 1); const int32_t mask1 = equal32(babs, 1); @@ -2041,6 +2041,8 @@ inline void select(ge_precomp* t, const int32_t mask7 = equal32(babs, 7); const int32_t mask8 = equal32(babs, 8); + ge_precomp_0(t); + for(size_t i = 0; i != 10; ++i) { t->yplusx[i] = t->yplusx[i] ^ |