-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: use constant-time equality checking for DHKE #232
Conversation
2dab023
to
9740715
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the intention to use this type is good, I think this type mostly is unused. It adds very little apart from being a marker trait. I feel that now that we are adding code to make it less vulnerable means that it is more harm than good. I would suggest that we instead delete this type and it's usages and replace them with the standard public key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NACK
sorry, this PR is fine, but I think the type should be deleted instead |
@stringhandler I get where you're coming from, but the intent isn't for this to simple be a Removing the type and simply using a As to this PR specifically, it was noted in #219 that while we can require constant-time equality support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing this offline, I'm happy to merge it
This PR ensures that
DiffieHellmanSharedSecret
equality testing is done in constant time.Previously, this equality testing was offloaded to the underlying
PublicKey
type. While this type supports theConstantTimeEq
trait, it is not guaranteed that equality testing will use this in all implementations.