diff options
author | Thara Gopinath <thara.gopinath@linaro.org> | 2021-04-29 17:07:07 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-05-14 13:07:56 +0200 |
commit | b51dcf05c1e96caccda769f3a60042d77f1a3a7d (patch) | |
tree | 2ca711e869e039a359bb3f239ac09913561029a6 /drivers/crypto/qce/aead.h | |
parent | crypto: qce - Add support for AEAD algorithms (diff) | |
download | linux-b51dcf05c1e96caccda769f3a60042d77f1a3a7d.tar.xz linux-b51dcf05c1e96caccda769f3a60042d77f1a3a7d.zip |
crypto: qce - Schedule fallback aead algorithm
Qualcomm crypto engine does not handle the following scenarios and
will issue an abort. In such cases, pass on the transformation to
a fallback algorithm.
- DES3 algorithms with all three keys same.
- AES192 algorithms.
- 0 length messages.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qce/aead.h')
-rw-r--r-- | drivers/crypto/qce/aead.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/qce/aead.h b/drivers/crypto/qce/aead.h index 3d1f2039930b..efb8477cc088 100644 --- a/drivers/crypto/qce/aead.h +++ b/drivers/crypto/qce/aead.h @@ -19,6 +19,8 @@ struct qce_aead_ctx { unsigned int enc_keylen; unsigned int auth_keylen; unsigned int authsize; + bool need_fallback; + struct crypto_aead *fallback; }; struct qce_aead_reqctx { @@ -39,6 +41,7 @@ struct qce_aead_reqctx { u8 ccm_nonce[QCE_MAX_NONCE]; u8 ccmresult_buf[QCE_BAM_BURST_SIZE]; u8 ccm_rfc4309_iv[QCE_MAX_IV_SIZE]; + struct aead_request fallback_req; }; static inline struct qce_alg_template *to_aead_tmpl(struct crypto_aead *tfm) |