app/crypto-perf: add asymmetric crypto tests
cover app/crypto-perf: add asymmetric crypto tests
This patch series adds below asymmetric tests in crypto-perf tool:
* MODEX group tests (RFC 3526)
* SM2 tests
* ECDSA P256R1 tests
Akhil Goyal (1):
app/crypto-perf: support SM2
Gowrishankar Muthukrishnan (5):
app/crypto-perf: add modex groups test app/crypto-perf: remove redundant local varriable app/crypto-perf: fix result location for asymmetric test app/crypto-perf: add function to check asymmetric operation app/crypto-perf: support ECDSA
app/test-crypto-perf/cperf_ops.c | 135 +++- app/test-crypto-perf/cperf_options.h | 8 + app/test-crypto-perf/cperf_options_parsing.c | 61 +- app/test-crypto-perf/cperf_test_common.c | 19 +- app/test-crypto-perf/cperf_test_common.h | 2 + app/test-crypto-perf/cperf_test_latency.c | 21 +- app/test-crypto-perf/cperf_test_throughput.c | 2 +- app/test-crypto-perf/cperf_test_vectors.c | 773 ++++++++++++++++++- app/test-crypto-perf/cperf_test_vectors.h | 41 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- app/test-crypto-perf/main.c | 87 ++- doc/guides/tools/cryptoperf.rst | 7 + 12 files changed, 1131 insertions(+), 27 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/6 app/crypto-perf: add modex groups test
Add perf tests for modex groups 5, 14, 15, 16, 17 and 18 based on RFC 3526.
--- app/test-crypto-perf/cperf_test_vectors.c | 570 +++++++++++++++++++++- app/test-crypto-perf/cperf_test_vectors.h | 4 +- 2 files changed, 571 insertions(+), 3 deletions(-)
app/test-crypto-perf/cperf_test_vectors.c +569 -1
@@ -8,7 +8,7 @@#include "cperf_test_vectors.h" struct -cperf_modex_test_data modex_perf_data[4 ] = { +cperf_modex_test_data modex_perf_data[10 ] = { { .base = { .data = {
@@ -233,6 +233,574 @@ cperf_modex_test_data modex_perf_data[4] = { .result = { .len = 448 } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0x6C, 0x80, 0xFF, 0x29, 0xF9, 0x27, 0x2E, 0x6D, + 0xE1, 0xB7, 0x3F, 0x13, 0x77, 0xD2, 0x3E, 0x49, + 0xCE, 0xAE, 0xBD, 0x73, 0x7A, 0x0F, 0xE7, 0xA4, + 0x20, 0x49, 0x72, 0x87, 0x4E, 0x1B + }, + .len = 30 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, + 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, + 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, + 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, + 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, + 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, + 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, + 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, + 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, + 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, + 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x23, 0x73, 0x27, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 192 + }, + .result = { + .len = 192 + } + }, + { + .base = { + .data = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + }, + .len = 64 + }, + .exponent = { + .data = { + 0x8E, 0x4E, 0x41, 0xA2, 0xE0, 0x59, 0xA8, 0x29, + 0x71, 0xF6, 0x21, 0xC9, 0xD5, 0x0E, 0x36, 0x0F, + 0x59, 0xD6, 0x74, 0x4C, 0x3A, 0xC7, 0x13, 0x5E, + 0x7D, 0x2D, 0x43, 0x63, 0x5A, 0x3D, 0xCA, 0x5F, + 0xF7, 0xB2, 0x3D, 0x9C, 0x3F, 0xA1, 0x5D, 0x71 + }, + .len = 40 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x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, 0x07, 0xA2, 0x8F, + 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, + 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, + 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, + 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, + 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 256 + }, + .result = { + .len = 256 + } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0x63, 0x4D, 0x67, 0x4E, 0x4A, 0x16, 0x0F, 0xEB, + 0x76, 0xC8, 0xAB, 0x3B, 0x4A, 0x74, 0x03, 0x02, + 0x2F, 0xAC, 0x34, 0x23, 0xC8, 0x2E, 0x1E, 0x60, + 0x63, 0x1E, 0x7D, 0x3F, 0x22, 0xB9, 0xBF, 0x2D, + 0x4F, 0xB3, 0x72, 0xAC, 0x1E, 0x62, 0xA7, 0x47, + 0x7A, 0xF3, 0x45, 0xAB, 0x5B, 0x67, 0x12, 0x80, + 0x77, 0xDA, 0xF8, 0xF4 + }, + .len = 52 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B,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, 0x05, 0x10, + 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, + 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, + 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, + 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, + 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, + 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, + 0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, + 0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, + 0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, + 0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, + 0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, + 0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, + 0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, + 0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, + 0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, + 0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, + 0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x3A, 0xD2, 0xCA, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 384 + }, + .result = { + .len = 384 + } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0xF2, 0x77, 0xFF, 0x91, 0x08, 0xF6, 0x16, 0x8E, + 0xEE, 0x8C, 0xCC, 0x62, 0x07, 0xA4, 0xE3, 0x0F, + 0xB8, 0xE8, 0xFD, 0x77, 0xEA, 0x06, 0x1D, 0x9F, + 0x2A, 0x96, 0xE8, 0x0D, 0x66, 0xA4, 0x97, 0x7E, + 0xDA, 0xDB, 0xC0, 0xC0, 0x2F, 0x72, 0xCD, 0xFC, + 0xBE, 0xC3, 0xAA, 0x46, 0x31, 0x7C, 0x4B, 0x4D, + 0x0B, 0x14, 0x02, 0x5C, 0x7F, 0x29, 0xC1, 0xDE, + 0xC5, 0x06, 0x70, 0x0B + }, + .len = 60 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, + 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, + 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, + 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, + 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36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, 0xB7, 0xDC, 0x90, 0xA6, 0xC0, 0x8F, + 0x4D, 0xF4, 0x35, 0xC9, 0x34, 0x06, 0x31, 0x99, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 512 + }, + .result = { + .len = 512 + } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0x06, 0x8B, 0x74, 0x99, 0x02, 0xCE, 0x50, 0x2C, + 0xED, 0x29, 0x2F, 0xFB, 0x14, 0x74, 0x11, 0x7A, + 0x7C, 0x1D, 0xBF, 0xF8, 0xC3, 0x2D, 0xFD, 0x45, + 0x56, 0xCF, 0xCD, 0x92, 0x12, 0xF2, 0xC1, 0x96, + 0x73, 0x11, 0x4C, 0xAC, 0xFA, 0x0C, 0x4B, 0x2B, + 0xFA, 0xED, 0xA5, 0x5A, 0xDD, 0xF7, 0x5F, 0x75, + 0xB0, 0x18, 0x69, 0x63, 0xB0, 0x8E, 0x04, 0xA2, + 0x0D, 0x1F, 0x68, 0xA9, 0x1A, 0x75, 0x8A, 0x29, + 0xD4, 0xC1, 0x31, 0xAC + }, + .len = 68 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2,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 0xF0, 0x32, 0xEA, 0x15, 0xD1, 0x72, 0x1D, 0x03, + 0xF4, 0x82, 0xD7, 0xCE, 0x6E, 0x74, 0xFE, 0xF6, + 0xD5, 0x5E, 0x70, 0x2F, 0x46, 0x98, 0x0C, 0x82, + 0xB5, 0xA8, 0x40, 0x31, 0x90, 0x0B, 0x1C, 0x9E, + 0x59, 0xE7, 0xC9, 0x7F, 0xBE, 0xC7, 0xE8, 0xF3, + 0x23, 0xA9, 0x7A, 0x7E, 0x36, 0xCC, 0x88, 0xBE, + 0x0F, 0x1D, 0x45, 0xB7, 0xFF, 0x58, 0x5A, 0xC5, + 0x4B, 0xD4, 0x07, 0xB2, 0x2B, 0x41, 0x54, 0xAA, + 0xCC, 0x8F, 0x6D, 0x7E, 0xBF, 0x48, 0xE1, 0xD8, + 0x14, 0xCC, 0x5E, 0xD2, 0x0F, 0x80, 0x37, 0xE0, + 0xA7, 0x97, 0x15, 0xEE, 0xF2, 0x9B, 0xE3, 0x28, + 0x06, 0xA1, 0xD5, 0x8B, 0xB7, 0xC5, 0xDA, 0x76, + 0xF5, 0x50, 0xAA, 0x3D, 0x8A, 0x1F, 0xBF, 0xF0, + 0xEB, 0x19, 0xCC, 0xB1, 0xA3, 0x13, 0xD5, 0x5C, + 0xDA, 0x56, 0xC9, 0xEC, 0x2E, 0xF2, 0x96, 0x32, + 0x38, 0x7F, 0xE8, 0xD7, 0x6E, 0x3C, 0x04, 0x68, + 0x04, 0x3E, 0x8F, 0x66, 0x3F, 0x48, 0x60, 0xEE, + 0x12, 0xBF, 0x2D, 0x5B, 0x0B, 0x74, 0x74, 0xD6, + 0xE6, 0x94, 0xF9, 0x1E, 0x6D, 0xCC, 0x40, 0x24, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 768 + }, + .result = { + .len = 768 + } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0x01, 0xA6, 0x8A, 0x0A, 0xDA, 0xA6, 0x14, 0x43, + 0x84, 0xD6, 0xEB, 0x11, 0x67, 0xA6, 0xD2, 0xAC, + 0x11, 0x5D, 0x15, 0x99, 0x31, 0x99, 0xAE, 0x08, + 0x3D, 0xEC, 0x19, 0x57, 0x3D, 0xDF, 0x96, 0x7C, + 0x9A, 0x1A, 0x72, 0x80, 0x1F, 0xF3, 0x50, 0x91, + 0xD0, 0x70, 0x11, 0x37, 0xA8, 0xFE, 0xE4, 0x37, + 0x3B, 0x36, 0x62, 0x89, 0xCF, 0x31, 0x1D, 0x76, + 0x28, 0xBE, 0x5F, 0x25, 0x12, 0x6E, 0x72, 0x83, + 0x8A, 0x1A, 0xC2, 0xFA, 0xD6, 0x49, 0x2C, 0x4F, + 0x2D, 0xF1, 0x77, 0x67, 0x49, 0xDA + }, + .len = 78 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, + 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, + 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, + 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, + 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, + 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, + 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, + 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, + 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, + 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, + 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, + 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, + 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, + 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, + 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, + 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, + 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, + 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, + 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, + 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, + 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, + 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, + 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, + 0xB3, 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30, 0x50, 0xE2, 0x76, 0x56, 0x94, 0xDF, + 0xC8, 0x1F, 0x56, 0xE8, 0x80, 0xB9, 0x6E, 0x71, + 0x60, 0xC9, 0x80, 0xDD, 0x98, 0xED, 0xD3, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 1024 + }, + .result = { + .len = 1024 + } } };
app/test-crypto-perf/cperf_test_vectors.h +2 -2
@@ -78,7 +78,7 @@ struct cperf_test_vector { };struct cperf_modex_test_data { -#define DATA_SIZE 512 +#define DATA_SIZE 1024struct {uint8_t data[DATA_SIZE ];uint16_t len;
@@ -110,6 +110,6 @@ extern uint8_t aad[];extern uint8_t digest[2048 ]; -extern struct cperf_modex_test_data modex_perf_data[4 ]; +extern struct cperf_modex_test_data modex_perf_data[10 ];#endif
Signature · 1 line
2.25.1
RE: [PATCH v1 1/6] app/crypto-perf: add modex groups test
Quoted 6 lines
Subject: [PATCH v1 1/6] app/crypto-perf: add modex groups test
Add perf tests for modex groups 5, 14, 15, 16, 17 and 18 based on RFC 3526.
Signed-off-by Gowrishankar Muthukrishnan <[email protected]>
PATCH 2/6 app/crypto-perf: remove redundant local varriable
In reply to Gowrishankar MuthukrishnanRemove redundant local variable used for asym session.
--- app/test-crypto-perf/cperf_ops.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
app/test-crypto-perf/cperf_ops.c +3 -6
@@ -21,7 +21,6 @@ cperf_set_ops_asym(struct rte_crypto_op **ops, uint64_t *tsc_start __rte_unused) {uint16_t i; -void *asym_sess = (void *)sess;for (i =0 ; i < nb_ops; i++) {struct rte_crypto_asym_op *asym_op = ops[i]->asym;
@@ -31,7 +30,7 @@ cperf_set_ops_asym(struct rte_crypto_op **ops, asym_op->modex.base.length = options->modex_data->base.len; asym_op->modex.result.data = options->modex_data->result.data; asym_op->modex.result.length = options->modex_data->result.len; -rte_crypto_op_attach_asym_session (ops[i], asym_sess); +rte_crypto_op_attach_asym_session (ops[i], sess); } }
@@ -62,7 +61,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,for (i =0 ; i < nb_ops; i++) {struct rte_crypto_sym_op *sym_op = ops[i]->sym; -void *sec_sess = (void *)sess;uint32_t buf_sz; uint32_t *per_pkt_hfn = rte_crypto_op_ctod_offset(ops[i],
@@ -70,7 +68,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops, *per_pkt_hfn = options->pdcp_ses_hfn_en ?0 :PDCP_DEFAULT_HFN ; ops[i]->status =RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ; -rte_security_attach_session (ops[i], sec_sess); +rte_security_attach_session (ops[i], sess); sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset);
@@ -127,7 +125,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops, uint16_t iv_offset __rte_unused, uint32_t *imix_idx, uint64_t *tsc_start) { -void *sec_sess = sess;const uint32_t test_buffer_size = options->test_buffer_size;uint64_t tsc_start_temp, tsc_end_temp;uint16_t i =0 ;
@@ -140,7 +137,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,uint32_t offset = test_buffer_size; ops[i]->status =RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ; -rte_security_attach_session (ops[i], sec_sess); +rte_security_attach_session (ops[i], sess); sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset); sym_op->m_src->pkt_len = test_buffer_size;
Signature · 1 line
2.25.1
RE: [PATCH v1 2/6] app/crypto-perf: remove redundant local varriable
Quoted 8 lines
Subject: [PATCH v1 2/6] app/crypto-perf: remove redundant local varriable
Remove redundant local variable used for asym session.
Fixes a29bb248988 ("cryptodev: hide asymmetric session structure")Fixes 2973dbf93b4 ("security: hide session structure")Signed-off-by Gowrishankar Muthukrishnan <[email protected]>
PATCH 3/6 app/crypto-perf: fix result location for asymmetric test
In reply to Gowrishankar MuthukrishnanFor asymmetric op, private test data should be stored after rte_crypto_asym_op struct.
--- app/test-crypto-perf/cperf_test_common.c | 6 ++++-- app/test-crypto-perf/cperf_test_latency.c | 14 +++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-)
app/test-crypto-perf/cperf_test_common.c +4 -2
@@ -149,11 +149,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,int ret;/* Calculate the object size */ -uint16_t crypto_op_size =sizeof (struct rte_crypto_op ) + -sizeof (struct rte_crypto_sym_op ); +uint16_t crypto_op_size =sizeof (struct rte_crypto_op );uint16_t crypto_op_private_size;if (options->op_type ==CPERF_ASYM_MODEX ) { + crypto_op_size +=sizeof (struct rte_crypto_asym_op );snprintf (pool_name,RTE_MEMPOOL_NAMESIZE ,"perf_asym_op_pool%u" ,rte_socket_id ()); *pool = rte_crypto_op_pool_create(
@@ -170,6 +170,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,return 0 ; } + crypto_op_size +=sizeof (struct rte_crypto_sym_op ); +/* * If doing AES-CCM, IV field needs to be 16 bytes long, * and AAD field needs to be long enough to have 18 bytes,
app/test-crypto-perf/cperf_test_latency.c +11 -3
@@ -122,7 +122,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp) {struct priv_op_data *priv_data; - priv_data = (struct priv_op_data *) (op->sym +1 ); +if (op->type ==RTE_CRYPTO_OP_TYPE_SYMMETRIC ) + priv_data = (struct priv_op_data *) (op->sym +1 ); +else + priv_data = (struct priv_op_data *) (op->asym +1 ); + priv_data->result->status = op->status; priv_data->result->tsc_end = timestamp; }
@@ -251,9 +255,13 @@ cperf_latency_test_runner(void *arg) ctx->res[tsc_idx].tsc_start = tsc_start;/* * Private data structure starts after the end of the -* rte_crypto_sym_op structure. +* rte_crypto_sym_op (or rte_crypto_asym_op) structure. */ - priv_data = (struct priv_op_data *) (ops[i]->sym +1 ); +if (ops[i]->type ==RTE_CRYPTO_OP_TYPE_SYMMETRIC ) + priv_data = (struct priv_op_data *) (ops[i]->sym +1 ); +else + priv_data = (struct priv_op_data *) (ops[i]->asym +1 ); + priv_data->result = (void *)&ctx->res[tsc_idx]; tsc_idx++; }
Signature · 1 line
2.25.1
RE: [PATCH v1 3/6] app/crypto-perf: fix result location for asymmetric test
Quoted 14 lines
-----Original Message-----
From: Gowrishankar Muthukrishnan <[email protected]>
Sent: Saturday, June 15, 2024 5:23 PM
To: [email protected]; Ciara Power <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Akhil Goyal <[email protected]>
Cc: Anoob Joseph <[email protected]>; Gowrishankar Muthukrishnan <[email protected]>; [email protected]
Subject: [PATCH v1 3/6] app/crypto-perf: fix result location for asymmetric testFor asymmetric op, private test data should be stored after
rte_crypto_asym_opstruct.
Quoted 6 lines
Fixes a538d1d2d01e ("test/crypto-perf: extend asymmetric crypto throughputtest")
Cc: [email protected]Signed-off-by Gowrishankar Muthukrishnan <[email protected]>---
PATCH 4/6 app/crypto-perf: add function to check asymmetric operation
In reply to Gowrishankar MuthukrishnanReplace checking input option for every asymmetric test case by a function.
--- app/test-crypto-perf/cperf_test_common.c | 12 +++++++++++- app/test-crypto-perf/cperf_test_common.h | 2 ++ app/test-crypto-perf/cperf_test_latency.c | 7 ++++--- app/test-crypto-perf/cperf_test_throughput.c | 2 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- app/test-crypto-perf/main.c | 8 ++++---- 6 files changed, 23 insertions(+), 10 deletions(-)
app/test-crypto-perf/cperf_test_common.c +11 -1
@@ -152,7 +152,7 @@ cperf_alloc_common_memory(const struct cperf_options *options,uint16_t crypto_op_size =sizeof (struct rte_crypto_op );uint16_t crypto_op_private_size; -if (options->op_type ==CPERF_ASYM_MODEX ) { +if (cperf_is_asym_test (options)) { crypto_op_size +=sizeof (struct rte_crypto_asym_op );snprintf (pool_name,RTE_MEMPOOL_NAMESIZE ,"perf_asym_op_pool%u" ,rte_socket_id ());
@@ -301,3 +301,13 @@ cperf_mbuf_set(struct rte_mbuf *mbuf, mbuf = mbuf->next; } } + +bool +cperf_is_asym_test (const struct cperf_options *options) +{ +if (options->op_type ==CPERF_ASYM_MODEX || + options->op_type ==CPERF_ASYM_SM2 ) +return true; + +return false; +}
app/test-crypto-perf/cperf_test_common.h +2 -0
@@ -26,4 +26,6 @@ cperf_mbuf_set(struct rte_mbuf *mbuf,const struct cperf_options *options, const struct cperf_test_vector *test_vector); +bool +cperf_is_asym_test (const struct cperf_options *options);#endif /* _CPERF_TEST_COMMON_H_ */
app/test-crypto-perf/cperf_test_latency.c +4 -3
@@ -47,7 +47,7 @@ cperf_latency_test_free(struct cperf_latency_ctx *ctx)return ;if (ctx->sess !=NULL ) { -if (ctx->options->op_type ==CPERF_ASYM_MODEX ) +if (cperf_is_asym_test (ctx->options))rte_cryptodev_asym_session_free (ctx->dev_id, ctx->sess);#ifdef RTE_LIB_SECURITY else if (ctx->options->op_type == CPERF_PDCP ||
@@ -217,8 +217,9 @@ cperf_latency_test_runner(void *arg) &imix_idx, &tsc_start);/* Populate the mbuf with the test vector */ -for (i =0 ; i < burst_size; i++) -cperf_mbuf_set (ops[i]->sym->m_src, +if (!cperf_is_asym_test (ctx->options)) +for (i =0 ; i < burst_size; i++) +cperf_mbuf_set (ops[i]->sym->m_src, ctx->options, ctx->test_vector);
app/test-crypto-perf/cperf_test_throughput.c +1 -1
@@ -37,7 +37,7 @@ cperf_throughput_test_free(struct cperf_throughput_ctx *ctx)if (!ctx)return ;if (ctx->sess) { -if (ctx->options->op_type ==CPERF_ASYM_MODEX ) +if (cperf_is_asym_test (ctx->options))rte_cryptodev_asym_session_free (ctx->dev_id, (void *)ctx->sess);#ifdef RTE_LIB_SECURITY
app/test-crypto-perf/cperf_test_verify.c +1 -1
@@ -42,7 +42,7 @@ cperf_verify_test_free(struct cperf_verify_ctx *ctx)return ;if (ctx->sess !=NULL ) { -if (ctx->options->op_type ==CPERF_ASYM_MODEX ) +if (cperf_is_asym_test (ctx->options))rte_cryptodev_asym_session_free (ctx->dev_id, ctx->sess);#ifdef RTE_LIB_SECURITY else if (ctx->options->op_type == CPERF_PDCP ||
app/test-crypto-perf/main.c +4 -4
@@ -18,6 +18,7 @@#include "cperf.h" #include "cperf_options.h" #include "cperf_test_vector_parsing.h" +#include "cperf_test_common.h" #include "cperf_test_throughput.h" #include "cperf_test_latency.h" #include "cperf_test_verify.h"
@@ -203,7 +204,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)rte_cryptodev_info_get (cdev_id, &cdev_info); -if (opts->op_type ==CPERF_ASYM_MODEX ) { +if (cperf_is_asym_test (opts)) {if ((cdev_info.feature_flags &RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO ) ==0 )continue ;
@@ -289,7 +290,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)return -ENOTSUP ; } -if (opts->op_type ==CPERF_ASYM_MODEX ) +if (cperf_is_asym_test (opts)) ret =create_asym_op_pool_socket (socket_id, sessions_needed);else
@@ -300,9 +301,8 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs) qp_conf.mp_session = session_pool_socket[socket_id].sess_mp; -if (opts->op_type ==CPERF_ASYM_MODEX ) { +if (cperf_is_asym_test (opts)) qp_conf.mp_session =NULL ; - } ret =rte_cryptodev_configure (cdev_id, &conf);if (ret <0 ) {
Signature · 1 line
2.25.1
RE: [PATCH v1 4/6] app/crypto-perf: add function to check asymmetric operation
Quoted 7 lines
Subject: [PATCH v1 4/6] app/crypto-perf: add function to check asymmetric operation
Replace checking input option for every asymmetric test case by a function.
Signed-off-by Gowrishankar Muthukrishnan <[email protected]>
RE: [PATCH v1 4/6] app/crypto-perf: add function to check asymmetric operation
In reply to Gowrishankar MuthukrishnanQuoted 7 lines
Subject: [PATCH v1 4/6] app/crypto-perf: add function to check asymmetric operation
Replace checking input option for every asymmetric test case by a function.
Signed-off-by Gowrishankar Muthukrishnan <[email protected]>
Please fix
ninja: Entering directory `./build-gcc-static'
[1/7] Compiling C object 'app/a172ced@@dpdk-test-crypto-perf@exe/test-crypto-perf_cperf_test_common.c.o'.
FAILED: app/a172ced@@dpdk-test-crypto-perf@exe/test-crypto-perf_cperf_test_common.c.o
ccache gcc -Iapp/a172ced@@dpdk-test-crypto-perf@exe -Iapp -I../app -Ilib/cryptodev -I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Ilib/net -I../lib/net -Ilib/security -I../lib/security -Idrivers/crypto/scheduler -I../drivers/crypto/scheduler -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/reorder -I../lib/reorder -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O2 -g -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -march=native -mrtm -DALLOW_EXPERIMENTAL_API -MD -MQ 'app/a172ced@@dpdk-test-crypto-perf@exe/test-crypto-perf_cperf_test_common.c.o' -MF 'app/a172ced@@dpdk-test-crypto-perf@exe/test-crypto-perf_cperf_test_common.c.o.d' -o 'app/a172ced@@dpdk-test-crypto-perf@exe/test-crypto-perf_cperf_test_common.c.o' -c ../app/test-crypto-perf/cperf_test_common.c ../app/test-crypto-perf/cperf_test_common.c: In function 'cperf_is_asym_test':../app/test-crypto-perf/cperf_test_common.c:309:26: error: 'CPERF_ASYM_SM2' undeclared (first use in this function); did you mean 'CPERF_ASYM_MODEX'?
309 | options->op_type == CPERF_ASYM_SM2)
| ^~~~~~~~~~~~~~
| CPERF_ASYM_MODEX../app/test-crypto-perf/cperf_test_common.c:309:26: note: each undeclared identifier is reported only once for each function it appears in [6/7] Compiling C object 'app/a172ced@@dpdk-test-crypto-perf@exe/test-crypto-perf_main.c.o'.
PATCH 5/6 app/crypto-perf: support SM2
In reply to Gowrishankar MuthukrishnanFrom: Akhil Goyal <[email protected]>
Added support for SM2 asymmetric crypto performance. A new command line option is added to specify asymmetric operation type --asym-op Type. Type can be sign/verify/encrypt/decrypt.
Example command:
./dpdk-test-crypto-perf --vdev crypto_openssl -c 0x30 -- \
--devtype crypto_openssl --ptest throughput --optype sm2 \
--total-ops 10000 --asym-op sign
--- app/test-crypto-perf/cperf_ops.c | 69 ++++++++++- app/test-crypto-perf/cperf_options.h | 6 + app/test-crypto-perf/cperf_options_parsing.c | 55 ++++++++- app/test-crypto-perf/cperf_test_vectors.c | 120 +++++++++++++++++++ app/test-crypto-perf/cperf_test_vectors.h | 25 ++++ app/test-crypto-perf/main.c | 61 ++++++++++ doc/guides/tools/cryptoperf.rst | 6 + 7 files changed, 339 insertions(+), 3 deletions(-)
app/test-crypto-perf/cperf_ops.c +67 -2
@@ -10,7 +10,7 @@#include "cperf_test_vectors.h" static void -cperf_set_ops_asym(struct rte_crypto_op **ops, +cperf_set_ops_asym_modex(struct rte_crypto_op **ops, uint32_t src_buf_offset __rte_unused, uint32_t dst_buf_offset __rte_unused, uint16_t nb_ops, void *sess,
@@ -34,6 +34,47 @@ cperf_set_ops_asym(struct rte_crypto_op **ops, } } +static void +cperf_set_ops_asym_sm2 (struct rte_crypto_op **ops, + uint32_t src_buf_offset __rte_unused, + uint32_t dst_buf_offset __rte_unused, uint16_t nb_ops, +void *sess, +const struct cperf_options *options, + const struct cperf_test_vector *test_vector __rte_unused, + uint16_t iv_offset __rte_unused, + uint32_t *imix_idx __rte_unused, + uint64_t *tsc_start __rte_unused) +{ +uint16_t i; + +for (i =0 ; i < nb_ops; i++) { +struct rte_crypto_asym_op *asym_op = ops[i]->asym; + + ops[i]->status =RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ; +rte_crypto_op_attach_asym_session (ops[i], sess); + +/* Populate op with operational details */ + asym_op->sm2.hash = options->asym_hash_alg; + + asym_op->sm2.op_type = options->asym_op_type; + asym_op->sm2.message.data = options->sm2_data->message.data; + asym_op->sm2.message.length = options->sm2_data->message.length; + asym_op->sm2.cipher.data = options->sm2_data->cipher.data; + asym_op->sm2.cipher.length = options->sm2_data->cipher.length; + asym_op->sm2.id.data = options->sm2_data->id.data; + asym_op->sm2.id.length = options->sm2_data->id.length; + + asym_op->sm2.k.data = options->sm2_data->k.data; + asym_op->sm2.k.length = options->sm2_data->k.length; + + asym_op->sm2.r.data = options->sm2_data->sign_r.data; + asym_op->sm2.r.length = options->sm2_data->sign_r.length; + asym_op->sm2.s.data = options->sm2_data->sign_s.data; + asym_op->sm2.s.length = options->sm2_data->sign_s.length; + } +} + +#ifdef RTE_LIB_SECURITY static void test_ipsec_vec_populate(struct rte_mbuf *m, const struct cperf_options *options,
@@ -932,6 +973,27 @@ cperf_create_session(struct rte_mempool *sess_mp, }return asym_sess; } + +if (options->op_type ==CPERF_ASYM_SM2 ) { + xform.next =NULL ; + xform.xform_type =RTE_CRYPTO_ASYM_XFORM_SM2 ; + xform.ec.curve_id = options->sm2_data->curve; + xform.ec.pkey.data = options->sm2_data->pkey.data; + xform.ec.pkey.length = options->sm2_data->pkey.length; + xform.ec.q.x.data = options->sm2_data->pubkey_qx.data; + xform.ec.q.x.length = options->sm2_data->pubkey_qx.length; + xform.ec.q.y.data = options->sm2_data->pubkey_qy.data; + xform.ec.q.y.length = options->sm2_data->pubkey_qy.length; + + ret =rte_cryptodev_asym_session_create (dev_id, &xform, + sess_mp, &asym_sess); +if (ret <0 ) { +RTE_LOG (ERR ,USER1 ,"SM2 Asym session create failed\n" ); +return NULL ; + } + +return asym_sess; + }#ifdef RTE_LIB_SECURITY /* * security only
@@ -1230,7 +1292,10 @@ cperf_get_op_functions(const struct cperf_options *options, op_fns->populate_ops = cperf_set_ops_cipher;break ;case CPERF_ASYM_MODEX : - op_fns->populate_ops = cperf_set_ops_asym; + op_fns->populate_ops = cperf_set_ops_asym_modex; +break ; +case CPERF_ASYM_SM2 : + op_fns->populate_ops = cperf_set_ops_asym_sm2;break ;#ifdef RTE_LIB_SECURITY case CPERF_PDCP :
app/test-crypto-perf/cperf_options.h +6 -0
@@ -49,6 +49,8 @@#define CPERF_DIGEST_SZ ("digest-sz") +#define CPERF_ASYM_OP ("asym-op") +#ifdef RTE_LIB_SECURITY #define CPERF_PDCP_SN_SZ ("pdcp-sn-sz")#define CPERF_PDCP_DOMAIN ("pdcp-domain")
@@ -85,6 +87,7 @@ enum cperf_op_type {CPERF_DOCSIS ,CPERF_IPSEC ,CPERF_ASYM_MODEX , +CPERF_ASYM_SM2 , CPERF_TLS, };
@@ -162,6 +165,9 @@ struct cperf_options {uint8_t imix_distribution_count;struct cperf_modex_test_data *modex_data;uint16_t modex_len; +struct cperf_sm2_test_data *sm2_data; +enum rte_crypto_asym_op_type asym_op_type; +enum rte_crypto_auth_algorithm asym_hash_alg; };void
app/test-crypto-perf/cperf_options_parsing.c +54 -1
103 lines not on this page · raw message
app/test-crypto-perf/cperf_test_vectors.c +120 -0
132 lines not on this page · raw message
app/test-crypto-perf/cperf_test_vectors.h +25 -0
@@ -75,6 +75,16 @@ struct cperf_test_vector {uint32_t mlen;uint32_t elen; } modex; + +struct { +uint8_t *sign_r; +uint8_t *sign_s; +uint8_t *message; +uint8_t *cipher; +uint32_t sign_len; +uint32_t msg_len; +uint32_t cipher_len; + } sm2; };struct cperf_modex_test_data {
@@ -97,6 +107,20 @@ struct cperf_modex_test_data { } result; }; +struct cperf_sm2_test_data { +rte_crypto_param pubkey_qx; +rte_crypto_param pubkey_qy; +rte_crypto_param pkey; +rte_crypto_param k; +rte_crypto_param sign_r; +rte_crypto_param sign_s; +rte_crypto_param id; +rte_crypto_param cipher; +rte_crypto_param message; +rte_crypto_param digest; +int curve; +}; +struct cperf_test_vector *cperf_test_vector_get_dummy (struct cperf_options *options);
@@ -111,5 +135,6 @@ extern uint8_t aad[];extern uint8_t digest[2048 ];extern struct cperf_modex_test_data modex_perf_data[10 ]; +extern struct cperf_sm2_test_data sm2_perf_data;#endif
app/test-crypto-perf/main.c +61 -0
79 lines not on this page · raw message
doc/guides/tools/cryptoperf.rst +6 -0
@@ -175,6 +175,7 @@ The following are the application command-line options: pdcp docsis modex + sm2 ipsec tls-record
@@ -342,6 +343,11 @@ The following are the application command-line options: Set modex length for asymmetric crypto perf test. Supported lengths are 60, 128, 255, 448. Default length is 128. +* ``--asym-op <sign/verify/encrypt/decrypt>`` + + Set Asymmetric crypto operation mode. + To be used with SM2 asymmetric crypto ops. Default is ``sign``. + * ``--tls-version <TLS1.2/TLS1.3/DTLS1.2>`` Set TLS/DTLS protocol version for perf test (default is TLS1.2).
Signature · 1 line
2.25.1
PATCH 6/6 app/crypto-perf: support ECDSA
In reply to Gowrishankar MuthukrishnanAdded support for ECDSA SECP256R1 curve SIGN and VERIFY operations.
--- app/test-crypto-perf/cperf_ops.c | 57 ++++++++++++++ app/test-crypto-perf/cperf_options.h | 2 + app/test-crypto-perf/cperf_options_parsing.c | 10 ++- app/test-crypto-perf/cperf_test_common.c | 1 + app/test-crypto-perf/cperf_test_vectors.c | 83 ++++++++++++++++++++ app/test-crypto-perf/cperf_test_vectors.h | 12 +++ app/test-crypto-perf/main.c | 18 +++++ doc/guides/tools/cryptoperf.rst | 1 + 8 files changed, 182 insertions(+), 2 deletions(-)
app/test-crypto-perf/cperf_ops.c +57 -0
@@ -34,6 +34,39 @@ cperf_set_ops_asym_modex(struct rte_crypto_op **ops, } } +static void +cperf_set_ops_asym_ecdsa (struct rte_crypto_op **ops, + uint32_t src_buf_offset __rte_unused, + uint32_t dst_buf_offset __rte_unused, uint16_t nb_ops, +void *sess, +const struct cperf_options *options, + const struct cperf_test_vector *test_vector __rte_unused, + uint16_t iv_offset __rte_unused, + uint32_t *imix_idx __rte_unused, + uint64_t *tsc_start __rte_unused) +{ +uint16_t i; + +for (i =0 ; i < nb_ops; i++) { +struct rte_crypto_asym_op *asym_op = ops[i]->asym; + + ops[i]->status =RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ; +rte_crypto_op_attach_asym_session (ops[i], sess); + + asym_op->ecdsa.op_type = options->asym_op_type; + asym_op->ecdsa.message.data = options->secp256r1_data->message.data; + asym_op->ecdsa.message.length = options->secp256r1_data->message.length; + + asym_op->ecdsa.k.data = options->secp256r1_data->k.data; + asym_op->ecdsa.k.length = options->secp256r1_data->k.length; + + asym_op->ecdsa.r.data = options->secp256r1_data->sign_r.data; + asym_op->ecdsa.r.length = options->secp256r1_data->sign_r.length; + asym_op->ecdsa.s.data = options->secp256r1_data->sign_s.data; + asym_op->ecdsa.s.length = options->secp256r1_data->sign_s.length; + } +} + static void cperf_set_ops_asym_sm2(struct rte_crypto_op **ops, uint32_t src_buf_offset __rte_unused,
@@ -974,6 +1007,27 @@ cperf_create_session(struct rte_mempool *sess_mp,return asym_sess; } +if (options->op_type ==CPERF_ASYM_SECP256R1 ) { + xform.next =NULL ; + xform.xform_type =RTE_CRYPTO_ASYM_XFORM_ECDSA ; + xform.ec.curve_id = options->secp256r1_data->curve; + xform.ec.pkey.data = options->secp256r1_data->pkey.data; + xform.ec.pkey.length = options->secp256r1_data->pkey.length; + xform.ec.q.x.data = options->secp256r1_data->pubkey_qx.data; + xform.ec.q.x.length = options->secp256r1_data->pubkey_qx.length; + xform.ec.q.y.data = options->secp256r1_data->pubkey_qy.data; + xform.ec.q.y.length = options->secp256r1_data->pubkey_qy.length; + + ret =rte_cryptodev_asym_session_create (dev_id, &xform, + sess_mp, &asym_sess); +if (ret <0 ) { +RTE_LOG (ERR ,USER1 ,"ECDSA Asym session create failed\n" ); +return NULL ; + } + +return asym_sess; + } +if (options->op_type ==CPERF_ASYM_SM2 ) { xform.next =NULL ; xform.xform_type =RTE_CRYPTO_ASYM_XFORM_SM2 ;
@@ -1294,6 +1348,9 @@ cperf_get_op_functions(const struct cperf_options *options,case CPERF_ASYM_MODEX : op_fns->populate_ops = cperf_set_ops_asym_modex;break ; +case CPERF_ASYM_SECP256R1 : + op_fns->populate_ops = cperf_set_ops_asym_ecdsa; +break ;case CPERF_ASYM_SM2 : op_fns->populate_ops = cperf_set_ops_asym_sm2;break ;
app/test-crypto-perf/cperf_options.h +2 -0
@@ -87,6 +87,7 @@ enum cperf_op_type {CPERF_DOCSIS ,CPERF_IPSEC ,CPERF_ASYM_MODEX , +CPERF_ASYM_SECP256R1 ,CPERF_ASYM_SM2 , CPERF_TLS, };
@@ -165,6 +166,7 @@ struct cperf_options {uint8_t imix_distribution_count;struct cperf_modex_test_data *modex_data;uint16_t modex_len; +struct cperf_ecdsa_test_data *secp256r1_data;struct cperf_sm2_test_data *sm2_data;enum rte_crypto_asym_op_type asym_op_type;enum rte_crypto_auth_algorithm asym_hash_alg;
app/test-crypto-perf/cperf_options_parsing.c +8 -2
@@ -11,6 +11,7 @@#include <rte_ether.h> #include "cperf_options.h" +#include "cperf_test_common.h" #include "cperf_test_vectors.h" #define AES_BLOCK_SIZE 16
@@ -37,7 +38,7 @@ usage(char *progname)" --desc-nb N: set number of descriptors for each crypto device\n" " --devtype TYPE: set crypto device type to use\n" " --optype cipher-only / auth-only / cipher-then-auth / auth-then-cipher /\n" -" aead / pdcp / docsis / ipsec / modex / sm2 / tls-record : set operation type\n" +" aead / pdcp / docsis / ipsec / modex / secp256r1 / sm2 / tls-record : set operation type\n" " --sessionless: enable session-less crypto operations\n" " --out-of-place: enable out-of-place crypto operations\n" " --test-file NAME: set the test vector file path\n"
@@ -483,6 +484,10 @@ parse_op_type(struct cperf_options *opts, const char *arg) cperf_op_type_strs[CPERF_ASYM_MODEX ],CPERF_ASYM_MODEX }, + { + cperf_op_type_strs[CPERF_ASYM_SECP256R1 ], +CPERF_ASYM_SECP256R1 + }, { cperf_op_type_strs[CPERF_ASYM_SM2 ],CPERF_ASYM_SM2
@@ -1064,6 +1069,7 @@ cperf_options_default(struct cperf_options *opts)#endif opts->modex_data = (struct cperf_modex_test_data *)&modex_perf_data[0 ]; + opts->secp256r1_data = &secp256r1_perf_data; opts->sm2_data = &sm2_perf_data; opts->asym_op_type =RTE_CRYPTO_ASYM_OP_SIGN ; }
@@ -1488,7 +1494,7 @@ cperf_options_dump(struct cperf_options *opts)printf ("#\n" );printf ("# number of queue pairs per device: %u\n" , opts->nb_qps);printf ("# crypto operation: %s\n" , cperf_op_type_strs[opts->op_type]); -if (opts->op_type ==CPERF_ASYM_SM2 ) +if (opts->op_type ==CPERF_ASYM_SM2 || opts->op_type ==CPERF_ASYM_SECP256R1 )printf ("# asym operation type: %s\n" , rte_crypto_asym_op_strings[opts->asym_op_type]);printf ("# sessionless: %s\n" , opts->sessionless ?"yes" :"no" );
app/test-crypto-perf/cperf_test_common.c +1 -0
@@ -306,6 +306,7 @@ bool cperf_is_asym_test(const struct cperf_options *options) {if (options->op_type ==CPERF_ASYM_MODEX || + options->op_type ==CPERF_ASYM_SECP256R1 || options->op_type ==CPERF_ASYM_SM2 )return true;
app/test-crypto-perf/cperf_test_vectors.c +83 -0
95 lines not on this page · raw message
app/test-crypto-perf/cperf_test_vectors.h +12 -0
@@ -107,6 +107,17 @@ struct cperf_modex_test_data { } result; }; +struct cperf_ecdsa_test_data { +rte_crypto_param pubkey_qx; +rte_crypto_param pubkey_qy; +rte_crypto_param pkey; +rte_crypto_param k; +rte_crypto_param sign_r; +rte_crypto_param sign_s; +rte_crypto_param message; +int curve; +}; +struct cperf_sm2_test_data {rte_crypto_param pubkey_qx;rte_crypto_param pubkey_qy;
@@ -135,6 +146,7 @@ extern uint8_t aad[];extern uint8_t digest[2048 ];extern struct cperf_modex_test_data modex_perf_data[10 ]; +extern struct cperf_ecdsa_test_data secp256r1_perf_data;extern struct cperf_sm2_test_data sm2_perf_data;#endif
app/test-crypto-perf/main.c +18 -0
@@ -45,6 +45,7 @@ const char *cperf_op_type_strs[] = { [CPERF_DOCSIS] = "docsis", [CPERF_IPSEC] = "ipsec", [CPERF_ASYM_MODEX] = "modex", + [CPERF_ASYM_SECP256R1] = "ecdsa_p256r1", [CPERF_ASYM_SM2] = "sm2", [CPERF_TLS] = "tls-record" };
@@ -225,6 +226,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs) };switch (opts->op_type) { +case CPERF_ASYM_SECP256R1 :case CPERF_ASYM_SM2 :case CPERF_ASYM_MODEX : conf.ff_disable |= (RTE_CRYPTODEV_FF_SECURITY |
@@ -364,6 +366,22 @@ cperf_verify_devices_capabilities(struct cperf_options *opts, } +if (opts->op_type ==CPERF_ASYM_SECP256R1 ) { + asym_cap_idx.type =RTE_CRYPTO_ASYM_XFORM_ECDSA ; + asym_capability =rte_cryptodev_asym_capability_get (cdev_id, &asym_cap_idx); +if (asym_capability ==NULL ) +return -1 ; + +if (!rte_cryptodev_asym_xform_capability_check_optype (asym_capability, + opts->asym_op_type)) +return -1 ; + +if (asym_capability->internal_rng !=0 ) { + opts->secp256r1_data->k.data =NULL ; + opts->secp256r1_data->k.length =0 ; + } + } +if (opts->op_type ==CPERF_ASYM_SM2 ) { asym_cap_idx.type =RTE_CRYPTO_ASYM_XFORM_SM2 ; asym_capability =rte_cryptodev_asym_capability_get (cdev_id, &asym_cap_idx);
doc/guides/tools/cryptoperf.rst +1 -0
@@ -175,6 +175,7 @@ The following are the application command-line options: pdcp docsis modex + ecdsa_p256r1 sm2 ipsec tls-record
Signature · 1 line
2.25.1
RE: [PATCH v1 6/6] app/crypto-perf: support ECDSA
Quoted 5 lines
Subject: [PATCH v1 6/6] app/crypto-perf: support ECDSA
Added support for ECDSA SECP256R1 curve SIGN and VERIFY operations.
Signed-off-by Gowrishankar Muthukrishnan <[email protected]>
Quoted 9 lines
This patch series adds below asymmetric tests in crypto-perf tool:
* MODEX group tests (RFC 3526)
* SM2 tests
* ECDSA P256R1 testsAkhil Goyal (1):
app/crypto-perf: support SM2
Quoted 7 lines
Gowrishankar Muthukrishnan (5):
app/crypto-perf: add modex groups test app/crypto-perf: remove redundant local varriable app/crypto-perf: fix result location for asymmetric test app/crypto-perf: add function to check asymmetric operation app/crypto-perf: support ECDSA
Series Acked-by: Anoob Joseph <[email protected]>
Hi Gowrishankar,
Quoted 38 lines
-----Original Message-----
From: Gowrishankar Muthukrishnan <[email protected]>
Sent: Saturday, June 15, 2024 12:53 PM
To: [email protected]
Cc: Anoob Joseph <[email protected]>; Akhil Goyal <[email protected]>; Gowrishankar Muthukrishnan <[email protected]>
Subject: [PATCH v1 0/6] app/crypto-perf: add asymmetric crypto testsThis patch series adds below asymmetric tests in crypto-perf tool:
* MODEX group tests (RFC 3526)
* SM2 tests
* ECDSA P256R1 testsAkhil Goyal (1):
app/crypto-perf: support SM2Gowrishankar Muthukrishnan (5):
app/crypto-perf: add modex groups test app/crypto-perf: remove redundant local varriable app/crypto-perf: fix result location for asymmetric test app/crypto-perf: add function to check asymmetric operation app/crypto-perf: support ECDSAapp/test-crypto-perf/cperf_ops.c | 135 +++- app/test-crypto-perf/cperf_options.h | 8 + app/test-crypto-perf/cperf_options_parsing.c | 61 +- app/test-crypto-perf/cperf_test_common.c | 19 +- app/test-crypto-perf/cperf_test_common.h | 2 + app/test-crypto-perf/cperf_test_latency.c | 21 +- app/test-crypto-perf/cperf_test_throughput.c | 2 +- app/test-crypto-perf/cperf_test_vectors.c | 773 ++++++++++++++++++- app/test-crypto-perf/cperf_test_vectors.h | 41 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- app/test-crypto-perf/main.c | 87 ++- doc/guides/tools/cryptoperf.rst | 7 + 12 files changed, 1131 insertions(+), 27 deletions(-)
Quoted 2 lines
--
2.25.1
v2 cover app/crypto-perf: add asymmetric crypto tests
In reply to Gowrishankar MuthukrishnanThis patch series adds below asymmetric tests in crypto-perf tool:
* MODEX group tests (RFC 3526)
* SM2 tests
* ECDSA P256R1 tests
Akhil Goyal (1):
app/crypto-perf: support SM2
Gowrishankar Muthukrishnan (5):
app/crypto-perf: add modex groups test app/crypto-perf: remove redundant local varriable app/crypto-perf: fix result location for asymmetric test app/crypto-perf: add function to check asymmetric operation app/crypto-perf: support ECDSA
app/test-crypto-perf/cperf_ops.c | 135 +++- app/test-crypto-perf/cperf_options.h | 8 + app/test-crypto-perf/cperf_options_parsing.c | 61 +- app/test-crypto-perf/cperf_test_common.c | 19 +- app/test-crypto-perf/cperf_test_common.h | 2 + app/test-crypto-perf/cperf_test_latency.c | 21 +- app/test-crypto-perf/cperf_test_throughput.c | 2 +- app/test-crypto-perf/cperf_test_vectors.c | 773 ++++++++++++++++++- app/test-crypto-perf/cperf_test_vectors.h | 41 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- app/test-crypto-perf/main.c | 87 ++- doc/guides/tools/cryptoperf.rst | 7 + 12 files changed, 1131 insertions(+), 27 deletions(-)
Signature · 1 line
2.25.1
PATCH v2 1/6 app/crypto-perf: add modex groups test
Add perf tests for modex groups 5, 14, 15, 16, 17 and 18 based on RFC 3526.
--- app/test-crypto-perf/cperf_test_vectors.c | 570 +++++++++++++++++++++- app/test-crypto-perf/cperf_test_vectors.h | 4 +- 2 files changed, 571 insertions(+), 3 deletions(-)
app/test-crypto-perf/cperf_test_vectors.c +569 -1
@@ -8,7 +8,7 @@#include "cperf_test_vectors.h" struct -cperf_modex_test_data modex_perf_data[4 ] = { +cperf_modex_test_data modex_perf_data[10 ] = { { .base = { .data = {
@@ -233,6 +233,574 @@ cperf_modex_test_data modex_perf_data[4] = { .result = { .len = 448 } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0x6C, 0x80, 0xFF, 0x29, 0xF9, 0x27, 0x2E, 0x6D, + 0xE1, 0xB7, 0x3F, 0x13, 0x77, 0xD2, 0x3E, 0x49, + 0xCE, 0xAE, 0xBD, 0x73, 0x7A, 0x0F, 0xE7, 0xA4, + 0x20, 0x49, 0x72, 0x87, 0x4E, 0x1B + }, + .len = 30 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, + 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, + 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, + 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, + 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, + 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, + 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, + 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, + 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, + 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, + 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x23, 0x73, 0x27, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 192 + }, + .result = { + .len = 192 + } + }, + { + .base = { + .data = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + }, + .len = 64 + }, + .exponent = { + .data = { + 0x8E, 0x4E, 0x41, 0xA2, 0xE0, 0x59, 0xA8, 0x29, + 0x71, 0xF6, 0x21, 0xC9, 0xD5, 0x0E, 0x36, 0x0F, + 0x59, 0xD6, 0x74, 0x4C, 0x3A, 0xC7, 0x13, 0x5E, + 0x7D, 0x2D, 0x43, 0x63, 0x5A, 0x3D, 0xCA, 0x5F, + 0xF7, 0xB2, 0x3D, 0x9C, 0x3F, 0xA1, 0x5D, 0x71 + }, + .len = 40 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 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F, 0x4C, 0x52, 0xC9, + 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, + 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, + 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, + 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 256 + }, + .result = { + .len = 256 + } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0x63, 0x4D, 0x67, 0x4E, 0x4A, 0x16, 0x0F, 0xEB, + 0x76, 0xC8, 0xAB, 0x3B, 0x4A, 0x74, 0x03, 0x02, + 0x2F, 0xAC, 0x34, 0x23, 0xC8, 0x2E, 0x1E, 0x60, + 0x63, 0x1E, 0x7D, 0x3F, 0x22, 0xB9, 0xBF, 0x2D, + 0x4F, 0xB3, 0x72, 0xAC, 0x1E, 0x62, 0xA7, 0x47, + 0x7A, 0xF3, 0x45, 0xAB, 0x5B, 0x67, 0x12, 0x80, + 0x77, 0xDA, 0xF8, 0xF4 + }, + .len = 52 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1,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0xC4, 0x2D, + 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, + 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, + 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, + 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, + 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, + 0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, + 0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, + 0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, + 0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, + 0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, + 0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, + 0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, + 0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, + 0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, + 0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, + 0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x3A, 0xD2, 0xCA, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 384 + }, + .result = { + .len = 384 + } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0xF2, 0x77, 0xFF, 0x91, 0x08, 0xF6, 0x16, 0x8E, + 0xEE, 0x8C, 0xCC, 0x62, 0x07, 0xA4, 0xE3, 0x0F, + 0xB8, 0xE8, 0xFD, 0x77, 0xEA, 0x06, 0x1D, 0x9F, + 0x2A, 0x96, 0xE8, 0x0D, 0x66, 0xA4, 0x97, 0x7E, + 0xDA, 0xDB, 0xC0, 0xC0, 0x2F, 0x72, 0xCD, 0xFC, + 0xBE, 0xC3, 0xAA, 0x46, 0x31, 0x7C, 0x4B, 0x4D, + 0x0B, 0x14, 0x02, 0x5C, 0x7F, 0x29, 0xC1, 0xDE, + 0xC5, 0x06, 0x70, 0x0B + }, + .len = 60 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, + 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, + 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, + 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, + 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, + 0x69, 0x16, 0x3F, 0xA8,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4, 0x35, 0xC9, 0x34, 0x06, 0x31, 0x99, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 512 + }, + .result = { + .len = 512 + } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0x06, 0x8B, 0x74, 0x99, 0x02, 0xCE, 0x50, 0x2C, + 0xED, 0x29, 0x2F, 0xFB, 0x14, 0x74, 0x11, 0x7A, + 0x7C, 0x1D, 0xBF, 0xF8, 0xC3, 0x2D, 0xFD, 0x45, + 0x56, 0xCF, 0xCD, 0x92, 0x12, 0xF2, 0xC1, 0x96, + 0x73, 0x11, 0x4C, 0xAC, 0xFA, 0x0C, 0x4B, 0x2B, + 0xFA, 0xED, 0xA5, 0x5A, 0xDD, 0xF7, 0x5F, 0x75, + 0xB0, 0x18, 0x69, 0x63, 0xB0, 0x8E, 0x04, 0xA2, + 0x0D, 0x1F, 0x68, 0xA9, 0x1A, 0x75, 0x8A, 0x29, + 0xD4, 0xC1, 0x31, 0xAC + }, + .len = 68 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, + 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, + 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, + 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, + 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, + 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, + 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, + 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, + 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, + 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, + 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, + 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, + 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, + 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, + 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, + 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, + 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, + 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, + 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, + 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, + 0xA8, 0x55, 0x21, 0x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xF4, 0x82, 0xD7, 0xCE, 0x6E, 0x74, 0xFE, 0xF6, + 0xD5, 0x5E, 0x70, 0x2F, 0x46, 0x98, 0x0C, 0x82, + 0xB5, 0xA8, 0x40, 0x31, 0x90, 0x0B, 0x1C, 0x9E, + 0x59, 0xE7, 0xC9, 0x7F, 0xBE, 0xC7, 0xE8, 0xF3, + 0x23, 0xA9, 0x7A, 0x7E, 0x36, 0xCC, 0x88, 0xBE, + 0x0F, 0x1D, 0x45, 0xB7, 0xFF, 0x58, 0x5A, 0xC5, + 0x4B, 0xD4, 0x07, 0xB2, 0x2B, 0x41, 0x54, 0xAA, + 0xCC, 0x8F, 0x6D, 0x7E, 0xBF, 0x48, 0xE1, 0xD8, + 0x14, 0xCC, 0x5E, 0xD2, 0x0F, 0x80, 0x37, 0xE0, + 0xA7, 0x97, 0x15, 0xEE, 0xF2, 0x9B, 0xE3, 0x28, + 0x06, 0xA1, 0xD5, 0x8B, 0xB7, 0xC5, 0xDA, 0x76, + 0xF5, 0x50, 0xAA, 0x3D, 0x8A, 0x1F, 0xBF, 0xF0, + 0xEB, 0x19, 0xCC, 0xB1, 0xA3, 0x13, 0xD5, 0x5C, + 0xDA, 0x56, 0xC9, 0xEC, 0x2E, 0xF2, 0x96, 0x32, + 0x38, 0x7F, 0xE8, 0xD7, 0x6E, 0x3C, 0x04, 0x68, + 0x04, 0x3E, 0x8F, 0x66, 0x3F, 0x48, 0x60, 0xEE, + 0x12, 0xBF, 0x2D, 0x5B, 0x0B, 0x74, 0x74, 0xD6, + 0xE6, 0x94, 0xF9, 0x1E, 0x6D, 0xCC, 0x40, 0x24, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 768 + }, + .result = { + .len = 768 + } + }, + { + .base = { + .data = { + 0x02, + }, + .len = 1 + }, + .exponent = { + .data = { + 0x01, 0xA6, 0x8A, 0x0A, 0xDA, 0xA6, 0x14, 0x43, + 0x84, 0xD6, 0xEB, 0x11, 0x67, 0xA6, 0xD2, 0xAC, + 0x11, 0x5D, 0x15, 0x99, 0x31, 0x99, 0xAE, 0x08, + 0x3D, 0xEC, 0x19, 0x57, 0x3D, 0xDF, 0x96, 0x7C, + 0x9A, 0x1A, 0x72, 0x80, 0x1F, 0xF3, 0x50, 0x91, + 0xD0, 0x70, 0x11, 0x37, 0xA8, 0xFE, 0xE4, 0x37, + 0x3B, 0x36, 0x62, 0x89, 0xCF, 0x31, 0x1D, 0x76, + 0x28, 0xBE, 0x5F, 0x25, 0x12, 0x6E, 0x72, 0x83, + 0x8A, 0x1A, 0xC2, 0xFA, 0xD6, 0x49, 0x2C, 0x4F, + 0x2D, 0xF1, 0x77, 0x67, 0x49, 0xDA + }, + .len = 78 + }, + .modulus = { + .data = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, + 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, + 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, + 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, + 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, + 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, + 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, + 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, + 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, + 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, + 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, + 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, + 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, + 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, + 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, + 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, + 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, + 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, + 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, + 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, + 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, + 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, + 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, + 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, + 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, + 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, + 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, + 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, + 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, + 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, + 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, + 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, + 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, + 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, + 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, + 0xAB, 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 0x56, 0xE8, 0x80, 0xB9, 0x6E, 0x71, + 0x60, 0xC9, 0x80, 0xDD, 0x98, 0xED, 0xD3, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + }, + .len = 1024 + }, + .result = { + .len = 1024 + } } };
app/test-crypto-perf/cperf_test_vectors.h +2 -2
@@ -78,7 +78,7 @@ struct cperf_test_vector { };struct cperf_modex_test_data { -#define DATA_SIZE 512 +#define DATA_SIZE 1024struct {uint8_t data[DATA_SIZE ];uint16_t len;
@@ -110,6 +110,6 @@ extern uint8_t aad[];extern uint8_t digest[2048 ]; -extern struct cperf_modex_test_data modex_perf_data[4 ]; +extern struct cperf_modex_test_data modex_perf_data[10 ];#endif
Signature · 1 line
2.25.1
PATCH v2 2/6 app/crypto-perf: remove redundant local varriable
In reply to Gowrishankar MuthukrishnanRemove redundant local variable used for asym session.
--- app/test-crypto-perf/cperf_ops.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
app/test-crypto-perf/cperf_ops.c +3 -6
@@ -21,7 +21,6 @@ cperf_set_ops_asym(struct rte_crypto_op **ops, uint64_t *tsc_start __rte_unused) {uint16_t i; -void *asym_sess = (void *)sess;for (i =0 ; i < nb_ops; i++) {struct rte_crypto_asym_op *asym_op = ops[i]->asym;
@@ -31,7 +30,7 @@ cperf_set_ops_asym(struct rte_crypto_op **ops, asym_op->modex.base.length = options->modex_data->base.len; asym_op->modex.result.data = options->modex_data->result.data; asym_op->modex.result.length = options->modex_data->result.len; -rte_crypto_op_attach_asym_session (ops[i], asym_sess); +rte_crypto_op_attach_asym_session (ops[i], sess); } }
@@ -62,7 +61,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,for (i =0 ; i < nb_ops; i++) {struct rte_crypto_sym_op *sym_op = ops[i]->sym; -void *sec_sess = (void *)sess;uint32_t buf_sz; uint32_t *per_pkt_hfn = rte_crypto_op_ctod_offset(ops[i],
@@ -70,7 +68,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops, *per_pkt_hfn = options->pdcp_ses_hfn_en ?0 :PDCP_DEFAULT_HFN ; ops[i]->status =RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ; -rte_security_attach_session (ops[i], sec_sess); +rte_security_attach_session (ops[i], sess); sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset);
@@ -127,7 +125,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops, uint16_t iv_offset __rte_unused, uint32_t *imix_idx, uint64_t *tsc_start) { -void *sec_sess = sess;const uint32_t test_buffer_size = options->test_buffer_size;uint64_t tsc_start_temp, tsc_end_temp;uint16_t i =0 ;
@@ -140,7 +137,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,uint32_t offset = test_buffer_size; ops[i]->status =RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ; -rte_security_attach_session (ops[i], sec_sess); +rte_security_attach_session (ops[i], sess); sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset); sym_op->m_src->pkt_len = test_buffer_size;
Signature · 1 line
2.25.1
PATCH v2 3/6 app/crypto-perf: fix result location for asymmetric test
In reply to Gowrishankar MuthukrishnanFor asymmetric op, private test data should be stored after rte_crypto_asym_op struct.
--- app/test-crypto-perf/cperf_test_common.c | 6 ++++-- app/test-crypto-perf/cperf_test_latency.c | 14 +++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-)
app/test-crypto-perf/cperf_test_common.c +4 -2
@@ -149,11 +149,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,int ret;/* Calculate the object size */ -uint16_t crypto_op_size =sizeof (struct rte_crypto_op ) + -sizeof (struct rte_crypto_sym_op ); +uint16_t crypto_op_size =sizeof (struct rte_crypto_op );uint16_t crypto_op_private_size;if (options->op_type ==CPERF_ASYM_MODEX ) { + crypto_op_size +=sizeof (struct rte_crypto_asym_op );snprintf (pool_name,RTE_MEMPOOL_NAMESIZE ,"perf_asym_op_pool%u" ,rte_socket_id ()); *pool = rte_crypto_op_pool_create(
@@ -170,6 +170,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,return 0 ; } + crypto_op_size +=sizeof (struct rte_crypto_sym_op ); +/* * If doing AES-CCM, IV field needs to be 16 bytes long, * and AAD field needs to be long enough to have 18 bytes,
app/test-crypto-perf/cperf_test_latency.c +11 -3
@@ -122,7 +122,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp) {struct priv_op_data *priv_data; - priv_data = (struct priv_op_data *) (op->sym +1 ); +if (op->type ==RTE_CRYPTO_OP_TYPE_SYMMETRIC ) + priv_data = (struct priv_op_data *) (op->sym +1 ); +else + priv_data = (struct priv_op_data *) (op->asym +1 ); + priv_data->result->status = op->status; priv_data->result->tsc_end = timestamp; }
@@ -251,9 +255,13 @@ cperf_latency_test_runner(void *arg) ctx->res[tsc_idx].tsc_start = tsc_start;/* * Private data structure starts after the end of the -* rte_crypto_sym_op structure. +* rte_crypto_sym_op (or rte_crypto_asym_op) structure. */ - priv_data = (struct priv_op_data *) (ops[i]->sym +1 ); +if (ops[i]->type ==RTE_CRYPTO_OP_TYPE_SYMMETRIC ) + priv_data = (struct priv_op_data *) (ops[i]->sym +1 ); +else + priv_data = (struct priv_op_data *) (ops[i]->asym +1 ); + priv_data->result = (void *)&ctx->res[tsc_idx]; tsc_idx++; }
Signature · 1 line
2.25.1
PATCH v2 4/6 app/crypto-perf: add function to check asymmetric operation
In reply to Gowrishankar MuthukrishnanReplace checking input option for every asymmetric test case by a function.
---
v2:
- cperf_is_asym_test is fixed to check only modex in this patch.
--- app/test-crypto-perf/cperf_test_common.c | 11 ++++++++++- app/test-crypto-perf/cperf_test_common.h | 2 ++ app/test-crypto-perf/cperf_test_latency.c | 7 ++++--- app/test-crypto-perf/cperf_test_throughput.c | 2 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- app/test-crypto-perf/main.c | 8 ++++---- 6 files changed, 22 insertions(+), 10 deletions(-)
app/test-crypto-perf/cperf_test_common.c +10 -1
@@ -152,7 +152,7 @@ cperf_alloc_common_memory(const struct cperf_options *options,uint16_t crypto_op_size =sizeof (struct rte_crypto_op );uint16_t crypto_op_private_size; -if (options->op_type ==CPERF_ASYM_MODEX ) { +if (cperf_is_asym_test (options)) { crypto_op_size +=sizeof (struct rte_crypto_asym_op );snprintf (pool_name,RTE_MEMPOOL_NAMESIZE ,"perf_asym_op_pool%u" ,rte_socket_id ());
@@ -301,3 +301,12 @@ cperf_mbuf_set(struct rte_mbuf *mbuf, mbuf = mbuf->next; } } + +bool +cperf_is_asym_test (const struct cperf_options *options) +{ +if (options->op_type ==CPERF_ASYM_MODEX ) +return true; + +return false; +}
app/test-crypto-perf/cperf_test_common.h +2 -0
@@ -26,4 +26,6 @@ cperf_mbuf_set(struct rte_mbuf *mbuf,const struct cperf_options *options, const struct cperf_test_vector *test_vector); +bool +cperf_is_asym_test (const struct cperf_options *options);#endif /* _CPERF_TEST_COMMON_H_ */
app/test-crypto-perf/cperf_test_latency.c +4 -3
@@ -47,7 +47,7 @@ cperf_latency_test_free(struct cperf_latency_ctx *ctx)return ;if (ctx->sess !=NULL ) { -if (ctx->options->op_type ==CPERF_ASYM_MODEX ) +if (cperf_is_asym_test (ctx->options))rte_cryptodev_asym_session_free (ctx->dev_id, ctx->sess);#ifdef RTE_LIB_SECURITY else if (ctx->options->op_type == CPERF_PDCP ||
@@ -217,8 +217,9 @@ cperf_latency_test_runner(void *arg) &imix_idx, &tsc_start);/* Populate the mbuf with the test vector */ -for (i =0 ; i < burst_size; i++) -cperf_mbuf_set (ops[i]->sym->m_src, +if (!cperf_is_asym_test (ctx->options)) +for (i =0 ; i < burst_size; i++) +cperf_mbuf_set (ops[i]->sym->m_src, ctx->options, ctx->test_vector);
app/test-crypto-perf/cperf_test_throughput.c +1 -1
@@ -37,7 +37,7 @@ cperf_throughput_test_free(struct cperf_throughput_ctx *ctx)if (!ctx)return ;if (ctx->sess) { -if (ctx->options->op_type ==CPERF_ASYM_MODEX ) +if (cperf_is_asym_test (ctx->options))rte_cryptodev_asym_session_free (ctx->dev_id, (void *)ctx->sess);#ifdef RTE_LIB_SECURITY
app/test-crypto-perf/cperf_test_verify.c +1 -1
@@ -42,7 +42,7 @@ cperf_verify_test_free(struct cperf_verify_ctx *ctx)return ;if (ctx->sess !=NULL ) { -if (ctx->options->op_type ==CPERF_ASYM_MODEX ) +if (cperf_is_asym_test (ctx->options))rte_cryptodev_asym_session_free (ctx->dev_id, ctx->sess);#ifdef RTE_LIB_SECURITY else if (ctx->options->op_type == CPERF_PDCP ||
app/test-crypto-perf/main.c +4 -4
@@ -18,6 +18,7 @@#include "cperf.h" #include "cperf_options.h" #include "cperf_test_vector_parsing.h" +#include "cperf_test_common.h" #include "cperf_test_throughput.h" #include "cperf_test_latency.h" #include "cperf_test_verify.h"
@@ -203,7 +204,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)rte_cryptodev_info_get (cdev_id, &cdev_info); -if (opts->op_type ==CPERF_ASYM_MODEX ) { +if (cperf_is_asym_test (opts)) {if ((cdev_info.feature_flags &RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO ) ==0 )continue ;
@@ -289,7 +290,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)return -ENOTSUP ; } -if (opts->op_type ==CPERF_ASYM_MODEX ) +if (cperf_is_asym_test (opts)) ret =create_asym_op_pool_socket (socket_id, sessions_needed);else
@@ -300,9 +301,8 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs) qp_conf.mp_session = session_pool_socket[socket_id].sess_mp; -if (opts->op_type ==CPERF_ASYM_MODEX ) { +if (cperf_is_asym_test (opts)) qp_conf.mp_session =NULL ; - } ret =rte_cryptodev_configure (cdev_id, &conf);if (ret <0 ) {
Signature · 1 line
2.25.1
PATCH v2 5/6 app/crypto-perf: support SM2
In reply to Gowrishankar MuthukrishnanFrom: Akhil Goyal <[email protected]>
Added support for SM2 asymmetric crypto performance. A new command line option is added to specify asymmetric operation type --asym-op Type. Type can be sign/verify/encrypt/decrypt.
Example command:
./dpdk-test-crypto-perf --vdev crypto_openssl -c 0x30 -- \
--devtype crypto_openssl --ptest throughput --optype sm2 \
--total-ops 10000 --asym-op sign
--- app/test-crypto-perf/cperf_ops.c | 69 ++++++++++- app/test-crypto-perf/cperf_options.h | 6 + app/test-crypto-perf/cperf_options_parsing.c | 55 ++++++++- app/test-crypto-perf/cperf_test_common.c | 3 +- app/test-crypto-perf/cperf_test_vectors.c | 120 +++++++++++++++++++ app/test-crypto-perf/cperf_test_vectors.h | 25 ++++ app/test-crypto-perf/main.c | 61 ++++++++++ doc/guides/tools/cryptoperf.rst | 6 + 8 files changed, 341 insertions(+), 4 deletions(-)
app/test-crypto-perf/cperf_ops.c +67 -2
@@ -10,7 +10,7 @@#include "cperf_test_vectors.h" static void -cperf_set_ops_asym(struct rte_crypto_op **ops, +cperf_set_ops_asym_modex(struct rte_crypto_op **ops, uint32_t src_buf_offset __rte_unused, uint32_t dst_buf_offset __rte_unused, uint16_t nb_ops, void *sess,
@@ -34,6 +34,47 @@ cperf_set_ops_asym(struct rte_crypto_op **ops, } } +static void +cperf_set_ops_asym_sm2 (struct rte_crypto_op **ops, + uint32_t src_buf_offset __rte_unused, + uint32_t dst_buf_offset __rte_unused, uint16_t nb_ops, +void *sess, +const struct cperf_options *options, + const struct cperf_test_vector *test_vector __rte_unused, + uint16_t iv_offset __rte_unused, + uint32_t *imix_idx __rte_unused, + uint64_t *tsc_start __rte_unused) +{ +uint16_t i; + +for (i =0 ; i < nb_ops; i++) { +struct rte_crypto_asym_op *asym_op = ops[i]->asym; + + ops[i]->status =RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ; +rte_crypto_op_attach_asym_session (ops[i], sess); + +/* Populate op with operational details */ + asym_op->sm2.hash = options->asym_hash_alg; + + asym_op->sm2.op_type = options->asym_op_type; + asym_op->sm2.message.data = options->sm2_data->message.data; + asym_op->sm2.message.length = options->sm2_data->message.length; + asym_op->sm2.cipher.data = options->sm2_data->cipher.data; + asym_op->sm2.cipher.length = options->sm2_data->cipher.length; + asym_op->sm2.id.data = options->sm2_data->id.data; + asym_op->sm2.id.length = options->sm2_data->id.length; + + asym_op->sm2.k.data = options->sm2_data->k.data; + asym_op->sm2.k.length = options->sm2_data->k.length; + + asym_op->sm2.r.data = options->sm2_data->sign_r.data; + asym_op->sm2.r.length = options->sm2_data->sign_r.length; + asym_op->sm2.s.data = options->sm2_data->sign_s.data; + asym_op->sm2.s.length = options->sm2_data->sign_s.length; + } +} + +#ifdef RTE_LIB_SECURITY static void test_ipsec_vec_populate(struct rte_mbuf *m, const struct cperf_options *options,
@@ -932,6 +973,27 @@ cperf_create_session(struct rte_mempool *sess_mp, }return asym_sess; } + +if (options->op_type ==CPERF_ASYM_SM2 ) { + xform.next =NULL ; + xform.xform_type =RTE_CRYPTO_ASYM_XFORM_SM2 ; + xform.ec.curve_id = options->sm2_data->curve; + xform.ec.pkey.data = options->sm2_data->pkey.data; + xform.ec.pkey.length = options->sm2_data->pkey.length; + xform.ec.q.x.data = options->sm2_data->pubkey_qx.data; + xform.ec.q.x.length = options->sm2_data->pubkey_qx.length; + xform.ec.q.y.data = options->sm2_data->pubkey_qy.data; + xform.ec.q.y.length = options->sm2_data->pubkey_qy.length; + + ret =rte_cryptodev_asym_session_create (dev_id, &xform, + sess_mp, &asym_sess); +if (ret <0 ) { +RTE_LOG (ERR ,USER1 ,"SM2 Asym session create failed\n" ); +return NULL ; + } + +return asym_sess; + }#ifdef RTE_LIB_SECURITY /* * security only
@@ -1230,7 +1292,10 @@ cperf_get_op_functions(const struct cperf_options *options, op_fns->populate_ops = cperf_set_ops_cipher;break ;case CPERF_ASYM_MODEX : - op_fns->populate_ops = cperf_set_ops_asym; + op_fns->populate_ops = cperf_set_ops_asym_modex; +break ; +case CPERF_ASYM_SM2 : + op_fns->populate_ops = cperf_set_ops_asym_sm2;break ;#ifdef RTE_LIB_SECURITY case CPERF_PDCP :
app/test-crypto-perf/cperf_options.h +6 -0
@@ -49,6 +49,8 @@#define CPERF_DIGEST_SZ ("digest-sz") +#define CPERF_ASYM_OP ("asym-op") +#ifdef RTE_LIB_SECURITY #define CPERF_PDCP_SN_SZ ("pdcp-sn-sz")#define CPERF_PDCP_DOMAIN ("pdcp-domain")
@@ -85,6 +87,7 @@ enum cperf_op_type {CPERF_DOCSIS ,CPERF_IPSEC ,CPERF_ASYM_MODEX , +CPERF_ASYM_SM2 , CPERF_TLS, };
@@ -162,6 +165,9 @@ struct cperf_options {uint8_t imix_distribution_count;struct cperf_modex_test_data *modex_data;uint16_t modex_len; +struct cperf_sm2_test_data *sm2_data; +enum rte_crypto_asym_op_type asym_op_type; +enum rte_crypto_auth_algorithm asym_hash_alg; };void
app/test-crypto-perf/cperf_options_parsing.c +54 -1
103 lines not on this page · raw message
app/test-crypto-perf/cperf_test_common.c +2 -1
@@ -305,7 +305,8 @@ cperf_mbuf_set(struct rte_mbuf *mbuf,bool cperf_is_asym_test (const struct cperf_options *options) { -if (options->op_type ==CPERF_ASYM_MODEX ) +if (options->op_type ==CPERF_ASYM_MODEX || + options->op_type ==CPERF_ASYM_SM2 )return true;return false;
app/test-crypto-perf/cperf_test_vectors.c +120 -0
132 lines not on this page · raw message
app/test-crypto-perf/cperf_test_vectors.h +25 -0
@@ -75,6 +75,16 @@ struct cperf_test_vector {uint32_t mlen;uint32_t elen; } modex; + +struct { +uint8_t *sign_r; +uint8_t *sign_s; +uint8_t *message; +uint8_t *cipher; +uint32_t sign_len; +uint32_t msg_len; +uint32_t cipher_len; + } sm2; };struct cperf_modex_test_data {
@@ -97,6 +107,20 @@ struct cperf_modex_test_data { } result; }; +struct cperf_sm2_test_data { +rte_crypto_param pubkey_qx; +rte_crypto_param pubkey_qy; +rte_crypto_param pkey; +rte_crypto_param k; +rte_crypto_param sign_r; +rte_crypto_param sign_s; +rte_crypto_param id; +rte_crypto_param cipher; +rte_crypto_param message; +rte_crypto_param digest; +int curve; +}; +struct cperf_test_vector *cperf_test_vector_get_dummy (struct cperf_options *options);
@@ -111,5 +135,6 @@ extern uint8_t aad[];extern uint8_t digest[2048 ];extern struct cperf_modex_test_data modex_perf_data[10 ]; +extern struct cperf_sm2_test_data sm2_perf_data;#endif
app/test-crypto-perf/main.c +61 -0
79 lines not on this page · raw message
doc/guides/tools/cryptoperf.rst +6 -0
@@ -175,6 +175,7 @@ The following are the application command-line options: pdcp docsis modex + sm2 ipsec tls-record
@@ -342,6 +343,11 @@ The following are the application command-line options: Set modex length for asymmetric crypto perf test. Supported lengths are 60, 128, 255, 448. Default length is 128. +* ``--asym-op <sign/verify/encrypt/decrypt>`` + + Set Asymmetric crypto operation mode. + To be used with SM2 asymmetric crypto ops. Default is ``sign``. + * ``--tls-version <TLS1.2/TLS1.3/DTLS1.2>`` Set TLS/DTLS protocol version for perf test (default is TLS1.2).
Signature · 1 line
2.25.1
PATCH v2 6/6 app/crypto-perf: support ECDSA
In reply to Gowrishankar MuthukrishnanAdded support for ECDSA SECP256R1 curve SIGN and VERIFY operations.
--- app/test-crypto-perf/cperf_ops.c | 57 ++++++++++++++ app/test-crypto-perf/cperf_options.h | 2 + app/test-crypto-perf/cperf_options_parsing.c | 10 ++- app/test-crypto-perf/cperf_test_common.c | 1 + app/test-crypto-perf/cperf_test_vectors.c | 83 ++++++++++++++++++++ app/test-crypto-perf/cperf_test_vectors.h | 12 +++ app/test-crypto-perf/main.c | 18 +++++ doc/guides/tools/cryptoperf.rst | 1 + 8 files changed, 182 insertions(+), 2 deletions(-)
app/test-crypto-perf/cperf_ops.c +57 -0
@@ -34,6 +34,39 @@ cperf_set_ops_asym_modex(struct rte_crypto_op **ops, } } +static void +cperf_set_ops_asym_ecdsa (struct rte_crypto_op **ops, + uint32_t src_buf_offset __rte_unused, + uint32_t dst_buf_offset __rte_unused, uint16_t nb_ops, +void *sess, +const struct cperf_options *options, + const struct cperf_test_vector *test_vector __rte_unused, + uint16_t iv_offset __rte_unused, + uint32_t *imix_idx __rte_unused, + uint64_t *tsc_start __rte_unused) +{ +uint16_t i; + +for (i =0 ; i < nb_ops; i++) { +struct rte_crypto_asym_op *asym_op = ops[i]->asym; + + ops[i]->status =RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ; +rte_crypto_op_attach_asym_session (ops[i], sess); + + asym_op->ecdsa.op_type = options->asym_op_type; + asym_op->ecdsa.message.data = options->secp256r1_data->message.data; + asym_op->ecdsa.message.length = options->secp256r1_data->message.length; + + asym_op->ecdsa.k.data = options->secp256r1_data->k.data; + asym_op->ecdsa.k.length = options->secp256r1_data->k.length; + + asym_op->ecdsa.r.data = options->secp256r1_data->sign_r.data; + asym_op->ecdsa.r.length = options->secp256r1_data->sign_r.length; + asym_op->ecdsa.s.data = options->secp256r1_data->sign_s.data; + asym_op->ecdsa.s.length = options->secp256r1_data->sign_s.length; + } +} + static void cperf_set_ops_asym_sm2(struct rte_crypto_op **ops, uint32_t src_buf_offset __rte_unused,
@@ -974,6 +1007,27 @@ cperf_create_session(struct rte_mempool *sess_mp,return asym_sess; } +if (options->op_type ==CPERF_ASYM_SECP256R1 ) { + xform.next =NULL ; + xform.xform_type =RTE_CRYPTO_ASYM_XFORM_ECDSA ; + xform.ec.curve_id = options->secp256r1_data->curve; + xform.ec.pkey.data = options->secp256r1_data->pkey.data; + xform.ec.pkey.length = options->secp256r1_data->pkey.length; + xform.ec.q.x.data = options->secp256r1_data->pubkey_qx.data; + xform.ec.q.x.length = options->secp256r1_data->pubkey_qx.length; + xform.ec.q.y.data = options->secp256r1_data->pubkey_qy.data; + xform.ec.q.y.length = options->secp256r1_data->pubkey_qy.length; + + ret =rte_cryptodev_asym_session_create (dev_id, &xform, + sess_mp, &asym_sess); +if (ret <0 ) { +RTE_LOG (ERR ,USER1 ,"ECDSA Asym session create failed\n" ); +return NULL ; + } + +return asym_sess; + } +if (options->op_type ==CPERF_ASYM_SM2 ) { xform.next =NULL ; xform.xform_type =RTE_CRYPTO_ASYM_XFORM_SM2 ;
@@ -1294,6 +1348,9 @@ cperf_get_op_functions(const struct cperf_options *options,case CPERF_ASYM_MODEX : op_fns->populate_ops = cperf_set_ops_asym_modex;break ; +case CPERF_ASYM_SECP256R1 : + op_fns->populate_ops = cperf_set_ops_asym_ecdsa; +break ;case CPERF_ASYM_SM2 : op_fns->populate_ops = cperf_set_ops_asym_sm2;break ;
app/test-crypto-perf/cperf_options.h +2 -0
@@ -87,6 +87,7 @@ enum cperf_op_type {CPERF_DOCSIS ,CPERF_IPSEC ,CPERF_ASYM_MODEX , +CPERF_ASYM_SECP256R1 ,CPERF_ASYM_SM2 , CPERF_TLS, };
@@ -165,6 +166,7 @@ struct cperf_options {uint8_t imix_distribution_count;struct cperf_modex_test_data *modex_data;uint16_t modex_len; +struct cperf_ecdsa_test_data *secp256r1_data;struct cperf_sm2_test_data *sm2_data;enum rte_crypto_asym_op_type asym_op_type;enum rte_crypto_auth_algorithm asym_hash_alg;
app/test-crypto-perf/cperf_options_parsing.c +8 -2
@@ -11,6 +11,7 @@#include <rte_ether.h> #include "cperf_options.h" +#include "cperf_test_common.h" #include "cperf_test_vectors.h" #define AES_BLOCK_SIZE 16
@@ -37,7 +38,7 @@ usage(char *progname)" --desc-nb N: set number of descriptors for each crypto device\n" " --devtype TYPE: set crypto device type to use\n" " --optype cipher-only / auth-only / cipher-then-auth / auth-then-cipher /\n" -" aead / pdcp / docsis / ipsec / modex / sm2 / tls-record : set operation type\n" +" aead / pdcp / docsis / ipsec / modex / secp256r1 / sm2 / tls-record : set operation type\n" " --sessionless: enable session-less crypto operations\n" " --out-of-place: enable out-of-place crypto operations\n" " --test-file NAME: set the test vector file path\n"
@@ -483,6 +484,10 @@ parse_op_type(struct cperf_options *opts, const char *arg) cperf_op_type_strs[CPERF_ASYM_MODEX ],CPERF_ASYM_MODEX }, + { + cperf_op_type_strs[CPERF_ASYM_SECP256R1 ], +CPERF_ASYM_SECP256R1 + }, { cperf_op_type_strs[CPERF_ASYM_SM2 ],CPERF_ASYM_SM2
@@ -1064,6 +1069,7 @@ cperf_options_default(struct cperf_options *opts)#endif opts->modex_data = (struct cperf_modex_test_data *)&modex_perf_data[0 ]; + opts->secp256r1_data = &secp256r1_perf_data; opts->sm2_data = &sm2_perf_data; opts->asym_op_type =RTE_CRYPTO_ASYM_OP_SIGN ; }
@@ -1488,7 +1494,7 @@ cperf_options_dump(struct cperf_options *opts)printf ("#\n" );printf ("# number of queue pairs per device: %u\n" , opts->nb_qps);printf ("# crypto operation: %s\n" , cperf_op_type_strs[opts->op_type]); -if (opts->op_type ==CPERF_ASYM_SM2 ) +if (opts->op_type ==CPERF_ASYM_SM2 || opts->op_type ==CPERF_ASYM_SECP256R1 )printf ("# asym operation type: %s\n" , rte_crypto_asym_op_strings[opts->asym_op_type]);printf ("# sessionless: %s\n" , opts->sessionless ?"yes" :"no" );
app/test-crypto-perf/cperf_test_common.c +1 -0
@@ -306,6 +306,7 @@ bool cperf_is_asym_test(const struct cperf_options *options) {if (options->op_type ==CPERF_ASYM_MODEX || + options->op_type ==CPERF_ASYM_SECP256R1 || options->op_type ==CPERF_ASYM_SM2 )return true;
app/test-crypto-perf/cperf_test_vectors.c +83 -0
95 lines not on this page · raw message
app/test-crypto-perf/cperf_test_vectors.h +12 -0
@@ -107,6 +107,17 @@ struct cperf_modex_test_data { } result; }; +struct cperf_ecdsa_test_data { +rte_crypto_param pubkey_qx; +rte_crypto_param pubkey_qy; +rte_crypto_param pkey; +rte_crypto_param k; +rte_crypto_param sign_r; +rte_crypto_param sign_s; +rte_crypto_param message; +int curve; +}; +struct cperf_sm2_test_data {rte_crypto_param pubkey_qx;rte_crypto_param pubkey_qy;
@@ -135,6 +146,7 @@ extern uint8_t aad[];extern uint8_t digest[2048 ];extern struct cperf_modex_test_data modex_perf_data[10 ]; +extern struct cperf_ecdsa_test_data secp256r1_perf_data;extern struct cperf_sm2_test_data sm2_perf_data;#endif
app/test-crypto-perf/main.c +18 -0
@@ -45,6 +45,7 @@ const char *cperf_op_type_strs[] = { [CPERF_DOCSIS] = "docsis", [CPERF_IPSEC] = "ipsec", [CPERF_ASYM_MODEX] = "modex", + [CPERF_ASYM_SECP256R1] = "ecdsa_p256r1", [CPERF_ASYM_SM2] = "sm2", [CPERF_TLS] = "tls-record" };
@@ -225,6 +226,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs) };switch (opts->op_type) { +case CPERF_ASYM_SECP256R1 :case CPERF_ASYM_SM2 :case CPERF_ASYM_MODEX : conf.ff_disable |= (RTE_CRYPTODEV_FF_SECURITY |
@@ -364,6 +366,22 @@ cperf_verify_devices_capabilities(struct cperf_options *opts, } +if (opts->op_type ==CPERF_ASYM_SECP256R1 ) { + asym_cap_idx.type =RTE_CRYPTO_ASYM_XFORM_ECDSA ; + asym_capability =rte_cryptodev_asym_capability_get (cdev_id, &asym_cap_idx); +if (asym_capability ==NULL ) +return -1 ; + +if (!rte_cryptodev_asym_xform_capability_check_optype (asym_capability, + opts->asym_op_type)) +return -1 ; + +if (asym_capability->internal_rng !=0 ) { + opts->secp256r1_data->k.data =NULL ; + opts->secp256r1_data->k.length =0 ; + } + } +if (opts->op_type ==CPERF_ASYM_SM2 ) { asym_cap_idx.type =RTE_CRYPTO_ASYM_XFORM_SM2 ; asym_capability =rte_cryptodev_asym_capability_get (cdev_id, &asym_cap_idx);
doc/guides/tools/cryptoperf.rst +1 -0
@@ -175,6 +175,7 @@ The following are the application command-line options: pdcp docsis modex + ecdsa_p256r1 sm2 ipsec tls-record
Signature · 1 line
2.25.1
Akhil Goyal
AppliedQuoted 17 lines
Subject: [PATCH v2 0/6] app/crypto-perf: add asymmetric crypto tests
This patch series adds below asymmetric tests in crypto-perf tool:
* MODEX group tests (RFC 3526)
* SM2 tests
* ECDSA P256R1 testsAkhil Goyal (1):
app/crypto-perf: support SM2Gowrishankar Muthukrishnan (5):
app/crypto-perf: add modex groups test app/crypto-perf: remove redundant local varriable app/crypto-perf: fix result location for asymmetric test app/crypto-perf: add function to check asymmetric operation app/crypto-perf: support ECDSA
Quoted 13 lines
app/test-crypto-perf/cperf_ops.c | 135 +++- app/test-crypto-perf/cperf_options.h | 8 + app/test-crypto-perf/cperf_options_parsing.c | 61 +- app/test-crypto-perf/cperf_test_common.c | 19 +- app/test-crypto-perf/cperf_test_common.h | 2 + app/test-crypto-perf/cperf_test_latency.c | 21 +- app/test-crypto-perf/cperf_test_throughput.c | 2 +- app/test-crypto-perf/cperf_test_vectors.c | 773 ++++++++++++++++++- app/test-crypto-perf/cperf_test_vectors.h | 41 +- app/test-crypto-perf/cperf_test_verify.c | 2 +- app/test-crypto-perf/main.c | 87 ++- doc/guides/tools/cryptoperf.rst | 7 + 12 files changed, 1131 insertions(+), 27 deletions(-)
Applied to dpdk-next-crypto
Thanks