summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/chacha20.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-08-06 18:31:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-08-06 19:25:29 +0200
commit1a72c38631b775529ba63aeec1f35df7080be609 (patch)
tree3377c9e1fbe00dbd45d90d2eb22dc524443b816d /src/crypto/chacha20.h
parent9160aae97794bac985d8dcb644a12c944fb11d33 (diff)
crypto: move simd context to specific type
Suggested-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/chacha20.h')
-rw-r--r--src/crypto/chacha20.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/crypto/chacha20.h b/src/crypto/chacha20.h
index 01fb99a..86ea4e3 100644
--- a/src/crypto/chacha20.h
+++ b/src/crypto/chacha20.h
@@ -6,6 +6,7 @@
#ifndef _WG_CHACHA20_H
#define _WG_CHACHA20_H
+#include "simd.h"
#include <linux/kernel.h>
#include <linux/types.h>
@@ -39,8 +40,8 @@ static inline void chacha20_init(struct chacha20_ctx *state, const u8 key[CHACHA
state->counter[2] = nonce & U32_MAX;
state->counter[3] = nonce >> 32;
}
-void chacha20(struct chacha20_ctx *state, u8 *dst, const u8 *src, u32 len, bool have_simd);
+void chacha20(struct chacha20_ctx *state, u8 *dst, const u8 *src, u32 len, simd_context_t simd_context);
-void hchacha20(u8 derived_key[CHACHA20_KEY_SIZE], const u8 nonce[HCHACHA20_NONCE_SIZE], const u8 key[HCHACHA20_KEY_SIZE], bool have_simd);
+void hchacha20(u8 derived_key[CHACHA20_KEY_SIZE], const u8 nonce[HCHACHA20_NONCE_SIZE], const u8 key[HCHACHA20_KEY_SIZE], simd_context_t simd_context);
#endif /* _WG_CHACHA20_H */