diff options
author | Kevin Jones <kevin@vcsjones.com> | 2021-05-08 01:45:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-08 01:45:02 +0300 |
commit | 74cafe71de68fac46cd4956da98387bce9e1043c (patch) | |
tree | 45efb3134e5789d896e8527f6e2428c922aeaf64 /eng/generators.targets | |
parent | 28cff50994cf8246d2b0fd07fa5a617fc474786c (diff) |
Fix over-zeroing of destination buffer with PaddingMode.Zeros
This addresses two issues with how zero padding is handled.
The first is performance. When applying zero padding, we were clearing
the entire destination, then copying the plaintext over it. We were
zeroing more data than required, the only data that needed to be zeroed
is where the zero padding is applied.
The second is in the case of overlapping buffers for the plaintext
and ciphertext. However, this cannot happen currently since we always
ensure the destination buffer does not overlap the input buffer.
If overlapping is permitted in a future change, this would clear the
plaintext, not just where padding is required.
Diffstat (limited to 'eng/generators.targets')
0 files changed, 0 insertions, 0 deletions