[openssl-commits] [openssl] master update

Andy Polyakov appro at openssl.org
Sat Jan 21 21:34:36 UTC 2017


The branch master has been updated
       via  9872238eb6fb981fc7c36ba4180d193cab077b34 (commit)
      from  6f553edba88f7f35452bffd2bf49eac806190cf6 (commit)


- Log -----------------------------------------------------------------
commit 9872238eb6fb981fc7c36ba4180d193cab077b34
Author: Andy Polyakov <appro at openssl.org>
Date:   Sun Dec 25 16:36:43 2016 +0100

    poly1305/poly1305_base2_44.c: clarify shift boundary condition.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/poly1305/poly1305_base2_44.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/poly1305/poly1305_base2_44.c b/crypto/poly1305/poly1305_base2_44.c
index 2036585..b6313d0 100644
--- a/crypto/poly1305/poly1305_base2_44.c
+++ b/crypto/poly1305/poly1305_base2_44.c
@@ -117,8 +117,8 @@ void poly1305_blocks(void *ctx, const unsigned char *inp, size_t len,
 
         /* "lazy" reduction step */
         h0 = (u64)d0 & 0x0fffffffffff;
-        h1 = (u64)(d1 += d0 >> 44) & 0x0fffffffffff;
-        h2 = (u64)(d2 += d1 >> 44) & 0x03ffffffffff; /* last digit is 42 bits */
+        h1 = (u64)(d1 += (u64)(d0 >> 44)) & 0x0fffffffffff;
+        h2 = (u64)(d2 += (u64)(d1 >> 44)) & 0x03ffffffffff; /* last 42 bits */
 
         c = (d2 >> 42);
         h0 += c + (c << 2);


More information about the openssl-commits mailing list