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 sampling of DLEQ challenge #66

Closed
alxdavids opened this issue Feb 7, 2020 · 2 comments
Closed

Fix sampling of DLEQ challenge #66

alxdavids opened this issue Feb 7, 2020 · 2 comments
Assignees

Comments

@alxdavids
Copy link
Collaborator

The sampling of the DLEQ challenge value (c) is currently performed as the output of a SHA-512 evaluation for all supported ciphersuites. However, in the case of P-521, this is incorrect, as the size of the field is 521 bits.

We should update the draft specification to output this challenge as the output of an HKDF-Expand so that we can expand the output arbirtarily to the required number of bytes.

@alxdavids alxdavids self-assigned this Feb 7, 2020
@armfazh
Copy link
Collaborator

armfazh commented Feb 7, 2020

A similar discussion is currently running in the hash-to-curve draft. In there, the hash-to-field function is being designed.

cfrg/draft-irtf-cfrg-hash-to-curve#202

alxdavids added a commit that referenced this issue Feb 10, 2020
- Use HKDF-Expand-SHA512 for sampling scalars in DLEQ
- Fixes #66
alxdavids added a commit that referenced this issue Feb 10, 2020
- Use HKDF-Expand-SHA512 for sampling scalars in DLEQ
- Fixes #66
@alxdavids
Copy link
Collaborator Author

alxdavids commented Feb 10, 2020

@armfazh It would be good to get consensus on the best approach once the discussion is concluded. Until then I've written a PR that just uses HKDF-Expand-SHA512 instead of sampling using SHA512.

chris-wood pushed a commit that referenced this issue Mar 2, 2020
- Use HKDF-Expand-SHA512 for sampling scalars in DLEQ
- Fixes #66
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

2 participants