basavesh 3b83638567 Fix leakage when the cacheline is 32-bytes in CBC_MAC_ROTATE_IN_PLACE
rotated_mac is a 64-byte aligned buffer of size 64 and rotate_offset is secret.
Consider a weaker leakage model(CL) where only cacheline base address is leaked,
i.e address/32 for 32-byte cacheline(CL32).

Previous code used to perform two loads
    1. rotated_mac[rotate_offset ^ 32] and
    2. rotated_mac[rotate_offset++]
which would leak 2q + 1, 2q for 0 <= rotate_offset < 32
and 2q, 2q + 1 for 32 <= rotate_offset < 64

The proposed fix performs load operations which will always leak 2q, 2q + 1 and
selects the appropriate value in constant-time.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18033)
2022-05-09 16:40:21 +02:00
..
2022-05-04 13:46:10 +10:00
2022-05-03 13:34:51 +01:00
2022-05-03 13:34:51 +01:00
2020-11-26 14:18:57 +00:00
2021-06-02 16:30:15 +10:00
2022-05-03 13:34:51 +01:00
2021-05-20 14:22:33 +01:00
2022-05-03 13:34:51 +01:00
2021-06-17 13:24:59 +01:00
2022-05-03 13:34:51 +01:00
2022-05-03 13:34:51 +01:00
2022-05-03 13:34:51 +01:00
2022-05-03 13:34:51 +01:00
2020-11-11 12:12:23 +01:00
2020-11-18 23:38:34 +01:00
2022-05-03 13:34:51 +01:00
2022-05-03 13:34:51 +01:00
2021-09-07 13:35:43 +02:00
2022-05-03 13:34:51 +01:00
2019-09-28 20:26:35 +02:00
2022-05-03 13:34:51 +01:00
2022-05-03 13:34:51 +01:00
2021-11-26 06:45:19 +01:00
2022-05-03 13:34:51 +01:00