[PATCH v4] crypto/qat: add SM3 HMAC to gen4 devices

2023-06-20 Thread Arek Kusztal
This commit adds SM3 HMAC to Intel QuickAssist Technology PMD generation 3 and 4 devices. Signed-off-by: Arkadiusz Kusztal Acked-by: Ciara Power --- doc/guides/cryptodevs/features/qat.ini | 1 + doc/guides/cryptodevs/qat.rst| 2 + doc/guides/rel_notes/release_23_07.rst

[PATCH v3 3/3] app/test: add rsa none padding tests

2023-06-19 Thread Arek Kusztal
Added RSA NONE padding test cases. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 205 +++ app/test/test_cryptodev_rsa_test_vectors.h | 220 + 2 files changed, 425 insertions(+) diff --git a/app/test/test_cryptodev_asym.c b/app

[PATCH v3 2/3] app/test: add modexp and modinv functions

2023-06-19 Thread Arek Kusztal
Added modular exponentiation and modular inverse tests to the asymmetric crypto testsuite. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 152 +++-- app/test/test_cryptodev_mod_test_vectors.h | 123 + 2 files changed, 263 insertions

[PATCH v3 1/3] app/test: remove obsolete test function

2023-06-19 Thread Arek Kusztal
Removed function `one by one` as it was not enough scalable and robust. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 404 - app/test/test_cryptodev_mod_test_vectors.h | 925 - app/test/test_cryptodev_rsa_test_vectors.h | 224 - 3

[PATCH v3 0/3] Replace obsolote test cases.

2023-06-19 Thread Arek Kusztal
This patchset removes obsolete test cases for RSA, MOD EXP, MOD INV. Doing that, new way of handling ut_setup and ut_teardown was proposed. Now both behave like constructor/desctuctor in the unit tests. It frees particular alghorithm functions from any kind of responsibility to free resources for

[PATCH v3] crypto/qat: add SM3 HMAC to gen4 devices

2023-06-14 Thread Arek Kusztal
This commit adds SM3 HMAC to Intel QuickAssist Technology PMD generation 3 and 4 devices. Signed-off-by: Arek Kusztal --- v2: - Fixed problem with chaining operations - Added implementation of prefix tables v3: - Added support for gen3 devices doc/guides/cryptodevs/features/qat.ini | 1

[PATCH v2] crypto/qat: add SM3 HMAC to gen4 devices

2023-05-28 Thread Arek Kusztal
This commit adds SM3 HMAC to Intel QuickAssist Technology PMD generation 4. Signed-off-by: Arek Kusztal --- v2: - Fixed problem with chaining operations - Added implementation of prefix tables Depends-on: patch-127513 ("cryptodev: support SM3_HMAC,SM4_CFB and SM4_OFB") doc/guides/

[PATCH v2 4/4] app/test: add rsa kat and pwct tests

2023-05-28 Thread Arek Kusztal
Added RSA PWCT and KAT tests. Now it complies with setup/teardown logic. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 1073 ++-- app/test/test_cryptodev_asym_util.h| 10 - app/test/test_cryptodev_rsa_test_vectors.h | 600 +-- 3

[PATCH v2 3/4] app/test: refactor mod inv tests

2023-05-28 Thread Arek Kusztal
Added new modular multiplicative inverse function. Now it handles changes to the generic setup. Signed-off-by: Arek Kusztal Acked-by: Ciara Power --- app/test/test_cryptodev_asym.c | 144 ++--- app/test/test_cryptodev_asym_util.h| 9 -- app/test

[PATCH v2 2/4] app/test: refactor mod exp test case

2023-05-28 Thread Arek Kusztal
Refactored modular exponentiation test case. Added multiple vectors to be checked in KAT tests. Signed-off-by: Arek Kusztal Acked-by: Ciara Power --- app/test/test_cryptodev_asym.c | 219 app/test/test_cryptodev_asym_util.h| 9 - app/test

[PATCH v2 0/4] Replace obsolote test cases.

2023-05-28 Thread Arek Kusztal
This patchset removes obsolete test cases for RSA, MOD EXP, MOD INV. Doing that, new way of handling ut_setup and ut_teardown was proposed. Now both behave like constructor/desctuctor to the unit tests. It frees particular alghorithm functions from any kind of responsibility to free resources. The

[PATCH v2 1/4] app/test: remove testsuite calls from ut setup

2023-05-28 Thread Arek Kusztal
Unit test setup should be responsible for setting unit test parateres only, analogous rules should apply to ut teardown function. Cryptodev start/stop functions should be used once - during setting the testsuite. Signed-off-by: Arek Kusztal Acked-by: Ciara Power --- app/test

[PATCH 4/4] app/test: add rsa kat and pwct tests

2023-05-17 Thread Arek Kusztal
Added RSA PWCT and KAT tests. Now it complies with setup/teardown logic. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 1050 ++-- app/test/test_cryptodev_asym_util.h| 10 - app/test/test_cryptodev_rsa_test_vectors.h | 600 ++- 3

[PATCH 3/4] app/test: refactor mod inv tests

2023-05-17 Thread Arek Kusztal
Added new modular multiplicative inverse function. Now it handles changes to the generic setup. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 140 ++--- app/test/test_cryptodev_asym_util.h| 9 -- app/test/test_cryptodev_mod_test_vectors.h

[PATCH 2/4] app/test: refactor mod exp test case

2023-05-17 Thread Arek Kusztal
Refactored modular exponentiation test case. Added multiple vectors to be checked in KAT tests. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 201 app/test/test_cryptodev_asym_util.h| 9 - app/test/test_cryptodev_mod_test_vectors.h | 567

[PATCH 1/4] app/test: remove testsuite calls from ut setup

2023-05-17 Thread Arek Kusztal
Unit test setup should be responsible for setting unit test parateres only, analogous rules should apply to ut teardown function. Cryptodev start/stop functions should be used once - during setting the testsuite. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 310

[PATCH 0/4] Replace obsolote test cases.

2023-05-17 Thread Arek Kusztal
This patchset removes obsolete test cases for RSA, MOD EXP, MOD INV. Doing that, new way of handling of ut_setup, ut_teardown was proposed. Now both behave like constructor/desctuctor to the unit tests. It frees particular alghoritrm function from any kind of responsability to free resource. Functi

[PATCH 2/2] crypto/qat: add sm3 hmac

2023-04-19 Thread Arek Kusztal
This commit adds SM3-HMAC algorithm to the Intel QuickAssist Technology symmetric crypto PMD. Signed-off-by: Arek Kusztal --- drivers/crypto/qat/qat_sym_session.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c

[PATCH 1/2] crypto/qat: add hash mode 2

2023-04-19 Thread Arek Kusztal
This commit adds hash mode 2 to the Intel QuickAssist Technology symmetric crypto PMD. Signed-off-by: Arek Kusztal --- drivers/common/qat/qat_adf/icp_qat_fw_la.h | 10 ++ drivers/crypto/qat/qat_sym_session.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/common

[PATCH] common/qat: fix undefined initial slice

2022-11-07 Thread Arek Kusztal
This commit fixes undefined initial value of slice capability. When unset it could lead to undefined read of capability due to stack frame picked values, is should therefore be set to 0. Fixes: b3cbbcdffa4f ("common/qat: read HW slice configuration") Signed-off-by: Arek Kusztal --

[PATCH v2 3/4] crypto/qat: add ecdh key exchange algorithm

2022-10-20 Thread Arek Kusztal
This commit adds ECDH algorithm to Intel QuickAssist Technology driver. Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/qat.ini | 7 ++- doc/guides/cryptodevs/qat.rst | 1 + doc/guides/rel_notes/release_22_11.rst | 4 ++ drivers/crypto/qat/qat_asym.c | 98

[PATCH v2 4/4] crypto/qat: add ecdh public key verification

2022-10-20 Thread Arek Kusztal
This commit adds verification option for elliptic curve points when used along ECDH algorithm. Signed-off-by: Arek Kusztal --- drivers/common/qat/qat_adf/qat_pke.h | 24 +++ drivers/crypto/qat/qat_asym.c| 58 +++- 2 files changed, 81

[PATCH v2 2/4] crypto/qat: improve freeing of asym cookies

2022-10-20 Thread Arek Kusztal
Improve the way that cookies are freed and cleared. Signed-off-by: Arek Kusztal --- drivers/crypto/qat/qat_asym.c | 73 --- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c index

[PATCH v2 1/4] crypto/qat: make immutable parameters constant

2022-10-20 Thread Arek Kusztal
All pointers passed to functions that are not supposed to have its data changed should be marked as constant. Signed-off-by: Arek Kusztal --- drivers/common/qat/qat_adf/qat_pke.h | 16 +++ drivers/common/qat/qat_device.c | 2 +- drivers/common/qat/qat_device.h | 4 +- drivers

[PATCH v2 0/4] crypto/qat: extend asymmetric crypto pmd

2022-10-20 Thread Arek Kusztal
This patchset extends Intel QuickAssist Technology asymmetric crypto PMD. Following features were added: - ECDH algorithm handling - EC point verification Depends-on: series-25284 ("crypto/qat: fix uncleared cookies in asym") v2: - resolved compilation issues - improved code struc

[PATCH v3 2/2] crypto/qat: read hw slice configuration

2022-10-18 Thread Arek Kusztal
Read slice configuration of QAT capabilities. This will allow to recognize if specific hw function is available on particular device. Signed-off-by: Arek Kusztal --- v2: - added generation specific functions v3: - split into two patches - fixed checkpatch issues drivers/crypto/qat/dev

[PATCH v3 1/2] common/qat: read hw slice configuration

2022-10-18 Thread Arek Kusztal
Read slice configuration of QAT capabilities. This will allow to recognize if specific hw function is available on particular device. Signed-off-by: Arek Kusztal --- v2: - added generation specific functions v3: - split into two patches - fixed checkpatch issues drivers/common/qat/dev

[PATCH v2 3/3] crypto/qat: fix not set rsa lengths

2022-10-18 Thread Arek Kusztal
Fixed not set output length in asym pmd when doing RSA. Fixes: 002486db239e ("crypto/qat: refactor asymmetric session") Signed-off-by: Arek Kusztal --- v2: - fixed compilation issues - split into 3 patches drivers/crypto/qat/qat_asym.c | 24 ++-- 1 file c

[PATCH v2 2/3] crypto/qat: fix unnecessary session check

2022-10-18 Thread Arek Kusztal
Removed unncessary session check which could lead to segfault, in case api was changed. Fixes: 002486db239e ("crypto/qat: refactor asymmetric session") Signed-off-by: Arek Kusztal --- v2: - fixed compilation issues - split into 3 patches drivers/crypto/qat/qat_asym.c | 12 ++

[PATCH v2 1/3] crypto/qat: fix uncleared cookies in asym

2022-10-18 Thread Arek Kusztal
Fixed incorrectly placed clean function in asym response. Fixes: 002486db239e ("crypto/qat: refactor asymmetric session") Signed-off-by: Arek Kusztal --- v2: - fixed compilation issues - split into 3 patches drivers/crypto/qat/qat_asym.c | 33 + 1 fi

[PATCH v2] common/qat: read hw slice configuration

2022-10-13 Thread Arek Kusztal
Read slice configuration of QAT capabilities. This will allow to recognize if specific hw function is available on particular device. Signed-off-by: Arek Kusztal --- drivers/common/qat/dev/qat_dev_gen1.c| 8 +++ drivers/common/qat/dev/qat_dev_gen2.c| 8 +++ drivers/common/qat

[PATCH v2 2/2] crypto/qat : add SM3 hash algorithm

2022-09-30 Thread Arek Kusztal
- Added ShangMi 3 (SM3) hash algorithm. Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/qat.ini | 1 + doc/guides/rel_notes/release_22_11.rst | 3 +++ drivers/common/qat/qat_adf/icp_qat_hw.h | 4 +++- drivers/crypto/qat/qat_sym_session.c| 25 + 4

[PATCH v2 1/2] crypto/qat: add SM4 encryption algorithm

2022-09-30 Thread Arek Kusztal
- Added ShangMi 4 (SM4) encryption algorithms. Supported modes: ECB, CBC, CTR. Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/qat.ini | 3 +++ doc/guides/rel_notes/release_22_11.rst | 4 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 9 + drivers

[PATCH v2 0/2] crypto/qat: add sm3 and sm4 algorithms

2022-09-30 Thread Arek Kusztal
. Depends-on: series-24882 ("cryptodev: add SM3 and SM4 algorithms") v2: - Fixed hardcoded number. Arek Kusztal (2): crypto/qat: add SM4 encryption algorithm crypto/qat : add SM3 hash algorithm doc/guides/cryptodevs/features/qat.ini | 4 +++ doc/guides/rel_notes/release

[PATCH 2/2] crypto/qat: fix not set rsa lengths

2022-09-28 Thread Arek Kusztal
Fixed not set output length in asym pmd when doing RSA. Fixes: 002486db239e ("crypto/qat: refactor asymmetric session") Signed-off-by: Arek Kusztal --- drivers/crypto/qat/qat_asym.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/driv

[PATCH 1/2] crypto/qat: fix uncleared cookies in asym

2022-09-28 Thread Arek Kusztal
Fixed incorrectly placed clean function in asym response. Fixes: 002486db239e ("crypto/qat: refactor asymmetric session") Signed-off-by: Arek Kusztal --- drivers/crypto/qat/qat_asym.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qa

[PATCH v2 1/2] cryptodev: add sm4 encryption algorithm

2022-09-28 Thread Arek Kusztal
ShangMi 4 (SM4) is a block cipher used in the Chinese National Standard for Wireless LAN WAPI and also used with Transport Layer Security. - Added SM4 encryption algorithm. Supported modes are ECB, CBC and CTR. Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/default.ini | 3

[PATCH v2 2/2] cryptodev: add sm3 hash algorithm

2022-09-28 Thread Arek Kusztal
ShangMi 3 (SM3) is a cryptographic hash function used in the Chinese National Standard. - Added SM3 algorithm Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/default.ini | 1 + doc/guides/rel_notes/release_22_11.rst | 5 + lib/cryptodev/rte_crypto_sym.h | 4

[PATCH v2 0/2] cryptodev: add SM3 and SM4 algorithms

2022-09-28 Thread Arek Kusztal
string - Added full name of the algorithm Arek Kusztal (2): cryptodev: add sm4 encryption algorithm cryptodev: add sm3 hash algorithm doc/guides/cryptodevs/features/default.ini | 4 doc/guides/rel_notes/release_22_11.rst | 9 + lib/cryptodev/rte_crypto_sym.h

[PATCH 2/2] cryptodev: add ec point verification

2022-08-18 Thread Arek Kusztal
This addition complements point verification in ECDH operation. This will allow to use point verification in other situations than pure ECDH. Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/default.ini | 1 + lib/cryptodev/rte_crypto_asym.h| 11 +++ 2 files

[PATCH 1/2] cryptodev: add option to use ec base point in ecpm

2022-08-18 Thread Arek Kusztal
Add option to use elliptic curve generator point instead of setting it manually. It corresponds to the public point generation in EC Diffie-Hellman key exchange. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH 0/2] cryptodev: extend elliptic curves operations

2022-08-18 Thread Arek Kusztal
This pathset adds two new capabilities in asym cryptodev: 1) Base point instead of manual point can be used with point multiplication too. 2) Point verify can be used without ECDH, now it will be possible to use point verification for other ec operations. Arek Kusztal (2): cryptodev: add option

[PATCH 2/2] test/crypto: add ecdh tests

2022-08-18 Thread Arek Kusztal
This commit adds ECDH test cases based on rfc5114. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 357 + app/test/test_cryptodev_ecdh_vectors.h | 144 + 2 files changed, 501 insertions(+) create mode 100644 app/test

[PATCH 1/2] test/crypto: add ecdsa qat test cases

2022-08-18 Thread Arek Kusztal
This commit adds ECDSA test cases to Intel QuickAssist Technology testsuite. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 196 + 1 file changed, 196 insertions(+) diff --git a/app/test/test_cryptodev_asym.c b/app/test

[PATCH 0/2] test: add elliptic curve tests

2022-08-18 Thread Arek Kusztal
This patchset adds new test cases that can be used to verify elliptic curve algorithms like ECDSA, ECDH, etc. Depends-on: series-24333 ("crypto/qat: extend asymmetric crypto pmd") Arek Kusztal (2): test/crypto: add ecdsa qat test cases test/crypto: add ecdh tests

[PATCH] common/qat: read slice configuration

2022-08-17 Thread Arek Kusztal
Read slice configuration of QAT capabilities. Signed-off-by: Arek Kusztal --- drivers/common/qat/qat_device.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c index db4b087d2b..d25a696c5e 100644 --- a/drivers

[PATCH 3/3] crypto/qat: add ecdh public key verification

2022-08-17 Thread Arek Kusztal
This commit adds verification option for elliptic curve points when used along ECDH algorithm. Signed-off-by: Arek Kusztal --- drivers/common/qat/qat_adf/qat_pke.h | 24 +++ drivers/crypto/qat/qat_asym.c| 58 +++- 2 files changed, 81

[PATCH 2/3] crypto/qat: add ecdh key exchange algorithm

2022-08-17 Thread Arek Kusztal
This commit adds ECDH algorithm to Intel QuickAssist Technology driver. Signed-off-by: Arek Kusztal --- drivers/crypto/qat/qat_asym.c | 94 +++ 1 file changed, 94 insertions(+) diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c

[PATCH 1/3] crypto/qat: make immutable parameters constant

2022-08-17 Thread Arek Kusztal
All pointers passed to functions that are not supposed to have its data changed should be marked as constant. Additionally session field should be checked only in with session case. Signed-off-by: Arek Kusztal --- drivers/common/qat/qat_adf/qat_pke.h | 16 ++--- drivers/crypto/qat/qat_asym.c

[PATCH 0/3] crypto/qat: extend asymmetric crypto pmd

2022-08-17 Thread Arek Kusztal
This patchset extends Intel QuickAssist Technology asymmetric crypto PMD. Following features were added: - ECDH algorithm handling - EC point verification Arek Kusztal (3): crypto/qat: make immutable parameters constant crypto/qat: add ecdh key exchange algorithm crypto/qat: add ecdh public

[PATCH 4/4] crypto/qat : add SM3 hash algorithm

2022-08-17 Thread Arek Kusztal
- Added SM3 hash algorithm. Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/qat.ini | 1 + doc/guides/rel_notes/release_22_11.rst | 3 +++ drivers/common/qat/qat_adf/icp_qat_hw.h | 2 +- drivers/crypto/qat/qat_sym_session.c| 20 +++- 4 files changed, 24

[PATCH 3/4] crypto/qat: add SM4 encryption algorithm

2022-08-17 Thread Arek Kusztal
- Added SM4 encryption algorithms. Supported modes: ECB, CBC, CTR. Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/qat.ini | 3 +++ doc/guides/rel_notes/release_22_11.rst | 4 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 9 + drivers/crypto/qat/dev

[PATCH 2/4] cryptodev: add SM3 hash algorithm

2022-08-17 Thread Arek Kusztal
SM3 is a cryptographic hash function used in the Chinese National Standard. - Added SM3 algorithm Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/default.ini | 1 + doc/guides/rel_notes/release_22_11.rst | 5 + lib/cryptodev/rte_crypto_sym.h | 4 +++- lib

[PATCH 1/4] cryptodev: add SM4 encryption algorithm

2022-08-17 Thread Arek Kusztal
SM4 is a block cipher used in the Chinese National Standard for Wireless LAN WAPI and also used with Transport Layer Security. - Added SM4 encryption algorithm. Supported modes are ECB, CBC and CTR. Signed-off-by: Arek Kusztal --- doc/guides/cryptodevs/features/default.ini | 3 +++ doc/guides

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

2022-08-17 Thread Arek Kusztal
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

[PATCH] common/qat: fix vf2pf answer

2022-07-29 Thread Arek Kusztal
This commit fixes answer sent to physical device in vf2pf communication. Fixes: b17d16fb47b4 ("common/qat: add PF to VF communication") Cc: sta...@dpdk.org Signed-off-by: Arek Kusztal --- drivers/common/qat/qat_pf2vf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) di

[PATCH] crypto/qat: fix missing copy guards in asym mod

2022-06-17 Thread Arek Kusztal
This commit fixes missing guards for size of memcpy, it is needed to prevent faulty access when incorrect length passed from the user. Fixes: 3b78aa7b2317 ("crypto/qat: refactor asymmetric crypto functions") Signed-off-by: Arek Kusztal --- drivers/crypto/qat/qat_asym.c | 8 ++

[PATCH] crypto/qat: fix cleanup function default behaviour

2022-06-15 Thread Arek Kusztal
Full cookie data should be cleared by default if not algorithm specified. This is protection in case algorithm specific cleanup is not implemented. Fixes: 3b78aa7b2317 ("crypto/qat: refactor asymmetric crypto functions") Signed-off-by: Arek Kusztal --- drivers/crypto/qat/qat_asym.c |

[PATCH v5 12/12] cryptodev: add salt length and optional label

2022-06-01 Thread Arek Kusztal
- Added salt length and optional label. Common parameters to PSS and OAEP padding for RSA. - Changed RSA hash padding fields names. Now it corresponds to the RSA documents. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 19 +-- 1 file changed, 17 insertions

[PATCH v5 11/12] cryptodev: clarify rsa verify with none padding

2022-06-01 Thread Arek Kusztal
integer, therefore some of the constraints were lifted. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index ae0b62c22f..aaa4bf9952 100644

[PATCH v5 10/12] cryptodev: move RSA padding into separate struct

2022-06-01 Thread Arek Kusztal
- move RSA padding into separate struct. More padding members should be added into padding, therefore having separate struct for padding parameters will make this more readable. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 10 ++-- drivers/common/cpt

[PATCH v5 09/12] cryptodev: clarify usage of rsa padding hash

2022-06-01 Thread Arek Kusztal
- Clarified usage of RSA padding hash. It was not specified how to use hash for PKCS1_5 padding. This could lead to incorrect implementation. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff

[PATCH v5 08/12] cryptodev: add asym op flags

2022-06-01 Thread Arek Kusztal
example is TLS1.2 - TLS1.3. For ease of use, and to avoid additional copy on certain occasions, driver should be able to return both. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/lib/cryptodev

[PATCH v5 07/12] cryptodev: add public key verify option

2022-06-01 Thread Arek Kusztal
-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 11 --- lib/cryptodev/rte_cryptodev.c | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index f61a2ddce8..ae3ca31a89 100644 --- a/lib

[PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman

2022-06-01 Thread Arek Kusztal
work. Signed-off-by: Arek Kusztal --- devtools/libabigail.abignore | 3 +++ doc/guides/cryptodevs/features/default.ini | 1 + doc/guides/prog_guide/cryptodev_lib.rst| 7 +++--- doc/guides/rel_notes/release_22_07.rst | 2 ++ lib/cryptodev/rte_crypto_asym.h| 38

[PATCH v5 05/12] cryptodev: move dh type from xform to dh op

2022-06-01 Thread Arek Kusztal
the same group. Similar problem would be observed in sessionless case. Additionally, it will help extend DH to support Elliptic Curves. - Changed order of Diffie-Hellman operation phases. Now it corresponds with the order of operations. Signed-off-by: Arek Kusztal --- app/test

[PATCH v5 04/12] cryptodev: clarify usage of private key in dh

2022-06-01 Thread Arek Kusztal
- Clarified usage of private key in Diffie-Hellman. CSRNG capable device should generate private key and then use it for public key generation. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/cryptodev

[PATCH v5 03/12] cryptodev: remove comment about using ephemeral key in dsa

2022-06-01 Thread Arek Kusztal
- Removed comment that stated DSA can be used with Diffie Hellman ephemeral key. DH and DSA integration allowed to use ephemeral keys for random integer, but not for private keys. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH v5 02/12] cryptodev: separate key exchange operation enum

2022-06-01 Thread Arek Kusztal
operation type Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 52 +++- drivers/crypto/openssl/rte_openssl_pmd.c | 10 +++--- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 18 +- lib/cryptodev/rte_crypto_asym.h | 45

[PATCH v5 01/12] cryptodev: redefine ec group enum

2022-06-01 Thread Arek Kusztal
. Only few selected curves are included in previously referenced rfc8422. IANA reference is added instead. - Removed UNKNOWN ec group. There is no default value, and there is no UNKNOWN elliptic curve. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 16 ++-- 1 file

[PATCH v5 00/12] cryptodev: rsa, dh, ecdh changes

2022-06-01 Thread Arek Kusztal
asym op flags - Fixes many API comments (like EC curves) v5: - fixed build - added documentation changes - added release notes Arek Kusztal (12): cryptodev: redefine ec group enum cryptodev: separate key exchange operation enum cryptodev: remove comment about using ephemeral key in dsa

[PATCH v4 12/12] cryptodev: add salt length and optional label

2022-05-30 Thread Arek Kusztal
- Added salt length and optional label. Common parameters to PSS and OAEP padding for RSA. - Changed RSA hash padding fields names. Now it corresponds to the RSA documents. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 19 +-- 1 file changed, 17 insertions

[PATCH v4 11/12] cryptodev: clarify rsa verify with none padding

2022-05-30 Thread Arek Kusztal
integer, therefore some of the constraints were lifted. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index 76fabc61b5..d31642680f 100644

[PATCH v4 10/12] cryptodev: move RSA padding into separate struct

2022-05-30 Thread Arek Kusztal
- move RSA padding into separate struct. More padding members should be added into padding, therefore having separate struct for padding parameters will make this more readable. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 10 ++-- drivers/common/cpt

[PATCH v4 09/12] cryptodev: clarify usage of rsa padding hash

2022-05-30 Thread Arek Kusztal
- Clarified usage of RSA padding hash. It was not specified how to use hash for PKCS1_5 padding. This could lead to incorrect implementation. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff

[PATCH v4 08/12] cryptodev: add asym op flags

2022-05-30 Thread Arek Kusztal
example is TLS1.2 - TLS1.3. For ease of use, and to avoid additional copy on certain occasions, driver should be able to return both. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/lib/cryptodev/rte_crypto_asym.h

[PATCH v4 07/12] cryptodev: add public key verify option

2022-05-30 Thread Arek Kusztal
-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 11 --- lib/cryptodev/rte_cryptodev.c | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index f61a2ddce8..ae3ca31a89 100644 --- a/lib

[PATCH v4 06/12] cryptodev: add elliptic curve diffie hellman

2022-05-30 Thread Arek Kusztal
work. Cc: m...@ashroe.eu Signed-off-by: Arek Kusztal --- devtools/libabigail.abignore| 3 +++ lib/cryptodev/rte_crypto_asym.h | 38 ++ 2 files changed, 41 insertions(+) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index

[PATCH v4 05/12] cryptodev: move dh type from xform to dh op

2022-05-30 Thread Arek Kusztal
the same group. Similar problem would be observed in sessionless case. Additionally, it will help extend DH to support Elliptic Curves. - Changed order of Diffie-Hellman operation phases. Now it corresponds with the order of operations. Signed-off-by: Arek Kusztal --- app/test

[PATCH v4 04/12] cryptodev: clarify usage of private key in dh

2022-05-30 Thread Arek Kusztal
- Clarified usage of private key in Diffie-Hellman. CSRNG capable device should generate private key and then use it for public key generation. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/cryptodev

[PATCH v4 03/12] cryptodev: remove comment about using ephemeral key in dsa

2022-05-30 Thread Arek Kusztal
- Removed comment that stated DSA can be used with Diffie Hellman ephemeral key. DH and DSA integration allowed to use ephemeral keys for random integer, but not for private keys. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH v4 02/12] cryptodev: separate key exchange operation enum

2022-05-30 Thread Arek Kusztal
operation type Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 52 +++- drivers/crypto/openssl/rte_openssl_pmd.c | 10 +++--- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 18 +- lib/cryptodev/rte_crypto_asym.h | 45

[PATCH v4 01/12] cryptodev: redefine ec group enum

2022-05-30 Thread Arek Kusztal
. Only few selected curves are included in previously referenced rfc8422. IANA reference is added instead. - Removed UNKNOWN ec group. There is no default value, and there is no UNKNOWN elliptic curve. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 16 ++-- 1 file

[PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes

2022-05-30 Thread Arek Kusztal
asym op flags - Fixes many API comments (like EC curves) v4: - fixed shared build problem - added ABI ignore entry for xform Arek Kusztal (12): cryptodev: redefine ec group enum cryptodev: separate key exchange operation enum cryptodev: remove comment about using ephemeral key in dsa

[PATCH v3 12/12] cryptodev: add salt length and optional label

2022-05-30 Thread Arek Kusztal
- Added salt length and optional label. Common parameters to PSS and OAEP padding for RSA. - Changed RSA hash padding fields names. Now it corresponds to the RSA documents. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 19 +-- 1 file changed, 17 insertions

[PATCH v3 11/12] cryptodev: clarify rsa verify with none padding

2022-05-30 Thread Arek Kusztal
integer, therefore some of the constraints were lifted. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index 76fabc61b5..d31642680f 100644

[PATCH v3 10/12] cryptodev: move RSA padding into separate struct

2022-05-30 Thread Arek Kusztal
- move RSA padding into separate struct. More padding members should be added into padding, therefore having separate struct for padding parameters will make this more readable. Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 10 ++-- drivers/common/cpt

[PATCH v3 09/12] cryptodev: clarify usage of rsa padding hash

2022-05-30 Thread Arek Kusztal
- Clarified usage of RSA padding hash. It was not specified how to use hash for PKCS1_5 padding. This could lead to incorrect implementation. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff

[PATCH v3 08/12] cryptodev: add asym op flags

2022-05-30 Thread Arek Kusztal
example is TLS1.2 - TLS1.3. For ease of use, and to avoid additional copy on certain occasions, driver should be able to return both. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/lib/cryptodev/rte_crypto_asym.h

[PATCH v3 07/12] cryptodev: add public key verify option

2022-05-30 Thread Arek Kusztal
-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 11 --- lib/cryptodev/rte_cryptodev.c | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index f61a2ddce8..ae3ca31a89 100644 --- a/lib

[PATCH v3 06/12] cryptodev: add elliptic curve diffie hellman

2022-05-30 Thread Arek Kusztal
work. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 38 ++ 1 file changed, 38 insertions(+) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index 88bc34dc8c..f61a2ddce8 100644 --- a/lib/cryptodev

[PATCH v3 05/12] cryptodev: move dh type from xform to dh op

2022-05-30 Thread Arek Kusztal
the same group. Similar problem would be observed in sessionless case. Additionally, it will help extend DH to support Elliptic Curves. - Changed order of Diffie-Hellman operation phases. Now it corresponds with the order of operations. Signed-off-by: Arek Kusztal --- app/test

[PATCH v3 04/12] cryptodev: clarify usage of private key in dh

2022-05-30 Thread Arek Kusztal
- Clarified usage of private key in Diffie-Hellman. CSRNG capable device should generate private key and then use it for public key generation. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/cryptodev

[PATCH v3 03/12] cryptodev: remove comment about using ephemeral key in dsa

2022-05-30 Thread Arek Kusztal
- Removed comment that stated DSA can be used with Diffie Hellman ephemeral key. DH and DSA integration allowed to use ephemeral keys for random integer, but not for private keys. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH v3 02/12] cryptodev: separate key exchange operation enum

2022-05-30 Thread Arek Kusztal
operation type Signed-off-by: Arek Kusztal --- app/test/test_cryptodev_asym.c | 52 +++- drivers/crypto/openssl/rte_openssl_pmd.c | 10 +++--- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 18 +- lib/cryptodev/rte_crypto_asym.h | 45

[PATCH v3 01/12] cryptodev: redefine ec group enum

2022-05-30 Thread Arek Kusztal
. Only few selected curves are included in previously referenced rfc8422. IANA reference is added instead. - Removed UNKNOWN ec group. There is no default value, and there is no UNKNOWN elliptic curve. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 16 ++-- 1 file

[PATCH v3 00/12] cryptodev: rsa, dh, ecdh changes

2022-05-30 Thread Arek Kusztal
asym op flags - Fixes many API comments (like EC curves) v3: - removed 2 commits Arek Kusztal (12): cryptodev: redefine ec group enum cryptodev: separate key exchange operation enum cryptodev: remove comment about using ephemeral key in dsa cryptodev: clarify usage of private key in dh

[PATCH v2 14/14] cryptodev: add asym algorithms capabilities

2022-05-25 Thread Arek Kusztal
- Added asymmetric crypto algorithm specific capability struct. Included fields like random number capability, padding flags etc. Signed-off-by: Arek Kusztal --- app/test-crypto-perf/main.c | 12 +- app/test-eventdev/test_perf_common.c | 2 +- app/test

[PATCH v2 13/14] cryptodev: add salt length and optional label

2022-05-25 Thread Arek Kusztal
- Added salt length and optional label. Common parameters to PSS and OAEP padding for RSA. - Fixed hash API in RSA padding. Now it is specified how hash should be used with particular RSA padding modes. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 19 +-- 1

[PATCH v2 12/14] cryptodev: clarify rsa verify with none padding

2022-05-25 Thread Arek Kusztal
- Clarified where should output be stored of signature decryption with padding none. PMD is not able to know what padding algorithm was used, therefore decrypted signature should be returned to the user. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 7 ++- 1 file changed

  1   2   3   4   5   6   >