summaryrefslogtreecommitdiff
path: root/crypto/blowfish_common.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2023-10-09 22:59:43 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2023-10-20 13:39:25 +0800
commitba95588e20059d4ecc82a0a784ef37d82863d945 (patch)
treed566c033515c16af2c0096ad82a79e6b86723382 /crypto/blowfish_common.c
parent8a3684881087d6030988a99bea8b3299e88aaf17 (diff)
downloadlinux-crypto-ba95588e20059d4ecc82a0a784ef37d82863d945.tar.gz
linux-crypto-ba95588e20059d4ecc82a0a784ef37d82863d945.zip
crypto: adiantum - add fast path for single-page messages
When the source scatterlist is a single page, optimize the first hash step of adiantum to use crypto_shash_digest() instead of init/update/final, and use the same local kmap for both hashing the bulk part and loading the narrow part of the source data. Likewise, when the destination scatterlist is a single page, optimize the second hash step of adiantum to use crypto_shash_digest() instead of init/update/final, and use the same local kmap for both hashing the bulk part and storing the narrow part of the destination data. In some cases these optimizations improve performance significantly. Note: ideally, for optimal performance each architecture should implement the full "adiantum(xchacha12,aes)" algorithm and fully optimize the contiguous buffer case to use no indirect calls. That's not something I've gotten around to doing, though. This commit just makes a relatively small change that provides some benefit with the existing template-based approach. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/blowfish_common.c')
0 files changed, 0 insertions, 0 deletions