mbox series

[00/40] cryptodev: rsa, dh, ecdh changes

Message ID 20220520055445.40063-1-arkadiuszx.kusztal@intel.com (mailing list archive)
Headers show
Series cryptodev: rsa, dh, ecdh changes | expand

Message

Arek Kusztal May 20, 2022, 5:54 a.m. UTC
This patchset introduces some of changes discussed on mailing list
for 22.07 release in cryptodev asym.

Key changes:

- It fixes API for RSA (expescially signature paddings)
- Adds Elliptic-Curve Diffie-Hellman
- Removes LIST_END enumerators (ABI issue - supressed asym_xform)
- Adds Eliiptic-Curve point verification (DH verification - but will be used only for EC)
- Adds RSA missing padding fields.
- Adds asym op flags
- Fixes many API comments (like EC curves)

Commits are grouped by functionality, and mostly independent.

Arek Kusztal (40):
  cryptodev: redefine ec group enum
  cryptodev: remove list end enumerators
  test/crypto: remove list end enumerators
  cryptodev: reduce number of comments in asym xform
  test/crypto: removed asym xform none
  cryptodev: separate key exchange operation enum
  crypto/openssl: separate key exchange operation enum
  test/crypto: separate key exchange operation enum
  cryptodev: remove unnecessary zero assignement
  cryptodev: remove comment about using ephemeral key in dsa
  cryptodev: remove asym crypto next xform
  crypto/openssl: remove asym crypto next xform
  test/crypto: remove asym crypto next xform
  app/test-crypto-perf: remove asym crypto next xform
  app/test-eventdev: remove asym crypto next xform
  cryptodev: move dh type from xform to dh op
  crypto/openssl: move dh type from xform to dh op
  test/crypto: move dh type from xform to dh op
  cryptodev: changed order of dh fields
  cryptodev: add elliptic curve diffie hellman
  cryptodev: add public key verify option
  cryptodev: move RSA padding into separate struct
  crypto/qat: move RSA padding into separate struct
  crypto/openssl: move RSA padding into separate struct
  crypto/octeontx: move RSA padding into separate struct
  crypto/cnxk: move RSA padding into separate struct
  common/cpt: move RSA padding into separate struct
  test/crypto: move RSA padding into separate struct
  cryptodev: add salt length and optional label
  cryptodev: reduce rsa struct to only necessary fields
  crypto/qat: reduce rsa struct to only necessary fields
  crypto/openssl: reduce rsa struct to only necessary fields
  crypto/octeontx: reduce rsa struct to only necessary fields
  crypto/cnxk: reduce rsa struct to only necessary fields
  common/cpt: reduce rsa struct to only necessary fields
  test/crypto: reduce rsa struct to only necessary fields
  cryptodev: add asym op flags
  cryptodev: clarify usage of private key in dh
  crypto/openssl: generate dh private key
  test/crypto: added test for dh priv key generation

 app/test-crypto-perf/cperf_ops.c             |   1 -
 app/test-eventdev/test_perf_common.c         |   1 -
 app/test/test_cryptodev_asym.c               | 117 +++++----
 app/test/test_cryptodev_dh_test_vectors.h    |   1 -
 app/test/test_cryptodev_dsa_test_vectors.h   |   1 -
 app/test/test_cryptodev_mod_test_vectors.h   |   2 -
 app/test/test_cryptodev_rsa_test_vectors.h   |   2 -
 app/test/test_event_crypto_adapter.c         |   4 -
 devtools/libabigail.abignore                 |   2 +
 drivers/common/cpt/cpt_ucode_asym.h          |  12 +-
 drivers/crypto/cnxk/cnxk_ae.h                |  44 ++--
 drivers/crypto/octeontx/otx_cryptodev_ops.c  |  26 +-
 drivers/crypto/openssl/rte_openssl_pmd.c     |  47 ++--
 drivers/crypto/openssl/rte_openssl_pmd_ops.c |  33 +--
 drivers/crypto/qat/qat_asym.c                |  28 +--
 lib/cryptodev/rte_crypto_asym.h              | 342 ++++++++++++++++-----------
 lib/cryptodev/rte_cryptodev.c                |  15 +-
 17 files changed, 358 insertions(+), 320 deletions(-)

Comments

Akhil Goyal May 20, 2022, 7:30 a.m. UTC | #1
> This patchset introduces some of changes discussed on mailing list
> for 22.07 release in cryptodev asym.
> 
> Key changes:
> 
> - It fixes API for RSA (expescially signature paddings)
> - Adds Elliptic-Curve Diffie-Hellman
> - Removes LIST_END enumerators (ABI issue - supressed asym_xform)
> - Adds Eliiptic-Curve point verification (DH verification - but will be used only for
> EC)
> - Adds RSA missing padding fields.
> - Adds asym op flags
> - Fixes many API comments (like EC curves)
> 
> Commits are grouped by functionality, and mostly independent.

Please ensure all commits compile individually.
Also mark previous versions in patchworks as superseded.

> 
> Arek Kusztal (40):
>   cryptodev: redefine ec group enum
>   cryptodev: remove list end enumerators
>   test/crypto: remove list end enumerators
>   cryptodev: reduce number of comments in asym xform
>   test/crypto: removed asym xform none
>   cryptodev: separate key exchange operation enum
>   crypto/openssl: separate key exchange operation enum
>   test/crypto: separate key exchange operation enum
>   cryptodev: remove unnecessary zero assignement
>   cryptodev: remove comment about using ephemeral key in dsa
>   cryptodev: remove asym crypto next xform
>   crypto/openssl: remove asym crypto next xform
>   test/crypto: remove asym crypto next xform
>   app/test-crypto-perf: remove asym crypto next xform
>   app/test-eventdev: remove asym crypto next xform
>   cryptodev: move dh type from xform to dh op
>   crypto/openssl: move dh type from xform to dh op
>   test/crypto: move dh type from xform to dh op
>   cryptodev: changed order of dh fields
>   cryptodev: add elliptic curve diffie hellman
>   cryptodev: add public key verify option
>   cryptodev: move RSA padding into separate struct
>   crypto/qat: move RSA padding into separate struct
>   crypto/openssl: move RSA padding into separate struct
>   crypto/octeontx: move RSA padding into separate struct
>   crypto/cnxk: move RSA padding into separate struct
>   common/cpt: move RSA padding into separate struct
>   test/crypto: move RSA padding into separate struct
>   cryptodev: add salt length and optional label
>   cryptodev: reduce rsa struct to only necessary fields
>   crypto/qat: reduce rsa struct to only necessary fields
>   crypto/openssl: reduce rsa struct to only necessary fields
>   crypto/octeontx: reduce rsa struct to only necessary fields
>   crypto/cnxk: reduce rsa struct to only necessary fields
>   common/cpt: reduce rsa struct to only necessary fields
>   test/crypto: reduce rsa struct to only necessary fields
>   cryptodev: add asym op flags
>   cryptodev: clarify usage of private key in dh
>   crypto/openssl: generate dh private key
>   test/crypto: added test for dh priv key generation
> 
>  app/test-crypto-perf/cperf_ops.c             |   1 -
>  app/test-eventdev/test_perf_common.c         |   1 -
>  app/test/test_cryptodev_asym.c               | 117 +++++----
>  app/test/test_cryptodev_dh_test_vectors.h    |   1 -
>  app/test/test_cryptodev_dsa_test_vectors.h   |   1 -
>  app/test/test_cryptodev_mod_test_vectors.h   |   2 -
>  app/test/test_cryptodev_rsa_test_vectors.h   |   2 -
>  app/test/test_event_crypto_adapter.c         |   4 -
>  devtools/libabigail.abignore                 |   2 +
>  drivers/common/cpt/cpt_ucode_asym.h          |  12 +-
>  drivers/crypto/cnxk/cnxk_ae.h                |  44 ++--
>  drivers/crypto/octeontx/otx_cryptodev_ops.c  |  26 +-
>  drivers/crypto/openssl/rte_openssl_pmd.c     |  47 ++--
>  drivers/crypto/openssl/rte_openssl_pmd_ops.c |  33 +--
>  drivers/crypto/qat/qat_asym.c                |  28 +--
>  lib/cryptodev/rte_crypto_asym.h              | 342 ++++++++++++++++-----------
>  lib/cryptodev/rte_cryptodev.c                |  15 +-
>  17 files changed, 358 insertions(+), 320 deletions(-)
> 
> --
> 2.13.6
Arek Kusztal May 20, 2022, 7:37 a.m. UTC | #2
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Friday, May 20, 2022 9:30 AM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>
> Subject: RE: [EXT] [PATCH 00/40] cryptodev: rsa, dh, ecdh changes
> 
> > This patchset introduces some of changes discussed on mailing list for
> > 22.07 release in cryptodev asym.
> >
> > Key changes:
> >
> > - It fixes API for RSA (expescially signature paddings)
> > - Adds Elliptic-Curve Diffie-Hellman
> > - Removes LIST_END enumerators (ABI issue - supressed asym_xform)
> > - Adds Eliiptic-Curve point verification (DH verification - but will
> > be used only for
> > EC)
> > - Adds RSA missing padding fields.
> > - Adds asym op flags
> > - Fixes many API comments (like EC curves)
> >
> > Commits are grouped by functionality, and mostly independent.
> 
> Please ensure all commits compile individually.
> Also mark previous versions in patchworks as superseded.
[Arek] - I will send v2 then, and I will fix all technical issues. Please verify if you are fine with changes proposed,. Most of these changes were already proposed in previous patches and in RFCs with no or minor problems found. Second patchset I would like to send contains capability changes and montgormery/Edwards curvers (would be good to have this in this release).
> 
> >
> > Arek Kusztal (40):
> >   cryptodev: redefine ec group enum
> >   cryptodev: remove list end enumerators
> >   test/crypto: remove list end enumerators
> >   cryptodev: reduce number of comments in asym xform
> >   test/crypto: removed asym xform none
> >   cryptodev: separate key exchange operation enum
> >   crypto/openssl: separate key exchange operation enum
> >   test/crypto: separate key exchange operation enum
> >   cryptodev: remove unnecessary zero assignement
> >   cryptodev: remove comment about using ephemeral key in dsa
> >   cryptodev: remove asym crypto next xform
> >   crypto/openssl: remove asym crypto next xform
> >   test/crypto: remove asym crypto next xform
> >   app/test-crypto-perf: remove asym crypto next xform
> >   app/test-eventdev: remove asym crypto next xform
> >   cryptodev: move dh type from xform to dh op
> >   crypto/openssl: move dh type from xform to dh op
> >   test/crypto: move dh type from xform to dh op
> >   cryptodev: changed order of dh fields
> >   cryptodev: add elliptic curve diffie hellman
> >   cryptodev: add public key verify option
> >   cryptodev: move RSA padding into separate struct
> >   crypto/qat: move RSA padding into separate struct
> >   crypto/openssl: move RSA padding into separate struct
> >   crypto/octeontx: move RSA padding into separate struct
> >   crypto/cnxk: move RSA padding into separate struct
> >   common/cpt: move RSA padding into separate struct
> >   test/crypto: move RSA padding into separate struct
> >   cryptodev: add salt length and optional label
> >   cryptodev: reduce rsa struct to only necessary fields
> >   crypto/qat: reduce rsa struct to only necessary fields
> >   crypto/openssl: reduce rsa struct to only necessary fields
> >   crypto/octeontx: reduce rsa struct to only necessary fields
> >   crypto/cnxk: reduce rsa struct to only necessary fields
> >   common/cpt: reduce rsa struct to only necessary fields
> >   test/crypto: reduce rsa struct to only necessary fields
> >   cryptodev: add asym op flags
> >   cryptodev: clarify usage of private key in dh
> >   crypto/openssl: generate dh private key
> >   test/crypto: added test for dh priv key generation
> >
> >  app/test-crypto-perf/cperf_ops.c             |   1 -
> >  app/test-eventdev/test_perf_common.c         |   1 -
> >  app/test/test_cryptodev_asym.c               | 117 +++++----
> >  app/test/test_cryptodev_dh_test_vectors.h    |   1 -
> >  app/test/test_cryptodev_dsa_test_vectors.h   |   1 -
> >  app/test/test_cryptodev_mod_test_vectors.h   |   2 -
> >  app/test/test_cryptodev_rsa_test_vectors.h   |   2 -
> >  app/test/test_event_crypto_adapter.c         |   4 -
> >  devtools/libabigail.abignore                 |   2 +
> >  drivers/common/cpt/cpt_ucode_asym.h          |  12 +-
> >  drivers/crypto/cnxk/cnxk_ae.h                |  44 ++--
> >  drivers/crypto/octeontx/otx_cryptodev_ops.c  |  26 +-
> >  drivers/crypto/openssl/rte_openssl_pmd.c     |  47 ++--
> >  drivers/crypto/openssl/rte_openssl_pmd_ops.c |  33 +--
> >  drivers/crypto/qat/qat_asym.c                |  28 +--
> >  lib/cryptodev/rte_crypto_asym.h              | 342 ++++++++++++++++-----------
> >  lib/cryptodev/rte_cryptodev.c                |  15 +-
> >  17 files changed, 358 insertions(+), 320 deletions(-)
> >
> > --
> > 2.13.6