From: Alekos Filini Date: Thu, 25 Aug 2022 10:21:33 +0000 (+0200) Subject: Merge bitcoindevkit/bdk#718: Verify signatures after signing X-Git-Tag: 0.22.0-rc.1~7 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/struct.EncoderStringWriter.html?a=commitdiff_plain;h=0a3734ed2b9aeebdc7f13e64c6544d35788a0699;p=bdk Merge bitcoindevkit/bdk#718: Verify signatures after signing 7b1ad1b62914a26d6f445364ace4e784bb2901c2 Verify signatures after signing (Scott Robinson) Pull request description: ### Description Verify signatures after signing As per [BIP-340, footnote 14][fn]: > Verifying the signature before leaving the signer prevents random or > attacker provoked computation errors. This prevents publishing invalid > signatures which may leak information about the secret key. It is > recommended, but can be omitted if the computation cost is prohibitive. [fn]: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#cite_note-14 ### Notes to the reviewers How do we test this? ### Checklists #### All Submissions: * [ ] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: afilini: re-ACK 7b1ad1b62914a26d6f445364ace4e784bb2901c2 Tree-SHA512: 7319db1f8cec2fcfe4ac443ab5728893f9fb6133b33331b35ec6910662c45de8a7cdcf80ac1f3bb435815e914ccf639682a5c07ff0baef42605bf044a34a8232 --- 0a3734ed2b9aeebdc7f13e64c6544d35788a0699