-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update seed command to support electrum mnemonics #527
Conversation
src/utility.cpp
Outdated
@@ -80,6 +89,26 @@ data_chunk new_seed(size_t bit_length) | |||
return seed; | |||
} | |||
|
|||
data_chunk new_electrum_seed(size_t bit_length) | |||
{ | |||
static const auto now = high_resolution_clock::now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could see moving most of this method into libbitcoin/src/utility/random.cpp similar to new_seed
UPDATE: This is no longer relevant, as seed changes have been reverted. This generates valid electrum mnemonics verified against electrum 3.0x:
The default entropy size for electrum mnemonics is 132 bits. I didn't want to automatically override the default (of 192 to 132) if --electrum was used in the case that -b 192 was used specifically, so for now, the recommended usage is to specify -b 132 as in the example above. Thoughts? |
919732d
to
7474ba0
Compare
Ah, this needs a unit test as well, will add one. |
d861c55
to
f603a14
Compare
use only what is required. By default, 132 bits of entropy are used to match the default for electrum 2.x+. If more input entropy is provided and more entropy for the electrum-mnemonic is desired, a -b,bit-length option is provided to specify how much.
f603a14
to
b625c63
Compare
Update seed command to support electrum mnemonics with 132 bits of entropy (the default for electrum 2.x+) or more (resolves #499)