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

<div>            (&#39;a&#39;, &#39;c&#39;), (&#39;a&#39;, &#39;e&#39;), (&#39;a&#39;, &#39;o&#39;),</div><div>            (&#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>            (&#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>            (&#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;),</div>

<div>            (&#39;e&#39;, &#39;f&#39;), (&#39;e&#39;, &#39;o&#39;),</div><div>            (&#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>            (&#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>            (&#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>            (&#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>            (&#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>            (&#39;k&#39;, &#39;x&#39;),</div><div>            (&#39;l&#39;, &#39;t&#39;),</div><div>            (&#39;m&#39;, &#39;n&#39;), (&#39;m&#39;, &#39;w&#39;),</div><div>            (&#39;n&#39;, &#39;u&#39;), (&#39;n&#39;, &#39;z&#39;),</div>

<div>            (&#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>            (&#39;p&#39;, &#39;q&#39;), (&#39;p&#39;, &#39;r&#39;),</div><div>            (&#39;q&#39;, &#39;y&#39;),</div>

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

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

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

some fairly old wordlist solver code of mine:<br>
<br>
<a href="https://people.xiph.org/~greg/wordlist.visual.py" target="_blank">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="HOEnZb"><div class="h5"><br>
On Fri, Oct 18, 2013 at 4:52 PM, jan &lt;<a href="mailto:jan.marecek@gmail.com">jan.marecek@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; The words &#39;public&#39;, &#39;private&#39; and &#39;secret&#39; could be confusing when<br>
&gt; encoding public and private keys. eg. a private key that begins with<br>
&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<br>
&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[] = { &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;   char **pairs = similar_char_pairs;<br>
&gt;   do {<br>
&gt;     char *p = *pairs;<br>
&gt;     if ((c1 == p[0] &amp;&amp; c2 == p[1]) ||<br>
&gt;         (c1 == p[1] &amp;&amp; c2 == p[0]))<br>
&gt;       return true;<br>
&gt;   } while (*++pairs);<br>
&gt;<br>
&gt;   return false;<br>
&gt; }<br>
&gt;<br>
&gt; bool print_words_if_similar(char *word1, char *word2)<br>
&gt; {<br>
&gt;   /* reject words of different lengths */<br>
&gt;   if (strlen(word1) != strlen(word2))<br>
&gt;     return false;<br>
&gt;<br>
&gt;   size_t i, similarcount = 0;<br>
&gt;<br>
&gt;   for (i = 0; i &lt; strlen(word1); i++) {<br>
&gt;     /* skip identical letters */<br>
&gt;     if (word1[i] == word2[i])<br>
&gt;       continue;<br>
&gt;<br>
&gt;     /* reject words that don&#39;t match */<br>
&gt;     if (is_similar_char(word1[i], word2[i]) == false)<br>
&gt;       return false;<br>
&gt;<br>
&gt;     similarcount++;<br>
&gt;   }<br>
&gt;<br>
&gt;   /* reject words with more than 1 different letter */<br>
&gt;   //if (similarcount &gt; 1)<br>
&gt;   //  return false;<br>
&gt;<br>
&gt;   printf(&quot;%s %s\n&quot;, word1, word2);<br>
&gt;<br>
&gt;   return true;<br>
&gt; }<br>
&gt;<br>
&gt; int main(void)<br>
&gt; {<br>
&gt;   /* english.txt is assumed to exist in the working directory<br>
&gt;      download from:<br>
&gt;      <a href="https://github.com/trezor/python-mnemonic/blob/master/mnemonic/wordlist/english.txt" target="_blank">https://github.com/trezor/python-mnemonic/blob/master/mnemonic/wordlist/english.txt</a> */<br>
&gt;   FILE* f = fopen(&quot;english.txt&quot;, &quot;r&quot;);<br>
&gt;   if (!f) {<br>
&gt;     fprintf(stderr, &quot;failed to open english.txt\n&quot;);<br>
&gt;     return 1;<br>
&gt;   }<br>
&gt;<br>
&gt;   /* read in word list, assumes one word per line */<br>
&gt;   #define MAXWORD 16<br>
&gt;   char wordlist[2048][MAXWORD];<br>
&gt;   int word = 0;<br>
&gt;   while (fgets(wordlist[word], MAXWORD, f)) {<br>
&gt;     /* strip trailing whitespace, assumes no leading whitespace */<br>
&gt;     char *ch = strpbrk(wordlist[word], &quot; \n\t&quot;);<br>
&gt;     if (ch)<br>
&gt;       *ch = &#39;\0&#39;;<br>
&gt;     word++;<br>
&gt;   }<br>
&gt;<br>
&gt;   if (word != 2048) {<br>
&gt;     fprintf(stderr, &quot;word list incorrect length\n&quot;);<br>
&gt;     return 1;<br>
&gt;   }<br>
&gt;<br>
&gt;   /* check each word for similarity against every other word */<br>
&gt;   int i, j, count = 0;<br>
&gt;   for (i = 0; i &lt; 2048; i++) {<br>
&gt;     for (j = i+1; j &lt; 2048; j++) {<br>
&gt;       if (print_words_if_similar(wordlist[i], wordlist[j]))<br>
&gt;         count++;<br>
&gt;     }<br>
&gt;   }<br>
&gt;<br>
&gt;   printf(&quot;%d matches\n&quot;, count);<br>
&gt;<br>
&gt;   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.<br>
&gt; Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from<br>
&gt; the latest Intel processors and coprocessors. See abstracts and register &gt;<br>
&gt; <a href="http://pubads.g.doubleclick.net/gampad/clk?id=60135031&amp;iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=60135031&amp;iu=/4140/ostg.clktrk</a><br>
&gt; _______________________________________________<br>
&gt; Bitcoin-development mailing list<br>
&gt; <a href="mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a><br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-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 from<br>
the latest Intel processors and coprocessors. See abstracts and register &gt;<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=60135031&amp;iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=60135031&amp;iu=/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href="mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
</div></div></blockquote></div><br></div>