Implement various _clear() functions with secp256k1_memclear()

This commit is contained in:
Tim Ruffing
2019-06-08 11:29:49 +02:00
committed by Sebastian Falbesoner
parent 9bb368d146
commit 97c57f42ba
9 changed files with 10 additions and 55 deletions

View File

@@ -27,6 +27,10 @@
static const secp256k1_scalar secp256k1_scalar_one = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 1);
static const secp256k1_scalar secp256k1_scalar_zero = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0);
SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) {
secp256k1_memclear(r, sizeof(secp256k1_scalar));
}
static int secp256k1_scalar_set_b32_seckey(secp256k1_scalar *r, const unsigned char *bin) {
int overflow;
secp256k1_scalar_set_b32(r, bin, &overflow);