Uh oh!
There was an error while loading. Please reload this page.
Poly1305 refactor - #48
Merged
Merged
Conversation
str4d
commented
Mar 28, 2020
ContributorAuthor
See str4d/rage#57 (comment) for an indication of the effect of this PR on ChaCha20Poly1305 performance. |
This path will be taken if the caller is exclusively using the UniversalHash trait. The original path might be taken if they are mixing in calls to Poly1305::update, which might result in partial blocks.
When zeroize is enabled, Poly1305 implements Drop, and because soft::Poly1305State does not implement Copy, we cannot move it out of Poly1305.
| use crate::{Tag, BLOCK_SIZE}; | ||
| #[derive(Clone)] | ||
| pub(crate) struct Poly1305State { |
Member
There was a problem hiding this comment.
I think I'd prefer State to Poly1305State in the spirit of RFC#356 (although that deals specifically with modules, and not necessarily the name of the parent crate)
ContributorAuthor
There was a problem hiding this comment.
Sounds good; I'll make this change in the next PR.
tarcieri
commented
Mar 29, 2020
Member
Will go ahead and merge this. If you agree with |
Merged
str4d added a commit
to str4d/rage
that referenced
this pull request
Nov 3, 2020
Improves throughput benchmarks by ~20%, due to a refactor included in poly1305 0.6: RustCrypto/universal-hashes#48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the implementation more readable, sets the ground for #46, and also improves performance a bit!