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

Verification comparison is not constant time #21

Closed
djc opened this issue Oct 10, 2019 · 1 comment
Closed

Verification comparison is not constant time #21

djc opened this issue Oct 10, 2019 · 1 comment

Comments

@djc
Copy link
Contributor

djc commented Oct 10, 2019

This implementation's verify_raw() function doesn't make any attempt to use constant-time comparison, opening up the potential for side-channel attacks:

https://github.com/sru-systems/rust-argon2/blob/master/src/argon2.rs#L543

The reference implementation does attempt to make the comparison constant-time:

https://github.com/P-H-C/phc-winner-argon2/blob/f30e1f11f2e2619f07a4950abe1419218c4900be/src/argon2.c#L239

(As far as I can tell, the spec does not explicitly mention a requirement for this.)

@djc
Copy link
Contributor Author

djc commented Dec 26, 2019

Thanks!

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

No branches or pull requests

1 participant