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

@@ -38,17 +38,6 @@
#define SECP256K1_N_H_6 ((uint32_t)0xFFFFFFFFUL)
#define SECP256K1_N_H_7 ((uint32_t)0x7FFFFFFFUL)
SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) {
r->d[0] = 0;
r->d[1] = 0;
r->d[2] = 0;
r->d[3] = 0;
r->d[4] = 0;
r->d[5] = 0;
r->d[6] = 0;
r->d[7] = 0;
}
SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) {
r->d[0] = v;
r->d[1] = 0;