Skip to content

Commit

Permalink
Merge bitcoin#619: Clear a copied secret key after negation
Browse files Browse the repository at this point in the history
069870d Clear a copied secret key after negation (Seonpyo Kim)

Pull request description:

  It closes bitcoin#618

Tree-SHA512: 05299597c886c5d1a913fd0ce8c698d2e513eb80fbd33d571a02fc6910cfd337324c6f0f27175eaf125eb3478d38187763680e859ece9a469a034c9b8a8d6920
  • Loading branch information
gmaxwell committed May 16, 2019
2 parents 84a8085 + 069870d commit 735fbde
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 735fbde

Please sign in to comment.