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

signmessage: also accept Trezor-type sigs for p2wpkh and p2wpkh-p2sh addrs #7668

Merged

Conversation

SomberNight
Copy link
Member

see #3861:

there is no clear consensus how to sign messages with segwit addresses (txin type of p2wpkh-p2sh and p2wpkh)
We do one thing, and Trezor does something else. Bitcoin Core has this disabled.

This PR only changes the signature verification we do:

  • the signatures we create are unchanged,
  • but we now also accept signatures created by Trezor and others.

closes #3861
closes #7660

…addrs

The signatures we create are unchanged but we now also accept signatures created by Trezor and others.

see spesmilo#3861
@bitromortac
Copy link
Contributor

For my understanding: the difference between the signature approaches is that Electrum treats all segwit signatures as if it would be for a compressed legacy address but Trezor encodes the address type in the signature header. So this address type can then be used to check the given address with the address derived from the signature pubkey, but Electrum just brute forces the address check. So far looks good to me.

@massmux
Copy link

massmux commented Feb 17, 2022

I tested this patched branch and works as a charm. Anxious to see it merged into the main branch

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.

message signature verification Segwit message signing is not compatible with other software
3 participants