chacha20-poly1305: fix wrong en/decryption on large input buffers
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 26 Mar 2019 17:27:00 +0000 (19:27 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 26 Mar 2019 17:27:00 +0000 (19:27 +0200)
commit049376470b31832d3331fc0037d273b4147e9d38
tree67bad245b345e4798011f0a95fc7059f3d8722ad
parentbb03edcbba95e06686188957a65c1967ee07cd6a
chacha20-poly1305: fix wrong en/decryption on large input buffers

* cipher/chacha20.c (_gcry_chacha20_poly1305_encrypt)
(_gcry_chacha20_poly1305_decrypt): Correctly use 'currlen' for chacha20
on the non-stitched code path.
--

This patch fixes bug which was introduced by commit:
  "Add stitched ChaCha20-Poly1305 SSSE3 and AVX2 implementations"
  d6330dfb4b0e9fb3f8eef65ea13146060b804a97

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/chacha20.c