summaryrefslogtreecommitdiff
path: root/8e/a6c94d64772137bf9c1caa9e07a84ffb74e003
blob: 883c0086d81b80608055a02faefec36988fbf1ae (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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
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 1X7LWd-0004yO-Ii
	for bitcoin-development@lists.sourceforge.net;
	Wed, 16 Jul 2014 09:29:23 +0000
Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com
	designates 209.85.219.54 as permitted sender)
	client-ip=209.85.219.54; envelope-from=mh.in.england@gmail.com;
	helo=mail-oa0-f54.google.com; 
Received: from mail-oa0-f54.google.com ([209.85.219.54])
	by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1X7LWc-0002TX-6f
	for bitcoin-development@lists.sourceforge.net;
	Wed, 16 Jul 2014 09:29:23 +0000
Received: by mail-oa0-f54.google.com with SMTP id n16so654846oag.41
	for <bitcoin-development@lists.sourceforge.net>;
	Wed, 16 Jul 2014 02:29:16 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.60.52.5 with SMTP id p5mr19109747oeo.55.1405502956746; Wed,
	16 Jul 2014 02:29:16 -0700 (PDT)
Sender: mh.in.england@gmail.com
Received: by 10.76.35.234 with HTTP; Wed, 16 Jul 2014 02:29:16 -0700 (PDT)
In-Reply-To: <lq5fvo$4s6$1@ger.gmane.org>
References: <CANEZrP3ZzCBohXWZmZxE=ofP74Df4Hd-hCLH6jYn=JKbiqNQXA@mail.gmail.com>
	<CAObn+gfbH61kyv_ttT4vsQuNFRWLB5H3xaux7GQ0co82ucO_eA@mail.gmail.com>
	<CANg-TZAe2PO9nwQktmDSJFtaLsg6hogOw6mj0SaROdJJr33vog@mail.gmail.com>
	<CANEZrP3E2mdvOUHiW9W_hM3Z_kn9um8E6aX5vf-S9tA7KgnpUQ@mail.gmail.com>
	<CACq0ZD5qTc-2f+puPaXMDFZNWUx8kvOZQMxqkM_e4YafhTW7cA@mail.gmail.com>
	<lq5fvo$4s6$1@ger.gmane.org>
Date: Wed, 16 Jul 2014 11:29:16 +0200
X-Google-Sender-Auth: WMPM1clGTS1cWDtVjnHLJT7JOaY
Message-ID: <CANEZrP0x2Ypb063VkcoE+h_OHfRVOusmXB2X1VQx77sZhAuTFw@mail.gmail.com>
From: Mike Hearn <mike@plan99.net>
To: Andreas Schildbach <andreas@schildbach.de>
Content-Type: multipart/alternative; boundary=001a11332c8e77c22d04fe4c2852
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: 1X7LWc-0002TX-6f
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] BIP 38 NFC normalisation issue
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, 16 Jul 2014 09:29:23 -0000

--001a11332c8e77c22d04fe4c2852
Content-Type: text/plain; charset=UTF-8

Yes sorry, you're right, the issue starts with the null code point. Python
seems to have problems starting there too. It might work if we took that
out.


On Wed, Jul 16, 2014 at 11:17 AM, Andreas Schildbach <andreas@schildbach.de>
wrote:

> Guys, you are always talking about the Unicode astral plane, but in fact
> its a plain old (ASCII) control character where this problem starts and
> likely ends: \u0000.
>
> Let's ban/filter ISO control characters and be done with it. Most
> control characters will never be enterable by any keyboard into a
> password field. Of course I assume that Character.isISOControl() works
> consistently across platforms.
>
>
> http://docs.oracle.com/javase/7/docs/api/java/lang/Character.html#isISOControl%28char%29
>
>
> On 07/16/2014 12:23 AM, Aaron Voisine wrote:
> > If the user creates a password on an iOS device with an astral
> > character and then can't enter that password on a JVM wallet, that
> > sucks. If JVMs really can't support unicode NFC then that's a strong
> > case to limit the spec to the subset of unicode that all popular
> > platforms can support, but it sounds like it might just be a JVM
> > string library bug that could hopefully be reported and fixed. I get
> > the same result as in the test case using apple's
> > CFStringNormalize(passphrase, kCFStringNormalizationFormC);
> >
> > Aaron Voisine
> > breadwallet.com
> >
> >
> > On Tue, Jul 15, 2014 at 11:20 AM, Mike Hearn <mike@plan99.net> wrote:
> >> Yes, we know, Andreas' code is indeed doing normalisation.
> >>
> >> However it appears the output bytes end up being different. What I get
> back
> >> is:
> >>
> >> cf930001303430300166346139
> >>
> >> vs
> >>
> >> cf9300f0909080f09f92a9
> >>
> >> from the spec.
> >>
> >> I'm not sure why. It appears this is due to the character from the
> astral
> >> planes. Java is old and uses 16 bit characters internally - it wouldn't
> >> surprise me if there's some weirdness that means it doesn't/won't
> support
> >> this kind of thing.
> >>
> >> I recommend instead that any implementation that wishes to be compatible
> >> with JVM based wallets (I suspect Android is the same) just refuse any
> >> passphrase that includes characters outside the BMP. At least unless
> someone
> >> can find a fix. I somehow doubt this will really hurt anyone.
> >>
> >>
> ------------------------------------------------------------------------------
> >> Want fast and easy access to all the code in your enterprise? Index and
> >> search up to 200,000 lines of code with a free copy of Black Duck
> >> Code Sight - the same software that powers the world's largest code
> >> search on Ohloh, the Black Duck Open Hub! Try it now.
> >> http://p.sf.net/sfu/bds
> >> _______________________________________________
> >> Bitcoin-development mailing list
> >> Bitcoin-development@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
> >>
> >
> >
> ------------------------------------------------------------------------------
> > Want fast and easy access to all the code in your enterprise? Index and
> > search up to 200,000 lines of code with a free copy of Black Duck
> > Code Sight - the same software that powers the world's largest code
> > search on Ohloh, the Black Duck Open Hub! Try it now.
> > http://p.sf.net/sfu/bds
> >
>
>
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>

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

<div dir=3D"ltr">Yes sorry, you&#39;re right, the issue starts with the nul=
l code point. Python seems to have problems starting there too. It might wo=
rk if we took that out.</div><div class=3D"gmail_extra"><br><br><div class=
=3D"gmail_quote">
On Wed, Jul 16, 2014 at 11:17 AM, Andreas Schildbach <span dir=3D"ltr">&lt;=
<a href=3D"mailto:andreas@schildbach.de" target=3D"_blank">andreas@schildba=
ch.de</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Guys, you are always talking about the Unicode astral plane, but in fact<br=
>
its a plain old (ASCII) control character where this problem starts and<br>
likely ends: \u0000.<br>
<br>
Let&#39;s ban/filter ISO control characters and be done with it. Most<br>
control characters will never be enterable by any keyboard into a<br>
password field. Of course I assume that Character.isISOControl() works<br>
consistently across platforms.<br>
<br>
<a href=3D"http://docs.oracle.com/javase/7/docs/api/java/lang/Character.htm=
l#isISOControl%28char%29" target=3D"_blank">http://docs.oracle.com/javase/7=
/docs/api/java/lang/Character.html#isISOControl%28char%29</a><br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
<br>
On 07/16/2014 12:23 AM, Aaron Voisine wrote:<br>
&gt; If the user creates a password on an iOS device with an astral<br>
&gt; character and then can&#39;t enter that password on a JVM wallet, that=
<br>
&gt; sucks. If JVMs really can&#39;t support unicode NFC then that&#39;s a =
strong<br>
&gt; case to limit the spec to the subset of unicode that all popular<br>
&gt; platforms can support, but it sounds like it might just be a JVM<br>
&gt; string library bug that could hopefully be reported and fixed. I get<b=
r>
&gt; the same result as in the test case using apple&#39;s<br>
&gt; CFStringNormalize(passphrase, kCFStringNormalizationFormC);<br>
&gt;<br>
&gt; Aaron Voisine<br>
&gt; <a href=3D"http://breadwallet.com" target=3D"_blank">breadwallet.com</=
a><br>
&gt;<br>
&gt;<br>
&gt; On Tue, Jul 15, 2014 at 11:20 AM, Mike Hearn &lt;<a href=3D"mailto:mik=
e@plan99.net">mike@plan99.net</a>&gt; wrote:<br>
&gt;&gt; Yes, we know, Andreas&#39; code is indeed doing normalisation.<br>
&gt;&gt;<br>
&gt;&gt; However it appears the output bytes end up being different. What I=
 get back<br>
&gt;&gt; is:<br>
&gt;&gt;<br>
&gt;&gt; cf930001303430300166346139<br>
&gt;&gt;<br>
&gt;&gt; vs<br>
&gt;&gt;<br>
&gt;&gt; cf9300f0909080f09f92a9<br>
&gt;&gt;<br>
&gt;&gt; from the spec.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m not sure why. It appears this is due to the character from=
 the astral<br>
&gt;&gt; planes. Java is old and uses 16 bit characters internally - it wou=
ldn&#39;t<br>
&gt;&gt; surprise me if there&#39;s some weirdness that means it doesn&#39;=
t/won&#39;t support<br>
&gt;&gt; this kind of thing.<br>
&gt;&gt;<br>
&gt;&gt; I recommend instead that any implementation that wishes to be comp=
atible<br>
&gt;&gt; with JVM based wallets (I suspect Android is the same) just refuse=
 any<br>
&gt;&gt; passphrase that includes characters outside the BMP. At least unle=
ss someone<br>
&gt;&gt; can find a fix. I somehow doubt this will really hurt anyone.<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------------------------------------------=
------------<br>
&gt;&gt; Want fast and easy access to all the code in your enterprise? Inde=
x and<br>
&gt;&gt; search up to 200,000 lines of code with a free copy of Black Duck<=
br>
&gt;&gt; Code Sight - the same software that powers the world&#39;s largest=
 code<br>
&gt;&gt; search on Ohloh, the Black Duck Open Hub! Try it now.<br>
&gt;&gt; <a href=3D"http://p.sf.net/sfu/bds" target=3D"_blank">http://p.sf.=
net/sfu/bds</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Bitcoin-development mailing list<br>
&gt;&gt; <a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitco=
in-development@lists.sourceforge.net</a><br>
&gt;&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/b=
itcoin-development</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; ----------------------------------------------------------------------=
--------<br>
&gt; Want fast and easy access to all the code in your enterprise? Index an=
d<br>
&gt; search up to 200,000 lines of code with a free copy of Black Duck<br>
&gt; Code Sight - the same software that powers the world&#39;s largest cod=
e<br>
&gt; search on Ohloh, the Black Duck Open Hub! Try it now.<br>
&gt; <a href=3D"http://p.sf.net/sfu/bds" target=3D"_blank">http://p.sf.net/=
sfu/bds</a><br>
&gt;<br>
<br>
<br>
<br>
---------------------------------------------------------------------------=
---<br>
Want fast and easy access to all the code in your enterprise? Index and<br>
search up to 200,000 lines of code with a free copy of Black Duck<br>
Code Sight - the same software that powers the world&#39;s largest code<br>
search on Ohloh, the Black Duck Open Hub! Try it now.<br>
<a href=3D"http://p.sf.net/sfu/bds" target=3D"_blank">http://p.sf.net/sfu/b=
ds</a><br>
_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-develo=
pment@lists.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-development=
" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment</a><br>
</div></div></blockquote></div><br></div>

--001a11332c8e77c22d04fe4c2852--