Also zero the public key and nonce after encryption in crypto_box_seal()

This commit is contained in:
Frank Denis
2015-05-09 12:40:25 +02:00
parent a593e37983
commit fe02b1db1b
@@ -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;