diff options
author | Eric Biggers <ebiggers@google.com> | 2018-10-18 07:37:58 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-11-09 12:36:48 +0300 |
commit | 0a6a40c2a8c184a2fb467efacfb1cd338d719e0b (patch) | |
tree | 83c30f4e2775779925bd03c9d3f5f5f4f06887ae /arch/arm | |
parent | 9f4debe38415583086ce814798eeb864aeb39551 (diff) | |
download | linux-0a6a40c2a8c184a2fb467efacfb1cd338d719e0b.tar.xz |
crypto: aes_ti - disable interrupts while accessing S-box
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>
Diffstat (limited to 'arch/arm')
0 files changed, 0 insertions, 0 deletions