crypto: qce - handle AES-XTS cases that qce fails

QCE hangs when presented with an AES-XTS request whose length is larger
than QCE_SECTOR_SIZE (512-bytes), and is not a multiple of it.  Let the
fallback cipher handle them.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Eneas U de Queiroz
2020-02-07 12:02:27 -03:00
committed by Herbert Xu
parent ce163ba0bf
commit 7f19380b2c
3 changed files with 10 additions and 4 deletions

View File

@@ -12,6 +12,9 @@
#include <crypto/hash.h>
#include <crypto/internal/skcipher.h>
/* xts du size */
#define QCE_SECTOR_SIZE 512
/* key size in bytes */
#define QCE_SHA_HMAC_KEY_SIZE 64
#define QCE_MAX_CIPHER_KEY_SIZE AES_KEYSIZE_256