From 958323b8bc92748de19695a2b5fa44e497c2a06a Mon Sep 17 00:00:00 2001 From: Steve Thomas Date: Sat, 10 Oct 2015 19:24:42 -0500 Subject: [PATCH 1/2] Update hmac_hmacsha512.c --- src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.c b/src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.c index 4ffd2645..edb940df 100644 --- a/src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.c +++ b/src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.c @@ -66,6 +66,7 @@ crypto_auth_hmacsha512_init(crypto_auth_hmacsha512_state *state, } crypto_hash_sha512_update(&state->octx, pad, 128); + sodium_memzero((void *) pad, sizeof pad); sodium_memzero((void *) khash, sizeof khash); return 0; From e07599dafe9ce8331fe9ae4cf5362afd80cea476 Mon Sep 17 00:00:00 2001 From: Steve Thomas Date: Sat, 10 Oct 2015 19:28:13 -0500 Subject: [PATCH 2/2] Update hmac_hmacsha256.c --- src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.c b/src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.c index 9cd69ac3..b2e7a789 100644 --- a/src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.c +++ b/src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.c @@ -66,6 +66,7 @@ crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *state, } crypto_hash_sha256_update(&state->octx, pad, 64); + sodium_memzero((void *) pad, sizeof pad); sodium_memzero((void *) khash, sizeof khash); return 0;