BIP-39: say what separates two words #2237

pull fametrano wants to merge 1 commits into bitcoin:master from fametrano:bip39_word_separator changing 1 files +8 −0
  1. fametrano commented at 9:55 PM on August 5, 2026: contributor

    The BIP never says it. The rule exists — the Japanese wordlist page requires the ideographic space U+3000, added in #130 — but it is not in the BIP text, and the note there holds a caveat: ASCII and ideographic spaces are equivalent "as long as your code never shows the user an ASCII space separated phrase or tries to split the phrase input by the user".

    The reference implementation splits the input, on U+0020, and so cannot read back the Japanese sentences it writes: to_entropy raises on all 24 Japanese vectors of its own vectors.json. The fix of the reference implementation is open there: https://github.com/trezor/python-mnemonic/pull/145

    This adds three sentences to "From mnemonic to seed": the separator, the Japanese exception, and what it means for software that splits a sentence before normalizing it. No test vector changes, and nothing that is correct today becomes incorrect.

    Found downstream in btclib: btclib-org/btclib#258.

    🤖 Generated with Claude Code

  2. BIP-39: say what separates two words
    The BIP never says it. The rule is on the wordlist page, which requires
    the ideographic space for Japanese, and it is not quoted here; the note
    there also holds a caveat that ASCII and ideographic spaces are the same
    "as long as your code ... [does not try] to split the phrase input by
    the user". The reference implementation does split it, on U+0020, and so
    cannot read back the Japanese sentences it writes.
    
    No test vector changes.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    1dd18aa5b9
  3. murchandamus added the label Proposed BIP modification on Aug 5, 2026
  4. murchandamus added the label Pending acceptance on Aug 5, 2026
  5. fametrano commented at 10:07 PM on August 5, 2026: contributor

    If this lands and there is interest, I am happy to write the follow-up on the other half of the question: what a reader should do with whitespace that is not the separator — a leading or trailing space, the line break of a paper backup wrapped over two lines, a doubled space from a copy-paste.

    The BIP mandates NFKD and says nothing more, so implementations differ and the failure mode is quiet: to_seed hashes whatever it is given, so a sentence that a checksum check would reject still derives a seed — a valid-looking wallet that is not the user's. Two answers look defensible: refuse anything but the canonical single-space form, or collapse any run of whitespace after NFKD. No test vector changes under either; btclib, which I maintain, collapses.

    I left it out of this PR because it is new normative text rather than a clarification of what the wordlist page already requires, and it should not hold up the separator sentence. Glad to open it separately if the authors want it, or to drop it if the view is that a Deployed BIP should not grow new requirements.

  6. murchandamus commented at 10:08 PM on August 5, 2026: member

    cc authors: @prusnak, @ebfull, @slush0, @voisine

  7. prusnak commented at 3:07 PM on August 7, 2026: contributor

    On several occasions I raised my will that we should drop non-English wordlists from BIP39, but I was always blocked by editors.

    Since I am not able to edit my own standard, I don't really care about issues related to non-English use.

  8. fametrano commented at 3:42 PM on August 7, 2026: contributor

    prusnak I do understand your position, and I agree with you about English only.

    That said, I do care about fixing inconsistencies, and I would love it if your "I don't really care" could become an ACK.

    Also, the possible follow-up — what to do with whitespace that is not the separator, a leading or trailing space and so on — concerns English too, not just Japanese.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-20 04:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me