Skip to content

feat(storage): PIN KDF hardening, seed lock, BIP-85 and recovery fixes - #347

Closed
BitHighlander wants to merge 1 commit into
feature/715-05-zcash-orchard-enginefrom
feature/715-06-storage-bip85-recovery
Closed

feat(storage): PIN KDF hardening, seed lock, BIP-85 and recovery fixes#347
BitHighlander wants to merge 1 commit into
feature/715-05-zcash-orchard-enginefrom
feature/715-06-storage-bip85-recovery

Conversation

@BitHighlander

Copy link
Copy Markdown
Owner

7.15 review stack position 06/17.

This PR is intentionally one coherent commit, based on feature/715-05-zcash-orchard-engine, for individual auditing.
The full stack is linear from the clean fork develop at 1af2ffe.

Review scope: feat(storage): PIN KDF hardening, seed lock, BIP-85 and recovery fixes.

The preserved pre-restage candidate remains available at preserve/alpha-2026-08-05.

Storage:
- The PIN key-derivation function is versioned so its cost can be raised
  without breaking existing wallets, with the migration path documented in
  docs/security/pin-kdf-v19-migration.md.
- A wallet created by bitcoin-only firmware is stamped, and multi-chain
  firmware refuses to touch it (storage_isBitcoinOnlyLocked) rather than
  silently operating on a wallet whose owner chose a reduced attack surface.
- Storage layout reserves the clear-sign identity block and zeroes it on read
  and on wipe, so nothing there can outlive a factory reset.
- Orchard key derivation and seed fingerprinting are reachable through storage
  with progress reporting, guarded by the privacy build flag.
- docs/security/anti-rollback-security-epoch-rfc.md records the proposed
  security-epoch scheme; it is a design note, nothing here implements it.

BIP-85:
- GetBip85Mnemonic derives a child mnemonic and displays it under constant
  power, with PIN and initialization checks. Always available — it is a seed
  derivation, not a coin engine.

Recovery and authenticator:
- The cipher-recovery wordlist permutation now borrows the shared frame arena
  instead of another multi-kilobyte stack buffer.
- wipeAuthData reports failure instead of always claiming success, a cancelled
  authenticator action is distinguishable from an error, and a cancelled
  passphrase prompt aborts the request instead of continuing without one.
@BitHighlander

Copy link
Copy Markdown
Owner Author

Superseded by the smaller audit-ready 7.15 stack: #359 release foundation, #360 authenticated clear-signing, #361 recovery and entropy, #362 Zcash Orchard, #363 chain integrations, and #364 Bitcoin/release security. All release changes remain preserved in the replacement branches and preservation tags. The replacement aggregate was tree-verified against the prior release and passed the local CI-equivalent container suite (405 firmware, 2 board, 18 crypto, and 7 Pallas constant-time tests). GitHub-hosted checks have been explicitly dispatched and are currently queued.

@BitHighlander
BitHighlander deleted the feature/715-06-storage-bip85-recovery branch August 9, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant