Bitcoin Forum

Bitcoin => Electrum => Topic started by: jackg on December 09, 2018, 04:49:27 PM



Title: Two word seeds?
Post by: jackg on December 09, 2018, 04:49:27 PM
I was putting in a normal 12 word seed and it seems weird but the first two words are a seed of their own. The second word wasn’t even entered in full either, anyone know of a command to test the smallest word phrase actually possible for a seed (or the closest to it without churning through every seed).


Title: Re: Two word seeds?
Post by: Abdussamad on December 09, 2018, 11:51:41 PM
Yes this is possible. Basically it has to hash to a number with one of the allowed version prefixes. So sometimes you get short strings that do that. You can generate  a custom size seed with the make_seed command line option on *nix:

Code:
electrum make_seed --nbits=22

The above will give you a two word seed like "rival impact". If you replace 22 with 11 you'll get a one word seed ('best'). Interestingly all you get is 'best' if you ask it to generate a <= 11bit seed


Title: Re: Two word seeds?
Post by: jackg on December 10, 2018, 12:13:03 AM
It’s better than what I’m getting (-32601 ‘Method run_cmdline not supported.’) ;D

I’m guessing one word seeds aren’t very secure then ;D. 11 bits of entropy for a word? I’m guessing that’s to prevent underflow?

Edit; of course, you can’t do roc calls while electrum is running. I wonder if I can do it under a different user while it’s running though?


Title: Re: Two word seeds?
Post by: Abdussamad on December 10, 2018, 04:09:45 AM
It’s better than what I’m getting (-32601 ‘Method run_cmdline not supported.’) ;D

Are you on windows? CLI access isn't available on Windows. It may work over RPC.

I’m guessing one word seeds aren’t very secure then ;D. 11 bits of entropy for a word? I’m guessing that’s to prevent underflow?

It's 11 because the default dictionary is 2048 words (2^11). If you use a larger dictionary you can encode more bits. You can replace the default dictionaries with your own if you like. Here's (https://bitcoinelectrum.com/english-custom.txt) one with nearly 9k words. It's a combination of the electrum dictionary and one I downloaded from the EFF's site. On linux you can replace the Electrum dictionary in /lib/python3/site-packages/electrum/wordlist directory.


Title: Re: Two word seeds?
Post by: jackg on December 10, 2018, 12:03:15 PM
It’s better than what I’m getting (-32601 ‘Method run_cmdline not supported.’) ;D

Are you on windows? CLI access isn't available on Windows. It may work over RPC.

I’m guessing one word seeds aren’t very secure then ;D. 11 bits of entropy for a word? I’m guessing that’s to prevent underflow?

It's 11 because the default dictionary is 2048 words (2^11). If you use a larger dictionary you can encode more bits. You can replace the default dictionaries with your own if you like. Here's (https://bitcoinelectrum.com/english-custom.txt) one with nearly 9k words. It's a combination of the electrum dictionary and one I downloaded from the EFF's site. On linux you can replace the Electrum dictionary in /lib/python3/site-packages/ele colctrum/wordlist directory.

Ah that’s quite cool. I think I have every word in the Collins English dictionary somewhere so that’ll be interesting to try...

Is electrum happy to go over 256 bits of entropy?


Title: Re: Two word seeds?
Post by: Abdussamad on December 11, 2018, 01:56:35 AM
yes


Title: Re: Two word seeds?
Post by: jackg on December 11, 2018, 02:21:52 PM
I’m getting errors when asking for more than 3000 bits... that’s sad, we can’t have greater entropy than private keys then I’m guessing ;D?


Title: Re: Two word seeds?
Post by: Master1781 on December 11, 2018, 11:14:10 PM
It’s better than what I’m getting (-32601 ‘Method run_cmdline not supported.’) ;D

Are you on windows? CLI access isn't available on Windows. It may work over RPC.

I’m guessing one word seeds aren’t very secure then ;D. 11 bits of entropy for a word? I’m guessing that’s to prevent underflow?

It's 11 because the default dictionary is 2048 words (2^11). If you use a larger dictionary you can encode more bits. You can replace the default dictionaries with your own if you like. Here's (https://bitcoinelectrum.com/english-custom.txt) one with nearly 9k words. It's a combination of the electrum dictionary and one I downloaded from the EFF's site. On linux you can replace the Electrum dictionary in /lib/python3/site-packages/ele colctrum/wordlist directory.

Ah that’s quite cool. I think I have every word in the Collins English dictionary somewhere so that’ll be interesting to try...

Is electrum happy to go over 256 bits of entropy?

Just to note, be careful backuping this new dictionary file if you intend to use that new wallet and seed. If in future you'd need to reinstall or upgrade Electrum, and recreate the wallet (with your seed), then you'd need also the same file to generate your wallet addresses and keys. So you'd be dependant not only of your seed, but also of this file.


Title: Re: Two word seeds?
Post by: Abdussamad on December 12, 2018, 12:57:26 AM
Just to note, be careful backuping this new dictionary file if you intend to use that new wallet and seed. If in future you'd need to reinstall or upgrade Electrum, and recreate the wallet (with your seed), then you'd need also the same file to generate your wallet addresses and keys. So you'd be dependant not only of your seed, but also of this file.

That's not correct. Electrum doesn't depend on any dictionary. You can restore without having the dictionary on hand.

For example:

sensuous 4478 plentiful scribble schematic 6525 sloppy pesky 7002 bobble

Try restoring using the above seed.


Title: Re: Two word seeds?
Post by: Master1781 on December 13, 2018, 08:55:04 PM
Just to note, be careful backuping this new dictionary file if you intend to use that new wallet and seed. If in future you'd need to reinstall or upgrade Electrum, and recreate the wallet (with your seed), then you'd need also the same file to generate your wallet addresses and keys. So you'd be dependant not only of your seed, but also of this file.

That's not correct. Electrum doesn't depend on any dictionary. You can restore without having the dictionary on hand.

For example:

sensuous 4478 plentiful scribble schematic 6525 sloppy pesky 7002 bobble

Try restoring using the above seed.

Very interesting! I didn't know that. So it means the dictionary used to create a seed can be used only temporarily? Then, with that seed generated, I can safely restore the wallet in another PC with the default electrum installation?


Title: Re: Two word seeds?
Post by: jackg on December 13, 2018, 09:03:24 PM
Just to note, be careful backuping this new dictionary file if you intend to use that new wallet and seed. If in future you'd need to reinstall or upgrade Electrum, and recreate the wallet (with your seed), then you'd need also the same file to generate your wallet addresses and keys. So you'd be dependant not only of your seed, but also of this file.

That's not correct. Electrum doesn't depend on any dictionary. You can restore without having the dictionary on hand.

For example:

sensuous 4478 plentiful scribble schematic 6525 sloppy pesky 7002 bobble

Try restoring using the above seed.

Very interesting! I didn't know that. So it means the dictionary used to create a seed can be used only temporarily? Then, with that seed generated, I can safely restore the wallet in another PC with the default electrum installation?

If you’re going to do that why not just swap the dictionary for numbers when writing it down (and then run a script to link the corresponding word and sritd that down.

You can host the dictionary on an open github repo too.


Title: Re: Two word seeds?
Post by: Abdussamad on December 14, 2018, 04:42:39 AM
Very interesting! I didn't know that. So it means the dictionary used to create a seed can be used only temporarily? Then, with that seed generated, I can safely restore the wallet in another PC with the default electrum installation?

Yep. That last seed is from this dictionary (https://bitcoinelectrum.com/english-alpha-numeric.txt) with 8954 words and 1-7430 numbers giving you 2^14 total.