app/crypto-perf: add RSA test vectors
PATCH 1/1 app/crypto-perf: add RSA test vectors
Add test vectors to benchmark larger RSA modulus.
Signed-off-by Gowrishankar Muthukrishnan <[email protected]>
--- app/test-crypto-perf/cperf_options.h | 3 + app/test-crypto-perf/cperf_options_parsing.c | 132 +- app/test-crypto-perf/cperf_test_vectors.c | 1386 +++++++++++++++++- app/test-crypto-perf/cperf_test_vectors.h | 7 +- doc/guides/tools/cryptoperf.rst | 16 +- 5 files changed, 1472 insertions(+), 72 deletions(-)
app/test-crypto-perf/cperf_options.h +3 -0
@@ -14,6 +14,7 @@#define CPERF_PTEST_TYPE ("ptest")#define CPERF_MODEX_LEN ("modex-len")#define CPERF_RSA_PRIV_KEYTYPE ("rsa-priv-keytype") +#define CPERF_RSA_MODLEN ("rsa-modlen")#define CPERF_SILENT ("silent")#define CPERF_ENABLE_SDAP ("enable-sdap")
@@ -181,6 +182,8 @@ struct cperf_options {enum rte_crypto_asym_op_type asym_op_type;enum rte_crypto_auth_algorithm asym_hash_alg;struct cperf_rsa_test_data *rsa_data; +uint16_t rsa_modlen; +uint8_t rsa_keytype; };void
app/test-crypto-perf/cperf_options_parsing.c +118 -14
182 lines not on this page · raw message
app/test-crypto-perf/cperf_test_vectors.c +1333 -53
1,407 lines not on this page · raw message
app/test-crypto-perf/cperf_test_vectors.h +4 -3
@@ -114,6 +114,7 @@ struct cperf_rsa_plaintext { };struct cperf_rsa_test_data { +char name[64 ];enum rte_crypto_rsa_priv_key_type key_type;rte_crypto_param n;rte_crypto_param e;
@@ -177,9 +178,9 @@ extern struct cperf_modex_test_data modex_perf_data[10];extern struct cperf_ecdsa_test_data secp256r1_perf_data;extern struct cperf_eddsa_test_data ed25519_perf_data;extern struct cperf_sm2_test_data sm2_perf_data; -extern struct cperf_rsa_test_data rsa_pub_perf_data; -extern struct cperf_rsa_test_data rsa_exp_perf_data; -extern struct cperf_rsa_test_data rsa_qt_perf_data; +extern struct cperf_rsa_test_data rsa_pub_perf_data[4 ]; +extern struct cperf_rsa_test_data rsa_exp_perf_data[4 ]; +extern struct cperf_rsa_test_data rsa_qt_perf_data[4 ];extern struct cperf_rsa_plaintext rsa_plaintext;#endif
doc/guides/tools/cryptoperf.rst +14 -2
@@ -177,6 +177,7 @@ The following are the application command-line options: modex ecdsa_p256r1 eddsa_25519 + rsa sm2 ipsec tls-record
@@ -355,8 +356,19 @@ The following are the application command-line options: * ``--asym-op <sign/verify/encrypt/decrypt>`` Set Asymmetric crypto operation mode. - To be used with SM2 asymmetric crypto ops. - Default is ``sign``. + Not applicable for modex op type. + Default is ``encrypt``. + +* ``--rsa-priv-keytype <exp/qt>`` + + Set RSA private key type. + To be used with RSA asymmetric crypto ops. + +* ``--rsa-modlen <n>`` + + Set RSA mod length (in bits) for asymmetric crypto perf test. + To be used with RSA asymmetric crypto ops. + Supported lengths are 1024, 2048, 4096, 8192. Default length is 1024. * ``--tls-version <TLS1.2/TLS1.3/DTLS1.2>``
Signature · 1 line
2.25.1