hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 23a0ae861f7b01b8e931160a38ed3c9ab0942a1b
parent 2a6211aa53b1371cdf0a3b9a8078e2b93ec9624c
Author: Armin Preiml <apreiml@strohwolke.at>
Date:   Mon, 10 Jan 2022 16:16:15 +0100

crypto::salsa: clear temp secret state on init

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>

Diffstat:
Mcrypto/salsa/salsa20.ha | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/crypto/salsa/salsa20.ha b/crypto/salsa/salsa20.ha @@ -97,6 +97,9 @@ export fn xsalsa20_init( endian::leputu32(dkey[28..], state[9]); salsa20_init(s, &dkey, nonce[16..]: *[NONCESIZE]u8); + + bytes::zero((state[..]: *[*]u8)[..64]); + bytes::zero(dkey); }; // Advances the key stream to "seek" to a future state by 'counter' times