diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-06 18:31:18 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-06 19:25:29 +0200 |
commit | 5856479cdaf7e87f2bc46881246607ec3b887dae (patch) | |
tree | bfff84bd6d34cfefa014681629b55a5081d0ed54 /src/crypto/poly1305.h | |
parent | compat: better atomic acquire/release backport (diff) | |
download | wireguard-monolithic-historical-5856479cdaf7e87f2bc46881246607ec3b887dae.tar.xz wireguard-monolithic-historical-5856479cdaf7e87f2bc46881246607ec3b887dae.zip |
crypto: move simd context to specific type
Suggested-by: Andy Lutomirski <luto@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | src/crypto/poly1305.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/poly1305.h b/src/crypto/poly1305.h index 876234c..f8467bc 100644 --- a/src/crypto/poly1305.h +++ b/src/crypto/poly1305.h @@ -6,6 +6,7 @@ #ifndef _WG_POLY1305_H #define _WG_POLY1305_H +#include "simd.h" #include <linux/types.h> enum poly1305_lengths { @@ -23,9 +24,9 @@ struct poly1305_ctx { void poly1305_fpu_init(void); -void poly1305_init(struct poly1305_ctx *ctx, const u8 key[POLY1305_KEY_SIZE], bool have_simd); -void poly1305_update(struct poly1305_ctx *ctx, const u8 *inp, const size_t len, bool have_simd); -void poly1305_finish(struct poly1305_ctx *ctx, u8 mac[POLY1305_MAC_SIZE], bool have_simd); +void poly1305_init(struct poly1305_ctx *ctx, const u8 key[POLY1305_KEY_SIZE], simd_context_t simd_context); +void poly1305_update(struct poly1305_ctx *ctx, const u8 *inp, const size_t len, simd_context_t simd_context); +void poly1305_finish(struct poly1305_ctx *ctx, u8 mac[POLY1305_MAC_SIZE], simd_context_t simd_context); #ifdef DEBUG bool poly1305_selftest(void); |