From: Ard Biesheuvel Date: Thu, 22 Aug 2019 15:47:31 +0000 (+0300) Subject: crypto: ccp - invoke fallback for XTS ciphertext stealing X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c03a509304954c5ed58ac9c607e20f1b55f88a28;p=linux.git crypto: ccp - invoke fallback for XTS ciphertext stealing For correctness and compliance with the XTS-AES specification, we are adding support for ciphertext stealing to XTS implementations, even though no use cases are known that will be enabled by this. Since the ccp driver already has a fallback skcipher standby for dealing with input sizes other than [16, 512, 1024, 2048, 4096], just drop the check against the block size. Cc: Tom Lendacky Cc: Gary Hook Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/ccp/ccp-crypto-aes-xts.c b/drivers/crypto/ccp/ccp-crypto-aes-xts.c index 783ba75e06187..8e4a531f4f707 100644 --- a/drivers/crypto/ccp/ccp-crypto-aes-xts.c +++ b/drivers/crypto/ccp/ccp-crypto-aes-xts.c @@ -116,9 +116,6 @@ static int ccp_aes_xts_crypt(struct ablkcipher_request *req, if (!ctx->u.aes.key_len) return -EINVAL; - if (req->nbytes & (AES_BLOCK_SIZE - 1)) - return -EINVAL; - if (!req->info) return -EINVAL;