diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-20 16:31:01 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-21 16:05:22 +0200 |
commit | f61fb1b86c28225353ee67802b512c8529d21fb0 (patch) | |
tree | 19ed9b2463f47fca15b706d82faf8080a5c28742 /src/crypto/zinc/chacha20/chacha20-mips-glue.h | |
parent | 08edd02db06f9dd424bc023703fed8ea8c42c97d (diff) |
chacha20-arm: go with Ard's version to optimize for Cortex-A7
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc/chacha20/chacha20-mips-glue.h')
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20-mips-glue.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20-mips-glue.h b/src/crypto/zinc/chacha20/chacha20-mips-glue.h index 2458e41..e38098e 100644 --- a/src/crypto/zinc/chacha20/chacha20-mips-glue.h +++ b/src/crypto/zinc/chacha20/chacha20-mips-glue.h @@ -9,11 +9,12 @@ static void __init chacha20_fpu_init(void) { } -static inline bool chacha20_arch(u8 *dst, const u8 *src, const size_t len, - const u32 key[8], const u32 counter[4], +static inline bool chacha20_arch(struct chacha20_ctx *state, u8 *dst, + const u8 *src, const size_t len, simd_context_t *simd_context) { - chacha20_mips(dst, src, len, key, counter); + chacha20_mips(dst, src, len, state->key, state->counter); + state->counter[0] += (len + 63) / 64; return true; } |