Clear a copied secret key after negation
This commit is contained in:
parent
1c830b4c9a
commit
51c21f6b9d
@ -567,6 +567,7 @@ int secp256k1_ec_privkey_negate(const secp256k1_context* ctx, unsigned char *sec
|
|||||||
secp256k1_scalar_negate(&sec, &sec);
|
secp256k1_scalar_negate(&sec, &sec);
|
||||||
secp256k1_scalar_get_b32(seckey, &sec);
|
secp256k1_scalar_get_b32(seckey, &sec);
|
||||||
|
|
||||||
|
secp256k1_scalar_clear(&sec);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user