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

chore(core): add consteq check directly into chachapoly.finish when decrypting

Public commit record

What the developer wrote

Authored by M1nd3r

62/100 · Adequate
chore(core): add consteq check directly into chachapoly.finish when decrypting

[no changelog]
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
The short version

What changed, and why it matters

This commit hardens how a Trezor hardware wallet checks the authentication tag when decrypting data protected by the ChaCha20-Poly1305 cipher. Previously, the Python caller compared the expected tag with the computed tag using a helper called utils.consteq. Now the comparison is done inside the low-level C module using a constant-time equality function, and decryption callers must pass the expected tag directly to finish(). This reduces the risk of a developer forgetting to verify the tag or using a non-constant-time comparison, which could let an attacker tamper with encrypted secrets.

Recommended action

Review all other Python callers of chacha20poly1305.finish() to ensure they now supply the expected MAC during decryption and no longer rely on external tag comparisons. Verify that consteq.h provides a truly constant-time implementation on the target architecture. Consider adding unit tests for missing/invalid MAC and for state-machine misuse.

Security signals we found

01

Constant-time MAC comparison added inside cryptographic module

02

Mandatory expected MAC argument when decrypting

03

State machine added to ChaCha20Poly1305 object to prevent misuse

04

Removal of external Python-side tag comparison in WebAuthn credential decryption

05

Potential prior vulnerability: missing or incorrect tag verification could allow ciphertext forgery

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.