Zero the nonce in crypto_sign()
This commit is contained in:
parent
eae4add8de
commit
b06951dd20
@ -5,6 +5,7 @@
|
||||
#include "crypto_hash_sha512.h"
|
||||
#include "ge.h"
|
||||
#include "sc.h"
|
||||
#include "utils.h"
|
||||
|
||||
int
|
||||
crypto_sign_detached(unsigned char *sig, unsigned long long *siglen,
|
||||
@ -44,6 +45,8 @@ crypto_sign_detached(unsigned char *sig, unsigned long long *siglen,
|
||||
sc_reduce(hram);
|
||||
sc_muladd(sig + 32, hram, az, nonce);
|
||||
|
||||
sodium_memzero(nonce, sizeof nonce);
|
||||
|
||||
if (siglen != NULL) {
|
||||
*siglen = 64U;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user