mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-20 02:25:14 -07:00
Wipe secret keys before public keys and nonces
This commit is contained in:
parent
1b63773986
commit
36e60b2d28
@ -35,9 +35,9 @@ crypto_box_seal(unsigned char *c, const unsigned char *m,
|
||||
_crypto_box_seal_nonce(nonce, epk, pk);
|
||||
ret = crypto_box_easy(c + crypto_box_PUBLICKEYBYTES, m, mlen,
|
||||
nonce, pk, esk);
|
||||
sodium_memzero(nonce, sizeof nonce);
|
||||
sodium_memzero(epk, sizeof epk);
|
||||
sodium_memzero(esk, sizeof esk);
|
||||
sodium_memzero(epk, sizeof epk);
|
||||
sodium_memzero(nonce, sizeof nonce);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user