merland / seedpicker

Create your own BIP39 seed phrase, securely and transparently.
http://seedpicker.net
MIT License
44 stars 20 forks source link

Testnet Vpub Broken? #22

Closed mflaxman closed 3 years ago

mflaxman commented 3 years ago

Steps to reproduce:

  1. http://seedpicker.net/calculator/last-word.html?network=testnet
  2. Input abandon 23x: abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon
  3. Seedpicker appends art to the mnemonic (correct) and produces this result: Extended Public Key in Vpub format (Testnet P2WSH) Vpub5ncJ4gVToMcTWjG4shBZHeeCUXhX5r86W9cwggqw1m6aojbrHxr9yJFsoXaiXrBfAzV3TaVyxCB6EYUW21SVayfcAhiVc9XRJS1WL4Gh9td
Screen Shot 2020-08-06 at 4 35 23 PM

This is incorrect, the Vpub should be Vpub5mLhmUp7c2mbtewB1ABALt1JhoCTuZU1aAhEBNUkAA1QzbzX4rg7PzupkWvuBs6yeM46z8QV2GfraXoHKw8dzVtnNW4zkHZBiqtBUKyCMeF

How to verify this Vpub:

  1. https://iancoleman.io/bip39/
  2. Enter abandon 23x with art on the end: abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art
  3. Select BTC - Bitcoin Testnet, then click on the BIP141 tab towards the bottom.
  4. Enter m/48'/0'/0'/2' under BIP32 Derivation Path and select P2WSH (1-of-1 multisig) under Script Semantics - hackey, but that's what corresponds to what we're calculating. See here for more.
  5. See that BIP32 Extended Public Key is Vpub5mLhmUp7c2mbtewB1ABALt1JhoCTuZU1aAhEBNUkAA1QzbzX4rg7PzupkWvuBs6yeM46z8QV2GfraXoHKw8dzVtnNW4zkHZBiqtBUKyCMeF.
Screen Shot 2020-08-06 at 4 42 28 PM
merland commented 3 years ago

Thanks for the report! I want to make sure I understand fully, can you please elaborate on verification step 4? Why should m/48'/0'/0'/2' be used instead of m/48'/1'/0'/2'?

mflaxman commented 3 years ago

Oof, my mistake. Sorry!

I forgot that in Electrum testnet and mainnet use different paths. That's why your tool is so much more useful for this vs https://iancoleman.io/bip39/, it's hard to mess up.