-
Notifications
You must be signed in to change notification settings - Fork 4
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
bring back zip
methods
#60
Conversation
The only purpose of using a trait here is to limit API breakage with Now I comment on it, I kind of feel I should have gone with a straight |
Yes, these should just be inherent methods. No It'd also be good to update the migration guide. |
Perhaps we can just add |
Alternative to RustCrypto#60
I'm not sure this really deserves its own module either, especially if it's just |
well, we could do a I don't know how to write a migration guide without just copy pasting this implementation every time. |
Where is it actually being used? If we do add it, I think it should be deprecated. |
generic-array: hybrid-array (earlier implementation): |
Yikes, that's gross! let full_tag = self.nonce.zip(h, |a, b| a ^ b).zip(c, |a, b| a ^ b);
Tag::<M>::clone_from_slice(&full_tag[..M::to_usize()]) It looks like it could be replaced by something like: self.nonce.into_iter().zip(h, |a, b| a ^ b).take(M::to_usize()).collect() |
I guess I should also mention: one of the goals of I would prefer not to continue to provide |
the only benefit I've seen from having a zip implementation was the enforcement of the sizes. But in the case of eax, this is enforced externally (message and data being the same size / type). |
FWIW bringing back |
well, it was in your branch? |
I don't have a branch |
See example usage:
https://github.com/RustCrypto/AEADs/blob/d1a22983d2af3c6a1ac3644850351f0ab0a77e51/eax/src/online.rs#L352