Remove |num_rounds| argument from chacha_core. The function was hard-coded to 20 rounds already so the argument was already useless. Thanks to Huzaifa Sidhpurwala for noticing. Change-Id: I5f9d6ca6d46c6ab769b19820f8f918349544846d
diff --git a/crypto/chacha/chacha_generic.c b/crypto/chacha/chacha_generic.c index 1e5b70d..b5daed2 100644 --- a/crypto/chacha/chacha_generic.c +++ b/crypto/chacha/chacha_generic.c
@@ -56,8 +56,7 @@ /* chacha_core performs |num_rounds| rounds of ChaCha20 on the input words in * |input| and writes the 64 output bytes to |output|. */ -static void chacha_core(uint8_t output[64], const uint32_t input[16], - int num_rounds) { +static void chacha_core(uint8_t output[64], const uint32_t input[16]) { uint32_t x[16]; int i; @@ -122,7 +121,7 @@ todo = in_len; } - chacha_core(buf, input, 20); + chacha_core(buf, input); for (i = 0; i < todo; i++) { out[i] = in[i] ^ buf[i]; }