diff options
author | jsing <> | 2014-06-24 18:12:09 +0000 |
---|---|---|
committer | jsing <> | 2014-06-24 18:12:09 +0000 |
commit | 6a9c4d13fc97c0ad186e4d15839ef568659ebf6f (patch) | |
tree | 77b512bc366b09aa3f9194007a50fa04d944872c /src/lib/libcrypto/comp/c_zlib.c | |
parent | 8bcb66ae2fbdc9abd5d6029738e23c72c75bad68 (diff) | |
download | openbsd-6a9c4d13fc97c0ad186e4d15839ef568659ebf6f.tar.gz openbsd-6a9c4d13fc97c0ad186e4d15839ef568659ebf6f.tar.bz2 openbsd-6a9c4d13fc97c0ad186e4d15839ef568659ebf6f.zip |
If a chacha operation does not consume all of the generated key stream,
ensure that we save it and consume it on subsequent writes. Otherwise we
end up discarding part of the key stream and instead generate a new block
at the start of the next write.
This was only an issue for callers that did multiple writes that are not
multiples of 64 bytes - in particular, the ChaCha20Poly1305 usage does not
hit this problem since it performs encryption in a single-shot. For the
same reason, this is also a non-issue when openssl(1) is used to encrypt
with ChaCha.
Issue identified by insane coder; reported to bugs@ by Joseph M. Schwartz.
ok beck@
Diffstat (limited to 'src/lib/libcrypto/comp/c_zlib.c')
0 files changed, 0 insertions, 0 deletions