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

cipher: remove unused AES-HMAC C exports

Public commit record

What the developer wrote

Authored by benma's agent

78/100 · Adequate
cipher: remove unused AES-HMAC C exports

The keystore calls the AES-HMAC implementation directly from Rust. No
C caller needs the wrappers, which can panic if given an invalid IV
length or an undersized output buffer.

Remove both C exports and their binding and link configuration. Drop
the redundant test import and direct AES dependencies in the device
tests and graphical simulators. The keystore continues to use the same
Rust encryption and decryption functions.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit removes two unused C-language bridge functions that wrapped an AES-HMAC encryption/decryption module. The functions themselves were not called from C code; the firmware now calls the same encryption logic directly from Rust. Removing them eliminates the risk that someone might later misuse these wrappers with a wrong input size, but the change does not fix any currently exploitable vulnerability.

Recommended action

No immediate action required. Treat as routine defensive cleanup. If these wrappers were ever intended to be reintroduced, ensure input-length validation and safe buffer sizing rather than relying on unwrap/try_into panics.

Security signals we found

01

Removal of C FFI wrappers that could panic on malformed inputs

02

Commit message acknowledges potential panic conditions (invalid IV length, undersized output buffer)

03

No functional change to the underlying AES-HMAC implementation

04

No replacement callers or new attack surface introduced

Risk score

Why this scored 17/100

Our methodology →
Potential impact 5/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/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.