-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
…ly wrapping around
…leaking into debug
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. |
@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. |
This PR introduces several changes:
ring
andchacha20-poly1305-aead
dependencies withorion
to provide XChaCha20Poly1305 and thereby also removes the internal HChaCha20 implementation.PartialEq
implementation for the Branca type so that comparison on the secret key runs in constant-time.Debug
to avoid the secret key leaking into logs.timestamp + ttl
) is now done withchecked_add
to avoid a silent wrap-around on release builds.