From 007314c530eb12d414ced07515f8cbc25a0f64f5 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Wed, 28 Nov 2018 10:35:17 -0500 Subject: Add CT::Mask type --- src/lib/mac/poly1305/poly1305.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/mac/poly1305/poly1305.cpp') diff --git a/src/lib/mac/poly1305/poly1305.cpp b/src/lib/mac/poly1305/poly1305.cpp index 32027b8d0..333a21a1a 100644 --- a/src/lib/mac/poly1305/poly1305.cpp +++ b/src/lib/mac/poly1305/poly1305.cpp @@ -119,10 +119,10 @@ void poly1305_finish(secure_vector& X, uint8_t mac[16]) uint64_t g2 = h2 + c - (static_cast(1) << 42); /* select h if h < p, or h + -p if h >= p */ - c = CT::expand_mask(c); - h0 = CT::select(c, g0, h0); - h1 = CT::select(c, g1, h1); - h2 = CT::select(c, g2, h2); + const auto c_mask = CT::Mask::expand(c); + h0 = c_mask.select(g0, h0); + h1 = c_mask.select(g1, h1); + h2 = c_mask.select(g2, h2); /* h = (h + pad) */ const uint64_t t0 = X[6]; -- cgit v1.2.3