Update seed command to support electrum mnemonics#527
Merged
evoskuil merged 4 commits intolibbitcoin:masterfrom Feb 20, 2018
Merged
Update seed command to support electrum mnemonics#527evoskuil merged 4 commits intolibbitcoin:masterfrom
evoskuil merged 4 commits intolibbitcoin:masterfrom
Conversation
thecodefactory
commented
Feb 10, 2018
src/utility.cpp
Outdated
|
|
||
| data_chunk new_electrum_seed(size_t bit_length) | ||
| { | ||
| static const auto now = high_resolution_clock::now(); |
Member
Author
There was a problem hiding this comment.
I could see moving most of this method into libbitcoin/src/utility/random.cpp similar to new_seed
Member
Author
|
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
Member
Author
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update seed command to support electrum mnemonics with 132 bits of entropy (the default for electrum 2.x+) or more (resolves #499)