From 6aed36c1decc1f2fa76337941acb36076b0adc59 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 17 Sep 2018 03:58:17 +0200 Subject: poly1305: do not require simd context for arch --- src/crypto/zinc/poly1305/poly1305-arm-glue.h | 3 +-- src/crypto/zinc/poly1305/poly1305-mips-glue.h | 3 +-- src/crypto/zinc/poly1305/poly1305-x86_64-glue.h | 3 +-- src/crypto/zinc/poly1305/poly1305.c | 8 +++----- 4 files changed, 6 insertions(+), 11 deletions(-) (limited to 'src/crypto/zinc/poly1305') 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; -- cgit v1.2.3-59-g8ed1b