Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

consensys/gnark-crypto
master @ 7739041
10
Fixes
0
CVEs
HIGH
Peak severity
25.0%
Coverage
Highlights
Cryptographic Issues: 8 prior fixes. Scrutinize any change in this area.
ecc/fr/mimc: most-fixed (2 issues). Treat as high-risk during review.
8 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Cryptographic Issues: Lack of strict checks on signature components (R and S) and their ranges during deserialization and public key recovery can lead to acceptance of invalid signatures or malleability attacks. Developers must guarantee that signature coordinates are strictly bounded and non-zero.
Cryptographic Issues: Deserializing elliptic curve points without validating that they belong to the correct subgroup allows invalid curve or subgroup attacks, compromising the security of protocols built on top of the library.
Cryptographic Issues: Insufficient round counts or loose input constraints (non-canonical field elements, unaligned blocks) on custom cipher constructions like MiMC expose the hash functions to cryptanalysis or invalid states.