-
Notifications
You must be signed in to change notification settings - Fork 47
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
Document chacha20 and salsa20 crates (closes #17) #37
Conversation
Improve rustdoc with examples and add a `README.md` to each crate
//! assert_eq!(data, [73, 98, 234, 202, 73, 143, 0]); | ||
//! | ||
//! // (re)create cipher instance | ||
//! let mut cipher = ChaCha20::new(&key, &nonce); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had originally tried to use SyncStreamCipherSeek
here only to discover that it appears to be broken 😰
I'll open an issue about that and try to fix it or remove the impl for now. If I'm able to fix it I will update these docs to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why it would be nice to use test macros from stream-cipher
. It has new_seek_test!
specifically for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'll look into those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses a custom binary format for test vectors, you can convert it using code here. (I need to document it properly one day...)
@@ -9,8 +9,8 @@ | |||
//! it either by using `RUSTFLAGS="-C target-feature=+aes,+ssse3"` or by editing | |||
//! your `.cargo/config`. (`sse2` target feature is usually enabled by default) | |||
//! | |||
//! # Warning | |||
//! This crate does not provide any authentification! Thus ciphertext integrity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed all of these, mainly because "authentification" is somewhat peculiar (I'd normally call it "authentication")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a common misspelling for many Europeans. :)
Improve rustdoc with examples and add a
README.md
to each crate