From: DesWurstes Date: Sat, 7 Jul 2018 09:10:53 +0000 (+0300) Subject: modes/ocb128.c: improve the calculation of double mask X-Git-Tag: OpenSSL_1_1_1-pre9~179 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c118fb92386cc6f81aadf2a64473e94bac938cee;p=openssl modes/ocb128.c: improve the calculation of double mask CLA: trivial Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6667) --- diff --git a/crypto/modes/ocb128.c b/crypto/modes/ocb128.c index 76591e6992..72e6ea9b58 100644 --- a/crypto/modes/ocb128.c +++ b/crypto/modes/ocb128.c @@ -74,7 +74,7 @@ static void ocb_double(OCB_BLOCK *in, OCB_BLOCK *out) */ mask = in->c[0] & 0x80; mask >>= 7; - mask *= 135; + mask = (0 - mask) & 0x87; ocb_block_lshift(in->c, 1, out->c);