Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto/elliptic: incorrect operations on the P-224 curve #43786

Closed
rolandshoemaker opened this issue Jan 19, 2021 · 3 comments
Closed

crypto/elliptic: incorrect operations on the P-224 curve #43786

rolandshoemaker opened this issue Jan 19, 2021 · 3 comments

Comments

@rolandshoemaker
Copy link
Member

@rolandshoemaker rolandshoemaker commented Jan 19, 2021

The P224() Curve implementation can in rare circumstances generate incorrect outputs, including returning invalid points from ScalarMult.

The crypto/x509 and golang.org/x/crypto/ocsp (but not crypto/tls) packages support P-224 ECDSA keys, but they are not supported by publicly trusted certificate authorities. No other standard library or golang.org/x/crypto package supports or uses the P-224 curve.

The incorrect output was found by the elliptic-curve-differential-fuzzer project running on OSS-Fuzz and reported by Philippe Antoine (Catena cyber).

This issue is CVE-2021-3114.

@JasonGross
Copy link

@JasonGross JasonGross commented Jan 20, 2021

Would #40171 solve the issue? (I can point at the relevant Go code in fiat-crypto if that would help with integration/testing.)

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Jan 20, 2021

I think the issue is already fixed in today's security fix releases for Go 1.14 and Go 1.15; e.g., 5c8fd72. Presumably the same fix will be ported forward for Go 1.16.

Looking at the fix, it does seem like #40171 would have prevented it.

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 20, 2021

Change https://golang.org/cl/284779 mentions this issue: crypto/elliptic: fix P-224 field reduction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants