summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/zinc
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-19 03:43:03 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-19 23:29:45 +0200
commitafdd509ad206e0a3858118ac4c26fbc709af3562 (patch)
treea0486d55112e0fd2d228dc27dec6e34cac13b324 /src/crypto/zinc
parentcb8af686daad9b45451a91906441f9749ea3ed71 (diff)
poly1305: no need to trick gcc 8.1
This reverts 37f114a73ba37219b00a66f0a51219a696599745, since gcc 8.2 no longer exhibits that bug. Suggested-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc')
-rw-r--r--src/crypto/zinc/poly1305/poly1305.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/zinc/poly1305/poly1305.c b/src/crypto/zinc/poly1305/poly1305.c
index 38a51ea..cd6cb9b 100644
--- a/src/crypto/zinc/poly1305/poly1305.c
+++ b/src/crypto/zinc/poly1305/poly1305.c
@@ -83,7 +83,7 @@ static inline void poly1305_emit(void *ctx, u8 mac[POLY1305_KEY_SIZE],
void poly1305_update(struct poly1305_ctx *ctx, const u8 *input, size_t len,
simd_context_t *simd_context)
{
- const size_t num = ctx->num % POLY1305_BLOCK_SIZE;
+ const size_t num = ctx->num;
size_t rem;
if (num) {
@@ -118,7 +118,7 @@ EXPORT_SYMBOL(poly1305_update);
void poly1305_final(struct poly1305_ctx *ctx, u8 mac[POLY1305_MAC_SIZE],
simd_context_t *simd_context)
{
- size_t num = ctx->num % POLY1305_BLOCK_SIZE;
+ size_t num = ctx->num;
if (num) {
ctx->data[num++] = 1;