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

Change constant time and cache resistant ECC mulmod #2894

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

SparkiDev
Copy link
Contributor

Ensure points being operated on change to make constant time.

@@ -89,6 +89,30 @@ mp_digit get_digit(mp_int* a, int n)
return (n >= a->used || n < 0) ? 0 : a->dp[n];
}

int mp_cond_copy(mp_int* a, int copy, mp_int* b)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but please add a basic comment here describing why and what this does for ease of future maintenance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments added.

Ensure points being operated on change to make constant time.
@carnil
Copy link

carnil commented Apr 13, 2020

This pull request seem to have been associated with CVE-2020-11713.

@SparkiDev SparkiDev assigned toddouska and unassigned SparkiDev Apr 13, 2020
@SparkiDev
Copy link
Contributor Author

Yes, this pull request is based on the report.

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and looks good.

@toddouska toddouska merged commit 3cb0c60 into wolfSSL:master Apr 13, 2020
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.

None yet

4 participants