AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 21 Bitcoin

feat(core): add mock RNGs for MCU, Optiga and Tropic

Public commit record

What the developer wrote

Authored by Andrew Kozlik

77/100 · Adequate
feat(core): add mock RNGs for MCU, Optiga and Tropic

[no changelog]

Co-Authored-By: cepetr <petr@cerninovi.cz>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit adds deterministic (predictable) fake random-number generators for Trezor's software emulator only, so automated tests can reproduce exact outputs. It removes the old insecure-prng feature flag from production build paths and gates the new mocks behind emulator-only compile checks. The change is designed to keep fake randomness out of real hardware wallets, but it still increases the amount of insecure-prng code in the repository.

Recommended action

Verify that no production device target can compile the new mock files, that CI still rejects USE_INSECURE_PRNG in release builds, and that the removed insecure_prng feature is not silently reintroduced. Review whether the deleted production-build bail-out in add_insecure_prng needs a replacement guard elsewhere.

Security signals we found

01

Adds deterministic / predictable RNG implementations (insecure by design)

02

Removes the insecure_prng feature flag and the production-build bail-out that rejected it

03

Gates mock RNG code behind TREZOR_EMULATOR and USE_INSECURE_PRNG macros with multiple compile-time safety checks

04

Replaces centralized insecure PRNG with per-source mock streams so tests can verify each entropy source independently

05

No changelog entry ([no changelog])

Risk score

Why this scored 21/100

Our methodology →
Potential impact 2/30
Exploitability 2/25
Stealth signal 3/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.