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] Adjust error handling in P-384. #25390

Merged

Conversation

jadephilipoom
Copy link
Contributor

This is a manual cherry-pick of #25329.

Return a bad status code rather than a fault when the public key or signature
is invalid (like P-256). Otherwise, OTBN would lock; it's better to fail
gracefully on bad input.

Signed-off-by: Jade Philipoom <[email protected]>
(cherry picked from commit 1c9535d)
Now that we have the IMEM space for it, it makes sense to push point-validity
checks closer to the use of the point in ECDSA verify and ECDH. This removes a
lot of places where the validity check and point use are decoupled, which could
lead to security holes. It also simplifies the code quite a bit and saves a
chunk of code size.

Signed-off-by: Jade Philipoom <[email protected]>
(cherry picked from commit 810945a)
@jadephilipoom jadephilipoom requested a review from a team as a code owner November 26, 2024 08:59
@moidx moidx removed the request for review from a team November 27, 2024 07:15
@moidx moidx merged commit a08dcef into lowRISC:earlgrey_1.0.0 Dec 12, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants