Repository navigation
doc: Update wallets.md generation draft for BIP-93 and python-codex32 v1 - #7
Draft
BenWestgate wants to merge 11 commits into
Draft
BenWestgate wants to merge 11 commits into
BenWestgate wants to merge 11 commits into
Conversation
BIP-93 now restricts master seeds to 128, 160, 192, 224, 256 and 512 bits, so wallets.md no longer needs to discourage other lengths. Keep 128 and 256 bits as the import baseline and default generation to 128. Human-readable part registration and length rules belong to BIP-93 and SLIP-0173. Bitcoin wallets only need to use ms and never offer it as an option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8jLK7YowhkeTheJRzgs7d
Every share carries the identifier, so an identifier derived from the secret gives a holder of fewer than the threshold of shares a 20-bit test against candidate secrets and links each share to the wallet's public fingerprint. Keep the fingerprint default for freshly generated unshared secrets only; share sets use a user-selected or random identifier. This matches the identifier policy of python-codex32's v1 branch, which also uses random identifiers when encoding existing seeds and rejects a re-shared set that repeats the source set's header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8jLK7YowhkeTheJRzgs7d
The padding code started the CRC register at 0, while python-codex32's v1 generator starts it at 1 (equivalently, prefixes the seed bits with a single 1 bit). Replace the convertbits-based snippet with a short crc_pad function that matches v1 for every BIP-93 seed length, say that importers must accept any padding, and regenerate both test vectors. The vectors were checked against python-codex32 v1, the BIP-93 reference decoder, and an independent BIP-0032 fingerprint calculation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8jLK7YowhkeTheJRzgs7d
Bring the display and full-verification guidance in line with the python-codex32 v1 ms32 create flow, which works well on full-keyboard desktop wallets: - Group windows four per row to match a recovery card template. - Show the identifier, share details and, for fresh seeds, the master fingerprint the user records. - Clear the string, including scrollback, before re-entry. - Ignore spaces and case, align the entry so an insertion or deletion marks only nearby windows, and re-ask only the wrong windows. - Note that confirmation cannot prove the written copy was corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8jLK7YowhkeTheJRzgs7d
The checksum corrects up to 4 substitutions, 8 erasures, or 13 consecutive erasures; it does not correct 4 errors and 13 erasures at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8jLK7YowhkeTheJRzgs7d
Ben's review note on this PR points to python-codex32's v1 staging branches for share generation. Describe what its ms32 create does so other wallets can follow it: - random share indices instead of alphabetical ones; - redraw the last random share until the secret has CRC padding; - re-encode an existing secret under a new header before sharing; - generate and confirm one share at a time, and import only after every share is confirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8jLK7YowhkeTheJRzgs7d
BenWestgate
commented
Oct 29, 2026
BenWestgate
left a comment
Owner
Author
There was a problem hiding this comment.
requesting changes and answers to questions.
| * The default SHOULD be the bech32-encoded BIP-0032 master key fingerprint. | ||
| * The identifier groups shares belonging to the same secret and helps users tell backups apart. It is public metadata, not authentication. | ||
| * Only unshared secrets MAY use an identifier derived from the secret. | ||
| * For a freshly generated unshared secret, the default SHOULD be the first four bech32 characters (20 bits) of its BIP-0032 master key fingerprint. |
Owner
Author
There was a problem hiding this comment.
should or may which is best here?
Owner
Author
There was a problem hiding this comment.
I kept SHOULD. The next line's benefit, a stateless wallet finding the right backup from a descriptor or PSBT, only works if wallets can count on the fingerprint default. With MAY, no wallet could assume it. Since f8b3204, wallets also SHOULD show the generated identifier and let the user edit it, so a user who knows of a clash can still change it. Say if you'd still prefer MAY.
Generated by Claude Code
BIP-93 already restricts master seeds to its six lengths, so drop the line repeating that for generation and the list of the optional lengths for import, which would need updating if BIP-93 changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JjfHnJYx61dYZxUGWTL9nS
- Drop the note that the default identifier leaks 20 bits of the fingerprint. Only unshared secrets use it, and anyone who sees one already has the whole seed. - Drop the claim that a secret-derived share identifier links shares to the fingerprint; not every secret-derived identifier does. The threshold argument alone rules them out. - Merge the repeated "user selected or random" rules into one, and ask wallets to show a generated identifier and let the user edit it, since the user may know it matches another backup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JjfHnJYx61dYZxUGWTL9nS
- Let wallets alternate color or background, not only font weight, between windows. - Drop "terminal scrollback": this guidance is aimed at graphical wallets. - Confirmation must not ignore letter case, since mixed case is invalid. An all-uppercase or all-lowercase entry is fine, and as during import the user should only be able to type uppercase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JjfHnJYx61dYZxUGWTL9nS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JjfHnJYx61dYZxUGWTL9nS
Keep this PR to unshared secret generation so it stays small enough to review. The share set section returns, with the review fixes, in a follow-up PR stacked on this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JjfHnJYx61dYZxUGWTL9nS
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.
Requested by Ben · project thread
Proposed update to BlockstreamResearch#71. It's opened against BlockstreamResearch#71's head branch so it can be reviewed before anything reaches the upstream PR. Merging this PR updates BlockstreamResearch#71.
It addresses the 2026-10-03 note on BlockstreamResearch#71: drop guidance that BIP-93 now covers, make share sets use a user-selected or random identifier, and follow python-codex32's v1
ms32 createflow (reviewability-v1). Share set generation is now in the follow-up #8, which is stacked on this branch.Commits
msand never offer it as an option.crc_padthat matches v1 for all six seed lengths, and both test vectors are regenerated.ms32 createdisplay and confirmation. Show four windows per row, and show the identifier and the fresh-seed fingerprint. Confirmation aligns entries so an insertion or deletion marks only nearby windows, and re-asks only the wrong windows. Adds the caveat that confirmation can't prove the written copy was fixed.Review fixes
Verification
crc_padin the doc equals python-codex32 v1_crc_padon 300 random seeds of each BIP-93 length, plus all-zero and all-one seeds.ms32_decode. The review fixes changed only their labels.Not changed
🤖 Generated with Claude Code
https://claude.ai/code/session_01JjfHnJYx61dYZxUGWTL9nS