Bitcoin Forum

Bitcoin => Electrum => Topic started by: anticonformist on June 15, 2018, 08:24:31 AM



Title: 12 word seed works with last word only a single letter WTF?
Post by: anticonformist on June 15, 2018, 08:24:31 AM
Just mucking around with stuff and want to know why does this 12 word seed work with the last word being not a word and only a single letter.
Lets see who can get the correct letter first to open the wallet and see if there are 100 bitcoins inside;-)

honor ketchup wall cake dismiss poor quietly coin take luxury ink ....... (12th one a single letter not a word)


Title: Re: 12 word seed works with last word only a single letter WTF?
Post by: Lucius on June 15, 2018, 09:19:44 AM
Just mucking around with stuff and want to know why does this 12 word seed work with the last word being not a word and only a single letter.
Lets see who can get the correct letter first to open the wallet and see if there are 100 bitcoins inside;-)

honor ketchup wall cake dismiss poor quietly coin take luxury ink ....... (12th one a single letter not a word)

I do not know why twelve word in this seed is only letter, maybe it is generated seed by some user, like brain wallet or something. But it was to easy to guess last word, in this case only letter, it is "k" and wallet is empty. Too bad, I was think there will be at least 1 BTC ;)


Title: Re: 12 word seed works with last word only a single letter WTF?
Post by: Abdussamad on June 15, 2018, 09:57:31 AM
If you add k at the end it creates a mnemonic with the correct checksum for a standard wallet. i think this counts as a bug because k is not a word in the dictionary. you should create an issue on github about this.


Title: Re: 12 word seed works with last word only a single letter WTF?
Post by: bob123 on June 15, 2018, 11:12:09 AM
Just mucking around with stuff and want to know why does this 12 word seed work with the last word being not a word and only a single letter.
Lets see who can get the correct letter first to open the wallet and see if there are 100 bitcoins inside;-)

honor ketchup wall cake dismiss poor quietly coin take luxury ink ....... (12th one a single letter not a word)


honor, poor, quietly, take and ink are neither part of the BIP39 word list nor of the wordlist electrum uses.

It is really weird how electrum does generate a wallet (both, as electrum AND BIP39 wallet) with 5 words not being in the dictionary and the last word actually being 'k'. This indeed sounds like a bug.


OP, how did you find out about this?  ???


Title: Re: 12 word seed works with last word only a single letter WTF?
Post by: anticonformist on June 15, 2018, 11:56:48 AM
I was just guessing random words from the electrum wallet, on the 12th word i was just cycling through the "k" words, but accidently just put in the single letter k instead of a complete k word and it opened, balance 0. Your also right about those words honor, poor, quietly, take and ink are not in the electrum wordlist. Maybe the wordlist has been updated? Im using electrum-3.1.3.


Title: Re: 12 word seed works with last word only a single letter WTF?
Post by: Abdussamad on June 15, 2018, 12:48:16 PM
Just mucking around with stuff and want to know why does this 12 word seed work with the last word being not a word and only a single letter.
Lets see who can get the correct letter first to open the wallet and see if there are 100 bitcoins inside;-)

honor ketchup wall cake dismiss poor quietly coin take luxury ink ....... (12th one a single letter not a word)


honor, poor, quietly, take and ink are neither part of the BIP39 word list nor of the wordlist electrum uses.

It is really weird how electrum does generate a wallet (both, as electrum AND BIP39 wallet) with 5 words not being in the dictionary and the last word actually being 'k'. This indeed sounds like a bug.


OP, how did you find out about this?  ???


If you want to do it on purpose then here's how. It is possible to replace the electrum dictionary with your own custom words. The key point is that the seed you generate with your custom dictionary is valid in any electrum installation even ones with the default dictionary. So create your own custom dictionary and include single letter "words" a..z and then use the make_seed cli command to generate seeds until you get one with a letter "word" in it.

Examples:

any agent cupboard figure taxi error skill tomato rely lawsuit r grief

carbon dial trumpet want ask slam rebuild rival n essay amused mushroom


The dictionary is in /usr/lib/python3/site-packages/electrum/wordlist . You can just appened a..z and 1...9 for instance to the default dictionary.

I am no longer certain that this should be classified as a bug. It's useful for people who make their own dictionaries :)