summaryrefslogtreecommitdiff
path: root/72/938aede1c15a9f02b0cfce6b23543135a849f9
blob: fdf67e69e876ba96dbf324f3b4e9ac5dcc9188af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
	helo=mx.sourceforge.net)
	by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <mh.in.england@gmail.com>) id 1WSule-0001sQ-1w
	for bitcoin-development@lists.sourceforge.net;
	Wed, 26 Mar 2014 20:49:46 +0000
Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com
	designates 209.85.219.52 as permitted sender)
	client-ip=209.85.219.52; envelope-from=mh.in.england@gmail.com;
	helo=mail-oa0-f52.google.com; 
Received: from mail-oa0-f52.google.com ([209.85.219.52])
	by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1WSuld-0007Y5-4d
	for bitcoin-development@lists.sourceforge.net;
	Wed, 26 Mar 2014 20:49:46 +0000
Received: by mail-oa0-f52.google.com with SMTP id l6so3197993oag.25
	for <bitcoin-development@lists.sourceforge.net>;
	Wed, 26 Mar 2014 13:49:39 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.60.76.38 with SMTP id h6mr195901oew.79.1395866979741; Wed,
	26 Mar 2014 13:49:39 -0700 (PDT)
Sender: mh.in.england@gmail.com
Received: by 10.76.71.231 with HTTP; Wed, 26 Mar 2014 13:49:39 -0700 (PDT)
Date: Wed, 26 Mar 2014 21:49:39 +0100
X-Google-Sender-Auth: FG4-hbQ5dz-ZiqakPflY-_tTfDI
Message-ID: <CANEZrP2hbBVGqytmXR1rAcVama4ONnR586Se-Ch=dsxOzy2O4w@mail.gmail.com>
From: Mike Hearn <mike@plan99.net>
To: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Content-Type: multipart/alternative; boundary=047d7b33d4fe7b398f04f5889b65
X-Spam-Score: -0.5 (/)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
	(mh.in.england[at]gmail.com)
	-0.0 SPF_PASS               SPF: sender matches SPF record
	1.0 HTML_MESSAGE           BODY: HTML included in message
	0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
	not necessarily valid
	-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1WSuld-0007Y5-4d
Subject: [Bitcoin-development] New BIP32 structure
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Wed, 26 Mar 2014 20:49:46 -0000

--047d7b33d4fe7b398f04f5889b65
Content-Type: text/plain; charset=UTF-8

Myself, Thomas V (Electrum) and Marek (Trezor) got together to make sure
our BIP32 wallet structures would be compatible - and I discovered that
only I was planning to use the default structure.

Because I'm hopeful that we can get a lot of interoperability between
wallets with regards to importing 12-words paper wallets, we brainstormed
to find a structure acceptable to everyone and ended up with:

  /m/cointype/reserved'/account'/change/n

The extra levels require some explanation:

   - cointype:  This is zero for Bitcoin. This is here to support two
   things, one is supporting alt coins based off the same root seed. Right now
   nobody seemed very bothered about alt coins but sometimes feature requests
   do come in for this. Arguably there is no need and alt coins could just use
   the same keys as Bitcoin, but it may help avoid confusion if they don't.

   More usefully, cointype can distinguish between keys intended for things
   like multisig outputs, e.g. for watchdog services. This means if your
   wallet does not know about the extra protocol layers involved in this, it
   can still import the "raw" money and it will just ignore/not see the keys
   used in more complex transactions.

   - reserved is for "other stuff". I actually don't recall why we ended up
   with this. It may have been intended to split out multisig outputs etc from
   cointype. Marek, Thomas?

   - account is for keeping essentially wallets-within-a-wallet to avoid
   mixing of coins. If you want that.

   - change is 0 for receiving addresses, 1 for change addresses.

   - n is the actual key index

For bitcoinj we're targeting a deliberately limited feature set for hdw v1
so I would just set the first three values all to zero and that is a
perfectly fine way to be compatible.

The goal here is that the same seed can be written down once, and meet all
the users needs, whilst still allowing some drift between what wallets
support.

Pieter made the I think valid point that you can't really encode how keys
are meant to be used into just an HDW hierarchy and normally you'd need
some metadata as well. However, I feel interop between wallets is more
important than arriving at the most perfect possible arrangement, which
feels a little like bikeshedding, so I'm happy to just go with the flow on
this one.

--047d7b33d4fe7b398f04f5889b65
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Myself, Thomas V (Electrum) and Marek (Trezor) got togethe=
r to make sure our BIP32 wallet structures would be compatible - and I disc=
overed that only I was planning to use the default structure.<div><br></div=
>
<div>Because I&#39;m hopeful that we can get a lot of interoperability betw=
een wallets with regards to importing 12-words paper wallets, we brainstorm=
ed to find a structure acceptable to everyone and ended up with:</div><div>
<br></div><div><span style=3D"font-family:arial,sans-serif;font-size:13px">=
=C2=A0 /m/cointype/reserved&#39;/account&#39;</span><span style=3D"font-fam=
ily:arial,sans-serif;font-size:13px">/change/n</span><br></div><div><span s=
tyle=3D"font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style=3D"font-family:arial,sans-serif;font-size:13p=
x">The extra levels require some explanation:</span></div><div><ul><li><fon=
t face=3D"arial, sans-serif">cointype: =C2=A0This is zero for Bitcoin. This=
 is here to support two things, one is supporting alt coins based off the s=
ame root seed. Right now nobody seemed very bothered about alt coins but so=
metimes feature requests do come in for this. Arguably there is no need and=
 alt coins could just use the same keys as Bitcoin, but it may help avoid c=
onfusion if they don&#39;t.<br>
<br>More usefully, cointype can distinguish between keys intended for thing=
s like multisig outputs, e.g. for watchdog services. This means if your wal=
let does not know about the extra protocol layers involved in this, it can =
still import the &quot;raw&quot; money and it will just ignore/not see the =
keys used in more complex transactions.<br>
<br></font></li><li><font face=3D"arial, sans-serif">reserved is for &quot;=
other stuff&quot;. I actually don&#39;t recall why we ended up with this. I=
t may have been intended to split out multisig outputs etc from cointype. M=
arek, Thomas?<br>
<br></font></li><li><font face=3D"arial, sans-serif">account is for keeping=
 essentially wallets-within-a-wallet to avoid mixing of coins. If you want =
that.<br><br></font></li><li><font face=3D"arial, sans-serif">change is 0 f=
or receiving addresses, 1 for change addresses.<br>
<br></font></li><li><font face=3D"arial, sans-serif">n is the actual key in=
dex</font></li></ul><div><font face=3D"arial, sans-serif">For bitcoinj we&#=
39;re targeting a deliberately limited feature set for hdw v1 so I would ju=
st set the first three values all to zero and that is a perfectly fine way =
to be compatible.</font></div>
</div><div><font face=3D"arial, sans-serif"><br></font></div><div><font fac=
e=3D"arial, sans-serif">The goal here is that the same seed can be written =
down once, and meet all the users needs, whilst still allowing some drift b=
etween what wallets support.</font></div>
<div><font face=3D"arial, sans-serif"><br></font></div><div><font face=3D"a=
rial, sans-serif">Pieter made the I think valid point that you can&#39;t re=
ally encode how keys are meant to be used into just an HDW hierarchy and no=
rmally you&#39;d need some metadata as well. However, I feel interop betwee=
n wallets is more important than arriving at the most perfect possible arra=
ngement, which feels a little like bikeshedding, so I&#39;m happy to just g=
o with the flow on this one.</font></div>
<div><font face=3D"arial, sans-serif"><br></font></div></div>

--047d7b33d4fe7b398f04f5889b65--