1.在离线的机器上使用安全程序通过bip32生成主公钥/私钥或bip39生成助记词/主公钥/私钥
2.在离线的机器上钱包导入主私钥,将主公钥备份到联网的机器上并导入,这样联网机器只能查看不能发送交易
3.地址类型使用三者都支持的P2PKH
4.发送时在联网的钱包上生成交易,复制到离线机器上签名,然后用第三方web网站解码查看签名的交易,正常再广播出去。
注意:
为保持和从主秘钥/公钥导入的地址一致,从备份的bip39助词恢复时要将Derivation Path设置为m/
最好离线和在线机器不直接通过u盘间接传递,联网机器通过网络和第三台机器交换签名文件,第三台再通过u盘和离线机器交换签名文件。
生成bip32/bip39可使用:
https://github.com/tyler-smith/go-bip32
https://github.com/tyler-smith/go-bip39
只要保证初始种子随机安全即可,上面程序通过rand.Read()生成,相同的种子生成相同的主秘钥/公钥/助记词,bip39助记词和初始种子可相互转换。
初始随机种子也可通过其它程序生成:
php7:
1 | php -r "echo bin2hex(random_bytes(32)).PHP_EOL;" |
python2:
1 | python2 - c 'import os;print os.urandom(32).encode("hex")' |
python3.5以上:
1 | python3 - c 'import os;print(os.urandom(32).hex())' |
在线生成验证,也可下载单文件bip39-standalone.html离线版本,或使用hd-wallet-derive验证。
https://iancoleman.io/bip39/
bsv钱包:ElectrumSV
bch钱包:Electron Cash
btc钱包:Electrum
使用gpg校验下载的软件签名:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | wget https: //download .electrum.org /3 .3.8 /Electrum-3 .3.8. tar .gz.asc wget https: //download .electrum.org /3 .3.8 /Electrum-3 .3.8. tar .gz wget https: //raw .githubusercontent.com /spesmilo/electrum/master/pubkeys/ThomasV .asc gpg -- import ThomasV.asc gpg --verify Electrum-3.3.8. tar .gz.asc wget https: //github .com /Electron-Cash/Electron-Cash/releases/download/4 .0.14 /Electron-Cash-4 .0.14. tar .gz wget https: //github .com /Electron-Cash/Electron-Cash/releases/download/4 .0.14 /Electron-Cash-4 .0.14. tar .gz.asc wget https: //github .com /Electron-Cash/Electron-Cash/raw/master/pubkeys/jonaldkey2 .txt gpg -- import jonaldkey2.txt gpg --verify Electron-Cash-4.0.14. tar .gz.asc wget https: //electrumsv .io /download/1 .2.5 /ElectrumSV-1 .2.5. tar .gz.asc wget https: //electrumsv-downloads .s3.us-east-2.amazonaws.com /releases/1 .2.5 /ElectrumSV-1 .2.5. tar .gz wget https: //raw .githubusercontent.com /electrumsv/electrumsv/master/pubkeys/rt121212121 .asc gpg -- import rt121212121.asc gpg --verify ElectrumSV-1.2.5. tar .gz.asc |
标签:none