aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/zinc/poly1305
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-17 03:58:17 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-17 04:36:24 +0200
commit6aed36c1decc1f2fa76337941acb36076b0adc59 (patch)
tree64152518c3e61242bcb4c79c2463ef53f54b50dd /src/crypto/zinc/poly1305
parentcrypto: make MIT (diff)
downloadwireguard-monolithic-historical-6aed36c1decc1f2fa76337941acb36076b0adc59.tar.xz
wireguard-monolithic-historical-6aed36c1decc1f2fa76337941acb36076b0adc59.zip
poly1305: do not require simd context for arch
Diffstat (limited to 'src/crypto/zinc/poly1305')
-rw-r--r--src/crypto/zinc/poly1305/poly1305-arm-glue.h3
-rw-r--r--src/crypto/zinc/poly1305/poly1305-mips-glue.h3
-rw-r--r--src/crypto/zinc/poly1305/poly1305-x86_64-glue.h3
-rw-r--r--src/crypto/zinc/poly1305/poly1305.c8
4 files changed, 6 insertions, 11 deletions
diff --git a/src/crypto/zinc/poly1305/poly1305-arm-glue.h b/src/crypto/zinc/poly1305/poly1305-arm-glue.h
index 82135e2..8181703 100644
--- a/src/crypto/zinc/poly1305/poly1305-arm-glue.h
+++ b/src/crypto/zinc/poly1305/poly1305-arm-glue.h
@@ -31,8 +31,7 @@ void __init poly1305_fpu_init(void)
}
static inline bool poly1305_init_arch(void *ctx,
- const u8 key[POLY1305_KEY_SIZE],
- simd_context_t simd_context)
+ const u8 key[POLY1305_KEY_SIZE])
{
poly1305_init_arm(ctx, key);
return true;
diff --git a/src/crypto/zinc/poly1305/poly1305-mips-glue.h b/src/crypto/zinc/poly1305/poly1305-mips-glue.h
index 0d841ff..960abee 100644
--- a/src/crypto/zinc/poly1305/poly1305-mips-glue.h
+++ b/src/crypto/zinc/poly1305/poly1305-mips-glue.h
@@ -14,8 +14,7 @@ void __init poly1305_fpu_init(void)
}
static inline bool poly1305_init_arch(void *ctx,
- const u8 key[POLY1305_KEY_SIZE],
- simd_context_t simd_context)
+ const u8 key[POLY1305_KEY_SIZE])
{
poly1305_init_mips(ctx, key);
return true;
diff --git a/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h b/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h
index 8cf3ac9..7f1af44 100644
--- a/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h
+++ b/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h
@@ -55,8 +55,7 @@ void __init poly1305_fpu_init(void)
}
static inline bool poly1305_init_arch(void *ctx,
- const u8 key[POLY1305_KEY_SIZE],
- simd_context_t simd_context)
+ const u8 key[POLY1305_KEY_SIZE])
{
poly1305_init_x86_64(ctx, key);
return true;
diff --git a/src/crypto/zinc/poly1305/poly1305.c b/src/crypto/zinc/poly1305/poly1305.c
index 51bbfb2..d8c103f 100644
--- a/src/crypto/zinc/poly1305/poly1305.c
+++ b/src/crypto/zinc/poly1305/poly1305.c
@@ -15,8 +15,7 @@
#ifndef HAVE_POLY1305_ARCH_IMPLEMENTATION
static inline bool poly1305_init_arch(void *ctx,
- const u8 key[POLY1305_KEY_SIZE],
- simd_context_t simd_context)
+ const u8 key[POLY1305_KEY_SIZE])
{
return false;
}
@@ -43,15 +42,14 @@ void __init poly1305_fpu_init(void)
#include "poly1305-donna32.h"
#endif
-void poly1305_init(struct poly1305_ctx *ctx, const u8 key[POLY1305_KEY_SIZE],
- simd_context_t simd_context)
+void poly1305_init(struct poly1305_ctx *ctx, const u8 key[POLY1305_KEY_SIZE])
{
ctx->nonce[0] = get_unaligned_le32(&key[16]);
ctx->nonce[1] = get_unaligned_le32(&key[20]);
ctx->nonce[2] = get_unaligned_le32(&key[24]);
ctx->nonce[3] = get_unaligned_le32(&key[28]);
- if (!poly1305_init_arch(ctx->opaque, key, simd_context))
+ if (!poly1305_init_arch(ctx->opaque, key))
poly1305_init_generic(ctx->opaque, key);
ctx->num = 0;