Fix diffie hellman computation#177
Conversation
|
Thanks for the fast merging! We have a security audit we would like to share with you. As this MR solved the only issue ( 🎉 ), we could directly include the fix. For that we would need a release first. Otherwise, we can share the audit as it is. Please tell me your preference. On a side note, the security advisory URL https://github.com/RustCrypto/nacl-compat/security/advisories/new is broken. How should we send you the audit? |
Will try to cut a new release soon
Please open a separate issue with screenshots that illustrate whatever problem you're having. The link works for me. |
|
This change actually breaks basic usage with |
|
Not sure what to do about that. We may need to add first-class support for Ed25519. |
|
what I don't quite understand is why does this fail in conjunction with |
|
I believe it's because the Ed25519 scalar has already been clamped. Clamping can make the Edwards -> Montgomery equivalence somewhat difficult to use |
crypto_boxcurrently uses the*operator directly to multiply thesecret_key.scalarand thepublic_key.0.This results in a minor incompatibility with libsodium, especially for specially drafted public keys.
This MR adds
test-vector-gen/src/crypto_box.rs. This test is taken from bleichenbacher-daniel/Rooterberg.To reproduce the issue, clone this repository, and run the tests.