Skip to content

Add signature grinding for ECDSA signatures#779

Merged
danielabrozzoni merged 1 commit intobitcoindevkit:masterfrom
vladimirfomene:implement-signature-grinding
Oct 17, 2022
Merged

Add signature grinding for ECDSA signatures#779
danielabrozzoni merged 1 commit intobitcoindevkit:masterfrom
vladimirfomene:implement-signature-grinding

Conversation

@vladimirfomene
Copy link
Copy Markdown
Contributor

@vladimirfomene vladimirfomene commented Oct 7, 2022

Description

This PR adds a new field called allow_grinding
in the Signer's SignOptions struct that is used
to determine whether or not to grind an ECDSA signature during the signing process.

Changelog notice

Breaking change: the BDK Signer now produces low-R signatures by default, saving one byte. If you want to preserve the original behavior, set allow_grinding in the SignOptions to false.

Notes to the reviewers

This PR resolves issue #695

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@vladimirfomene vladimirfomene marked this pull request as draft October 7, 2022 05:47
@vladimirfomene vladimirfomene force-pushed the implement-signature-grinding branch 2 times, most recently from 1d07269 to 2b1e239 Compare October 10, 2022 09:01
@vladimirfomene vladimirfomene marked this pull request as ready for review October 10, 2022 09:10
Copy link
Copy Markdown
Member

@danielabrozzoni danielabrozzoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK, the code looks good to me!

Comment thread src/wallet/signer.rs Outdated
Comment thread src/wallet/mod.rs Outdated
Copy link
Copy Markdown
Contributor

@rajarshimaitra rajarshimaitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.. Code LGTM..

Comment thread src/wallet/mod.rs
This PR adds a new field called `allow_grinding`
in the Signer's `SignOptions` struct that is used
to determine whether or not to grind an ECDSA signature
during the signing process.
@vladimirfomene vladimirfomene force-pushed the implement-signature-grinding branch from 2b1e239 to 68dd6d2 Compare October 17, 2022 09:28
Copy link
Copy Markdown
Contributor

@rajarshimaitra rajarshimaitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 68dd6d2

@danielabrozzoni
Copy link
Copy Markdown
Member

ACK 68dd6d2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants