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

compatibility-breaking crypto improvements #59

Open
warner opened this issue Oct 30, 2018 · 2 comments
Open

compatibility-breaking crypto improvements #59

warner opened this issue Oct 30, 2018 · 2 comments

Comments

@warner
Copy link
Collaborator

warner commented Oct 30, 2018

In #58 we noted that our symmetric encryption primitive (XSalsa20/Poly1305) is pretty much only used in libsodium, and the rest of the world (i.e. RFC7539 and ring's AEAD construction thereof) has moved to ChaCha20. Libsodium is a nuisance to use from Rust (since it's an FFI binding to a C library that takes some manual effort to build), so a short-term effort is to run a pure-rust XSalsa20 crate that's compatible with SecretBox.

But the long-term hope would be to move to ChaCha20 and RFC7539 (maybe Noise uses this?). That's a compatibility break, so I want to batch together all the other breaking crypto changes we might want to make and do them all at the same time, since as we all know version negotiation should happen just once at the highest level of a protocol, and it should be on a number instead of a matrix of individual features.

So this ticket is to collect the crypto changes we might want to make. Some others to consider:

  • get a PAKE pattern into Noise and use that instead of our initial setup protocol
  • replace Transit with Noise (although the new Dilation protocol already does this)
  • if we ever manage to establish a better encoding format or well-known-element selection process for SPAKE2, switch to that flavor for the PAKE phase
@warner
Copy link
Collaborator Author

warner commented Aug 12, 2019

see also magic-wormhole/magic-wormhole#348

@warner
Copy link
Collaborator Author

warner commented Sep 3, 2019

Also:

  • switch to the original M != N flavor of SPAKE2, by computing both the "A" side and the "B" side at the same time (different random scalars, of course), and putting both PAKE messages into the initial payload, along with the random "side" value. Upon receipt, compare sides to see which role you're playing, and proceed with only one of the two PAKE messages. This doubles the CPU of the initial step, but doesn't need a roundtrip, and lets us stick with the original security proof.

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