summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-12-17 19:55:16 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2021-01-03 08:41:37 +1100
commit5318d3db465d29efe97b0e18da29ad95156e6142 (patch)
tree6af228ab6514eda25d6ff44c4b18d5a79a0b2818 /drivers/char
parent15deb4333cd6d4e1e3216582e4c531ec40a6b060 (diff)
crypto: arm64/aes-ctr - improve tail handling
Counter mode is a stream cipher chaining mode that is typically used with inputs that are of arbitrarily length, and so a tail block which is smaller than a full AES block is rule rather than exception. The current ctr(aes) implementation for arm64 always makes a separate call into the assembler routine to process this tail block, which is suboptimal, given that it requires reloading of the AES round keys, and prevents us from handling this tail block using the 5-way stride that we use for better performance on deep pipelines. So let's update the assembler routine so it can handle any input size, and uses NEON permutation instructions and overlapping loads and stores to handle the tail block. This results in a ~16% speedup for 1420 byte blocks on cores with deep pipelines such as ThunderX2. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
0 files changed, 0 insertions, 0 deletions