summaryrefslogtreecommitdiffstats
path: root/Kconfig
diff options
context:
space:
mode:
authorArd Biesheuvel2018-01-19 13:04:34 +0100
committerHerbert Xu2018-01-25 15:10:33 +0100
commit83dee2ce1ae791c3dc0c9d4d3a8d42cb109613f6 (patch)
treed4a9df73a5b80d21367d70eb0e1358f66bbdd00f /Kconfig
parentcrypto: sha3-generic - fixes for alignment and big endian operation (diff)
downloadkernel-qcow2-linux-83dee2ce1ae791c3dc0c9d4d3a8d42cb109613f6.tar.gz
kernel-qcow2-linux-83dee2ce1ae791c3dc0c9d4d3a8d42cb109613f6.tar.xz
kernel-qcow2-linux-83dee2ce1ae791c3dc0c9d4d3a8d42cb109613f6.zip
crypto: sha3-generic - rewrite KECCAK transform to help the compiler optimize
The way the KECCAK transform is currently coded involves many references into the state array using indexes that are calculated at runtime using simple but non-trivial arithmetic. This forces the compiler to treat the state matrix as an array in memory rather than keep it in registers, which results in poor performance. So instead, let's rephrase the algorithm using fixed array indexes only. This helps the compiler keep the state matrix in registers, resulting in the following speedup (SHA3-256 performance in cycles per byte): before after speedup Intel Core i7 @ 2.0 GHz (2.9 turbo) 100.6 35.7 2.8x Cortex-A57 @ 2.0 GHz (64-bit mode) 101.6 12.7 8.0x Cortex-A53 @ 1.0 GHz 224.4 15.8 14.2x Cortex-A57 @ 2.0 GHz (32-bit mode) 201.8 63.0 3.2x Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions