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

Fix PublicKey.Equals against tming attacks #23

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

ostcar
Copy link
Contributor

@ostcar ostcar commented Feb 1, 2022

The current code has a very small vulnerability against timing attacks. If k.x and pub.X is not equal, then k.Y == pub.Y is not checked. So the code returns faster, when the X attribute is different then when it is equal.

@savely-krasovsky
Copy link
Member

Nice catch!

@savely-krasovsky savely-krasovsky merged commit e5bfb18 into ecies:master Feb 2, 2022
@ostcar ostcar deleted the public_key_equals branch February 2, 2022 10:32
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.

2 participants