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

Document chacha20 and salsa20 crates (closes #17) #37

Merged
merged 1 commit into from
Aug 16, 2019

Conversation

tarcieri
Copy link
Member

Improve rustdoc with examples and add a README.md to each crate

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);
Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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
Copy link
Member Author

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")

Copy link
Member

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. :)

@tarcieri tarcieri merged commit d6246f7 into master Aug 16, 2019
@tarcieri tarcieri deleted the salsa-family-docs branch August 16, 2019 20:27
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.

None yet

2 participants