diff options
author | Niels Möller <nisse@lysator.liu.se> | 2014-02-08 21:08:12 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2014-02-08 21:08:12 +0100 |
commit | 9fadf064b7328c99cd365811989e9ee2c27a6bca (patch) | |
tree | e9d0283ac66cbf592c50b989654e248836717853 | |
parent | b99fd6277a3b4a300ee072bfe604ba0068d81ca0 (diff) | |
download | nettle-9fadf064b7328c99cd365811989e9ee2c27a6bca.tar.gz |
chacha_crypt: Fixed block counter update.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | chacha-crypt.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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 2fb77777..60e2a539 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 */ |