Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2014-06-24 00:14:13 +0400
committerAdam Langley <agl@chromium.org>2014-06-24 00:14:13 +0400
commitd031f11596fd0bdfeb6333050a06be28dc64de41 (patch)
treed903e73e1d5321f476c4eb06a01f454357f507fe /crypto
parent3213bed728d15087dd7ec09ee65b2f448f3cd250 (diff)
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
Diffstat (limited to 'crypto')
-rw-r--r--crypto/chacha/chacha_generic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/chacha/chacha_generic.c b/crypto/chacha/chacha_generic.c
index 1e5b70d3..b5daed29 100644
--- a/crypto/chacha/chacha_generic.c
+++ b/crypto/chacha/chacha_generic.c
@@ -56,8 +56,7 @@ void CRYPTO_chacha_20_neon(uint8_t *out, const uint8_t *in, size_t in_len,
/* 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 @@ void CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len,
todo = in_len;
}
- chacha_core(buf, input, 20);
+ chacha_core(buf, input);
for (i = 0; i < todo; i++) {
out[i] = in[i] ^ buf[i];
}