]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
chacha_crypt: Fixed block counter update.
authorNiels Möller <nisse@lysator.liu.se>
Sat, 8 Feb 2014 20:08:12 +0000 (21:08 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 8 Feb 2014 20:08:12 +0000 (21:08 +0100)
ChangeLog
chacha-crypt.c

index fdc4a0f13e34369a8d4a295af64f3ded99615d87..a1030c95c14aa8a2ac3d41eeeea90aa1f45594ea 100644 (file)
--- 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
index 2fb77777b8ce07fb9dadd3314a5f5016cb9a6d55..60e2a5399f72e4eb6071c18a926d16fbc0e16bcf 100644 (file)
@@ -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 */