mbox series

[v4,00/11] Rework API for RSA algorithm in asymmetric crypto

Message ID 20190717125111.11288-1-arkadiuszx.kusztal@intel.com (mailing list archive)
Headers
Series Rework API for RSA algorithm in asymmetric crypto |

Message

Arkadiusz Kusztal July 17, 2019, 12:51 p.m. UTC
  Split into smaller commits, in order from least disputable ones.
Open things beside this:
1. Creating padding struct
2. Padding parameters (seedlen, optional label etc) 
3. Leading zeroes questions.
4. Random number requirements.
5. Capabilities.
6. Verify signature field when none padding.

v4:
- change API comments from length -> array allocation
to avoid ambiguity

v3:
- split into smaller patches
- removed padding struct changes
- rebased against patches from CRT patches from Ayuj Verma

v2:
- Field for singature verification when padding none selected was added
- Removed details from RFC
- Simplified padding struct
- Added padding none test case

This patchset depends on following patches:
[1] 
test/crypto: move rsa enqueue/dequeue into separate functions
(http://patchwork.dpdk.org/patch/56342/)
[2]
test/crypto: add tests for RSA key type CRT
(http://patchwork.dpdk.org/patch/56343/)

Arek Kusztal (11):
  cryptodev: change RSA API comments about primes
  cryptodev: add cipher field to RSA op
  crypto/openssl: add cipher field to openssl RSA implementation
  test: add cipher field to RSA test
  cryptodev: add information about message format when signing with RSA
  cryptodev: remove RSA PKCS1 BT0 padding
  openssl: remove RSA PKCS1_5 BT0 padding
  test: remove RSA PKCS1_5 BT0 padding from test cases
  cryptodev: add RSA padding none description
  test: add pkcs1_5 padding simulation
  test: add RSA PKCS1_5 padding case when no padding selected

 app/test/test_cryptodev_asym.c           | 53 ++++++++++++++++++++------
 app/test/test_cryptodev_asym_util.h      | 54 +++++++++++++++++++++++++++
 drivers/crypto/openssl/rte_openssl_pmd.c | 12 +++---
 lib/librte_cryptodev/rte_crypto_asym.h   | 64 ++++++++++++++++++++++++--------
 4 files changed, 149 insertions(+), 34 deletions(-)
  

Comments

Fiona Trahe July 17, 2019, 4 p.m. UTC | #1
> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Wednesday, July 17, 2019 1:51 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; shallyv@marvell.com; Nowak,
> DamianX <damianx.nowak@intel.com>; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v4 00/11] Rework API for RSA algorithm in asymmetric crypto
> 
> Split into smaller commits, in order from least disputable ones.
> Open things beside this:
> 1. Creating padding struct
> 2. Padding parameters (seedlen, optional label etc)
> 3. Leading zeroes questions.
> 4. Random number requirements.
> 5. Capabilities.
> 6. Verify signature field when none padding.
> 
> v4:
> - change API comments from length -> array allocation
> to avoid ambiguity
> 
> v3:
> - split into smaller patches
> - removed padding struct changes
> - rebased against patches from CRT patches from Ayuj Verma
> 
> v2:
> - Field for singature verification when padding none selected was added
> - Removed details from RFC
> - Simplified padding struct
> - Added padding none test case
> 
> This patchset depends on following patches:
> [1]
> test/crypto: move rsa enqueue/dequeue into separate functions
> (http://patchwork.dpdk.org/patch/56342/)
> [2]
> test/crypto: add tests for RSA key type CRT
> (http://patchwork.dpdk.org/patch/56343/)
> 
> Arek Kusztal (11):
>   cryptodev: change RSA API comments about primes
>   cryptodev: add cipher field to RSA op
>   crypto/openssl: add cipher field to openssl RSA implementation
>   test: add cipher field to RSA test
>   cryptodev: add information about message format when signing with RSA
>   cryptodev: remove RSA PKCS1 BT0 padding
>   openssl: remove RSA PKCS1_5 BT0 padding
>   test: remove RSA PKCS1_5 BT0 padding from test cases
>   cryptodev: add RSA padding none description
>   test: add pkcs1_5 padding simulation
>   test: add RSA PKCS1_5 padding case when no padding selected
> 
>  app/test/test_cryptodev_asym.c           | 53 ++++++++++++++++++++------
>  app/test/test_cryptodev_asym_util.h      | 54 +++++++++++++++++++++++++++
>  drivers/crypto/openssl/rte_openssl_pmd.c | 12 +++---
>  lib/librte_cryptodev/rte_crypto_asym.h   | 64 ++++++++++++++++++++++++--------
>  4 files changed, 149 insertions(+), 34 deletions(-)
> 
> --
> 2.1.0
Series-acked-by: Fiona Trahe <fiona.trahe@intel.com>
  
Damian Nowak July 18, 2019, 8:57 a.m. UTC | #2
> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Wednesday, July 17, 2019 14:51
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>;
> shallyv@marvell.com; Nowak, DamianX <damianx.nowak@intel.com>;
> Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v4 00/11] Rework API for RSA algorithm in asymmetric
> crypto
> 
> Split into smaller commits, in order from least disputable ones.
> Open things beside this:
> 1. Creating padding struct
> 2. Padding parameters (seedlen, optional label etc) 3. Leading zeroes
> questions.
> 4. Random number requirements.
> 5. Capabilities.
> 6. Verify signature field when none padding.
> 
> v4:
> - change API comments from length -> array allocation to avoid ambiguity
> 
> v3:
> - split into smaller patches
> - removed padding struct changes
> - rebased against patches from CRT patches from Ayuj Verma
> 
> v2:
> - Field for singature verification when padding none selected was added
> - Removed details from RFC
> - Simplified padding struct
> - Added padding none test case
> 
> This patchset depends on following patches:
> [1]
> test/crypto: move rsa enqueue/dequeue into separate functions
> (http://patchwork.dpdk.org/patch/56342/)
> [2]
> test/crypto: add tests for RSA key type CRT
> (http://patchwork.dpdk.org/patch/56343/)
> 
> Arek Kusztal (11):
>   cryptodev: change RSA API comments about primes
>   cryptodev: add cipher field to RSA op
>   crypto/openssl: add cipher field to openssl RSA implementation
>   test: add cipher field to RSA test
>   cryptodev: add information about message format when signing with RSA
>   cryptodev: remove RSA PKCS1 BT0 padding
>   openssl: remove RSA PKCS1_5 BT0 padding
>   test: remove RSA PKCS1_5 BT0 padding from test cases
>   cryptodev: add RSA padding none description
>   test: add pkcs1_5 padding simulation
>   test: add RSA PKCS1_5 padding case when no padding selected
> 
>  app/test/test_cryptodev_asym.c           | 53 ++++++++++++++++++++------
>  app/test/test_cryptodev_asym_util.h      | 54
> +++++++++++++++++++++++++++
>  drivers/crypto/openssl/rte_openssl_pmd.c | 12 +++---
>  lib/librte_cryptodev/rte_crypto_asym.h   | 64
> ++++++++++++++++++++++++--------
>  4 files changed, 149 insertions(+), 34 deletions(-)
> 
> --
> 2.1.0

Series-acked-by: Damian Nowak <damianx.nowak@intel.com>
  
Shally Verma July 18, 2019, 10:52 a.m. UTC | #3
> -----Original Message-----
> From: Nowak, DamianX <damianx.nowak@intel.com>
> Sent: Thursday, July 18, 2019 2:28 PM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Shally
> Verma <shallyv@marvell.com>
> Subject: [EXT] RE: [PATCH v4 00/11] Rework API for RSA algorithm in
> asymmetric crypto
> 
> External Email
> 
> ----------------------------------------------------------------------
> > -----Original Message-----
> > From: Kusztal, ArkadiuszX
> > Sent: Wednesday, July 17, 2019 14:51
> > To: dev@dpdk.org
> > Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>;
> > shallyv@marvell.com; Nowak, DamianX <damianx.nowak@intel.com>;
> > Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> > Subject: [PATCH v4 00/11] Rework API for RSA algorithm in asymmetric
> > crypto
> >
> > Split into smaller commits, in order from least disputable ones.
> > Open things beside this:
> > 1. Creating padding struct
> > 2. Padding parameters (seedlen, optional label etc) 3. Leading zeroes
> > questions.
> > 4. Random number requirements.
> > 5. Capabilities.
> > 6. Verify signature field when none padding.
> >
> > v4:
> > - change API comments from length -> array allocation to avoid
> > ambiguity
> >
> > v3:
> > - split into smaller patches
> > - removed padding struct changes
> > - rebased against patches from CRT patches from Ayuj Verma
> >
> > v2:
> > - Field for singature verification when padding none selected was
> > added
> > - Removed details from RFC
> > - Simplified padding struct
> > - Added padding none test case
> >
> > This patchset depends on following patches:
> > [1]
> > test/crypto: move rsa enqueue/dequeue into separate functions
> > (http://patchwork.dpdk.org/patch/56342/)
> > [2]
> > test/crypto: add tests for RSA key type CRT
> > (http://patchwork.dpdk.org/patch/56343/)
> >
> > Arek Kusztal (11):
> >   cryptodev: change RSA API comments about primes
> >   cryptodev: add cipher field to RSA op
> >   crypto/openssl: add cipher field to openssl RSA implementation
> >   test: add cipher field to RSA test
> >   cryptodev: add information about message format when signing with RSA
> >   cryptodev: remove RSA PKCS1 BT0 padding
> >   openssl: remove RSA PKCS1_5 BT0 padding
> >   test: remove RSA PKCS1_5 BT0 padding from test cases
> >   cryptodev: add RSA padding none description
> >   test: add pkcs1_5 padding simulation
> >   test: add RSA PKCS1_5 padding case when no padding selected
> >
> >  app/test/test_cryptodev_asym.c           | 53 ++++++++++++++++++++------
> >  app/test/test_cryptodev_asym_util.h      | 54
> > +++++++++++++++++++++++++++
> >  drivers/crypto/openssl/rte_openssl_pmd.c | 12 +++---
> >  lib/librte_cryptodev/rte_crypto_asym.h   | 64
> > ++++++++++++++++++++++++--------
> >  4 files changed, 149 insertions(+), 34 deletions(-)
> >
> > --
> > 2.1.0
> 
> Series-acked-by: Damian Nowak <damianx.nowak@intel.com>
I had ack'd some. But others which are Nack'd , we need more time for them.
So, from my end, which are Ack'd good to go but other need to wait.

Thanks
Shally
  
Arkadiusz Kusztal July 18, 2019, 1:09 p.m. UTC | #4
> > >
> > > Split into smaller commits, in order from least disputable ones.
> > > Open things beside this:
> > > 1. Creating padding struct
> > > 2. Padding parameters (seedlen, optional label etc) 3. Leading
> > > zeroes questions.
> > > 4. Random number requirements.
> > > 5. Capabilities.
> > > 6. Verify signature field when none padding.
> > >
> > > v4:
> > > - change API comments from length -> array allocation to avoid
> > > ambiguity
> > >
> > > v3:
> > > - split into smaller patches
> > > - removed padding struct changes
> > > - rebased against patches from CRT patches from Ayuj Verma
> > >
> > > v2:
> > > - Field for singature verification when padding none selected was
> > > added
> > > - Removed details from RFC
> > > - Simplified padding struct
> > > - Added padding none test case
> > >
> > > This patchset depends on following patches:
> > > [1]
> > > test/crypto: move rsa enqueue/dequeue into separate functions
> > > (http://patchwork.dpdk.org/patch/56342/)
> > > [2]
> > > test/crypto: add tests for RSA key type CRT
> > > (http://patchwork.dpdk.org/patch/56343/)
> > >
> > > Arek Kusztal (11):
> > >   cryptodev: change RSA API comments about primes
> > >   cryptodev: add cipher field to RSA op
> > >   crypto/openssl: add cipher field to openssl RSA implementation
> > >   test: add cipher field to RSA test
> > >   cryptodev: add information about message format when signing with
> RSA
> > >   cryptodev: remove RSA PKCS1 BT0 padding
> > >   openssl: remove RSA PKCS1_5 BT0 padding
> > >   test: remove RSA PKCS1_5 BT0 padding from test cases
> > >   cryptodev: add RSA padding none description
> > >   test: add pkcs1_5 padding simulation
> > >   test: add RSA PKCS1_5 padding case when no padding selected
> > >
> > >  app/test/test_cryptodev_asym.c           | 53 ++++++++++++++++++++------
> > >  app/test/test_cryptodev_asym_util.h      | 54
> > > +++++++++++++++++++++++++++
> > >  drivers/crypto/openssl/rte_openssl_pmd.c | 12 +++---
> > >  lib/librte_cryptodev/rte_crypto_asym.h   | 64
> > > ++++++++++++++++++++++++--------
> > >  4 files changed, 149 insertions(+), 34 deletions(-)
> > >
> > > --
> > > 2.1.0
> >
> > Series-acked-by: Damian Nowak <damianx.nowak@intel.com>
> I had ack'd some. But others which are Nack'd , we need more time for them.
> So, from my end, which are Ack'd good to go but other need to wait.

As I generally agree that we need far more time to get all things done, I would like to know what is current situation:

We should apply
1) Cipher field
2) Remove BT0

We should still discuss (possibly 19.11)
1) Signature input format
2) None padding

Is this correct?



> 
> Thanks
> Shally
  
Shally Verma July 18, 2019, 1:18 p.m. UTC | #5
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Thursday, July 18, 2019 6:39 PM
> To: Shally Verma <shallyv@marvell.com>; Nowak, DamianX
> <damianx.nowak@intel.com>; dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>
> Subject: [EXT] RE: [PATCH v4 00/11] Rework API for RSA algorithm in
> asymmetric crypto
> 
> External Email
> 
> ----------------------------------------------------------------------
> > > >
> > > > Split into smaller commits, in order from least disputable ones.
> > > > Open things beside this:
> > > > 1. Creating padding struct
> > > > 2. Padding parameters (seedlen, optional label etc) 3. Leading
> > > > zeroes questions.
> > > > 4. Random number requirements.
> > > > 5. Capabilities.
> > > > 6. Verify signature field when none padding.
> > > >
> > > > v4:
> > > > - change API comments from length -> array allocation to avoid
> > > > ambiguity
> > > >
> > > > v3:
> > > > - split into smaller patches
> > > > - removed padding struct changes
> > > > - rebased against patches from CRT patches from Ayuj Verma
> > > >
> > > > v2:
> > > > - Field for singature verification when padding none selected was
> > > > added
> > > > - Removed details from RFC
> > > > - Simplified padding struct
> > > > - Added padding none test case
> > > >
> > > > This patchset depends on following patches:
> > > > [1]
> > > > test/crypto: move rsa enqueue/dequeue into separate functions
> > > > (http://patchwork.dpdk.org/patch/56342/)
> > > > [2]
> > > > test/crypto: add tests for RSA key type CRT
> > > > (http://patchwork.dpdk.org/patch/56343/)
> > > >
> > > > Arek Kusztal (11):
> > > >   cryptodev: change RSA API comments about primes
> > > >   cryptodev: add cipher field to RSA op
> > > >   crypto/openssl: add cipher field to openssl RSA implementation
> > > >   test: add cipher field to RSA test
> > > >   cryptodev: add information about message format when signing
> > > > with
> > RSA
> > > >   cryptodev: remove RSA PKCS1 BT0 padding
> > > >   openssl: remove RSA PKCS1_5 BT0 padding
> > > >   test: remove RSA PKCS1_5 BT0 padding from test cases
> > > >   cryptodev: add RSA padding none description
> > > >   test: add pkcs1_5 padding simulation
> > > >   test: add RSA PKCS1_5 padding case when no padding selected
> > > >
> > > >  app/test/test_cryptodev_asym.c           | 53 ++++++++++++++++++++--
> ----
> > > >  app/test/test_cryptodev_asym_util.h      | 54
> > > > +++++++++++++++++++++++++++
> > > >  drivers/crypto/openssl/rte_openssl_pmd.c | 12 +++---
> > > >  lib/librte_cryptodev/rte_crypto_asym.h   | 64
> > > > ++++++++++++++++++++++++--------
> > > >  4 files changed, 149 insertions(+), 34 deletions(-)
> > > >
> > > > --
> > > > 2.1.0
> > >
> > > Series-acked-by: Damian Nowak <damianx.nowak@intel.com>
> > I had ack'd some. But others which are Nack'd , we need more time for
> them.
> > So, from my end, which are Ack'd good to go but other need to wait.
> 
> As I generally agree that we need far more time to get all things done, I
> would like to know what is current situation:
> 
> We should apply
> 1) Cipher field
I assume I acked it with some improvement requirement on description. Let me know if I did not.

> 2) Remove BT0
> 
> We should still discuss (possibly 19.11)
> 1) Signature input format
> 2) None padding
> 
[Shally] Yes but sorry I don't recall if it covers all patches I Nack'd . I , specifically, Acked some ,which are good to go.

> Is this correct?
> 

> 
> 
> >
> > Thanks
> > Shally