diff --git a/src/libsodium/crypto_box/crypto_box_seal.c b/src/libsodium/crypto_box/crypto_box_seal.c index 338e2893..0d261d86 100644 --- a/src/libsodium/crypto_box/crypto_box_seal.c +++ b/src/libsodium/crypto_box/crypto_box_seal.c @@ -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;