Skip to content

Commit

Permalink
schnorrsig: clear out masked secret key in BIP-340 nonce function
Browse files Browse the repository at this point in the history
  • Loading branch information
theStack committed Jan 29, 2025
1 parent f79f46c commit a82287f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/schnorrsig/main_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ static int nonce_function_bip340(unsigned char *nonce32, const unsigned char *ms
secp256k1_sha256_write(&sha, msg, msglen);
secp256k1_sha256_finalize(&sha, nonce32);
secp256k1_sha256_clear(&sha);
secp256k1_memclear(masked_key, sizeof(masked_key));

return 1;
}

Expand Down

0 comments on commit a82287f

Please sign in to comment.