Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue #7 #8

Merged
merged 3 commits into from
Apr 5, 2024
Merged

Fixed issue #7 #8

merged 3 commits into from
Apr 5, 2024

Conversation

ACken2
Copy link
Owner

@ACken2 ACken2 commented Apr 5, 2024

Issue #7 is traced back to the Verifier.verifyBIP137Signature method, which solely invokes the bitcoinMessage.verify method using the legacy signing address. Consequently, this approach fails to validate signatures if the header within the signature specifies an address flag in the range of 35-42, which are flags designated for P2SH and P2WPKH addresses.

This pull request addresses the issue by modifying the call to the bitcoinMessage.verify method. Now, it considers all potential addresses derivable from the signer's public key, enabling the validation of BIP-137 signatures across all address types.

This aligns with the library's principle that BIP-137 signatures should be valid for all addresses derivable from the same public key, a concept that has been supported since v1.1.0, particularly to accommodate BIP-137 signatures from taproot addresses.

@ACken2 ACken2 linked an issue Apr 5, 2024 that may be closed by this pull request
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8564838643

Details

  • 56 of 56 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 5915854952: 0.0%
Covered Lines: 350
Relevant Lines: 350

💛 - Coveralls

@ACken2 ACken2 merged commit 8b684fa into main Apr 5, 2024
6 of 7 checks passed
@ACken2 ACken2 deleted the 7-validating-messages branch April 5, 2024 05:16
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.

Validating messages
2 participants