Uh oh!
There was an error while loading. Please reload this page.
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. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tarcieri
commented
Mar 4, 2024
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 |
baloo
commented
Mar 4, 2024
well, we could do a I don't know how to write a migration guide without just copy pasting this implementation every time. |
tarcieri
commented
Mar 4, 2024
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() |
tarcieri
commented
Mar 4, 2024
I guess I should also mention: one of the goals of I would prefer not to continue to provide |
baloo
commented
Mar 4, 2024
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). |
tarcieri
commented
Mar 4, 2024
FWIW bringing back |
baloo
commented
Mar 4, 2024
well, it was in your branch? |
tarcieri
commented
Mar 4, 2024
I don't have a branch |
See example usage:
https://github.com/RustCrypto/AEADs/blob/d1a22983d2af3c6a1ac3644850351f0ab0a77e51/eax/src/online.rs#L352