From 3203c48cff69409dcb0f9c1cb8830470745910a8 Mon Sep 17 00:00:00 2001 From: Mladen Milankovic Date: Fri, 30 Oct 2026 15:23:36 +0100 Subject: [PATCH] Explain old Windows passphrase entry in seed recover Before the passphrase prompt, seed recover tells users whose wallet was set up on Windows with version 1.0.5 or earlier how to enter the passphrase: without the characters outside ASCII for 1.0.4 and 1.0.5, without a passphrase when it was pasted with Ctrl+V into the classic console, and through support for 1.0.3 and earlier. The documentation gets the full rule with its exceptions, and the prompt links to it. Co-Authored-By: Claude Fable 5.1 --- CHANGELOG.rst | 1 + cryptnox_cli/command/helper/ui.py | 13 ++++++++++++- cryptnox_cli/command/seed.py | 2 +- docs/cli.rst | 18 ++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fe9adc9..f7542c2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,7 @@ Added - CI runs flake8, pylint and the dependency license check on Python 3.14 - Dependabot opens update pull requests for the GitHub Actions every week and for the Python dependencies every month; minor and patch updates come grouped in one pull request per ecosystem, major updates one by one, and a release is proposed once it is seven days old - ``NOTICES.md`` and the license texts of code from other projects are included in the package; the Windows installer installs them together with the licenses of the bundled Python packages +- ``seed recover`` explains, before the passphrase prompt, how to enter the passphrase of a wallet set up on Windows with version 1.0.5 or earlier; the documentation has the details Changed ^^^^^^^ diff --git a/cryptnox_cli/command/helper/ui.py b/cryptnox_cli/command/helper/ui.py index 440dfd3..ae4384d 100644 --- a/cryptnox_cli/command/helper/ui.py +++ b/cryptnox_cli/command/helper/ui.py @@ -207,7 +207,7 @@ def _verify_input(card: cryptnox_sdk_py.Card, method, text, verify_text, return value -def get_bip39_passphrase(confirm_required: bool = True) -> str: +def get_bip39_passphrase(confirm_required: bool = True, recovery: bool = False) -> str: print() print_warning("BIP39 PASSPHRASE FEATURE") print("A BIP39 passphrase is an optional extra password that provides additional security.") @@ -220,6 +220,17 @@ def get_bip39_passphrase(confirm_required: bool = True) -> str: print(" • Press ENTER to skip passphrase (standard BIP39 with empty passphrase)") print() + if recovery: + print_warning("WALLET SET UP ON WINDOWS WITH VERSION 1.0.5 OR EARLIER?") + print("The passphrase prompt of those versions did not keep characters outside ASCII") + print("(accented letters, symbols, emoji). To open such a wallet:") + print(" • Set up with 1.0.4 or 1.0.5: enter the passphrase without those characters") + print(" • Pasted with Ctrl+V into the classic console: no passphrase was stored, answer No") + print(" • Set up with 1.0.3 or earlier: the characters were stored changed; contact support") + print("Then move the funds to a wallet created with this version.") + print("Details: https://docs.cryptnox.com/cryptnox-cli/cli.html#windows-passphrase") + print() + use_passphrase = confirm("Do you want to use a BIP39 passphrase?") passphrase = "" diff --git a/cryptnox_cli/command/seed.py b/cryptnox_cli/command/seed.py index a74f110..506c118 100644 --- a/cryptnox_cli/command/seed.py +++ b/cryptnox_cli/command/seed.py @@ -221,7 +221,7 @@ def _recover(card: cryptnox_sdk_py.Card) -> int: mnemonic = ui.input_with_exit("> ") try: - passphrase = ui.get_bip39_passphrase(confirm_required=True) + passphrase = ui.get_bip39_passphrase(confirm_required=True, recovery=True) except ui.ExitException as error: print(error) return -1 diff --git a/docs/cli.rst b/docs/cli.rst index 25617d4..8804ef6 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -582,6 +582,24 @@ If your wallet was created with a passphrase, you **must** provide the same pass - ✅ Same mnemonic + different passphrase = completely different wallet - ✅ Passphrase can be any UTF-8 string (including spaces and special characters) +.. _windows-passphrase: + +Wallets set up on Windows with version 1.0.5 or earlier +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Up to version 1.0.5 the passphrase prompt on Windows did not keep characters outside ASCII, such as accented letters, Cyrillic or CJK characters, symbols and emoji. The card works, but the passphrase as written down restores a different wallet. ``seed recover`` points to this section before it asks for the passphrase. Linux and macOS are not affected. + +Versions 1.0.4 and 1.0.5 dropped every such character that the console's code page contains, so the passphrase that opens the wallet is the one with those characters removed. Exceptions: + +- A character the code page does not contain became a question mark or a similar plain character, such as ``o`` for ``ő``, and that character is part of the stored passphrase. +- On a Chinese, Japanese or Korean console a character could leave one ASCII character behind, such as a backslash. +- Pasted into the classic console with right-click, symbols and emoji arrived as nothing; pasted into Windows Terminal, an emoji became two question marks. +- Pasted into the classic console with Ctrl+V, nothing arrived: the wallet was set up without a passphrase. Answer ``No`` when ``seed recover`` asks whether to use one. + +Version 1.0.3 and earlier stored a character the code page contains as a different character, so such a wallet opens neither with the passphrase as written nor with those characters removed. Contact Cryptnox support. + +Once the wallet is open, move the funds to a wallet created with the current version, so that the written-down passphrase is the one that restores it. + Exit Codes ----------