DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] crypto/qat: fix legacy sm4 ecb capability
@ 2023-07-05 13:23 Ciara Power
  2023-07-05 13:56 ` Ji, Kai
  2023-07-05 15:49 ` O'Donovan, Saoirse
  0 siblings, 2 replies; 4+ messages in thread
From: Ciara Power @ 2023-07-05 13:23 UTC (permalink / raw)
  To: dev; +Cc: kai.ji, saoirse.odonovan, Ciara Power

Following the deprecation of insecure algorithms in QAT,
SM4-ECB should be included as legacy, to be disabled by default.

Fixes: cffb726b7797 ("crypto/qat: enable insecure algorithms")

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
index bc71665a50..d25e1b2f3a 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
@@ -46,6 +46,9 @@ static struct rte_cryptodev_capabilities qat_sym_crypto_legacy_caps_gen3[] = {
 	QAT_SYM_PLAIN_AUTH_CAP(SHA3_224,
 		CAP_SET(block_size, 144),
 		CAP_RNG(digest_size, 28, 28, 0)),
+	QAT_SYM_CIPHER_CAP(SM4_ECB,
+		CAP_SET(block_size, 16),
+		CAP_RNG(key_size, 16, 16, 0), CAP_RNG(iv_size, 0, 0, 0))
 };
 
 static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen3[] = {
@@ -147,9 +150,6 @@ static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen3[] = {
 		CAP_RNG(key_size, 32, 32, 0),
 		CAP_RNG(digest_size, 16, 16, 0),
 		CAP_RNG(aad_size, 0, 240, 1), CAP_RNG(iv_size, 12, 12, 0)),
-	QAT_SYM_CIPHER_CAP(SM4_ECB,
-		CAP_SET(block_size, 16),
-		CAP_RNG(key_size, 16, 16, 0), CAP_RNG(iv_size, 0, 0, 0)),
 	QAT_SYM_CIPHER_CAP(SM4_CBC,
 		CAP_SET(block_size, 16),
 		CAP_RNG(key_size, 16, 16, 0), CAP_RNG(iv_size, 16, 16, 0)),
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] crypto/qat: fix legacy sm4 ecb capability
  2023-07-05 13:23 [PATCH] crypto/qat: fix legacy sm4 ecb capability Ciara Power
@ 2023-07-05 13:56 ` Ji, Kai
  2023-07-05 15:49 ` O'Donovan, Saoirse
  1 sibling, 0 replies; 4+ messages in thread
From: Ji, Kai @ 2023-07-05 13:56 UTC (permalink / raw)
  To: Power, Ciara, dev; +Cc: O'Donovan, Saoirse

[-- Attachment #1: Type: text/plain, Size: 2054 bytes --]

Acked-by: Kai Ji <kai.ji@intel.com<mailto:kai.ji@intel.com>>
________________________________
From: Power, Ciara <ciara.power@intel.com>
Sent: 05 July 2023 14:23
To: dev@dpdk.org <dev@dpdk.org>
Cc: Ji, Kai <kai.ji@intel.com>; O'Donovan, Saoirse <saoirse.odonovan@intel.com>; Power, Ciara <ciara.power@intel.com>
Subject: [PATCH] crypto/qat: fix legacy sm4 ecb capability

Following the deprecation of insecure algorithms in QAT,
SM4-ECB should be included as legacy, to be disabled by default.

Fixes: cffb726b7797 ("crypto/qat: enable insecure algorithms")

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
index bc71665a50..d25e1b2f3a 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
@@ -46,6 +46,9 @@ static struct rte_cryptodev_capabilities qat_sym_crypto_legacy_caps_gen3[] = {
         QAT_SYM_PLAIN_AUTH_CAP(SHA3_224,
                 CAP_SET(block_size, 144),
                 CAP_RNG(digest_size, 28, 28, 0)),
+       QAT_SYM_CIPHER_CAP(SM4_ECB,
+               CAP_SET(block_size, 16),
+               CAP_RNG(key_size, 16, 16, 0), CAP_RNG(iv_size, 0, 0, 0))
 };

 static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen3[] = {
@@ -147,9 +150,6 @@ static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen3[] = {
                 CAP_RNG(key_size, 32, 32, 0),
                 CAP_RNG(digest_size, 16, 16, 0),
                 CAP_RNG(aad_size, 0, 240, 1), CAP_RNG(iv_size, 12, 12, 0)),
-       QAT_SYM_CIPHER_CAP(SM4_ECB,
-               CAP_SET(block_size, 16),
-               CAP_RNG(key_size, 16, 16, 0), CAP_RNG(iv_size, 0, 0, 0)),
         QAT_SYM_CIPHER_CAP(SM4_CBC,
                 CAP_SET(block_size, 16),
                 CAP_RNG(key_size, 16, 16, 0), CAP_RNG(iv_size, 16, 16, 0)),
--
2.25.1


[-- Attachment #2: Type: text/html, Size: 4072 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] crypto/qat: fix legacy sm4 ecb capability
  2023-07-05 13:23 [PATCH] crypto/qat: fix legacy sm4 ecb capability Ciara Power
  2023-07-05 13:56 ` Ji, Kai
@ 2023-07-05 15:49 ` O'Donovan, Saoirse
  2023-07-05 18:22   ` Akhil Goyal
  1 sibling, 1 reply; 4+ messages in thread
From: O'Donovan, Saoirse @ 2023-07-05 15:49 UTC (permalink / raw)
  To: Power, Ciara, dev; +Cc: Ji, Kai

Hi Ciara,

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Wednesday 5 July 2023 14:23
> To: dev@dpdk.org
> Cc: Ji, Kai <kai.ji@intel.com>; O'Donovan, Saoirse
> <saoirse.odonovan@intel.com>; Power, Ciara <ciara.power@intel.com>
> Subject: [PATCH] crypto/qat: fix legacy sm4 ecb capability
> 
> Following the deprecation of insecure algorithms in QAT, SM4-ECB should be
> included as legacy, to be disabled by default.
> 
> Fixes: cffb726b7797 ("crypto/qat: enable insecure algorithms")
> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> ---
>  drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Tested-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] crypto/qat: fix legacy sm4 ecb capability
  2023-07-05 15:49 ` O'Donovan, Saoirse
@ 2023-07-05 18:22   ` Akhil Goyal
  0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2023-07-05 18:22 UTC (permalink / raw)
  To: O'Donovan, Saoirse, Power, Ciara, dev; +Cc: Ji, Kai

> > Subject: [PATCH] crypto/qat: fix legacy sm4 ecb capability
> >
> > Following the deprecation of insecure algorithms in QAT, SM4-ECB should be
> > included as legacy, to be disabled by default.
> >
> > Fixes: cffb726b7797 ("crypto/qat: enable insecure algorithms")
> >
> > Signed-off-by: Ciara Power <ciara.power@intel.com>
> > ---
> >  drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Tested-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>

Applied to dpdk-next-crypto

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-05 18:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 13:23 [PATCH] crypto/qat: fix legacy sm4 ecb capability Ciara Power
2023-07-05 13:56 ` Ji, Kai
2023-07-05 15:49 ` O'Donovan, Saoirse
2023-07-05 18:22   ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).