Commit cd2d1e28 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Niels Möller
Browse files

ctr16: fix encryption if src == dst

parent 7b4d6de8
2018-10-10 Dmitry Eremin-Solenikov <>
* ctr16.c (_ctr_crypt16): Bugfix for the src == dst case, when
processing more than on full block of size CTR_BUFFER_LIMIT, src
and dst arguments to memxor3 were not properly updated.
2018-10-10 Niels Möller <>
* aes-set-encrypt-key.c: Add missing include of stdlib.h.
......@@ -91,7 +91,7 @@ _ctr_crypt16(const void *ctx, nettle_cipher_func *f,
f(ctx, CTR_BUFFER_LIMIT, buffer->b, buffer->b);
if (length - i < CTR_BUFFER_LIMIT)
goto done;
memxor3 (dst, src, buffer->b, CTR_BUFFER_LIMIT);
memxor3 (dst + i, src + i, buffer->b, CTR_BUFFER_LIMIT);
if (blocks > 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment