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

chore(crypto): ecdsa uncompres_coords input check

Public commit record

What the developer wrote

Authored by M1nd3r

80/100 · Strong
chore(crypto): ecdsa uncompres_coords input check

- Calling `uncompres_coords` will now return 0 (error) if the input `x` is a non-residue (has no sqrt) - as non-residue `x` results in an invalid `y` value. In case of failure, `y` is zeroed-out.
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit hardens the Trezor firmware's elliptic-curve cryptography by making a low-level coordinate-decompression function validate its inputs. Previously, if a compressed public key or signature-recovery value pointed to an x-coordinate that does not correspond to any valid point on the curve, the function could silently produce a meaningless y-coordinate. The change now returns an error and clears the result, preventing downstream code from acting on invalid curve points. The commit message frames this as a routine code-quality improvement ('chore'), not as a security fix.

Recommended action

Treat this as a defensive hardening change worth including in security-focused release notes, even though the vendor labeled it as a chore. Review whether any other callers of `uncompress_coords()` (including in downstream forks or older branches) still ignore the return value, and ensure the new tests are run in CI. Consider whether invalid public keys could previously have reached `ecdsa_validate_pubkey()` with an unreduced or non-residue x and whether that had any exploitable consequence in higher-level protocols.

Security signals we found

01

Input validation added to elliptic-curve point decompression

02

Non-quadratic-residue x coordinates now rejected instead of producing invalid y

03

Out-of-range x coordinates (x >= p) now rejected

04

Failure path zeroes output y coordinate

05

Downstream callers updated to treat failure as an error condition

06

Commit message uses 'chore' label, not 'fix' or 'security'

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.