mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
scalarmult_ed25519_base(): return -1 if the scalar (not the result) is all zero
This commit is contained in:
parent
b6262d982f
commit
3e588a48e3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user