BIP93: Restrict master seed lengths and Revise codex32 string length specifications#2077
Draft
BenWestgate wants to merge 1 commit intobitcoin:masterfrom
Draft
BIP93: Restrict master seed lengths and Revise codex32 string length specifications#2077BenWestgate wants to merge 1 commit intobitcoin:masterfrom
BenWestgate wants to merge 1 commit intobitcoin:masterfrom
Conversation
Clarified codex32 string specifications, including character limits and decoding processes. Updated references to BIP-0173 and adjusted payload character limits.
This was referenced Jan 19, 2026
Contributor
Author
|
This is ready for review if you prefer the regular/long checksum switch being a property of the codex32 format rather than application specific. A new #2040 approach avoids "ms" length restrictions by leaving checksum selection up to each application. This still improves insert/delete error correction, but we have not studied how much, so is less urgent. |
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.
codex32 string length limited to always cover HRP characters, master seed bit lengths limited to multiples of 32-bits, updated master seed encoding/decoding processes.
Rationale
PR helper for #2040: prepares text for general HRP lengths by defining limits based on string length not data part length and deprecating master seed lengths that violate the new codex32 length rule.
Why
Restricting seeds to 32-bit multiples makes valid secret seed lengths differ by at least 6-7 characters reducing ambiguity to two valid lengths for insert/delete-correcting error correcting wallets. Restricting to 64-bit multiples has one valid length within correctable distance but @roconnor-blockstream wants 160-bit seeds.
Key changes c286c2c
Other changes:
<ref>notes for the less obvious changes./refso Footnotes now appear at the end of Rationale (they're invisible in master)Backward-compatibility and migration
Test Vectors
I have a reference implementation with test vectors according to this spec update, as well as #2040, so I will add these if reviewers agree about the text changes.