summaryrefslogtreecommitdiff
path: root/29/61b77ca6d3665dc4add335db0bfbb1fef04b41
blob: 0268c8985fcae79f756c2d31cfd16e44dcf4b499 (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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
	helo=mx.sourceforge.net)
	by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <marek@palatinus.cz>) id 1VZKwS-000831-LW
	for bitcoin-development@lists.sourceforge.net;
	Thu, 24 Oct 2013 13:27:12 +0000
X-ACL-Warn: 
Received: from mail-vc0-f173.google.com ([209.85.220.173])
	by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1VZKwR-0005Rv-4V
	for bitcoin-development@lists.sourceforge.net;
	Thu, 24 Oct 2013 13:27:12 +0000
Received: by mail-vc0-f173.google.com with SMTP id if17so1474473vcb.4
	for <bitcoin-development@lists.sourceforge.net>;
	Thu, 24 Oct 2013 06:27:05 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
	:date:message-id:subject:to:cc:content-type;
	bh=Rps7ru5t5xvvTY3yDbWJN1CqiC99hOTcetA/BfDOf4I=;
	b=ToSTRXsb6cihHCnnVz93XzfGVesKWJEIlrTqN6t9/hOQwZ8zOu/7R/uS3QaAHPR4Qz
	leYIxi1ihJ8P7TV1nNJPH/prRl4Ebe6qiJ3ziiCrri+NMOXq8UUxcQ77ObgDrMpnl41T
	IL88YH21pgaeKRpFj4RDFjTCesnOXhV5eR07LmvLnYEhaDUdQAYXl25AxWpPEQvqGo6P
	LV7P4zeIzILg3/XQ/ltlGIlOO0RwBbdj9EHeTzWoa6AI2TjXHffPaF+H998kzmO4+O8z
	YAXOihMUjhh9lsPPUSuHCmWtPEJzuK3LpnO48/zf5iAPmBpIjUeRwE93X/hd4LxQ+n7y
	zMnw==
X-Gm-Message-State: ALoCoQmSvzFV+pRa0FXixAepC1jYJAs+BZNC4ErL/sShnEVM3mvBAQjCFVoBmAOrR5vp7/EUac7j
X-Received: by 10.58.143.17 with SMTP id sa17mr1434465veb.14.1382621222510;
	Thu, 24 Oct 2013 06:27:02 -0700 (PDT)
MIME-Version: 1.0
Sender: marek@palatinus.cz
Received: by 10.59.1.2 with HTTP; Thu, 24 Oct 2013 06:26:32 -0700 (PDT)
In-Reply-To: <CAAS2fgQ1uYvNxZu6DOKZ2k9qj2kYhGpHxxzsZdsqb-Oi2uSKmw@mail.gmail.com>
References: <87iowuuof9.fsf@gmail.com>
	<CAAS2fgQ1uYvNxZu6DOKZ2k9qj2kYhGpHxxzsZdsqb-Oi2uSKmw@mail.gmail.com>
From: slush <slush@centrum.cz>
Date: Thu, 24 Oct 2013 15:26:32 +0200
X-Google-Sender-Auth: n26fDXyZsZwBFyAPcUfkJafPe_A
Message-ID: <CAJna-Hjap-GPc-rTQsYxVqjvigZ3y8YDQmL++b2Gw0SAC7QLQA@mail.gmail.com>
To: Gregory Maxwell <gmaxwell@gmail.com>
Content-Type: multipart/alternative; boundary=047d7b6d95eed3b76804e97c9683
X-Spam-Score: 1.0 (+)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.
	See
	http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
	for more information. [URIs: doubleclick.net]
	0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
	(slush[at]centrum.cz)
	1.0 HTML_MESSAGE           BODY: HTML included in message
X-Headers-End: 1VZKwR-0005Rv-4V
Cc: Bitcoin Development <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] BIP39 word list
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: Thu, 24 Oct 2013 13:27:12 -0000

--047d7b6d95eed3b76804e97c9683
Content-Type: text/plain; charset=ISO-8859-1

I've just pushed updated wordlist which is filtered to similar characters
taken from this matrix.

BIP39 now consider following character pairs as similar:

        similar = (
            ('a', 'c'), ('a', 'e'), ('a', 'o'),
            ('b', 'd'), ('b', 'h'), ('b', 'p'), ('b', 'q'), ('b', 'r'),
            ('c', 'e'), ('c', 'g'), ('c', 'n'), ('c', 'o'), ('c', 'q'),
('c', 'u'),
            ('d', 'g'), ('d', 'h'), ('d', 'o'), ('d', 'p'), ('d', 'q'),
            ('e', 'f'), ('e', 'o'),
            ('f', 'i'), ('f', 'j'), ('f', 'l'), ('f', 'p'), ('f', 't'),
            ('g', 'j'), ('g', 'o'), ('g', 'p'), ('g', 'q'), ('g', 'y'),
            ('h', 'k'), ('h', 'l'), ('h', 'm'), ('h', 'n'), ('h', 'r'),
            ('i', 'j'), ('i', 'l'), ('i', 't'), ('i', 'y'),
            ('j', 'l'), ('j', 'p'), ('j', 'q'), ('j', 'y'),
            ('k', 'x'),
            ('l', 't'),
            ('m', 'n'), ('m', 'w'),
            ('n', 'u'), ('n', 'z'),
            ('o', 'p'), ('o', 'q'), ('o', 'u'), ('o', 'v'),
            ('p', 'q'), ('p', 'r'),
            ('q', 'y'),
            ('s', 'z'),
            ('u', 'v'), ('u', 'w'), ('u', 'y'),
            ('v', 'w'), ('v', 'y')
        )

Feel free to review and comment current wordlist, but I think we're slowly
moving forward final list.

slush


On Sat, Oct 19, 2013 at 1:58 AM, Gregory Maxwell <gmaxwell@gmail.com> wrote:

> some fairly old wordlist solver code of mine:
>
> https://people.xiph.org/~greg/wordlist.visual.py
>
> it has a 52x52 letter visual similarity matrix in it (along with a
> citation)
>
> On Fri, Oct 18, 2013 at 4:52 PM, jan <jan.marecek@gmail.com> wrote:
> >
> > The words 'public', 'private' and 'secret' could be confusing when
> > encoding public and private keys. eg. a private key that begins with
> > the word 'public'.
> >
> > I think avoiding words that could look similar when written down would
> > be a good idea aswell. I searched for words that only differ by the
> > letters c & e, g & y, u & v and found the following:
> >
> > car ear
> > cat eat
> > gear year
> > value valve
> >
> > Other combinations could potentially be problematic depending on the
> > handwriting style: ft, ao, ij, vy, possibly even lt and il?
> >
> > I've included the search utility I used below.
> >
> >
> > #include <stdbool.h>
> > #include <string.h>
> > #include <stdio.h>
> >
> > char *similar_char_pairs[] = { "ce", "gy", "uv", NULL };
> >
> > bool is_similar_char(char c1, char c2)
> > {
> >   char **pairs = similar_char_pairs;
> >   do {
> >     char *p = *pairs;
> >     if ((c1 == p[0] && c2 == p[1]) ||
> >         (c1 == p[1] && c2 == p[0]))
> >       return true;
> >   } while (*++pairs);
> >
> >   return false;
> > }
> >
> > bool print_words_if_similar(char *word1, char *word2)
> > {
> >   /* reject words of different lengths */
> >   if (strlen(word1) != strlen(word2))
> >     return false;
> >
> >   size_t i, similarcount = 0;
> >
> >   for (i = 0; i < strlen(word1); i++) {
> >     /* skip identical letters */
> >     if (word1[i] == word2[i])
> >       continue;
> >
> >     /* reject words that don't match */
> >     if (is_similar_char(word1[i], word2[i]) == false)
> >       return false;
> >
> >     similarcount++;
> >   }
> >
> >   /* reject words with more than 1 different letter */
> >   //if (similarcount > 1)
> >   //  return false;
> >
> >   printf("%s %s\n", word1, word2);
> >
> >   return true;
> > }
> >
> > int main(void)
> > {
> >   /* english.txt is assumed to exist in the working directory
> >      download from:
> >
> https://github.com/trezor/python-mnemonic/blob/master/mnemonic/wordlist/english.txt*/
> >   FILE* f = fopen("english.txt", "r");
> >   if (!f) {
> >     fprintf(stderr, "failed to open english.txt\n");
> >     return 1;
> >   }
> >
> >   /* read in word list, assumes one word per line */
> >   #define MAXWORD 16
> >   char wordlist[2048][MAXWORD];
> >   int word = 0;
> >   while (fgets(wordlist[word], MAXWORD, f)) {
> >     /* strip trailing whitespace, assumes no leading whitespace */
> >     char *ch = strpbrk(wordlist[word], " \n\t");
> >     if (ch)
> >       *ch = '\0';
> >     word++;
> >   }
> >
> >   if (word != 2048) {
> >     fprintf(stderr, "word list incorrect length\n");
> >     return 1;
> >   }
> >
> >   /* check each word for similarity against every other word */
> >   int i, j, count = 0;
> >   for (i = 0; i < 2048; i++) {
> >     for (j = i+1; j < 2048; j++) {
> >       if (print_words_if_similar(wordlist[i], wordlist[j]))
> >         count++;
> >     }
> >   }
> >
> >   printf("%d matches\n", count);
> >
> >   return 0;
> > }
> >
> >
> ------------------------------------------------------------------------------
> > October Webinars: Code for Performance
> > Free Intel webinars can help you accelerate application performance.
> > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> > the latest Intel processors and coprocessors. See abstracts and register
> >
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Bitcoin-development mailing list
> > Bitcoin-development@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>

--047d7b6d95eed3b76804e97c9683
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I&#39;ve just pushed updated wordlist which is filtered to=
 similar characters taken from this matrix.<div><br></div><div>BIP39 now co=
nsider following character pairs as similar:<br><div><br></div><div><div>=
=A0 =A0 =A0 =A0 similar =3D (</div>

<div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;a&#39;, &#39;c&#39;), (&#39;a&#39;, &#39=
;e&#39;), (&#39;a&#39;, &#39;o&#39;),</div><div>=A0 =A0 =A0 =A0 =A0 =A0 (&#=
39;b&#39;, &#39;d&#39;), (&#39;b&#39;, &#39;h&#39;), (&#39;b&#39;, &#39;p&#=
39;), (&#39;b&#39;, &#39;q&#39;), (&#39;b&#39;, &#39;r&#39;),</div>

<div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;c&#39;, &#39;e&#39;), (&#39;c&#39;, &#39=
;g&#39;), (&#39;c&#39;, &#39;n&#39;), (&#39;c&#39;, &#39;o&#39;), (&#39;c&#=
39;, &#39;q&#39;), (&#39;c&#39;, &#39;u&#39;),</div><div>=A0 =A0 =A0 =A0 =
=A0 =A0 (&#39;d&#39;, &#39;g&#39;), (&#39;d&#39;, &#39;h&#39;), (&#39;d&#39=
;, &#39;o&#39;), (&#39;d&#39;, &#39;p&#39;), (&#39;d&#39;, &#39;q&#39;),</d=
iv>

<div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;e&#39;, &#39;f&#39;), (&#39;e&#39;, &#39=
;o&#39;),</div><div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;f&#39;, &#39;i&#39;), (&#=
39;f&#39;, &#39;j&#39;), (&#39;f&#39;, &#39;l&#39;), (&#39;f&#39;, &#39;p&#=
39;), (&#39;f&#39;, &#39;t&#39;),</div>

<div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;g&#39;, &#39;j&#39;), (&#39;g&#39;, &#39=
;o&#39;), (&#39;g&#39;, &#39;p&#39;), (&#39;g&#39;, &#39;q&#39;), (&#39;g&#=
39;, &#39;y&#39;),</div><div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;h&#39;, &#39;k&#=
39;), (&#39;h&#39;, &#39;l&#39;), (&#39;h&#39;, &#39;m&#39;), (&#39;h&#39;,=
 &#39;n&#39;), (&#39;h&#39;, &#39;r&#39;),</div>

<div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;i&#39;, &#39;j&#39;), (&#39;i&#39;, &#39=
;l&#39;), (&#39;i&#39;, &#39;t&#39;), (&#39;i&#39;, &#39;y&#39;),</div><div=
>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;j&#39;, &#39;l&#39;), (&#39;j&#39;, &#39;p&#=
39;), (&#39;j&#39;, &#39;q&#39;), (&#39;j&#39;, &#39;y&#39;),</div>

<div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;k&#39;, &#39;x&#39;),</div><div>=A0 =A0 =
=A0 =A0 =A0 =A0 (&#39;l&#39;, &#39;t&#39;),</div><div>=A0 =A0 =A0 =A0 =A0 =
=A0 (&#39;m&#39;, &#39;n&#39;), (&#39;m&#39;, &#39;w&#39;),</div><div>=A0 =
=A0 =A0 =A0 =A0 =A0 (&#39;n&#39;, &#39;u&#39;), (&#39;n&#39;, &#39;z&#39;),=
</div>

<div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;o&#39;, &#39;p&#39;), (&#39;o&#39;, &#39=
;q&#39;), (&#39;o&#39;, &#39;u&#39;), (&#39;o&#39;, &#39;v&#39;),</div><div=
>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;p&#39;, &#39;q&#39;), (&#39;p&#39;, &#39;r&#=
39;),</div><div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;q&#39;, &#39;y&#39;),</div>

<div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;s&#39;, &#39;z&#39;),</div><div>=A0 =A0 =
=A0 =A0 =A0 =A0 (&#39;u&#39;, &#39;v&#39;), (&#39;u&#39;, &#39;w&#39;), (&#=
39;u&#39;, &#39;y&#39;),</div><div>=A0 =A0 =A0 =A0 =A0 =A0 (&#39;v&#39;, &#=
39;w&#39;), (&#39;v&#39;, &#39;y&#39;)</div>

<div>=A0 =A0 =A0 =A0 )</div></div><div><br></div></div><div style>Feel free=
 to review and comment current wordlist, but I think we&#39;re slowly movin=
g forward final list.</div><div style><br></div><div style>slush</div></div=
><div class=3D"gmail_extra">

<br><br><div class=3D"gmail_quote">On Sat, Oct 19, 2013 at 1:58 AM, Gregory=
 Maxwell <span dir=3D"ltr">&lt;<a href=3D"mailto:gmaxwell@gmail.com" target=
=3D"_blank">gmaxwell@gmail.com</a>&gt;</span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">

some fairly old wordlist solver code of mine:<br>
<br>
<a href=3D"https://people.xiph.org/~greg/wordlist.visual.py" target=3D"_bla=
nk">https://people.xiph.org/~greg/wordlist.visual.py</a><br>
<br>
it has a 52x52 letter visual similarity matrix in it (along with a citation=
)<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
On Fri, Oct 18, 2013 at 4:52 PM, jan &lt;<a href=3D"mailto:jan.marecek@gmai=
l.com">jan.marecek@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; The words &#39;public&#39;, &#39;private&#39; and &#39;secret&#39; cou=
ld be confusing when<br>
&gt; encoding public and private keys. eg. a private key that begins with<b=
r>
&gt; the word &#39;public&#39;.<br>
&gt;<br>
&gt; I think avoiding words that could look similar when written down would=
<br>
&gt; be a good idea aswell. I searched for words that only differ by the<br=
>
&gt; letters c &amp; e, g &amp; y, u &amp; v and found the following:<br>
&gt;<br>
&gt; car ear<br>
&gt; cat eat<br>
&gt; gear year<br>
&gt; value valve<br>
&gt;<br>
&gt; Other combinations could potentially be problematic depending on the<b=
r>
&gt; handwriting style: ft, ao, ij, vy, possibly even lt and il?<br>
&gt;<br>
&gt; I&#39;ve included the search utility I used below.<br>
&gt;<br>
&gt;<br>
&gt; #include &lt;stdbool.h&gt;<br>
&gt; #include &lt;string.h&gt;<br>
&gt; #include &lt;stdio.h&gt;<br>
&gt;<br>
&gt; char *similar_char_pairs[] =3D { &quot;ce&quot;, &quot;gy&quot;, &quot=
;uv&quot;, NULL };<br>
&gt;<br>
&gt; bool is_similar_char(char c1, char c2)<br>
&gt; {<br>
&gt; =A0 char **pairs =3D similar_char_pairs;<br>
&gt; =A0 do {<br>
&gt; =A0 =A0 char *p =3D *pairs;<br>
&gt; =A0 =A0 if ((c1 =3D=3D p[0] &amp;&amp; c2 =3D=3D p[1]) ||<br>
&gt; =A0 =A0 =A0 =A0 (c1 =3D=3D p[1] &amp;&amp; c2 =3D=3D p[0]))<br>
&gt; =A0 =A0 =A0 return true;<br>
&gt; =A0 } while (*++pairs);<br>
&gt;<br>
&gt; =A0 return false;<br>
&gt; }<br>
&gt;<br>
&gt; bool print_words_if_similar(char *word1, char *word2)<br>
&gt; {<br>
&gt; =A0 /* reject words of different lengths */<br>
&gt; =A0 if (strlen(word1) !=3D strlen(word2))<br>
&gt; =A0 =A0 return false;<br>
&gt;<br>
&gt; =A0 size_t i, similarcount =3D 0;<br>
&gt;<br>
&gt; =A0 for (i =3D 0; i &lt; strlen(word1); i++) {<br>
&gt; =A0 =A0 /* skip identical letters */<br>
&gt; =A0 =A0 if (word1[i] =3D=3D word2[i])<br>
&gt; =A0 =A0 =A0 continue;<br>
&gt;<br>
&gt; =A0 =A0 /* reject words that don&#39;t match */<br>
&gt; =A0 =A0 if (is_similar_char(word1[i], word2[i]) =3D=3D false)<br>
&gt; =A0 =A0 =A0 return false;<br>
&gt;<br>
&gt; =A0 =A0 similarcount++;<br>
&gt; =A0 }<br>
&gt;<br>
&gt; =A0 /* reject words with more than 1 different letter */<br>
&gt; =A0 //if (similarcount &gt; 1)<br>
&gt; =A0 // =A0return false;<br>
&gt;<br>
&gt; =A0 printf(&quot;%s %s\n&quot;, word1, word2);<br>
&gt;<br>
&gt; =A0 return true;<br>
&gt; }<br>
&gt;<br>
&gt; int main(void)<br>
&gt; {<br>
&gt; =A0 /* english.txt is assumed to exist in the working directory<br>
&gt; =A0 =A0 =A0download from:<br>
&gt; =A0 =A0 =A0<a href=3D"https://github.com/trezor/python-mnemonic/blob/m=
aster/mnemonic/wordlist/english.txt" target=3D"_blank">https://github.com/t=
rezor/python-mnemonic/blob/master/mnemonic/wordlist/english.txt</a> */<br>
&gt; =A0 FILE* f =3D fopen(&quot;english.txt&quot;, &quot;r&quot;);<br>
&gt; =A0 if (!f) {<br>
&gt; =A0 =A0 fprintf(stderr, &quot;failed to open english.txt\n&quot;);<br>
&gt; =A0 =A0 return 1;<br>
&gt; =A0 }<br>
&gt;<br>
&gt; =A0 /* read in word list, assumes one word per line */<br>
&gt; =A0 #define MAXWORD 16<br>
&gt; =A0 char wordlist[2048][MAXWORD];<br>
&gt; =A0 int word =3D 0;<br>
&gt; =A0 while (fgets(wordlist[word], MAXWORD, f)) {<br>
&gt; =A0 =A0 /* strip trailing whitespace, assumes no leading whitespace */=
<br>
&gt; =A0 =A0 char *ch =3D strpbrk(wordlist[word], &quot; \n\t&quot;);<br>
&gt; =A0 =A0 if (ch)<br>
&gt; =A0 =A0 =A0 *ch =3D &#39;\0&#39;;<br>
&gt; =A0 =A0 word++;<br>
&gt; =A0 }<br>
&gt;<br>
&gt; =A0 if (word !=3D 2048) {<br>
&gt; =A0 =A0 fprintf(stderr, &quot;word list incorrect length\n&quot;);<br>
&gt; =A0 =A0 return 1;<br>
&gt; =A0 }<br>
&gt;<br>
&gt; =A0 /* check each word for similarity against every other word */<br>
&gt; =A0 int i, j, count =3D 0;<br>
&gt; =A0 for (i =3D 0; i &lt; 2048; i++) {<br>
&gt; =A0 =A0 for (j =3D i+1; j &lt; 2048; j++) {<br>
&gt; =A0 =A0 =A0 if (print_words_if_similar(wordlist[i], wordlist[j]))<br>
&gt; =A0 =A0 =A0 =A0 count++;<br>
&gt; =A0 =A0 }<br>
&gt; =A0 }<br>
&gt;<br>
&gt; =A0 printf(&quot;%d matches\n&quot;, count);<br>
&gt;<br>
&gt; =A0 return 0;<br>
&gt; }<br>
&gt;<br>
&gt; ----------------------------------------------------------------------=
--------<br>
&gt; October Webinars: Code for Performance<br>
&gt; Free Intel webinars can help you accelerate application performance.<b=
r>
&gt; Explore tips for MPI, OpenMP, advanced profiling, and more. Get the mo=
st from<br>
&gt; the latest Intel processors and coprocessors. See abstracts and regist=
er &gt;<br>
&gt; <a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D60135031&am=
p;iu=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.net=
/gampad/clk?id=3D60135031&amp;iu=3D/4140/ostg.clktrk</a><br>
&gt; _______________________________________________<br>
&gt; Bitcoin-development mailing list<br>
&gt; <a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-d=
evelopment@lists.sourceforge.net</a><br>
&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-develo=
pment" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitco=
in-development</a><br>
<br>
---------------------------------------------------------------------------=
---<br>
October Webinars: Code for Performance<br>
Free Intel webinars can help you accelerate application performance.<br>
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most fr=
om<br>
the latest Intel processors and coprocessors. See abstracts and register &g=
t;<br>
<a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D60135031&amp;iu=
=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.net/gam=
pad/clk?id=3D60135031&amp;iu=3D/4140/ostg.clktrk</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>

--047d7b6d95eed3b76804e97c9683--