From 71fe3313d3be7d9887516b72bb79a6b1d3e273a8 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 12 Jun 2019 15:41:19 +0200 Subject: [PATCH] Cleanup poly1305 struct --- wolfcrypt/src/port/arm/armv8-poly1305.c | 2 +- wolfssl/wolfcrypt/poly1305.h | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/wolfcrypt/src/port/arm/armv8-poly1305.c b/wolfcrypt/src/port/arm/armv8-poly1305.c index 564f18d9a..4f8eb946d 100644 --- a/wolfcrypt/src/port/arm/armv8-poly1305.c +++ b/wolfcrypt/src/port/arm/armv8-poly1305.c @@ -49,7 +49,7 @@ #endif static WC_INLINE void poly1305_blocks_16(Poly1305* ctx, const unsigned char *m, - size_t bytes) + size_t bytes) { __asm__ __volatile__ ( "CMP %[bytes], %[POLY1305_BLOCK_SIZE] \n\t" diff --git a/wolfssl/wolfcrypt/poly1305.h b/wolfssl/wolfcrypt/poly1305.h index d83de2c5e..0f81ca0e7 100644 --- a/wolfssl/wolfcrypt/poly1305.h +++ b/wolfssl/wolfcrypt/poly1305.h @@ -82,17 +82,13 @@ typedef struct Poly1305 { unsigned char finished; unsigned char started; #else -#ifdef WOLFSSL_ARMASM +#if defined(WOLFSSL_ARMASM) && defined(__aarch64__) ALIGN128 word32 r[5]; ALIGN128 word32 r_2[5]; // r^2 - ALIGN128 word32 r_4[5]; // r^2 + ALIGN128 word32 r_4[5]; // r^4 ALIGN128 word32 h[5]; word32 pad[4]; -#if defined(POLY130564) // use predictable size of leftover word64 leftover; -#else - word32 leftover; -#endif /* POLY130564 */ #else #if defined(POLY130564) word64 r[3];