Introduce separate _clear functions for hash module

This gives the caller more control about whether the state should
be cleaned (= should be considered secret). Moreover, it gives the
caller the possibility to clean a hash struct without finalizing it.
This commit is contained in:
Tim Ruffing
2020-04-27 18:55:36 +02:00
committed by Sebastian Falbesoner
parent 99cc9fd6d0
commit 349e6ab916
8 changed files with 26 additions and 7 deletions

View File

@@ -335,6 +335,7 @@ static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const
secp256k1_scalar_clear(&b);
secp256k1_gej_clear(&gb);
secp256k1_fe_clear(&f);
secp256k1_rfc6979_hmac_sha256_clear(&rng);
}
#endif /* SECP256K1_ECMULT_GEN_IMPL_H */