From 3e588a48e3d3684c0b2147da8b7e6c91e557810e Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 3 Dec 2017 20:53:54 +0100 Subject: [PATCH] scalarmult_ed25519_base(): return -1 if the scalar (not the result) is all zero --- .../crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c b/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c index de67c670..64ded772 100644 --- a/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c +++ b/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c @@ -67,7 +67,7 @@ crypto_scalarmult_ed25519_base(unsigned char *q, _crypto_scalarmult_ed25519_clamp(t); ge25519_scalarmult_base(&Q, t); ge25519_p3_tobytes(q, &Q); - if (sodium_is_zero(t, 32) != 0) { + if (sodium_is_zero(n, 32) != 0) { return -1; } return 0;