summaryrefslogtreecommitdiff
path: root/fs/crypto/fscrypt_private.h
diff options
context:
space:
mode:
authorNathan Huckleberry <nhuck@google.com>2022-05-20 18:15:00 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2022-06-10 16:40:18 +0800
commit9d2c0b485c46c7c5f781067c60300def5d1365cb (patch)
tree66e8f069b9f6b51d2ebeff326129d85c9134c23b /fs/crypto/fscrypt_private.h
parent34f7f6c3011276313383099156be287ac745bcea (diff)
downloadlwn-9d2c0b485c46c7c5f781067c60300def5d1365cb.tar.gz
lwn-9d2c0b485c46c7c5f781067c60300def5d1365cb.zip
crypto: arm64/polyval - Add PMULL accelerated implementation of POLYVAL
Add hardware accelerated version of POLYVAL for ARM64 CPUs with Crypto Extensions support. This implementation is accelerated using PMULL instructions to perform the finite field computations. For added efficiency, 8 blocks of the message are processed simultaneously by precomputing the first 8 powers of the key. Karatsuba multiplication is used instead of Schoolbook multiplication because it was found to be slightly faster on ARM64 CPUs. Montgomery reduction must be used instead of Barrett reduction due to the difference in modulus between POLYVAL's field and other finite fields. More information on POLYVAL can be found in the HCTR2 paper: "Length-preserving encryption with HCTR2": https://eprint.iacr.org/2021/1441.pdf Signed-off-by: Nathan Huckleberry <nhuck@google.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'fs/crypto/fscrypt_private.h')
0 files changed, 0 insertions, 0 deletions