mbox series

[0/4] cryptodev: add SM3 and SM4 algorithms

Message ID 20220817060856.78582-1-arkadiuszx.kusztal@intel.com (mailing list archive)
Headers
Series cryptodev: add SM3 and SM4 algorithms |

Message

Arkadiusz Kusztal Aug. 17, 2022, 6:08 a.m. UTC
  ShangMi 4 (SM4) is a block cipher used in the Chinese National Standard for
Wireless LAN WAPI and also used with Transport Layer Security.
ShangMi 3 (SM3) is a cryptographic hash function used in the
Chinese National Standard.

This patcheset adds both to the Cryptodev.

Arek Kusztal (4):
  cryptodev: add SM4 encryption algorithm
  cryptodev: add SM3 hash algorithm
  crypto/qat: add SM4 encryption algorithm
  crypto/qat : add SM3 hash algorithm

 doc/guides/cryptodevs/features/default.ini   |  4 ++++
 doc/guides/cryptodevs/features/qat.ini       |  4 ++++
 doc/guides/rel_notes/release_22_11.rst       | 16 ++++++++++++++
 drivers/common/qat/qat_adf/icp_qat_hw.h      |  2 +-
 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c |  9 ++++++++
 drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c |  9 ++++++++
 drivers/crypto/qat/qat_sym_session.c         | 32 +++++++++++++++++++++++++++-
 lib/cryptodev/rte_crypto_sym.h               | 13 +++++++++--
 lib/cryptodev/rte_cryptodev.c                |  8 +++++--
 9 files changed, 91 insertions(+), 6 deletions(-)
  

Comments

Akhil Goyal Sept. 21, 2022, 7:37 p.m. UTC | #1
> -----Original Message-----
> From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Sent: Wednesday, August 17, 2022 11:39 AM
> To: dev@dpdk.org
> Cc: Akhil Goyal <gakhil@marvell.com>; kai.ji@intel.com; Arek Kusztal
> <arkadiuszx.kusztal@intel.com>
> Subject: [EXT] [PATCH 0/4] cryptodev: add SM3 and SM4 algorithms
> 
> External Email
> 
> ----------------------------------------------------------------------
> ShangMi 4 (SM4) is a block cipher used in the Chinese National Standard for
> Wireless LAN WAPI and also used with Transport Layer Security.
> ShangMi 3 (SM3) is a cryptographic hash function used in the
> Chinese National Standard.

Add these full forms in comments of the enums that are added in patch 1 and 2

> 
> This patcheset adds both to the Cryptodev.
> 
> Arek Kusztal (4):
>   cryptodev: add SM4 encryption algorithm
>   cryptodev: add SM3 hash algorithm
>   crypto/qat: add SM4 encryption algorithm
>   crypto/qat : add SM3 hash algorithm
> 
>  doc/guides/cryptodevs/features/default.ini   |  4 ++++
>  doc/guides/cryptodevs/features/qat.ini       |  4 ++++
>  doc/guides/rel_notes/release_22_11.rst       | 16 ++++++++++++++
>  drivers/common/qat/qat_adf/icp_qat_hw.h      |  2 +-
>  drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c |  9 ++++++++
>  drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c |  9 ++++++++
>  drivers/crypto/qat/qat_sym_session.c         | 32
> +++++++++++++++++++++++++++-
>  lib/cryptodev/rte_crypto_sym.h               | 13 +++++++++--
>  lib/cryptodev/rte_cryptodev.c                |  8 +++++--
>  9 files changed, 91 insertions(+), 6 deletions(-)
> 
> --
> 2.13.6
  
Arkadiusz Kusztal Sept. 28, 2022, 10:56 a.m. UTC | #2
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Wednesday, September 21, 2022 9:37 PM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Ji, Kai <kai.ji@intel.com>
> Subject: RE: [EXT] [PATCH 0/4] cryptodev: add SM3 and SM4 algorithms
> 
> 
> 
> > -----Original Message-----
> > From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > Sent: Wednesday, August 17, 2022 11:39 AM
> > To: dev@dpdk.org
> > Cc: Akhil Goyal <gakhil@marvell.com>; kai.ji@intel.com; Arek Kusztal
> > <arkadiuszx.kusztal@intel.com>
> > Subject: [EXT] [PATCH 0/4] cryptodev: add SM3 and SM4 algorithms
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > ShangMi 4 (SM4) is a block cipher used in the Chinese National
> > Standard for Wireless LAN WAPI and also used with Transport Layer Security.
> > ShangMi 3 (SM3) is a cryptographic hash function used in the Chinese
> > National Standard.
> 
> Add these full forms in comments of the enums that are added in patch 1 and 2
I do not think we should, it is just current description of usage state of SM3/4.
Especially that we do not put much effort into other algorithms, particularly with 3gpp algorithms which are all over the place with naming and comments.
> 
> >
> > This patcheset adds both to the Cryptodev.
> >
> > Arek Kusztal (4):
> >   cryptodev: add SM4 encryption algorithm
> >   cryptodev: add SM3 hash algorithm
> >   crypto/qat: add SM4 encryption algorithm
> >   crypto/qat : add SM3 hash algorithm
> >
> >  doc/guides/cryptodevs/features/default.ini   |  4 ++++
> >  doc/guides/cryptodevs/features/qat.ini       |  4 ++++
> >  doc/guides/rel_notes/release_22_11.rst       | 16 ++++++++++++++
> >  drivers/common/qat/qat_adf/icp_qat_hw.h      |  2 +-
> >  drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c |  9 ++++++++
> > drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c |  9 ++++++++
> >  drivers/crypto/qat/qat_sym_session.c         | 32
> > +++++++++++++++++++++++++++-
> >  lib/cryptodev/rte_crypto_sym.h               | 13 +++++++++--
> >  lib/cryptodev/rte_cryptodev.c                |  8 +++++--
> >  9 files changed, 91 insertions(+), 6 deletions(-)
> >
> > --
> > 2.13.6
  
Akhil Goyal Sept. 28, 2022, 11:05 a.m. UTC | #3
> > > ShangMi 4 (SM4) is a block cipher used in the Chinese National
> > > Standard for Wireless LAN WAPI and also used with Transport Layer Security.
> > > ShangMi 3 (SM3) is a cryptographic hash function used in the Chinese
> > > National Standard.
> >
> > Add these full forms in comments of the enums that are added in patch 1 and 2
> I do not think we should, it is just current description of usage state of SM3/4.
> Especially that we do not put much effort into other algorithms, particularly with
> 3gpp algorithms which are all over the place with naming and comments.

Yes, we do not do so, as those algos are very common and does not have any other full form.
But SM3 and SM4 are relatively new and does not come up easily in search results if we just type SM3.
However, if we search for ShangMi 3, we get the RFC on first result.
  
Arkadiusz Kusztal Sept. 28, 2022, 11:49 a.m. UTC | #4
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Wednesday, September 28, 2022 1:05 PM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Ji, Kai <kai.ji@intel.com>
> Subject: RE: [EXT] [PATCH 0/4] cryptodev: add SM3 and SM4 algorithms
> 
> > > > ShangMi 4 (SM4) is a block cipher used in the Chinese National
> > > > Standard for Wireless LAN WAPI and also used with Transport Layer
> Security.
> > > > ShangMi 3 (SM3) is a cryptographic hash function used in the
> > > > Chinese National Standard.
> > >
> > > Add these full forms in comments of the enums that are added in
> > > patch 1 and 2
> > I do not think we should, it is just current description of usage state of SM3/4.
> > Especially that we do not put much effort into other algorithms,
> > particularly with 3gpp algorithms which are all over the place with naming and
> comments.
> 
> Yes, we do not do so, as those algos are very common and does not have any
> other full form.
> But SM3 and SM4 are relatively new and does not come up easily in search
> results if we just type SM3.
> However, if we search for ShangMi 3, we get the RFC on first result.
Ok, you meant algorithm full name - not full comment.
I misunderstood you, yes of course I will add full name.