Uh oh!
There was an error while loading. Please reload this page.
aead: adds a dev::MockBuffer to smoke test AEADs implementation - #1797
aead: adds a dev::MockBuffer to smoke test AEADs implementation#1797baloo wants to merge 1 commit into
dev::MockBuffer to smoke test AEADs implementation#1797Conversation
6686704 to
cece4dcComparebaloo
commented
Mar 14, 2025
Couldn't come up with anything better for the name. If you have ideas... |
tarcieri
commented
Mar 14, 2025
|
SplitBrainBuffer? DuplicatedBuffer? TwinBuffer? |
I don't think we need this new type. Instead, in my opinion it would be better to tweak the Also, cloning data to both input and output buffers looks wrong, since it leaves the window open for certain bug kinds. |
That doesn't really work though. Consumers expects the
Yeah, I agree that new_test should test that, but I would still need such a struct at the end of the day. |
The goal with proper It shouldn't matter what the output buffer is initialized to be, it should be completely overwritten. |
The idea behind the |
baloo
commented
Mar 14, 2025
I get that, but this one is not intended for production, this is to flush out |
And you are doing it incorrectly. With this type you would miss a bug with incorrect use of |
baloo
commented
Mar 14, 2025
I guess aes-gcm implementation is incorrect then because it really doesn't like me providing a zeroed output buffer. |
Well, it's not "incorrect". I think it just was written with the in-place mode of operation in mind (since it's the only mode we previously supported), so we would need a bit deeper changes for a proper |
baloo
commented
Mar 14, 2025
Well, zeroring the output buffer just shows a bug I introduced ^^ |
6899b1b to
21f6ecbComparedev::BicephalBuffer to smoke tests misuse of get_indev::MockBuffer to smoke test AEADs implementation21f6ecb to
27e6e5bComparebaloo
commented
Mar 14, 2025
Renamed it to |
6ec2392 to
f7ce5a9Comparef7ce5a9 to
a35c5daComparenewpavlov
commented
Mar 21, 2025
Closing in favor of #1802. |
As discussed in RustCrypto/AEADs#664, this introduces a
BicephalBufferwhose purpose is to provide two backing buffer for anInOutBufto flush out misuse ofget_in.