{"id":1553,"date":"2021-03-18T13:40:32","date_gmt":"2021-03-18T13:40:32","guid":{"rendered":"http:\/\/43.153.210.228\/\/?p=1553"},"modified":"2021-03-18T13:40:32","modified_gmt":"2021-03-18T13:40:32","slug":"electrum%e5%a6%82%e4%bd%95%e5%9c%a8bip-32%e4%b9%8b%e5%89%8d%e8%ae%a1%e7%ae%97%e7%a7%8d%e5%ad%90%e5%ad%97%e8%8a%82%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/43.153.210.228\/?p=1553","title":{"rendered":"Electrum\u5982\u4f55\u5728BIP-32\u4e4b\u524d\u8ba1\u7b97\u79cd\u5b50\u5b57\u8282\uff1f"},"content":{"rendered":"<p>\u4f5c\u4e3a\u6bd4\u7279\u5e01\u548c\u7f16\u7a0b\u7684\u65b0\u624b\uff0c\u6211\u6b63\u5728\u5c1d\u8bd5\u4ece\u52a9\u8bb0\u7b26\u751f\u6210BTC\u5730\u5740\u3002\u6240\u4ee5\u6211\u9605\u8bfb\u4e86BIPs\uff0c\u5728Github\u4e2d\u627e\u5230\u4e86\u5b9e\u73b0\u8fd9\u4e9b\u7684\u4ee3\u7801\u3002<br \/>\u6211\u53d1\u73b0Electrum\u6ca1\u6709\u5b9e\u73b0BIP-39\uff08\u5982\u679c\u6211\u6ca1\u6709\u5f04\u9519\u7684\u8bdd\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff09\uff0c\u56e0\u4e3aElectrum\u63a5\u53d7BIP-39\u4e2d\u65e0\u6548\u7684\u52a9\u8bb0\u7b26\uff01<br \/>\u6240\u4ee5\u6211\u7684\u95ee\u9898\u662f\uff1aElectrum\u5982\u4f55\u505a\u81ea\u5df1\u7684\u201c\u4ece\u8bb0\u5fc6\u5230\u79cd\u5b50\u201d\u90e8\u5206\uff08\u81f3\u5c11\u662f\u6807\u51c6\u94b1\u5305\uff09\uff1f\u5982\u679c\u6211\u6ca1\u5f04\u9519\u7684\u8bdd\uff0c\u8fd9\u4e2a\u201c\u79cd\u5b50\u5b57\u8282\u201d\u5c31\u662fBIP-32\u4e2d\u7528\u6765\u751f\u6210\u5bc6\u94a5\u7684\u90a3\u4e2a\u3002<br \/>\u6211\u5c1d\u8bd5\u4e86\u4ee5\u4e0bPython psuedocode\uff08\u6765\u81ea\u201cElectrum Seed Version System\u201d\uff09\uff1a<br \/>hmac=hmac\u6458\u8981\uff08b\u201c\u79cd\u5b50\u7248\u201d\uff0cb\u201c\u2026\uff0812\u5b57\u52a9\u8bb0\u7b26\uff09\u2026\u201d\uff0chashlib.sha512\u6587\u4ef6)<br \/>bip32_thing=bip32\uff08secret=hmac[\uff1a32]\uff0cchain=hmac[32:]\uff09#\u9ed8\u8ba4\u503c\uff1abip32\u4e3b\u7f51\u7248\u672c\uff08idk what this means\uff09<br \/>\u4f46\u662f\u6211\u751f\u6210\u7684\u4e3b\u516c\u94a5\u548cElectrum\u7684\u4e0d\u5339\u914d\uff08\u5f88\u53ef\u80fd\u6211\u5b8c\u5168\u8bef\u89e3\u4e86\u201c\u79cd\u5b50\u7248\u672c\u7cfb\u7edf\u201d\uff09\u3002\u611f\u8c22\u60a8\u7684\u56de\u590d\uff01<br \/>\u5982\u679c\u6709\u7528\u7684\u8bdd\uff1a\u6211\u5728Python\u4e2d\u4f7f\u7528bip-utils\u3002<br \/>\u9a7b\u6781\u4f53<br \/>\u79cd\u5b50<br \/>\u5206\u4eab<br \/>\u6539\u8fdb\u8fd9\u4e2a\u95ee\u9898<br \/>\u8ddf\u968f<br \/>15\u5c0f\u65f6\u524d\u7f16\u8f91\u7684<br \/>16\u5c0f\u65f6\u524d\u95ee\u7684<br \/>\u6ce2\u4f9d\u6ce2\u626c<br \/>11133\u9752\u94dc\u5fbd\u7ae0<br \/>\u65b0\u8d21\u732e\u8005<br \/>\u6dfb\u52a0\u8bc4\u8bba<br \/>1\u4e2a\u7b54\u6848<br \/>1<br \/>\u51e0\u4e2a\u5c0f\u65f6\u540e\uff0c\u6211\u627e\u5230\u4e86\uff01\u5b83\u5230\u5e95\u662f\u4ec0\u4e48\u52a9\u8bb0\u7b26\uff08\uff09\u4e0d\u5728\u52a9\u8bb0\u7b26.py! \uff08\u94fe\u63a5\uff09<br \/>\u6700\u76f8\u5173\u7684\u90e8\u5206\u662f\u5b83\u8fd4\u56de\u7684\u5185\u5bb9\uff1a<br \/>\u79cd\u5b50\u5b57\u8282=hashlib.pbkdf2\\u hmac\u6587\u4ef6\uff08&#8217;sha512&#8217;\uff0c\u52a9\u8bb0\u7b26\u7f16\u7801\uff08&#8217;utf-8&#8217;\uff09\uff0cb&#8217;electrum&#8217;+\u5bc6\u7801\u77ed\u8bed.encode\uff08&#8217;utf-8&#8217;\uff09\uff0c\u8fed\u4ee3\u6b21\u6570=PBKDF2\uff08\u8f6e\uff09<br \/>\u5f0f\u4e2d\uff0cPBKDF2_ROUNDS=2048\u3002\u7136\u540e\uff0c\u6211\u5c31\u3002\u3002\u3002<br \/>bip32_node=bip32.FromSeed\uff08seed_byte\uff09#\u6d3e\u751f\u8def\u5f84\uff1a\u201cm\/\u201d<br \/>\u5206\u4eab<br \/>\u6539\u8fdb\u8fd9\u4e2a\u7b54\u6848<br \/>\u8ddf\u968f<\/p>\n<p><a href=\"http:\/\/43.153.210.228\/\/wp-content\/uploads\/2021\/03\/2blockchain.png\"><img loading=\"lazy\" decoding=\"async\" title=\"2\u533a\u5757\u94fe\u6bd4\u7279\u5e01blockchain\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"2\u533a\u5757\u94fe\u6bd4\u7279\u5e01blockchain\" src=\"http:\/\/43.153.210.228\/\/wp-content\/uploads\/2021\/03\/2blockchain_thumb.png\" width=\"725\" height=\"545\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u4e3a\u6bd4\u7279\u5e01\u548c\u7f16\u7a0b\u7684\u65b0\u624b\uff0c\u6211\u6b63\u5728\u5c1d\u8bd5\u4ece\u52a9\u8bb0\u7b26\u751f\u6210BTC\u5730\u5740\u3002\u6240\u4ee5\u6211\u9605\u8bfb\u4e86BIPs\uff0c\u5728Github\u4e2d\u627e\u5230\u4e86\u5b9e\u73b0\u8fd9\u4e9b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1553","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/posts\/1553"}],"collection":[{"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/43.153.210.228\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1553"}],"version-history":[{"count":1,"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/posts\/1553\/revisions"}],"predecessor-version":[{"id":1554,"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/posts\/1553\/revisions\/1554"}],"wp:attachment":[{"href":"http:\/\/43.153.210.228\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/43.153.210.228\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1553"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/43.153.210.228\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}