[PATCH v3 07/10] crypto: caam - add xts check for block length equal to zero

2020-09-22 Thread Andrei Botila
From: Andrei Botila XTS should not return succes when dealing with block length equal to zero. This is different than the rest of the skcipher algorithms. Fixes: 31bb2f0da1b50 ("crypto: caam - check zero-length input") Cc: # v5.4+ Signed-off-by: Andrei Botila --- drivers/c

[PATCH v3 10/10] crypto: caam/qi2 - add support for XTS with 16B IV

2020-09-22 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH v3 06/10] crypto: caam/qi2 - add support for more XTS key lengths

2020-09-22 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: 226853ac3ebe ("crypto: caam/qi2

[PATCH v3 08/10] crypto: caam/jr - add support for XTS with 16B IV

2020-09-22 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH v3 05/10] crypto: caam/qi - add support for more XTS key lengths

2020-09-22 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: b189817cf789 ("crypto: caam/qi

[PATCH v3 09/10] crypto: caam/qi - add support for XTS with 16B IV

2020-09-22 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH v3 04/10] crypto: caam/jr - add support for more XTS key lengths

2020-09-22 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: c6415a6016bf ("crypto: caam - add su

[PATCH v3 03/10] crypto: caam/qi2 - add fallback for XTS with more than 8B IV

2020-09-22 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: 226853ac3ebe ("crypto: caam/qi2 - add skcipher algorithms") Cc: # v4.20+

[PATCH v3 02/10] crypto: caam/qi - add fallback for XTS with more than 8B IV

2020-09-22 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Cc

[PATCH v3 01/10] crypto: caam/jr - add fallback for XTS with more than 8B IV

2020-09-22 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: c6415a6016bf ("crypto: caam - add support for acipher xts(aes)") Cc: # v4

[PATCH v3 00/10] crypto: caam - xts(aes) updates

2020-09-22 Thread Andrei Botila
From: Andrei Botila This patch series fixes some problems in CAAM's implementation of xts(aes): - CAAM until Era 9 can't process XTS with 16B IV - CAAM can only process in hardware XTS key lengths of 16B and 32B - These hardware limitations are resolved through a fallback - CAAM used

[PATCH v2 09/12] crypto: caam/qi2 - add xts check for block length equal to zero

2020-09-21 Thread Andrei Botila
From: Andrei Botila XTS should not return succes when dealing with block length equal to zero. This is different than the rest of the skcipher algorithms. Fixes: 31bb2f0da1b50 ("crypto: caam - check zero-length input") Cc: # v5.4+ Signed-off-by: Andrei Botila --- drivers/c

[PATCH v2 04/12] crypto: caam/jr - add support for more XTS key lengths

2020-09-21 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: c6415a6016bf ("crypto: caam - add su

[PATCH v2 08/12] crypto: caam/qi - add xts check for block length equal to zero

2020-09-21 Thread Andrei Botila
From: Andrei Botila XTS should not return succes when dealing with block length equal to zero. This is different than the rest of the skcipher algorithms. Fixes: 31bb2f0da1b50 ("crypto: caam - check zero-length input") Cc: # v5.4+ Signed-off-by: Andrei Botila --- drivers/c

[PATCH v2 12/12] crypto: caam/qi2 - add support for XTS with 16B IV

2020-09-21 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH v2 05/12] crypto: caam/qi - add support for more XTS key lengths

2020-09-21 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: b189817cf789 ("crypto: caam/qi

[PATCH v2 07/12] crypto: caam/jr - add xts check for block length equal to zero

2020-09-21 Thread Andrei Botila
From: Andrei Botila XTS should not return succes when dealing with block length equal to zero. This is different than the rest of the skcipher algorithms. Fixes: 31bb2f0da1b50 ("crypto: caam - check zero-length input") Cc: # v5.4+ Signed-off-by: Andrei Botila --- drivers/c

[PATCH v2 10/12] crypto: caam/jr - add support for XTS with 16B IV

2020-09-21 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH v2 06/12] crypto: caam/qi2 - add support for more XTS key lengths

2020-09-21 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: 226853ac3ebe ("crypto: caam/qi2

[PATCH v2 11/12] crypto: caam/qi - add support for XTS with 16B IV

2020-09-21 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH v2 03/12] crypto: caam/qi2 - add fallback for XTS with more than 8B IV

2020-09-21 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: 226853ac3ebe ("crypto: caam/qi2 - add skcipher algorithms") Cc: # v4.20+

[PATCH v2 02/12] crypto: caam/qi - add fallback for XTS with more than 8B IV

2020-09-21 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Cc

[PATCH v2 00/12] crypto: caam - xts(aes) updates

2020-09-21 Thread Andrei Botila
From: Andrei Botila This patch series fixes some problems in CAAM's implementation of xts(aes): - CAAM until Era 9 can't process XTS with 16B IV - CAAM can only process in hardware XTS key lengths of 16B and 32B - These hardware limitations are resolved through a fallback - CAAM used

[PATCH v2 01/12] crypto: caam/jr - add fallback for XTS with more than 8B IV

2020-09-21 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: c6415a6016bf ("crypto: caam - add support for acipher xts(aes)") Cc: # v4

[PATCH 10/22] crypto: atmel-aes - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Andrei Botila --- drivers/crypto/atmel-aes.c

[PATCH 19/22] crypto: inside-secure - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Antoine Tenart Signed-off-by: Andrei Botila --- drivers/crypto/inside-secure/safexcel_cipher.c | 6 ++ 1 file changed

[PATCH 12/22] crypto: bcm - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Zhang Shengju Cc: Tang Bin Signed-off-by: Andrei Botila --- drivers/crypto/bcm/cipher.c | 3 +++ 1 file changed, 3

[PATCH 13/22] crypto: cavium/cpt - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: George Cherian Signed-off-by: Andrei Botila --- drivers/crypto/cavium/cpt/cptvf_algs.c | 4 1 file changed, 4

[PATCH 20/22] crypto: octeontx - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Boris Brezillon Cc: Arnaud Ebalard Cc: Srujana Challa Signed-off-by: Andrei Botila --- drivers/crypto/marvell/octeontx

[PATCH 16/22] crypto: ccree - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. This change has implications not only for xts(aes) but also for cts(cbc(aes)) and cts(cbc(paes)). Cc: Gilad Ben-Yossef Signed

[PATCH 18/22] crypto: hisilicon/sec - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Signed-off-by: Andrei Botila --- drivers/crypto/hisilicon/sec/sec_algs.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 21/22] crypto: qce - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Signed-off-by: Andrei Botila --- drivers/crypto/qce/skcipher.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers

[PATCH 17/22] crypto: chelsio - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Ayush Sawal Cc: Vinay Kumar Yadav Cc: Rohit Maheshwari Signed-off-by: Andrei Botila --- drivers/crypto/chelsio

[PATCH 15/22] crypto: ccp - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Tom Lendacky Cc: John Allen Signed-off-by: Andrei Botila --- drivers/crypto/ccp/ccp-crypto-aes-xts.c | 3 +++ 1 file

[PATCH 08/22] crypto: x86/glue_helper - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Signed-off-by: Andrei Botila ---

[PATCH 01/22] crypto: arm/aes-ce - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Russell King Signed-off-by: Andrei Botila --- arch/arm/crypto/aes-ce-glue.c | 6 ++ 1 file changed, 6 insertions

[PATCH 22/22] crypto: vmx - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: "Breno Leitão" Cc: Nayna Jain Cc: Paulo Flabiano Smorigo Cc: Benjamin Herrenschmidt Cc: Paul Mackerras C

[PATCH 11/22] crypto: artpec6 - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Jesper Nilsson Cc: Lars Persson Signed-off-by: Andrei Botila --- drivers/crypto/axis/artpec6_crypto.c | 6 ++ 1 file

[PATCH 07/22] crypto: s390/paes - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Signed-off-by: Andrei Botila --- arch/s390/crypto/paes_s390.c

[PATCH 09/22] crypto: xts - add check for block length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Signed-off-by: Andrei Botila --- crypto/xts.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/crypto/xts.c b/crypto

[PATCH 14/22] crypto: cavium/nitrox - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Srikanth Jampala Cc: Nagadheeraj Rottela Signed-off-by: Andrei Botila --- drivers/crypto/cavium/nitrox/nitrox_skcipher.c

[PATCH 02/22] crypto: arm/aes-neonbs - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Russell King Signed-off-by: Andrei Botila --- arch/arm/crypto/aes-neonbs-glue.c | 3 +++ 1 file changed, 3 insertions

[PATCH 05/22] crypto: powerpc/aes-spe - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Andrei Botila --- arch/powerpc/crypto/aes

[PATCH 03/22] crypto: arm64/aes - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrei Botila --- arch/arm64/crypto/aes-glue.c | 6 ++ 1 file changed

[PATCH 06/22] crypto: s390/aes - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Signed-off-by: Andrei Botila --- arch/s390/crypto/aes_s390.c

[PATCH 04/22] crypto: arm64/aes-neonbs - add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila Standardize the way input lengths equal to 0 are handled in all skcipher algorithms. All the algorithms return 0 for input lengths equal to zero. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrei Botila --- arch/arm64/crypto/aes-neonbs-glue.c | 3 +++ 1 file

[PATCH 00/22] crypto: add check for xts input length equal to zero

2020-08-07 Thread Andrei Botila
From: Andrei Botila This patch set is a follow-up on the previous RFC discussion which can be found here: https://lore.kernel.org/r/4145904.a5p2xsn...@tauon.chronox.de This series converts all XTS implementations to return 0 when the input length is equal to 0. This change is necessary in order

[PATCH RESEND 6/9] crypto: caam/qi2 - add support for more XTS key lengths

2020-08-06 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: 226853ac3ebe ("crypto: caam/qi2

[PATCH RESEND 0/9] crypto: caam - xts(aes) updates

2020-08-06 Thread Andrei Botila
From: Andrei Botila This patch series fixes some problems in CAAM's implementation of xts(aes): - CAAM until Era 9 can't process XTS with 16B IV - CAAM can only process in hardware XTS key lengths of 16B and 32B - These hardware limitations are resolved through a fallback This patch series

[PATCH RESEND 3/9] crypto: caam/qi2 - add fallback for XTS with more than 8B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: 226853ac3ebe ("crypto: caam/qi2 - add skcipher algorithms") Cc: # v4.20+

[PATCH RESEND 8/9] crypto: caam/qi - add support for XTS with 16B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH RESEND 4/9] crypto: caam/jr - add support for more XTS key lengths

2020-08-06 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: c6415a6016bf ("crypto: caam - add su

[PATCH 6/9] crypto: caam/qi2 - add support for more XTS key lengths

2020-08-06 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: 226853ac3ebe ("crypto: caam/qi2

[PATCH 9/9] crypto: caam/qi2 - add support for XTS with 16B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH 4/9] crypto: caam/jr - add support for more XTS key lengths

2020-08-06 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: c6415a6016bf ("crypto: caam - add su

[PATCH 3/9] crypto: caam/qi2 - add fallback for XTS with more than 8B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: 226853ac3ebe ("crypto: caam/qi2 - add skcipher algorithms") Cc: # v4.20+

[PATCH 1/9] crypto: caam/jr - add fallback for XTS with more than 8B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: c6415a6016bf ("crypto: caam - add support for acipher xts(aes)") Cc: # v4

[PATCH 5/9] crypto: caam/qi - add support for more XTS key lengths

2020-08-06 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: b189817cf789 ("crypto: caam/qi

[PATCH 8/9] crypto: caam/qi - add support for XTS with 16B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH 0/9] crypto: caam - xts(aes) updates

2020-08-06 Thread Andrei Botila
From: Andrei Botila This patch series fixes some problems in CAAM's implementation of xts(aes): - CAAM until Era 9 can't process XTS with 16B IV - CAAM can only process in hardware XTS key lengths of 16B and 32B - These hardware limitations are resolved through a fallback This patch series

[PATCH RESEND 9/9] crypto: caam/qi2 - add support for XTS with 16B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH RESEND 5/9] crypto: caam/qi - add support for more XTS key lengths

2020-08-06 Thread Andrei Botila
From: Andrei Botila CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: b189817cf789 ("crypto: caam/qi

[PATCH RESEND 2/9] crypto: caam/qi - add fallback for XTS with more than 8B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Cc

[PATCH RESEND 1/9] crypto: caam/jr - add fallback for XTS with more than 8B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: c6415a6016bf ("crypto: caam - add support for acipher xts(aes)") Cc: # v4

[PATCH RESEND 7/9] crypto: caam/jr - add support for XTS with 16B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH 7/9] crypto: caam/jr - add support for XTS with 16B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila --- drivers/crypto/caam

[PATCH 2/9] crypto: caam/qi - add fallback for XTS with more than 8B IV

2020-08-06 Thread Andrei Botila
From: Andrei Botila A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Cc

[PATCH v2] crypto: caam/qi2 - add support for dpseci_reset()

2020-06-03 Thread Andrei Botila
From: Andrei Botila Add support for dpseci_reset() command for DPSECI objects. For DPSECI DPAA2 objects with version lower than v5.4 reset command was broken in MC f/w. Signed-off-by: Andrei Botila --- Changes since V1: - added, in dpaa2_dpseci_free function an error message in case

[PATCH] crypto: caam/qi2 - add support for dpseci_reset()

2020-05-28 Thread Andrei Botila
From: Andrei Botila Add support for dpseci_reset() command for DPSECI objects. For DPSECI DPAA2 objects with version lower than v5.4 reset command was broken in MC f/w. Signed-off-by: Andrei Botila --- drivers/crypto/caam/caamalg_qi2.c | 11 +++ drivers/crypto/caam/dpseci.c | 18