Skip to content

Commit

Permalink
Clear a copied secret key after negation
Browse files Browse the repository at this point in the history
  • Loading branch information
HoOngEe committed May 15, 2019
1 parent 84a8085 commit 069870d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/secp256k1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 069870d

Please sign in to comment.