From 4bd18252d4ba7bd088cba2bb2c656dd372dc563a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 28 Oct 2017 21:36:01 +0200 Subject: [PATCH] Don't hardcode the number of rounds --- src/libsodium/crypto_stream/salsa20/xmm6int/u8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h b/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h index 4be5bc4e..467a9612 100644 --- a/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h +++ b/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h @@ -96,7 +96,7 @@ if (bytes >= 512) { z4 = orig4; z8 = orig8; - for (i = 0; i < 20; i += 2) { + for (i = 0; i < ROUNDS; i += 2) { /* the inner loop is a direct translation (regexp search/replace) * from the amd64-xmm6 ASM */ __m256i r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13,