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

orion for cryptographic functionality #1

Merged
merged 8 commits into from
Jun 29, 2019
Merged

Conversation

brycx
Copy link
Collaborator

@brycx brycx commented Jun 29, 2019

This PR introduces several changes:

  • As previously discussed, this replaces the ring and chacha20-poly1305-aead dependencies with orion to provide XChaCha20Poly1305 and thereby also removes the internal HChaCha20 implementation.
  • Manual PartialEq implementation for the Branca type so that comparison on the secret key runs in constant-time.
  • Manual implementation of Debug to avoid the secret key leaking into logs.
  • Checking expired tokens (timestamp + ttl) is now done with checked_add to avoid a silent wrap-around on release builds.

@charleschege
Copy link

is it okay to use orion given that on its page author recommends not to use for production ?

@brycx
Copy link
Collaborator Author

brycx commented Jun 29, 2019

is it okay to use orion given that on its page author recommends not to use for production ?

That's a very valid concern. I am the author of orion. The warning about production use comes mainly from the fact, that there has not been a third-party security audit done on any current version of the library. It's also relatively new and has not seen that much use yet. If you're interested in the security and testing of it, I can recommend looking at the wiki.

I have been in touch with @return about using orion and we settled upon me opening this PR.

@return
Copy link
Owner

return commented Jun 29, 2019

@charleschege As with several other Rust cryptography crates, I will have to put a warning notice up for using branca in a production environment since orion doesn't have a formal security audit yet. @brycx aims for orion to have a security audit soon.

But in comparison to the previous crate that was used, orion is actively maintained and supports the full XChaCha20-Poly1305 construction in pure rust which was a hard requirement that was needed in branca. Which was the reason why I chose to use orion.

@brycx Thanks for your pull request and I'll squash your commits and merge this in now.

@return return merged commit dffedfe into return:master Jun 29, 2019
@brycx brycx deleted the prototype branch July 6, 2019 06:31
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

Successfully merging this pull request may close these issues.

3 participants