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

Merge pull request #2260 from KeystoneHQ/replace-lvgl-rand

Public commit record

What the developer wrote

Authored by Soralit

58/100 · Thin
Merge pull request #2260 from KeystoneHQ/replace-lvgl-rand

replace lvgl rand
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit replaces the on-screen keyboard shuffle and a word-list randomizer so they use the device's true random-number generator (TRNG) instead of LVGL's weaker pseudo-random function. The change is defensive: it removes a source of predictable randomness that could, in theory, make shuffled PIN layouts or recovery-phrase ordering easier to guess or reproduce.

Recommended action

Treat as a security-hardening fix. Verify that `TrngGet()` is properly seeded/initialized and that its output is suitable for cryptographic use. Audit other callers of `lv_rand()` for similar bias or predictability issues, and consider adding unit tests for shuffle uniformity and TRNG failure handling.

Security signals we found

01

Replaced pseudo-random generator with hardware TRNG in security-sensitive shuffle operations

02

Removed fixed-range modulo reduction bias source (`lv_rand(0, 2048) % n`)

03

Changed include from LVGL UI library to device TRNG driver in utility code

04

Targets PIN keypad layout randomization and mnemonic/seed word ordering

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/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.