perf(k12): remove redundant 8KiB buffer zeroing in process_chunk#761
perf(k12): remove redundant 8KiB buffer zeroing in process_chunk#761Galoretka wants to merge 2 commits intoRustCrypto:masterfrom
Conversation
I would feel better about that if there were a |
|
I wonder why the implementation simply does not use |
|
@newpavlov IIUC, the block size is implicitly |
corrected |
|
Oof, sorry this one went by the wayside. @Galoretka can you rebase? |
The buffer was zeroed after each full chunk in KangarooTwelveCore::process_chunk(). This is unnecessary because subsequent reads only consume [..bufpos] and bufpos is reset to 0. Removing the memset avoids extra work on long inputs and aligns with the project’s pattern of cleaning sensitive data via Drop under the zeroize feature.