From c118fb92386cc6f81aadf2a64473e94bac938cee Mon Sep 17 00:00:00 2001 From: DesWurstes Date: Sat, 7 Jul 2018 12:10:53 +0300 Subject: [PATCH] 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) --- crypto/modes/ocb128.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);