summaryrefslogtreecommitdiff
path: root/drivers/crypto/qce/common.h
diff options
context:
space:
mode:
authorEneas U de Queiroz <cotequeiroz@gmail.com>2020-02-07 12:02:27 -0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-02-13 17:05:27 +0800
commit7f19380b2cfd412dcef2facefb3f6c62788864d7 (patch)
treecfbaf70041e790852e01c3a576a9722505cbb7a2 /drivers/crypto/qce/common.h
parentce163ba0bf298f1707321ac025ef639f88e62801 (diff)
downloadlinux-7f19380b2cfd412dcef2facefb3f6c62788864d7.tar.gz
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>
Diffstat (limited to 'drivers/crypto/qce/common.h')
-rw-r--r--drivers/crypto/qce/common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/qce/common.h b/drivers/crypto/qce/common.h
index 282d4317470d..9f989cba0f1b 100644
--- a/drivers/crypto/qce/common.h
+++ b/drivers/crypto/qce/common.h
@@ -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