aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/zinc/poly1305/poly1305.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/zinc/poly1305/poly1305.c')
-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;