modes/ocb128.c: improve the calculation of double mask

CLA: trivial

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6667)
This commit is contained in:
DesWurstes 2018-07-07 12:10:53 +03:00 committed by Andy Polyakov
parent 9e26532295
commit c118fb9238

View File

@ -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);