Eric Biggers
355f5af996
crypto: aes_ti - disable interrupts while accessing S-box
...
[ Upstream commit 0a6a40c2a8 ]
In the "aes-fixed-time" AES implementation, disable interrupts while
accessing the S-box, in order to make cache-timing attacks more
difficult. Previously it was possible for the CPU to be interrupted
while the S-box was loaded into L1 cache, potentially evicting the
cachelines and causing later table lookups to be time-variant.
In tests I did on x86 and ARM, this doesn't affect performance
significantly. Responsiveness is potentially a concern, but interrupts
are only disabled for a single AES block.
Note that even after this change, the implementation still isn't
necessarily guaranteed to be constant-time; see
https://cr.yp.to/antiforgery/cachetiming-20050414.pdf for a discussion
of the many difficulties involved in writing truly constant-time AES
software. But it's valuable to make such attacks more difficult.
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Signed-off-by: Eric Biggers <ebiggers@google.com >
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2019-02-12 20:02:06 +01:00
..
2018-10-26 09:30:47 +01:00
2018-06-18 20:17:38 +05:30
2016-10-25 11:08:33 +08:00
2018-08-03 18:06:04 +08:00
2017-04-21 20:30:50 +08:00
2018-01-12 23:03:39 +11:00
2018-07-09 00:30:26 +08:00
2018-07-09 00:30:26 +08:00
2018-07-09 00:30:26 +08:00
2018-10-08 13:44:53 +08:00
2017-02-11 17:50:43 +08:00
2019-02-12 20:02:06 +01:00
2018-10-23 10:57:06 -07:00
2018-09-28 12:46:25 +08:00
2017-01-13 00:24:39 +08:00
2018-09-28 12:46:25 +08:00
2018-09-04 11:37:04 +08:00
2018-09-28 12:46:08 +08:00
2018-09-04 11:35:03 +08:00
2018-05-26 09:16:44 +02:00
2018-06-28 10:40:47 -07:00
2015-04-22 09:30:18 +08:00
2014-11-24 22:43:57 +08:00
2018-07-18 07:27:22 -04:00
2014-11-24 22:43:57 +08:00
2019-01-22 21:09:50 +01:00
2019-01-22 21:09:50 +01:00
2018-08-03 18:06:04 +08:00
2011-09-22 21:25:25 +10:00
2015-01-13 22:29:11 +11:00
2017-11-29 17:33:25 +11:00
2017-11-29 17:33:25 +11:00
2017-11-29 17:33:25 +11:00
2013-08-14 20:42:03 +10:00
2018-11-29 14:53:59 +08:00
2018-09-04 11:35:03 +08:00
2019-01-09 17:45:59 +01:00
2018-09-21 13:24:50 +08:00
2017-12-22 19:02:33 +11:00
2018-04-21 00:58:34 +08:00
2017-02-11 17:52:28 +08:00
2016-10-21 11:03:42 +08:00
2018-05-27 00:12:09 +08:00
2018-05-27 00:12:08 +08:00
2013-09-12 15:31:34 +10:00
2016-09-13 20:27:26 +08:00
2018-09-28 12:46:08 +08:00
2018-02-15 23:26:50 +08:00
2018-09-28 12:46:08 +08:00
2018-11-09 17:35:43 +08:00
2018-11-09 17:35:43 +08:00
2014-03-21 21:54:28 +08:00
2018-04-21 00:58:34 +08:00
2018-04-21 00:58:34 +08:00
2017-04-24 18:11:08 +08:00
2015-01-13 22:29:11 +11:00
2018-08-03 18:06:06 +08:00
2018-07-20 13:51:21 +08:00
2018-08-03 18:05:48 +08:00
2014-11-26 20:06:30 +08:00
2018-07-20 13:51:22 +08:00
2019-01-26 09:20:41 +01:00
2018-04-21 00:58:29 +08:00
2017-10-12 22:55:00 +08:00
2018-04-21 00:58:29 +08:00
2018-09-28 12:46:08 +08:00
2014-11-24 22:43:57 +08:00
2015-04-23 14:18:09 +08:00
2018-09-28 12:46:08 +08:00
2017-12-22 19:52:40 +11:00
2018-07-09 00:30:24 +08:00
2015-12-20 15:27:12 +02:00
2017-11-29 13:39:15 +11:00
2018-09-04 11:37:04 +08:00
2016-11-17 23:34:52 +08:00
2015-06-25 23:18:33 +08:00
2019-02-12 20:02:06 +01:00
2017-11-29 17:33:26 +11:00
2014-11-24 22:43:57 +08:00
2017-01-13 00:24:39 +08:00
2018-10-05 10:22:48 +08:00
2017-04-10 19:17:27 +08:00
2017-04-10 19:17:27 +08:00
2017-05-08 17:15:13 -07:00
2018-09-28 12:46:26 +08:00
2018-07-09 00:30:24 +08:00
2018-07-09 00:30:24 +08:00
2013-12-09 20:09:12 +08:00
2014-11-24 22:43:57 +08:00
2018-10-08 13:44:53 +08:00
2018-10-08 13:44:53 +08:00
2018-09-28 12:46:26 +08:00
2018-11-29 14:53:59 +08:00
2017-12-22 19:02:47 +11:00
2018-07-09 00:30:24 +08:00
2018-05-16 07:23:35 +02:00
2017-11-02 11:10:55 +01:00
2018-07-09 00:30:24 +08:00
2018-07-09 00:30:24 +08:00
2018-07-27 19:28:36 +08:00
2018-07-27 19:28:36 +08:00
2018-09-28 12:46:25 +08:00
2018-04-07 19:04:02 +09:00
2018-10-26 09:30:46 +01:00
2018-04-21 00:58:37 +08:00
2016-07-05 23:05:26 +08:00
2015-10-14 22:23:16 +08:00
2018-05-31 00:13:57 +08:00
2018-08-03 18:06:03 +08:00
2018-01-06 09:18:00 -07:00
2014-11-24 22:43:57 +08:00
2018-09-28 12:46:08 +08:00
2017-08-09 20:17:54 +08:00
2018-07-09 00:30:24 +08:00
2018-08-03 17:55:12 +08:00
2018-07-09 00:30:24 +08:00
2018-07-09 00:30:24 +08:00
2018-09-04 11:37:03 +08:00
2018-11-09 17:35:43 +08:00
2018-09-28 12:46:06 +08:00
2019-01-22 21:09:50 +01:00
2018-05-05 14:52:51 +08:00
2019-01-09 17:45:59 +01:00
2018-09-28 12:46:26 +08:00
2015-01-13 22:29:11 +11:00
2019-01-09 17:45:59 +01:00
2019-01-09 17:45:59 +01:00
2018-07-09 00:30:24 +08:00
2017-11-29 17:33:25 +11:00
2017-11-29 17:33:25 +11:00
2018-07-01 21:00:44 +08:00
2018-07-09 00:30:24 +08:00
2018-09-04 11:35:03 +08:00
2017-11-15 18:21:04 -08:00
2018-09-21 13:24:50 +08:00
2018-04-21 00:58:30 +08:00