<div dir="ltr"><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 8, 2014 at 3:53 PM, Pieter Wuille <span dir="ltr">&lt;<a href="mailto:pieter.wuille@gmail.com" target="_blank">pieter.wuille@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I see the cause of our disagreement now.<br>
<br>
You actually want to share a single BIP32 tree across different<br>
currency types, but do it in a way that guarantees that they never use<br>
the same keys.<br>
<br>
I would have expected that different chains would use independent<br>
chains, and have serializations encode which chain they belong to.<br>
<br>
Let me offer an alternative suggestion, which is compatible with the<br>
original default BIP32 structure:<br>
* You can use one seed across different chains, but the master nodes<br>
are separate.<br>
* To derive the master node from the seed, the key string &quot;Bitcoin<br>
seed&quot; is replaced by something chain-specific.<br></blockquote><div><br></div>I&#39;ve discussed the solution of &quot;Litecoin seed&quot; in BIP32 HMAC with Litecoin devs already, and after long discussion we&#39;ve concluded that it is generally bad idea.<div>

<br></div><div>When changing &quot;Bitcoin seed&quot; constant to something different, same *entropy* will produce different *master node*. That&#39;s actually the opposite what&#39;s requested, because xprv serialization format stores *node*, not *entropy*. By changing HMAC constant, you still won&#39;t be able to store one node and derive wallets for multiple coins at same time.</div>

<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
* Every encoded node (including master nodes) has a chain-specific<br>
serialization magic.<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
This is in practice almost the same as your suggestion, except that<br>
the m/cointype&#39; in m/cointype&#39;/account&#39;/change/n is replaced by<br>
different masters. The only disadvantage I see is that you do not have<br>
a way to encode the &quot;super master&quot; that is the parent of all<br>
chain-specific masters. You can - and with the same security<br>
properties - encode the seed, though.<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>Actually I don&#39;t understand why there&#39;s such disagreement about &quot;cointype&quot; level here, what it breaks? I see it as the cleanest solution so far. It is forward and backward compatible, does need any special extension to bip32 (to be strict, bip32 says &quot;Bitcoin seed&quot;, so client using &quot;Litecoin seed&quot; cannot be &quot;bip32 compatible&quot;).</div>

<div><br></div><div>Of course, the problem of &quot;cointype&quot; can be solved in zillion ways, but still using cointype in bip32 path seem to be the most elegant way so far, because it fullfill all requirements for single backup, for separating pubkeys and for handling all coins by one master...</div>

<div><br></div><div>Marek</div><div><br></div></div></div></div>