Clear a copied secret key after negation

This commit is contained in:
Seonpyo Kim 2019-05-15 15:55:01 +09:00
parent 84a808598b
commit 069870d92a
1 changed files with 1 additions and 0 deletions

View File

@ -457,6 +457,7 @@ int secp256k1_ec_privkey_negate(const secp256k1_context* ctx, unsigned char *sec
secp256k1_scalar_negate(&sec, &sec);
secp256k1_scalar_get_b32(seckey, &sec);
secp256k1_scalar_clear(&sec);
return 1;
}