Skip to content

Commit f3fefa5

Browse files
authored
docs: Make recovery safety advice clearer
Use plain language in security guidance and CLI help. Keep the security model's detailed constraints and correct the help test. refs #4
1 parent a5bf84c commit f3fefa5

4 files changed

Lines changed: 27 additions & 46 deletions

File tree

‎SECURITY.md‎

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
11
# Security
22

3-
codex32 handles wallet recovery material. A **trusted computer** is under your
4-
exclusive control, is not known or suspected to be compromised, and runs an
5-
operating system and other software you trust for the operation. For wallet
6-
work, that trusted software includes Python, codex32, the terminal,
7-
`bitcoin-cli`, Bitcoin Core, and their relevant configuration. Wallet encryption,
8-
application permissions, and RPC authentication do not make a compromised
9-
computer trusted. Have the
10-
software and recovery plan reviewed before relying on it with funds. For
11-
stronger isolation, keep the trusted computer disconnected from every network
12-
before, while, and after it handles private recovery or signing material.
3+
codex32 handles wallet backup and recovery secrets. Use a computer you control
4+
and whose software you trust. Malware can steal secrets even when the wallet is
5+
encrypted. Have the software and recovery plan reviewed before using real funds.
6+
For stronger isolation, keep the computer offline until you shut it down.
137

148
A valid checksum detects many copying mistakes. It does not prove that a backup
159
belongs to your wallet. A correction is only a suggestion; compare it with the
1610
physical backup and wallet information kept elsewhere.
1711

18-
Python, your terminal, and your operating system may retain secret text in
19-
memory or scrollback. codex32 does not intentionally save secrets and keeps
20-
them out of command arguments, logs, and unrelated output. Commands that create,
21-
recover, derive, correct, or explicitly export recovery material intentionally
22-
display it when that is their purpose. codex32 cannot guarantee that every copy
23-
is erased from swap, hibernation data, or crash dumps. Using Tails and shutting
24-
down when finished helps mitigate this Python limitation.
25-
26-
Run a command first and enter recovery material at its prompt, or redirect its
27-
standard input from a separately protected source. Do not embed recovery text in
28-
shell command text: shell history, terminal logging, wrappers, and process
29-
tooling may retain it even though codex32 never receives it as an argument.
12+
codex32 does not intentionally save secrets or put them in command arguments,
13+
logs, or unrelated output. Commands that create or recover backups may display
14+
the recovery text on purpose. Python and the operating system may retain copies
15+
in memory, terminal scrollback, or disk. Tails and shutdown reduce this risk.
16+
17+
Run a command first, then enter your recovery text when prompted. Do not put it
18+
in the command itself: your shell may save it in its history.
3019

3120
## Report a security problem
3221

‎docs/user/guide.md‎

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,18 @@ codex32 detects and reports the local Bitcoin Core network. You do not need to
8787
change `bitcoin.conf` when using the standard local data directory and RPC
8888
port.
8989

90-
Use a trusted computer: one under your exclusive control, not known or suspected
91-
to be compromised, with its operating system, Python environment, terminal,
92-
codex32, `bitcoin-cli`, Bitcoin Core, and relevant configuration trusted for the
93-
operation. Wallet encryption or RPC authentication does not make a compromised
94-
computer safe. An offline trusted computer stays disconnected from every network
95-
before, while, and after it handles private recovery or signing material. Only
96-
codex32 and Bitcoin Core should perform recovery, derivation, wallet
97-
initialization, or signing. The QR tools below transport only public descriptors
98-
or PSBTs.
99-
100-
Bitcoin Core wallet encryption is strongly recommended. Bitcoin Core owns the
101-
passphrase and its prompts; codex32 never asks for, reads, or forwards it.
102-
103-
Do not type recovery text on the same line as a command: shell history, terminal
104-
logging, wrappers, or process tooling may retain the command text. Run the
105-
command first, then enter a master seed or shares on the separate `>` line when
106-
prompted. Standard-input redirection also keeps recovery text out of process
107-
arguments, but protect the redirected source separately.
90+
Use a computer you control and whose software you trust. Malware can steal
91+
recovery material even from an encrypted wallet. For more protection, disconnect
92+
from all networks before entering secrets and stay offline until shutdown.
93+
Use codex32 to create or recover backups, and Bitcoin Core to manage your wallet,
94+
review transactions, and sign them. QR codes below carry only public wallet
95+
details or partially signed transactions.
96+
97+
Bitcoin Core wallet encryption is strongly recommended. Keep its passphrase
98+
safe; codex32 never asks for it.
99+
100+
Run the command first, then type your seed or shares at the `>` prompt. Never
101+
put recovery text in the command itself: your shell may save that text.
108102
This keeps a 48-character string grouped in fours within an 80-column terminal.
109103
Later share prompts may show a fixed common header after `>`. Never photograph
110104
recovery text or put it in a website, chat, cloud clipboard, or online QR

‎src/codex32/_cli_parser.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ def parser(prog: str = "codex32", *, master_seed: bool = False) -> argparse.Argu
8686
if master_seed
8787
else "Check, correct, recover, and derive shares from codex32 backups."
8888
),
89-
epilog="Never put a secret or share in command arguments or shell command text.\n"
90-
"Enter it when prompted; some commands also accept redirected standard input.\n"
91-
"Protect redirected files; shells and terminals may keep text.",
89+
epilog="Never put a secret or share in a command.\n"
90+
"Enter it when prompted. Some commands also accept piped input.",
9291
formatter_class=argparse.RawDescriptionHelpFormatter,
9392
allow_abbrev=False,
9493
)

‎tests/test_generic_hrp.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,8 @@ def test_cli_split_and_unknown_neutral_summary() -> None:
125125
" create create or confirm a backup, or split an existing secret\n"
126126
" wallet restore a Bitcoin Core wallet\n"
127127
" xprv export the root extended private key\n\n"
128-
"Never put a secret or share in command arguments or shell command text.\n"
129-
"Enter it when prompted; some commands also accept redirected standard input.\n"
130-
"Protect redirected files; shells and terminals may keep text.\n"
128+
"Never put a secret or share in a command.\n"
129+
"Enter it when prompted. Some commands also accept piped input.\n"
131130
)
132131
for command in ("check", "correct", "secret", "share"):
133132
assert command in generic_help and command in ms_help

0 commit comments

Comments
 (0)