Merge pull request #62 from HoOngEe/master

Clear a copied secret key after negation
This commit is contained in:
Jonas Nick 2019-05-20 10:13:05 +00:00 committed by GitHub
commit 12aa65a379
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -567,6 +567,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;
}