<div dir="ltr">I'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> ('a', 'c'), ('a', 'e'), ('a', 'o'),</div><div> ('b', 'd'), ('b', 'h'), ('b', 'p'), ('b', 'q'), ('b', 'r'),</div>
<div> ('c', 'e'), ('c', 'g'), ('c', 'n'), ('c', 'o'), ('c', 'q'), ('c', 'u'),</div><div> ('d', 'g'), ('d', 'h'), ('d', 'o'), ('d', 'p'), ('d', 'q'),</div>
<div> ('e', 'f'), ('e', 'o'),</div><div> ('f', 'i'), ('f', 'j'), ('f', 'l'), ('f', 'p'), ('f', 't'),</div>
<div> ('g', 'j'), ('g', 'o'), ('g', 'p'), ('g', 'q'), ('g', 'y'),</div><div> ('h', 'k'), ('h', 'l'), ('h', 'm'), ('h', 'n'), ('h', 'r'),</div>
<div> ('i', 'j'), ('i', 'l'), ('i', 't'), ('i', 'y'),</div><div> ('j', 'l'), ('j', 'p'), ('j', 'q'), ('j', 'y'),</div>
<div> ('k', 'x'),</div><div> ('l', 't'),</div><div> ('m', 'n'), ('m', 'w'),</div><div> ('n', 'u'), ('n', 'z'),</div>
<div> ('o', 'p'), ('o', 'q'), ('o', 'u'), ('o', 'v'),</div><div> ('p', 'q'), ('p', 'r'),</div><div> ('q', 'y'),</div>
<div> ('s', 'z'),</div><div> ('u', 'v'), ('u', 'w'), ('u', 'y'),</div><div> ('v', 'w'), ('v', 'y')</div>
<div> )</div></div><div><br></div></div><div style>Feel free to review and comment current wordlist, but I think we'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"><<a href="mailto:gmaxwell@gmail.com" target="_blank">gmaxwell@gmail.com</a>></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 <<a href="mailto:jan.marecek@gmail.com">jan.marecek@gmail.com</a>> wrote:<br>
><br>
> The words 'public', 'private' and 'secret' could be confusing when<br>
> encoding public and private keys. eg. a private key that begins with<br>
> the word 'public'.<br>
><br>
> I think avoiding words that could look similar when written down would<br>
> be a good idea aswell. I searched for words that only differ by the<br>
> letters c & e, g & y, u & v and found the following:<br>
><br>
> car ear<br>
> cat eat<br>
> gear year<br>
> value valve<br>
><br>
> Other combinations could potentially be problematic depending on the<br>
> handwriting style: ft, ao, ij, vy, possibly even lt and il?<br>
><br>
> I've included the search utility I used below.<br>
><br>
><br>
> #include <stdbool.h><br>
> #include <string.h><br>
> #include <stdio.h><br>
><br>
> char *similar_char_pairs[] = { "ce", "gy", "uv", NULL };<br>
><br>
> bool is_similar_char(char c1, char c2)<br>
> {<br>
> char **pairs = similar_char_pairs;<br>
> do {<br>
> char *p = *pairs;<br>
> if ((c1 == p[0] && c2 == p[1]) ||<br>
> (c1 == p[1] && c2 == p[0]))<br>
> return true;<br>
> } while (*++pairs);<br>
><br>
> return false;<br>
> }<br>
><br>
> bool print_words_if_similar(char *word1, char *word2)<br>
> {<br>
> /* reject words of different lengths */<br>
> if (strlen(word1) != strlen(word2))<br>
> return false;<br>
><br>
> size_t i, similarcount = 0;<br>
><br>
> for (i = 0; i < strlen(word1); i++) {<br>
> /* skip identical letters */<br>
> if (word1[i] == word2[i])<br>
> continue;<br>
><br>
> /* reject words that don't match */<br>
> if (is_similar_char(word1[i], word2[i]) == false)<br>
> return false;<br>
><br>
> similarcount++;<br>
> }<br>
><br>
> /* reject words with more than 1 different letter */<br>
> //if (similarcount > 1)<br>
> // return false;<br>
><br>
> printf("%s %s\n", word1, word2);<br>
><br>
> return true;<br>
> }<br>
><br>
> int main(void)<br>
> {<br>
> /* english.txt is assumed to exist in the working directory<br>
> download from:<br>
> <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>
> FILE* f = fopen("english.txt", "r");<br>
> if (!f) {<br>
> fprintf(stderr, "failed to open english.txt\n");<br>
> return 1;<br>
> }<br>
><br>
> /* read in word list, assumes one word per line */<br>
> #define MAXWORD 16<br>
> char wordlist[2048][MAXWORD];<br>
> int word = 0;<br>
> while (fgets(wordlist[word], MAXWORD, f)) {<br>
> /* strip trailing whitespace, assumes no leading whitespace */<br>
> char *ch = strpbrk(wordlist[word], " \n\t");<br>
> if (ch)<br>
> *ch = '\0';<br>
> word++;<br>
> }<br>
><br>
> if (word != 2048) {<br>
> fprintf(stderr, "word list incorrect length\n");<br>
> return 1;<br>
> }<br>
><br>
> /* check each word for similarity against every other word */<br>
> int i, j, count = 0;<br>
> for (i = 0; i < 2048; i++) {<br>
> for (j = i+1; j < 2048; j++) {<br>
> if (print_words_if_similar(wordlist[i], wordlist[j]))<br>
> count++;<br>
> }<br>
> }<br>
><br>
> printf("%d matches\n", count);<br>
><br>
> return 0;<br>
> }<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 ><br>
> <a href="http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=60135031&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>
<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 ><br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=60135031&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>