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

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

Public commit record

What the developer wrote

Authored by M1nd3r

62/100 · Adequate
chore(core): add consteq check directly into aesgcm.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 Trezor devices verify AES-GCM authentication tags during decryption. Previously, callers computed the tag and then compared it separately using a constant-time helper. Now the comparison is performed inside the cryptographic finish routine itself, using a constant-time equality check. This reduces the risk that a future caller forgets to verify the tag or uses a non-constant-time comparison, which could allow an attacker to tamper with encrypted messages or recover secrets through timing analysis.

Recommended action

Review other AES-GCM callers in the codebase to ensure they also use the new finish(expected_tag) API and do not perform tag verification separately. Confirm that consteq() is implemented correctly and that the tag buffer is cleared on authentication failure to avoid leaking the computed tag.

Security signals we found

01

AES-GCM tag verification moved into the cryptographic primitive

02

Constant-time comparison (consteq) enforced for authentication tags

03

expected_tag made mandatory during decryption state

04

Manual tag comparisons removed from Python callers

05

Potential defense against forgotten or timing-vulnerable tag checks in future code

Risk score

Why this scored 47/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/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.