[PATCH v3 0/7] cryptodev: support digest message in SM2

2023-09-28 Thread Gowrishankar Muthukrishnan
This patch series fixes SM2 algorithm implementation to support digest message as input along with plain message as today. v3: - fixed minor issues in code rebase Gowrishankar Muthukrishnan (7): crypto/openssl: include SM2 in asymmetric capabilities cryptodev: add hash algorithms in

[PATCH v3 1/7] crypto/openssl: include SM2 in asymmetric capabilities

2023-09-28 Thread Gowrishankar Muthukrishnan
Include SM2 algorithm in the asymmetric capabilities supported by OpenSSL PMD. Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal --- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 14

[PATCH v3 2/7] cryptodev: add hash algorithms in asymmetric capability

2023-09-28 Thread Gowrishankar Muthukrishnan
already supports it. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 52 ++-- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 1 + lib/cryptodev/cryptodev_trace.h | 9 lib/cryptodev/cryptodev_trace_points.c

[PATCH v3 3/7] cryptodev: use generic EC xform params for SM2

2023-09-28 Thread Gowrishankar Muthukrishnan
SM2 curve could use generic EC xform as it is yet another EC. This would also require SM2 curve ID enumerated along with other curves, as listed in: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal

[PATCH v3 4/7] cryptodev: set private and public keys in EC session

2023-09-28 Thread Gowrishankar Muthukrishnan
Set EC private and public keys into xform so that, it can be maintained per session. Signed-off-by: Gowrishankar Muthukrishnan Change-Id: Ib8251987c805bc304f819bf13f94f310f225a0e3 --- app/test/test_cryptodev_asym.c | 60 ++-- drivers/common/cnxk/roc_ae.h

[PATCH v3 5/7] cryptodev: add RNG capability in EC based xform

2023-09-28 Thread Gowrishankar Muthukrishnan
Elliptic curve based asymmetric operations use cryptographically secure random number in its computation. If PMD supports RNG for such ops, the application could skip computing on its own. This patch adds new field in asymmetric capability to declare this capability. Signed-off-by: Gowrishankar

[PATCH v3 7/7] app/test: check asymmetric capabilities in SM2 test

2023-09-28 Thread Gowrishankar Muthukrishnan
Check asymmetric capabilities such as SM3 hash support and internal RNG and accordingly choose op params for SM2 test. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal --- app/test/test_cryptodev_asym.c | 77 +++--- app/test

[PATCH v3 6/7] crypto/cnxk: add SM2 support

2023-09-28 Thread Gowrishankar Muthukrishnan
Add SM2 asymmetric algorithm support in cnxk PMD. Signed-off-by: Gowrishankar Muthukrishnan --- doc/guides/cryptodevs/features/cn10k.ini | 1 + doc/guides/rel_notes/release_23_11.rst| 6 + drivers/common/cnxk/hw/cpt.h | 3 +- drivers/common/cnxk/roc_ae.c

[PATCH v4 0/7] cryptodev: support digest message in SM2

2023-10-09 Thread Gowrishankar Muthukrishnan
This patch series fixes SM2 algorithm implementation to support digest message as input along with plain message as today. v4: - code rebase on next-crypto Gowrishankar Muthukrishnan (7): crypto/openssl: include SM2 in asymmetric capabilities cryptodev: add hash algorithms in asymmetric

[PATCH v4 1/7] crypto/openssl: include SM2 in asymmetric capabilities

2023-10-09 Thread Gowrishankar Muthukrishnan
Include SM2 algorithm in the asymmetric capabilities supported by OpenSSL PMD. Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal --- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 14

[PATCH v4 2/7] cryptodev: add hash algorithms in asymmetric capability

2023-10-09 Thread Gowrishankar Muthukrishnan
already supports it. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 52 ++-- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 1 + lib/cryptodev/cryptodev_trace.h | 9 lib/cryptodev/cryptodev_trace_points.c

[PATCH v4 3/7] cryptodev: use generic EC xform params for SM2

2023-10-09 Thread Gowrishankar Muthukrishnan
SM2 curve could use generic EC xform as it is yet another EC. This would also require SM2 curve ID enumerated along with other curves, as listed in: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal

[PATCH v4 4/7] cryptodev: set private and public keys in EC session

2023-10-09 Thread Gowrishankar Muthukrishnan
Set EC private and public keys into xform so that, it can be maintained per session. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Ciara Power --- app/test/test_cryptodev_asym.c | 60 ++-- drivers/common/cnxk/roc_ae.h | 18 ++ drivers

[PATCH v4 5/7] cryptodev: add RNG capability in EC based xform

2023-10-09 Thread Gowrishankar Muthukrishnan
Elliptic curve based asymmetric operations use cryptographically secure random number in its computation. If PMD supports RNG for such ops, the application could skip computing on its own. This patch adds new field in asymmetric capability to declare this capability. Signed-off-by: Gowrishankar

[PATCH v4 6/7] crypto/cnxk: add SM2 support

2023-10-09 Thread Gowrishankar Muthukrishnan
Add SM2 asymmetric algorithm support in cnxk PMD. Signed-off-by: Gowrishankar Muthukrishnan --- doc/guides/cryptodevs/features/cn10k.ini | 1 + doc/guides/rel_notes/release_23_11.rst| 4 + drivers/common/cnxk/hw/cpt.h | 2 +- drivers/common/cnxk/roc_ae.c

[PATCH v4 7/7] app/test: check asymmetric capabilities in SM2 test

2023-10-09 Thread Gowrishankar Muthukrishnan
Check asymmetric capabilities such as SM3 hash support and internal RNG and accordingly choose op params for SM2 test. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal --- app/test/test_cryptodev_asym.c | 77 +++--- app/test

[PATCH v2] test/cryptodev: add modexp group tests

2023-10-25 Thread Gowrishankar Muthukrishnan
Add modexp tests for groups 5, 14, 15, 16, 17 and 18. Signed-off-by: Gowrishankar Muthukrishnan --- v2: - rebase on main --- app/test/test_cryptodev_asym.c | 48 + app/test/test_cryptodev_mod_test_vectors.h | 989 - 2 files changed, 1036 insertions(+), 1

[PATCH v1 0/4] test/cryptodev: add ECDH tests

2023-10-26 Thread Gowrishankar Muthukrishnan
This patch series adds ECDH testsuite. It also enables ECDH support in CNXK PMD. Gowrishankar Muthukrishnan (4): test/cryptodev: add ECDH tests crypto/cnxk: use generic EC opcodes crypto/cnxk: change order of ECFPM params crypto/cnxk: add ECDH support app/test/test_cryptodev_asym.c

[PATCH v1 1/4] test/cryptodev: add ECDH tests

2023-10-26 Thread Gowrishankar Muthukrishnan
Add ECDH tests. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 729 +++ app/test/test_cryptodev_asym_util.h | 12 + app/test/test_cryptodev_ecdh_test_vectors.h | 577 +++ app/test

[PATCH v1 2/4] crypto/cnxk: use generic EC opcodes

2023-10-26 Thread Gowrishankar Muthukrishnan
Use generic EC opcodes for sign and verify ops in ECDSA and SM2 implementations. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/common/cnxk/roc_ae.h | 14 +++--- drivers/crypto/cnxk/cnxk_ae.h | 50 +++ 2 files changed, 38 insertions(+), 26 deletions

[PATCH v1 3/4] crypto/cnxk: change order of ECFPM params

2023-10-26 Thread Gowrishankar Muthukrishnan
Change order of ECFPM params to match changes in v2.0 microcode. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/cnxk/cnxk_ae.h | 49 ++- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto

[PATCH v1 4/4] crypto/cnxk: add ECDH support

2023-10-26 Thread Gowrishankar Muthukrishnan
Add ECDH support in CNXK PMD. Signed-off-by: Gowrishankar Muthukrishnan --- doc/guides/cryptodevs/features/cn10k.ini | 1 + doc/guides/cryptodevs/features/cn9k.ini | 1 + drivers/common/cnxk/roc_ae.h | 7 + drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 12

[PATCH v3] test/cryptodev: add modexp group tests

2023-10-26 Thread Gowrishankar Muthukrishnan
Add modexp tests for groups 5, 14, 15, 16, 17 and 18. Signed-off-by: Gowrishankar Muthukrishnan --- v3: - Fixed test descriptions for clang requirement. --- app/test/test_cryptodev_asym.c | 48 + app/test/test_cryptodev_mod_test_vectors.h | 989 - 2 files

[PATCH v5 0/4] app/dma-perf: PCI Dev and SG copy support

2023-10-26 Thread Gowrishankar Muthukrishnan
device support Gowrishankar Muthukrishnan (2): app/dma-perf: validate copied memory app/dma-perf: add SG copy support app/test-dma-perf/benchmark.c | 344 ++ app/test-dma-perf/config.ini | 56 ++ app/test-dma-perf/main.c | 136 +- app/test

[PATCH v5 1/4] app/dma-perf: add skip support

2023-10-26 Thread Gowrishankar Muthukrishnan
From: Amit Prakash Shukla Add support to skip running a dma-perf test-case. Signed-off-by: Amit Prakash Shukla --- app/test-dma-perf/config.ini | 2 ++ app/test-dma-perf/main.c | 23 +++ app/test-dma-perf/main.h | 1 + 3 files changed, 26 insertions(+) diff --git

[PATCH v5 2/4] app/dma-perf: add PCI device support

2023-10-26 Thread Gowrishankar Muthukrishnan
From: Amit Prakash Shukla Add support to test performance for "device to memory" and "memory to device" data transfer. Signed-off-by: Amit Prakash Shukla --- app/test-dma-perf/benchmark.c | 67 +++ app/test-dma-perf/config.ini | 37 +++ app/test

[PATCH v5 3/4] app/dma-perf: validate copied memory

2023-10-26 Thread Gowrishankar Muthukrishnan
Validate copied memory to ensure DMA copy did not fail. Signed-off-by: Gowrishankar Muthukrishnan --- app/test-dma-perf/benchmark.c | 23 +-- app/test-dma-perf/main.c | 16 +++- app/test-dma-perf/main.h | 2 +- 3 files changed, 33 insertions(+), 8

[PATCH v5 4/4] app/dma-perf: add SG copy support

2023-10-26 Thread Gowrishankar Muthukrishnan
Add SG copy support. Signed-off-by: Gowrishankar Muthukrishnan --- app/test-dma-perf/benchmark.c | 274 +- app/test-dma-perf/config.ini | 19 ++- app/test-dma-perf/main.c | 34 - app/test-dma-perf/main.h | 5 +- 4 files changed, 292 insertions

[PATCH] maintainers: update for DMA perf app

2023-10-26 Thread Gowrishankar Muthukrishnan
Add co-maintainer for DMA perf app. Signed-off-by: Gowrishankar Muthukrishnan --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4083658697..b81eb1d5c0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1773,6 +1773,7 @@ F: doc/guides/testpmd_app_ug

[v1] examples/fips_validation: remove unused include file

2022-10-13 Thread Gowrishankar Muthukrishnan
Remove invoking include for sys/random.h which is not actually used by app. Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation_rsa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/fips_validation/fips_validation_rsa.c b/examples/fips_validation

[v1] examples/fips_validation: fix test output for AES GMAC decrypt

2022-10-17 Thread Gowrishankar Muthukrishnan
AES GMAC decrypt test should output only whether test passed or failed. Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation_gcm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/fips_validation/fips_validation_gcm.c b

RE: [EXT] [PATCH v1] examples/fips_validation: parse block error fix

2022-10-25 Thread Gowrishankar Muthukrishnan
Acked-by: Gowrishankar Muthukrishnan Thanks. > -Original Message- > From: Brian Dooley > Sent: Monday, October 24, 2022 4:07 PM > To: Brian Dooley > Cc: dev@dpdk.org; Gowrishankar Muthukrishnan > ; Akhil Goyal > Subject: [EXT] [PATCH v1] examples/fips_validati

[v1, 00/10] fips_validation application improvements

2023-02-06 Thread Gowrishankar Muthukrishnan
This patch series adds support for SHA3, SHAKE, AES-CCM JSON test vectors and fixes existing algorithms to support NIST test vectors. Gowrishankar Muthukrishnan (10): examples/fips_validation: fix MCT output for SHA examples/fips_validation: add SHA3 validation examples/fips_validation: fix

[v1, 01/10] examples/fips_validation: fix MCT output for SHA

2023-02-06 Thread Gowrishankar Muthukrishnan
MCT test for SHA need not print message string along with digest value. Fixes: d5c247145c2 ("examples/fips_validation: add parsing for SHA") Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation_sha.c | 8 ++-- examples/fips_validat

[v1, 02/10] examples/fips_validation: add SHA3 validation

2023-02-06 Thread Gowrishankar Muthukrishnan
Add support in fips_validation to parse SHA3 algorithms. Signed-off-by: Gowrishankar Muthukrishnan --- doc/guides/sample_app_ug/fips_validation.rst | 5 +- examples/fips_validation/fips_validation.h| 1 + .../fips_validation/fips_validation_hmac.c| 8 ++ .../fips_validation

[v1, 04/10] examples/fips_validation: add SHAKE validation

2023-02-06 Thread Gowrishankar Muthukrishnan
Add support in fips_validation to parse SHAKE algorithms. Signed-off-by: Gowrishankar Muthukrishnan --- doc/guides/sample_app_ug/fips_validation.rst | 1 + examples/fips_validation/fips_validation.h| 4 +- .../fips_validation/fips_validation_sha.c | 63 - examples

[v1, 03/10] examples/fips_validation: fix integer parse in test case

2023-02-06 Thread Gowrishankar Muthukrishnan
Parsing integer value in test case vector does not store it because only string was expected. This patch adds handling for integer value as well. Fixes: 58cc98801eb ("examples/fips_validation: add JSON parsing") Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_

[v1, 05/10] examples/fips_validation: add CCM JSON validation

2023-02-06 Thread Gowrishankar Muthukrishnan
Add support in fips_validation to parse CCM JSON vectors. Signed-off-by: Gowrishankar Muthukrishnan --- doc/guides/sample_app_ug/fips_validation.rst | 1 + examples/fips_validation/fips_validation.c| 2 + examples/fips_validation/fips_validation.h| 3 + .../fips_validation

[v1, 06/10] examples/fips_validation: add ECDSA keygen support

2023-02-06 Thread Gowrishankar Muthukrishnan
Add support to validate ECDSA keygen mode tests. Signed-off-by: Gowrishankar Muthukrishnan --- .../fips_validation/fips_validation_ecdsa.c | 52 +++ examples/fips_validation/main.c | 13 + 2 files changed, 65 insertions(+) diff --git a/examples

[v1, 07/10] examples/fips_validation: add SHA3 algorithms in ECDSA test

2023-02-06 Thread Gowrishankar Muthukrishnan
Add SHA3 algorithms in ECDSA as supported. Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation_ecdsa.c | 4 1 file changed, 4 insertions(+) diff --git a/examples/fips_validation/fips_validation_ecdsa.c b/examples/fips_validation/fips_validation_ecdsa.c

[v1, 09/10] examples/fips_validation: fix AES XTS to read seq number

2023-02-06 Thread Gowrishankar Muthukrishnan
Fix AES XTS test to read sequence number correctly. Fixes: f8e431ed8f6 ("examples/fips_validation: add parsing for AES-XTS") Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation_xts.c | 13 + 1 file changed, 9 insertions(+), 4 deletion

[v1, 08/10] examples/fips_validation: fix AES GCM validation tests

2023-02-06 Thread Gowrishankar Muthukrishnan
AES GCM validation tests fail in FIPS validation due to incorrect fields populated in response file. This patch fixes them. Fixes: 5b540bebac8e ("examples/fips_validation: fix GMAC decryption output") Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_valida

[v1, 10/10] examples/fips_validation: add extra space in JSON buffer

2023-02-06 Thread Gowrishankar Muthukrishnan
JSON buffer size") Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h index c4988053c1..abc1d64

[PATCH] common/cnxk: fix incorrect auth key length

2023-02-06 Thread Gowrishankar Muthukrishnan
Auth key length is stored as 8 bit value in SE context. It should be larger enough to accommodate supported auth key length of 1024 bytes maximum, as in HMAC. Fixes: a45859312ff ("common/cnxk: add SE definitions for symmetric crypto") Signed-off-by: Gowrishankar Muthukrishnan --

[PATCH] crypto/cnxk: fix order of ECFPM params

2023-02-06 Thread Gowrishankar Muthukrishnan
Fix the order of ECFPM parameters according to target board. Fixes: 8e39b133235 ("crypto/cnxk: support fixed point multiplication") Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/cnxk/cnxk_ae.h | 48 --- 1 file changed, 28 inserti

RE: [v1 0/6] cryptodev: support digest message in SM2

2023-09-14 Thread Gowrishankar Muthukrishnan
Hi, Could these patches get some review ? Thanks, Gowrishankar > This patch series fixes SM2 algorithm implementation to support digest > message as input along with plain message as today. > > Gowrishankar Muthukrishnan (6): > crypto/openssl: include SM2 in asymmetr

[PATCH] crypto/openssl: fix memory leaks in SM2 ops

2023-09-19 Thread Gowrishankar Muthukrishnan
Fix memory leaks in SM2 ops, as reported by valgrind. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/openssl/rte_openssl_pmd.c | 45 ++-- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto

RE: [EXT] [RFC] cryptodev: refactor sm2, add plain message flag

2023-09-20 Thread Gowrishankar Muthukrishnan
Hi, > Actually hash should be moved outside of xform, we do not want to have a > session per hash I think. > Session should be per key, eventually per private key only. > > If a hardware does not support hashing plain input before any SM2 op, It has to be first hashed in a separate session (based

[PATCH] app/test: add modexp group tests

2023-09-23 Thread Gowrishankar Muthukrishnan
Add modexp tests for groups 5, 14, 15, 16, 17 and 18. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 48 + app/test/test_cryptodev_mod_test_vectors.h | 989 - 2 files changed, 1036 insertions(+), 1 deletion(-) diff --git a/app

[PATCH v4 0/2] app/dma-perf: add SG copy support

2023-09-24 Thread Gowrishankar Muthukrishnan
Add SG copy support in dma-perf application. v4: - improvement in buffer allocation for perf validation. Gowrishankar Muthukrishnan (2): app/dma-perf: validate copied memory app/dma-perf: add SG copy support app/test-dma-perf/benchmark.c | 251 ++ app/test

[PATCH v4 1/2] app/dma-perf: validate copied memory

2023-09-24 Thread Gowrishankar Muthukrishnan
Validate copied memory to ensure DMA copy did not fail. Fixes: 623dc9364dc ("app/dma-perf: introduce DMA performance test") Signed-off-by: Gowrishankar Muthukrishnan --- app/test-dma-perf/benchmark.c | 24 ++-- app/test-dma-perf/main.c | 16 +++-

[PATCH v4 2/2] app/dma-perf: add SG copy support

2023-09-24 Thread Gowrishankar Muthukrishnan
Add SG copy support. Signed-off-by: Gowrishankar Muthukrishnan --- app/test-dma-perf/benchmark.c | 243 +- app/test-dma-perf/config.ini | 17 +++ app/test-dma-perf/main.c | 34 - app/test-dma-perf/main.h | 5 +- 4 files changed, 260 insertions

RE: [v1 3/6] cryptodev: add hash support in asymmetric capability

2023-09-26 Thread Gowrishankar Muthukrishnan
Hi Arek, > > rte_crypto_ec_xform { > > enum rte_crypto_curve_id curve_id; > > /**< Pre-defined ec groups */ > > + > > + enum rte_crypto_auth_algorithm hash; > [Arek] I think that session should only contain information that are constant > across its lifetime. Here we decided to have a cur

[PATCH v2 0/7] cryptodev: support digest message in SM2

2023-09-27 Thread Gowrishankar Muthukrishnan
This patch series fixes SM2 algorithm implementation to support digest message as input along with plain message as today. v2: - private and pubic keys stored per session. Gowrishankar Muthukrishnan (7): crypto/openssl: include SM2 in asymmetric capabilities cryptodev: set private and

[PATCH v2 1/7] crypto/openssl: include SM2 in asymmetric capabilities

2023-09-27 Thread Gowrishankar Muthukrishnan
Include SM2 algorithm in the asymmetric capabilities supported by OpenSSL PMD. Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal --- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 14

[PATCH v2 2/7] cryptodev: set private and public keys in EC session

2023-09-27 Thread Gowrishankar Muthukrishnan
Set EC private and public keys into xform so that, it can be maintained per session. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 121 ++ drivers/common/cnxk/roc_ae.h | 18 ++ drivers/common/cpt/cpt_mcode_defines.h

[PATCH v2 3/7] cryptodev: add RNG capability in EC based xform

2023-09-27 Thread Gowrishankar Muthukrishnan
Elliptic curve based asymmetric operations use cryptographically secure random number in its computation. If PMD supports RNG for such ops, the application could skip computing on its own. This patch adds new field in asymmetric capability to declare this capability. Signed-off-by: Gowrishankar

[PATCH v2 4/7] cryptodev: add hash algorithms in asymmetric capability

2023-09-27 Thread Gowrishankar Muthukrishnan
already supports it. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 1 + lib/cryptodev/cryptodev_trace.h | 9 + lib/cryptodev/cryptodev_trace_points.c | 3 +++ lib/cryptodev/rte_cryptodev.c| 16

[PATCH v2 5/7] cryptodev: use generic EC xform params for SM2

2023-09-27 Thread Gowrishankar Muthukrishnan
SM2 curve could use generic EC xform as it is yet another EC. This would also require SM2 curve ID enumerated along with other curves, as listed in: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal

[PATCH v2 6/7] app/test: check asymmetric capabilities in SM2 test

2023-09-27 Thread Gowrishankar Muthukrishnan
Check asymmetric capabilities such as SM3 hash support and internal RNG and accordingly choose op params for SM2 test. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal --- app/test/test_cryptodev_asym.c | 78 -- app/test

[PATCH v2 7/7] crypto/cnxk: add SM2 support

2023-09-27 Thread Gowrishankar Muthukrishnan
Add SM2 asymmetric algorithm support in cnxk PMD. Signed-off-by: Gowrishankar Muthukrishnan --- doc/guides/cryptodevs/features/cn10k.ini | 1 + doc/guides/rel_notes/release_23_11.rst| 6 + drivers/common/cnxk/hw/cpt.h | 3 +- drivers/common/cnxk/roc_ae.c

RE: [PATCH] lib/cryptodev: move RSA padding information into xform

2023-09-27 Thread Gowrishankar Muthukrishnan
Hi Arek, > > RSA padding information could be a xform entity rather than part of > > crypto op, as it seems associated with hashing algorithm used for the > > entire crypto session, where this algorithm is used in message digest > > itself. Even in virtIO standard spec, this info is associated in

[RFC 0/6] vhost: add asymmetric crypto support

2023-09-28 Thread Gowrishankar Muthukrishnan
27;ll check a bit closer. Gowrishankar Muthukrishnan (6): cryptodev: move RSA padding information into xform cryptodev: fix RSA xform for ASN.1 syntax vhost: add asymmetric RSA support crypto/virtio: add asymmetric RSA support examples/vhost_crypto: add asymmetric support app/test

[RFC 1/6] cryptodev: move RSA padding information into xform

2023-09-28 Thread Gowrishankar Muthukrishnan
creation. Hence, moving this info from crypto op into xform structure. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 4 -- app/test/test_cryptodev_rsa_test_vectors.h | 2 + drivers/common/cpt/cpt_ucode_asym.h | 4 +- drivers/crypto/cnxk

[RFC 2/6] cryptodev: fix RSA xform for ASN.1 syntax

2023-09-28 Thread Gowrishankar Muthukrishnan
VirtIO to benefit from the xform as per ASN.1 syntax. Signed-off-by: Gowrishankar Muthukrishnan --- lib/cryptodev/rte_crypto_asym.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index f0996816b9..afc5bdc874

[RFC 3/6] vhost: add asymmetric RSA support

2023-09-28 Thread Gowrishankar Muthukrishnan
Support asymmetric RSA crypto operations in vhost-user. Signed-off-by: Gowrishankar Muthukrishnan --- lib/cryptodev/cryptodev_pmd.h | 6 + lib/vhost/rte_vhost_crypto.h | 14 +- lib/vhost/vhost.c | 11 +- lib/vhost/vhost.h | 1 + lib/vhost/vhost_crypto.c | 551

[RFC 4/6] crypto/virtio: add asymmetric RSA support

2023-09-28 Thread Gowrishankar Muthukrishnan
Asymmetric RSA operations (SIGN, VERIFY, ENCRYPT and DECRYPT) are supported in virtio PMD. Signed-off-by: Gowrishankar Muthukrishnan --- .../virtio/virtio_crypto_capabilities.h | 19 + drivers/crypto/virtio/virtio_cryptodev.c | 388 +++--- drivers/crypto/virtio

[RFC 5/6] examples/vhost_crypto: add asymmetric support

2023-09-28 Thread Gowrishankar Muthukrishnan
Add symmetric support. Signed-off-by: Gowrishankar Muthukrishnan --- examples/vhost_crypto/main.c | 50 +--- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c index 02987ebd76..f9e2732d18

[RFC 6/6] app/test: add asymmetric tests for virtio pmd

2023-09-28 Thread Gowrishankar Muthukrishnan
Add asymmetric tests for Virtio PMD. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 36 -- app/test/test_cryptodev_rsa_test_vectors.h | 26 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/app/test

RE: [PATCH v2 2/7] cryptodev: set private and public keys in EC session

2023-09-28 Thread Gowrishankar Muthukrishnan
> > The cnxk changes should be in patch [v2,7/7] crypto/cnxk: add SM2 support. > Thanks Ciara. Minor issue in patches rebase. I'll send next version fixing it. Regards, Gowrishankar

[PATCH v1] test/crypto: remove unused stats in test setup

2024-07-15 Thread Gowrishankar Muthukrishnan
Remove unused stats in test setup. Coverity issue: 373869 Fixes: 2c6dab9cd93 ("test/crypto: add RSA and Mod tests") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH v1] test/crypto: fix asymmetric capability test

2024-07-15 Thread Gowrishankar Muthukrishnan
ned-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 3802cf8022..1d88832146 100644 --- a/app/test/test_cryptodev_asym.c +++

[PATCH v1] test/crypto: fix comparison function for modex values

2024-07-15 Thread Gowrishankar Muthukrishnan
Fix comparison function used by modex test to check from first non-zero value itself. Coverity issue: 430125 Fixes: 2162d32c1c3 ("test/crypto: validate modex from first non-zero") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_a

[PATCH] doc: announce cryptodev change to support EDDSA

2024-07-22 Thread Gowrishankar Muthukrishnan
Announce the additions in cryptodev ABI to support EDDSA algorithm. Signed-off-by: Gowrishankar Muthukrishnan -- RFC: https://patches.dpdk.org/project/dpdk/patch/0ae6a1afadac64050d80b0fd7712c4a6a8599e2c.1701273963.git.gmuthukri...@marvell.com/ --- doc/guides/rel_notes/deprecation.rst | 4

[PATCH] doc: announce cryptodev changes to offload RSA in VirtIO

2024-07-22 Thread Gowrishankar Muthukrishnan
Announce cryptodev changes to offload RSA asymmetric operation in VirtIO PMD. Signed-off-by: Gowrishankar Muthukrishnan -- RFC: https://patches.dpdk.org/project/dpdk/patch/20230928095300.1353-2-gmuthukri...@marvell.com/ https://patches.dpdk.org/project/dpdk/patch/20230928095300.1353-3

[PATCH] doc: announce vhost changes to support asymmetric operation

2024-07-22 Thread Gowrishankar Muthukrishnan
Announce vhost ABI changes to modify few functions to support asymmetric crypto operation. Signed-off-by: Gowrishankar Muthukrishnan -- RFC: https://patches.dpdk.org/project/dpdk/patch/20230928095300.1353-4-gmuthukri...@marvell.com/ --- doc/guides/rel_notes/deprecation.rst | 7 +++ 1

RE: [EXTERNAL] Re: [PATCH] doc: announce vhost changes to support asymmetric operation

2024-07-25 Thread Gowrishankar Muthukrishnan
Sure Jerin. I’ll drop this proposal as ABI versioning could help. Thanks. Looks like in this case adding new arguments to function. Could you check ABI versing helps here? It seems like it can be easy manged with ABI versioning.

RE: [PATCH] doc: announce cryptodev changes to offload RSA in VirtIO

2024-07-25 Thread Gowrishankar Muthukrishnan
> +* cryptodev: The struct rte_crypto_rsa_padding will be moved from > + rte_crypto_rsa_op_param struct to rte_crypto_rsa_xform struct, > + breaking ABI. The new location is recommended to comply with > + virtio-crypto specification. Applications and drivers using > + this struct will be up

RE: [PATCH] doc: announce cryptodev changes to offload RSA in VirtIO

2024-07-25 Thread Gowrishankar Muthukrishnan
Hi ArkadiuszX, > + > +* cryptodev: The struct rte_crypto_rsa_padding will be moved from > + rte_crypto_rsa_op_param struct to rte_crypto_rsa_xform struct, > + breaking ABI. The new location is recommended to comply with > + virtio-crypto specification. Applications and drivers using > +

RE: [PATCH] doc: announce cryptodev changes to offload RSA in VirtIO

2024-07-30 Thread Gowrishankar Muthukrishnan
Hi, We need to fix padding info in DPDK as per VirtIO specification in order to support RSA in virtio devices. VirtIO-crypto specification and DPDK specification differs in the way padding is handled. With current DPDK & virtio specification, it is impossible to support RSA in virtio-crypto. If

RE: [EXTERNAL] Re: [PATCH] doc: announce cryptodev change to support EDDSA

2024-08-07 Thread Gowrishankar Muthukrishnan
> It means we are not able to add an algo without breaking ABI. > Is it something we can improve? > Sure Thomas, we will address it in our patch, ensuring the long term solution as well. Regards, Gowrishankar

RE: [PATCH] doc: announce cryptodev changes to offload RSA in VirtIO

2024-08-17 Thread Gowrishankar Muthukrishnan
Hi Arek, > I do not have any particular security issues in mind here, and if PMD need to > copy keys internally, for alignment or padding purposes, redundancy problems > can be overcome. My concern was, that it is the more natural way of handling > the API; we have one key, multiple padding scheme

RE: [EXT] [PATCH] examples/fips_validation: fix link to libjansson

2022-06-07 Thread Gowrishankar Muthukrishnan
> -Original Message- > From: David Marchand > Sent: Tuesday, June 7, 2022 3:32 PM > To: dev@dpdk.org > Cc: tho...@monjalon.net; Fan Zhang ; Brian > Dooley ; Gowrishankar Muthukrishnan > ; Brandon Lo > Subject: [EXT] [PATCH] examples/fips_validation: fix link to

RE: [EXT] Re: [v9, 00/10] Add JSON vector set support to fips validation

2022-06-21 Thread Gowrishankar Muthukrishnan
3, 2022 5:29 PM > To: Gowrishankar Muthukrishnan ; Zhang, Roy > Fan ; Akhil Goyal > Cc: dev@dpdk.org; Dooley, Brian ; > lylav...@iol.unh.edu; Anoob Joseph ; Archana > Muniganti ; Jerin Jacob Kollanukkaran > > Subject: [EXT] Re: [v9, 00/10] Add JSON vector set support to fips

[PATCH v1] example/fips_validation: handle empty payload

2022-06-28 Thread Gowrishankar Muthukrishnan
Allocate atleast onebyte to handle empty payload in a test vector when defined. Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation.c | 2 +- 1 file

[PATCH v1] examples/fips_validation: add parsing for xts

2022-06-28 Thread Gowrishankar Muthukrishnan
Added function to parse algorithm for AES XTS test. Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation.c| 4 +- examples/fips_validation/fips_validation.h| 17 ++- .../fips_validation/fips_validation_xts.c | 126 ++ examples

[PATCH v2] example/fips_validation: handle empty payload

2022-06-28 Thread Gowrishankar Muthukrishnan
Allocate at least onebyte to handle empty payload in a test vector when defined. Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS application") Cc: sta...@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- v2: - commit message corrections. --- examples/fips_

[PATCH v2] examples/fips_validation: add parsing for xts

2022-06-28 Thread Gowrishankar Muthukrishnan
Added function to parse algorithm for AES XTS test. Signed-off-by: Gowrishankar Muthukrishnan --- v2: - build failure fixed if no jansson lib available. --- examples/fips_validation/fips_validation.c| 4 +- examples/fips_validation/fips_validation.h| 16 +- .../fips_validation

[PATCH v1] examples/fips_validation: add parsing for sha

2022-06-28 Thread Gowrishankar Muthukrishnan
Added function to parse algorithm for SHA test. Verified with SHA 1 and 256 vectors. SHA 384 and 512 has some issues with the way jansson objects are created, which could be addressed separately. Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation.c| 2

RE: [EXT] Re: [PATCH v1] examples/fips_validation: add parsing for xts

2022-06-29 Thread Gowrishankar Muthukrishnan
Thanks David, I ack and have added your suggestions in V3. Regards, Gowrishankar

RE: [PATCH v1] examples/fips_validation: add parsing for sha

2022-06-29 Thread Gowrishankar Muthukrishnan
Hi Fan, > > --- a/examples/fips_validation/main.c > > +++ b/examples/fips_validation/main.c > > @@ -1693,19 +1693,24 @@ fips_mct_sha_test(void) > > #define SHA_EXTERN_ITER100 > > #define SHA_INTERN_ITER1000 > > #define SHA_MD_BLOCK 3 > > - struct fips_val val = {NULL, 0}, md[SHA

[PATCH v3 0/3] example/fips_validation: add xts and sha json parsing

2022-06-29 Thread Gowrishankar Muthukrishnan
Add support in fips_validation to parse AES_XTS and SHA json vectors. v3: - individual patches for xts and sha are clubbed in this new series. Gowrishankar Muthukrishnan (3): examples/fips_validation: add aes_cbc specific enum examples/fips_validation: add parsing for xts examples

[PATCH v3 1/3] examples/fips_validation: add aes_cbc specific enum

2022-06-29 Thread Gowrishankar Muthukrishnan
Add algorithm enum specifically for AES_CBC instead of relying on AES as such. Fixes: 8b8546aaedf ("examples/fips_validation: add parsing for AES-CBC") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Fan Zhang --- examples/fips_validation/fips_validation.c | 2 +- examples/fips_

[PATCH v3 2/3] examples/fips_validation: add parsing for xts

2022-06-29 Thread Gowrishankar Muthukrishnan
Added function to parse algorithm for AES XTS test. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Fan Zhang --- v3: - CBC related changes moved to 1/3 patch. --- examples/fips_validation/fips_validation.c| 2 + examples/fips_validation/fips_validation.h| 15

[PATCH v3 3/3] examples/fips_validation: add parsing for sha

2022-06-29 Thread Gowrishankar Muthukrishnan
Added function to parse algorithm for SHA test. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Fan Zhang --- v3: - added a comment on flat array of fips_val for parse_writeback callback. --- examples/fips_validation/fips_validation.c| 2 + examples/fips_validation/fips_validation.h

[PATCH v4 0/3] example/fips_validation: add xts and sha json parsing

2022-06-29 Thread Gowrishankar Muthukrishnan
Add support in fips_validation to parse AES_XTS and SHA json vectors. v4: - doc updates Gowrishankar Muthukrishnan (3): examples/fips_validation: add aes_cbc specific enum examples/fips_validation: add parsing for xts examples/fips_validation: add parsing for sha doc/guides

[PATCH v4 1/3] examples/fips_validation: add aes_cbc specific enum

2022-06-29 Thread Gowrishankar Muthukrishnan
Add algorithm enum specifically for AES_CBC instead of relying on AES as such. Fixes: 8b8546aaedf ("examples/fips_validation: add parsing for AES-CBC") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Fan Zhang --- examples/fips_validation/fips_validation.c | 2 +- examples/fips_

[PATCH v4 2/3] examples/fips_validation: add parsing for xts

2022-06-29 Thread Gowrishankar Muthukrishnan
Added function to parse algorithm for AES XTS test. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Fan Zhang --- v4: - doc update --- doc/guides/sample_app_ug/fips_validation.rst | 1 + examples/fips_validation/fips_validation.c| 2 + examples/fips_validation/fips_validation.h

[PATCH v4 3/3] examples/fips_validation: add parsing for sha

2022-06-29 Thread Gowrishankar Muthukrishnan
Added function to parse algorithm for SHA test. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Fan Zhang --- v4: - doc update --- doc/guides/sample_app_ug/fips_validation.rst | 1 + examples/fips_validation/fips_validation.c| 2 + examples/fips_validation/fips_validation.h

[PATCH v1] examples/fips_validation: fix memory leak in sha test

2022-07-02 Thread Gowrishankar Muthukrishnan
There is wrong size used for allocation of digest buffer which in some cases cause memory corruption. Also, fixed places where memory leak is observed. Fixes: 93d797d94f1 ("examples/fips_validation: add parsing for sha") Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_

  1   2   3   4   5   6   7   8   >