GHSA-f6hc-9g49-xmx7

Source
https://github.com/advisories/GHSA-f6hc-9g49-xmx7
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/03/GHSA-f6hc-9g49-xmx7/GHSA-f6hc-9g49-xmx7.json
Aliases
Published
2023-03-01T22:36:36Z
Modified
2023-11-08T04:11:46.925268Z
Details

Multiplication of certain unreduced P-256 scalars produce incorrect results. There are no protocols known at this time that can be attacked due to this.

From the fix commit notes:

Unlike the rest of nistec, the P-256 assembly doesn't use complete addition formulas, meaning that p256PointAdd[Affine]Asm won't return the correct value if the two inputs are equal.

This was (undocumentedly) ignored in the scalar multiplication loops because as long as the input point is not the identity and the scalar is lower than the order of the group, the addition inputs can't be the same.

As part of the math/big rewrite, we went however from always reducing the scalar to only checking its length, under the incorrect assumption that the scalar multiplication loop didn't require reduction.

References

Affected packages

Go / filippo.io/nistec

Package

Affected ranges

Type
SEMVER
Events
Introduced
0The exact introduced commit is unknown
Fixed
0.0.2