diff --git a/ChangeLog b/ChangeLog index fdc4a0f13e34369a8d4a295af64f3ded99615d87..a1030c95c14aa8a2ac3d41eeeea90aa1f45594ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-02-08 Niels Möller <nisse@lysator.liu.se> + + * chacha-crypt.c (chacha_crypt): Fixed block counter update. + 2014-02-07 Niels Möller <nisse@lysator.liu.se> * nettle.texinfo (ASCII encoding): Document that diff --git a/chacha-crypt.c b/chacha-crypt.c index 2fb77777b8ce07fb9dadd3314a5f5016cb9a6d55..60e2a5399f72e4eb6071c18a926d16fbc0e16bcf 100644 --- a/chacha-crypt.c +++ b/chacha-crypt.c @@ -60,7 +60,7 @@ chacha_crypt(struct chacha_ctx *ctx, _chacha_core (x, ctx->state, CHACHA_ROUNDS); - ctx->state[9] += (++ctx->state[8] == 0); + ctx->state[13] += (++ctx->state[12] == 0); /* stopping at 2^70 length per nonce is user's responsibility */