Skip to content

feat(rng): auditable entropy source, on-device dice, and no entropy display - #356

Closed
BitHighlander wants to merge 2 commits into
feature/715-14-taprootfrom
feature/715-15-entropy-rng-dice
Closed

feat(rng): auditable entropy source, on-device dice, and no entropy display#356
BitHighlander wants to merge 2 commits into
feature/715-14-taprootfrom
feature/715-15-entropy-rng-dice

Conversation

@BitHighlander

Copy link
Copy Markdown
Owner

7.15 review stack position 15/17.

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

Review scope: feat(rng): auditable entropy source, on-device dice, and no entropy display.

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

…isplay

RNG:
- The RNG source selection is explicit and reportable, and a host can pull bulk
  samples for a health audit: a per-boot 64 KB budget replaces the
  press-per-kilobyte prompt that made auditing real hardware impossible.
  Scope is stated honestly in the code and docs — bulk output supports HEALTH
  testing (stuck/biased output, repeated buffers, transport caching, gross
  correlation), not a bound on the entropy of the generator's internal state.
- On an uninitialized device, one press unlocks the bulk audit; on an
  initialized device the confirm still gates entropy after the budget is spent.
- The emulator gets a real CSPRNG (lib/emulator/random.c, BCryptGenRandom on
  Windows) instead of libc random(), which CI now enforces.

Dice:
- ResetDevice can request on-device dice entropy: short press advances 1-6,
  long press confirms, undo is available, and the roll digest is confirmed
  before the seed is mixed. Pre-initialization only.
- The abort path disarms EntropyAck, so an aborted reset can no longer leave the
  device accepting host-supplied entropy for the seed.
- Evidence frames under docs/security/evidence/dice-entropy-reset, reproducible
  with scripts/emulator/capture-dice-flow.py.

Internal entropy is no longer displayed or returned: it is seed pre-image
material. display_random stays in the wire schema for host compatibility and is
ignored.
@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-15-entropy-rng-dice 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