]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: xts - consolidate sanity check for keys
authorStephan Mueller <smueller@chronox.de>
Tue, 9 Feb 2016 14:37:47 +0000 (15:37 +0100)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 5 Apr 2018 20:10:40 +0000 (13:10 -0700)
commit77dafd4a08a08b4572d9a7e3f00e41f927a3a162
treee302f2978888a2343a3928369c68f92866809515
parent5e84c99f68ec9d52f8dbce462f03e98b70764274
crypto: xts - consolidate sanity check for keys

The patch centralizes the XTS key check logic into the service function
xts_check_key which is invoked from the different XTS implementations.
With this, the XTS implementations in ARM, ARM64, PPC and S390 have now
a sanity check for the XTS keys similar to the other arches.

In addition, this service function received a check to ensure that the
key != the tweak key which is mandated by FIPS 140-2 IG A.9. As the
check is not present in the standards defining XTS, it is only enforced
in FIPS mode of the kernel.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 28856a9e52c7cac712af6c143de04766617535dc)

Orabug: 27809271

Signed-off-by: John Haxby <john.haxby@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
13 files changed:
arch/arm/crypto/aes-ce-glue.c
arch/arm/crypto/aesbs-glue.c
arch/arm64/crypto/aes-glue.c
arch/powerpc/crypto/aes-spe-glue.c
arch/s390/crypto/aes_s390.c
arch/x86/crypto/aesni-intel_glue.c
arch/x86/crypto/camellia_glue.c
arch/x86/crypto/cast6_avx_glue.c
arch/x86/crypto/serpent_avx_glue.c
arch/x86/crypto/serpent_sse2_glue.c
arch/x86/crypto/twofish_glue_3way.c
crypto/xts.c
include/crypto/xts.h