aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream/chacha
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-09-01 15:02:08 -0400
committerJack Lloyd <[email protected]>2016-09-01 15:02:08 -0400
commit3a887fa0efc8f9bea968e6e13b753a7531bd6fd5 (patch)
tree3448b00efbf6862c482a1ae01dd7ca28540e0217 /src/lib/stream/chacha
parentfc4b34d9d23c1afedaa71835c7af8f397c51c56d (diff)
Missing increment in SSE2 version, broke ChaCha20Poly1305 tests
But not any ChaCha20 tests due to no long test inputs. Add one.
Diffstat (limited to 'src/lib/stream/chacha')
-rw-r--r--src/lib/stream/chacha/chacha_sse2/chacha_sse2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/stream/chacha/chacha_sse2/chacha_sse2.cpp b/src/lib/stream/chacha/chacha_sse2/chacha_sse2.cpp
index 8c00ce133..c881a2990 100644
--- a/src/lib/stream/chacha/chacha_sse2/chacha_sse2.cpp
+++ b/src/lib/stream/chacha/chacha_sse2/chacha_sse2.cpp
@@ -251,6 +251,9 @@ void ChaCha::chacha_sse2_x4(byte output[64], u32bit input[16], size_t rounds)
#undef mm_rotl
+ input[12] += 4;
+ if(input[12] < 4)
+ input[13]++;
}
}