feat: an "Allow weak passwords" setting lets a new wallet have a short password (closes #674)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

Settings gains a Passwords section with an "Allow weak passwords" checkbox. It
is off in a new profile, and only a stored true turns it on. While it is off,
AddWallet refuses a password shorter than 12 characters, as before. While it is
on, AddWallet accepts any password that is not empty. Key derivation is
unchanged.

The README describes the setting under Settings and AddWallet. Its Key
Decisions section now states the Argon2id parameters and why they are light.
The user guide lists the setting under Settings.

Model: opus-5-5
This commit is contained in:
2026-10-26 20:49:27 +00:00
parent bf8aa9f5dd
commit be3e82ded2
8 changed files with 149 additions and 12 deletions
+20 -9
View File
@@ -1787,18 +1787,20 @@ view would leave a wallet one click from deletion.
without it, the lost-password route on DeleteWallet is the first they
would hear of it. The hint line reserves its height, so switching tabs
cannot move the password fields under the pointer.
- The password needs at least 12 characters. With "Allow weak passwords"
ticked in Settings, one character is enough.
- "Import" button, with the error line beside it so that it adds no height
to a screen whose button already starts near the bottom of the popup
- **Transitions**:
- "Import" with a valid entry and a matching password of at least 12
characters → creates the wallet, clears the navigation stack, and →
**Home**. When no address is active yet, as on the first wallet, the new
wallet's first address becomes the active one. The phrase and xprv modes
then scan for further used addresses and report the count as a flash
message. When the scan finds two or more used addresses, they replace the
wallet's list, which then holds the first address only if it was used. If
the first address was active and is not in the new list, the new list's
first address becomes the active one and `AUTISTMASK_ACTIVE_CHANGED` is
- "Import" with a valid entry and a matching password that is long enough →
creates the wallet, clears the navigation stack, and → **Home**. When no
address is active yet, as on the first wallet, the new wallet's first
address becomes the active one. The phrase and xprv modes then scan for
further used addresses and report the count as a flash message. When the
scan finds two or more used addresses, they replace the wallet's list,
which then holds the first address only if it was used. If the first
address was active and is not in the new list, the new list's first
address becomes the active one and `AUTISTMASK_ACTIVE_CHANGED` is
broadcast.
- "Import" with a missing, short or mismatched password → full-sentence
error on the error line, no screen change
@@ -2235,6 +2237,10 @@ view would leave a wallet one click from deletion.
- Wallets: one row per wallet with its name (tap to rename inline), a
`[recovery phrase]` button on HD wallets only, and an `[x]` delete button,
plus a "+ Add wallet" button
- Passwords:
- "Allow weak passwords" checkbox, unticked until the user ticks it
- A sentence saying the setting lets the user choose a password shorter
than 12 characters on AddWallet
- Tracked Tokens: one row per token tracked on the active network with an
`[x]` remove button, plus a "+ Add token" button
- Display: "Show tracked tokens with zero balance" checkbox, "UTC
@@ -3061,6 +3067,11 @@ logged.
- The user's password is run through Argon2id (`crypto_pwhash`) to derive a
256-bit encryption key. Argon2id is memory-hard, making GPU/ASIC brute
force attacks expensive.
- Each use of the password runs one Argon2id derivation at libsodium's
interactive setting: `OPSLIMIT_INTERACTIVE` and `MEMLIMIT_INTERACTIVE`, 2
passes over 64 MiB. Every signature asks for the password, so a light
setting keeps signing quick. The password's length, not the derivation's
cost, is what protects the stored secret.
- The derived key encrypts the secret material using XSalsa20-Poly1305
(`crypto_secretbox`), which provides authenticated encryption (the
ciphertext cannot be tampered with without detection).