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

recommend check for the all-zero value after key agreement #378

Open
dhh1128 opened this issue Apr 23, 2022 · 1 comment
Open

recommend check for the all-zero value after key agreement #378

dhh1128 opened this issue Apr 23, 2022 · 1 comment
Labels
defer won't target for v2.0

Comments

@dhh1128
Copy link
Contributor

dhh1128 commented Apr 23, 2022

From @AnomalRoil :

For Curve25519, especially the X25519 key exchange, the RFC mention that a non-zero check can be done on the output, IMO this should be done in our usecase if we want to achieve our security goals. As per https://datatracker.ietf.org/doc/html/rfc7748#section-6.1:

Both MAY check, without leaking extra information about the value of K, whether K is the all-zero value and abort if so (see below)

This probably requires adding something to the spec, but it could be in the ECDH-1PU/ECDH-ES ones…
It would be something like “after key agreement, both parties should check the resulting key is non-zero”.

That being said there are arguments in the crypto community about whether or not this is necessary or not, some arguing it hurts security depending on your use-case / protocol…

@dhh1128
Copy link
Contributor Author

dhh1128 commented Apr 23, 2022

I am logging this but I recommend deferring for the time being.

@TelegramSam TelegramSam added the defer won't target for v2.0 label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defer won't target for v2.0
Projects
None yet
Development

No branches or pull requests

2 participants