feat: use wordlist-4096 for denser encoding #26
Merged
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.
Fixes #25
Summary
This PR introduces wordlist-4096, the 4096-length wordlist i spent way too much time creating over the winter holidays 馃槄 This wordlist replaces our use of BIP39 and provides even stronger guarantees (like a Damerau Levenshtein minimum edit distance between all words, which BIP39 lacks)
With wordlist-4096, each word encodes 12 bits to BIP39's 11. This permits denser encoding, allowing us to drop the default phrase length from 15 to 14, and encode more data in the phrase at the same time.
By expanding the version number, we will also have more room to grow in the future, especially because we are probably going to add passphrase-encrypted phrases, which will require a new version number from the get-go.
Phrase Encoding Changes
This table highlights the changes to the fields encoded in the recovery phrases.