mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-26 19:57:13 +09:00
Also zero the public key and nonce after encryption in crypto_box_seal()
This commit is contained in:
@@ -35,6 +35,8 @@ 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);
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user