Ver código fonte

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
kris/onging/CECPQ3_patch15
Adam Langley 10 anos atrás
pai
commit
d031f11596
1 arquivos alterados com 2 adições e 3 exclusões
  1. +2
    -3
      crypto/chacha/chacha_generic.c

+ 2
- 3
crypto/chacha/chacha_generic.c Ver arquivo

@@ -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];
}


Carregando…
Cancelar
Salvar