Samourai-Wallet / samourai-wallet-android

Bitcoin Wallet strongly focused on privacy when transacting on the bitcoin network
https://samouraiwallet.com
The Unlicense
634 stars 238 forks source link

Message signing includes different address as part of its output #407

Open 0xmichalis opened 4 years ago

0xmichalis commented 4 years ago

I have sent some BTC to a Samourai wallet (bech32 address) and when I try to sign that address, the generated signature seems to be for a totally different address (legacy p2pkh). Not sure if it is worth to post the original address and the generated signature but if you think so I can post them.

FWIW the seed for the wallet has been manually imported (I had no funds at start, then I sent some BTC to an address generated by Samourai).

0xmichalis commented 4 years ago

Actually I just tried verifying the signature against both addresses and both work fine. May still be worth to fix outputing the correct address as part of the resulting output.

SamouraiDev commented 4 years ago

We include the P2PKH address in the output because that is what most existing validation tools look for. That output text is a default suggestion and you may change it if you want. For segwit address types we include the pubkey as that is a constant.