diff --git a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c index e2a03faa..64ec31e9 100644 --- a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +++ b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c @@ -4,6 +4,7 @@ #include "crypto_scalarmult_curve25519.h" #include "api.h" #include "randombytes.h" +#include "utils.h" int crypto_box_seed_keypair( unsigned char *pk, @@ -14,6 +15,7 @@ int crypto_box_seed_keypair( unsigned char hash[64]; crypto_hash_sha512(hash,seed,32); memmove(sk,hash,32); + sodium_memzero(hash, sizeof hash); return crypto_scalarmult_curve25519_base(pk,sk); }