summaryrefslogtreecommitdiffstats
path: root/crypto/modes
diff options
context:
space:
mode:
authorDesWurstes <DesWurstes@users.noreply.github.com>2018-07-07 12:10:53 +0300
committerAndy Polyakov <appro@openssl.org>2018-07-09 12:35:02 +0200
commitc118fb92386cc6f81aadf2a64473e94bac938cee (patch)
tree227e0dda3311e5a931fd563d9acda77bd5a95415 /crypto/modes
parent9e26532295c579afa91a3edf0864b380a5f0ec16 (diff)
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)
Diffstat (limited to 'crypto/modes')
-rw-r--r--crypto/modes/ocb128.c2
1 files changed, 1 insertions, 1 deletions
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);