Skip to content

app/crypto-perf: extend PQC support

Pratik Senapati dpdk-dev 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 0 repliesNew
  2. v44 patches 5 repliesSuperseded
  3. v34 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches0 repliesSuperseded
v14 patches1 replySuperseded

Changes in v5 from the cover letter

- Added patch 5: fix PQC test vector output buffer handling
- Added rte_free_sensitive() for ML-KEM dk/sk and ML-DSA privkey
- Used rte_zmalloc for the test vector struct (NULL-initializes optional fields; rte_free(NULL) is a defined no-op in DPDK)
- Pre-allocate output buffer pool (length x nb_descriptors) so each op in a burst has its own writable output slot

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5app/crypto-perf: support mldsa Sign-Iterationapp/test-crypto-perf/cperf_options.h app/test-crypto-perf/cperf_options_parsing.c app/test-crypto-perf/cperf_test_vectors.c +3 more+1096 -50 replies
2/5app/crypto-perf: add ML-KEM supportapp/test-crypto-perf/cperf_ops.c app/test-crypto-perf/cperf_options.h app/test-crypto-perf/cperf_options_parsing.c +4 more+1555 -190 replies
3/5app/crypto-perf: add ML-DSA supportapp/test-crypto-perf/cperf_ops.c app/test-crypto-perf/cperf_options.h app/test-crypto-perf/cperf_options_parsing.c +4 more+2876 -510 replies
4/5app/crypto-perf: add ML-DSA sign supportapp/test-crypto-perf/cperf_ops.c app/test-crypto-perf/cperf_options_parsing.c app/test-crypto-perf/cperf_test_vectors.c +3 more+280 -550 replies
5/5app/crypto-perf: fix PQC test vector output buffer handlingapp/test-crypto-perf/cperf_ops.c app/test-crypto-perf/cperf_test_vector_parsing.c app/test-crypto-perf/cperf_test_vectors.c +1 more+256 -1470 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/5] app/crypto-perf: extend PQC support

This series extends the ML-KEM and ML-DSA support in test-crypto-perf that was introduced in v24.11 (ML-KEM-512 and ML-DSA-44).

Patches 1-4 add the remaining key sizes and sign functionality:
- ML-KEM-768 and ML-KEM-1024 encapsulation/decapsulation
- ML-DSA-65 and ML-DSA-87 sign/verify
- ML-DSA Sign-Iteration test mode (1, 5, 10 iterations) for all ML-DSA variants, measuring per-signing-iteration latency

Patch 5 fixes a correctness issue in the PQC test vector output buffer handling. ML-KEM and ML-DSA output fields (sign, cipher, shared key) were pointing directly into shared global data, causing all ops in a burst to write to the same buffer and clobber each other's results. This patch routes PQC ops through the cperf_test_vector mechanism, allocating per-op writable output buffer pools (length * nb_descriptors) and using rte_free_sensitive() for private key material.

v5 changes:
- Added patch 5: fix PQC test vector output buffer handling
- Added rte_free_sensitive() for ML-KEM dk/sk and ML-DSA privkey
- Used rte_zmalloc for the test vector struct (NULL-initializes optional fields; rte_free(NULL) is a defined no-op in DPDK)
- Pre-allocate output buffer pool (length x nb_descriptors) so each op in a burst has its own writable output slot

Testing:
- ML-DSA and ML-KEM operations tested across all supported key sizes by Pratik Senapati <[email protected]>

Pratik Senapati (5):
app/crypto-perf: support mldsa Sign-Iteration app/crypto-perf: add ML-KEM support app/crypto-perf: add ML-DSA support app/crypto-perf: add ML-DSA sign support app/crypto-perf: fix PQC test vector output buffer handling

 app/test-crypto-perf/cperf_ops.c                 | 121 +-
 app/test-crypto-perf/cperf_options.h              |   7 +
 app/test-crypto-perf/cperf_options_parsing.c      |  91 +-
 app/test-crypto-perf/cperf_test_common.c          |   6 +-
 app/test-crypto-perf/cperf_test_vector_parsing.c  |  12 +
 app/test-crypto-perf/cperf_test_vectors.c         | 5586 ++++++++++++++++-
 app/test-crypto-perf/cperf_test_vectors.h         |  65 +-
 app/test-crypto-perf/main.c                       |  62 +-
 doc/guides/tools/cryptoperf.rst                   |   8 +
 9 files changed, 5873 insertions(+), 85 deletions(-)
Signature · 1 line
2.43.0