Post
Topic
Board Wallet software
Re: Verifying SegWit messages
by
pooya87
on 29/04/2019, 04:18:44 UTC
AFAIK, Trezor implements it differently than Electrum's method.
It signs the legacy format of the address using the same private key of the SegWit address.

address doesn't even come in when you are signing a message with a private key and there is no difference between private keys! it is just a number.
the only difference is in the first byte of the 65 byte result. Electrum and all other old/unchanged tools are expecting the first byte to be 27 + [1-4] + [0 or 4] so basically a number between 28 and 32 but Trezor is adding an extra amount to indicate SegWit addresses, i haven't looked at the code to know what the amount is exactly but i believe it is [1 or 2] added based on being P2WPKH or P2WSH respectively.