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

replace lvgl rand

Public commit record

What the developer wrote

Authored by ww3512687

28/100 · Opaque
replace lvgl rand
✓ Subject identifies a change! No meaningful explanatory body
The short version

What changed, and why it matters

This commit swaps out the LVGL graphics library's pseudo-random number generator for the device's hardware true random number generator (TRNG) in two places: shuffling the on-screen numeric keypad and shuffling recovery-word lists. The old code used lv_rand, which is not designed for cryptographic security and may be predictable. Using a predictable shuffle could let an attacker who can see or guess the random sequence reduce the number of possible keypad layouts or word orders they must try, weakening protections for PIN entry or seed-phrase backup verification. The patch itself is a clear improvement, but it is small and we cannot verify from the diff alone whether the TRNG driver is correctly implemented or whether other sensitive code still uses lv_rand.

Recommended action

Verify that TrngGet is a properly seeded and audited hardware TRNG with adequate entropy for each call. Audit all remaining lv_rand and similar non-cryptographic RNG uses across the firmware and replace them in security contexts. Consider adding a small bias-removal step (e.g., rejection sampling) for the modulo reduction when range sizes are not powers of two. Review whether the shuffle outputs are observable by side channels (timing, display refresh) that could leak the TRNG output or resulting permutation.

Security signals we found

01

Replacement of non-cryptographic PRNG with hardware TRNG in security-sensitive shuffle routines

02

Fisher-Yates shuffle of on-screen PIN keypad now uses TrngGet

03

Fisher-Yates shuffle of mnemonic word array now uses TrngGet

04

Removal of lv_rand dependency from user_utils.c

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.