Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D91FB606A31C for ; Mon, 30 Nov 2026 11:12:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.a=rsa-sha256 header.s=pfpt0220 header.b=Om5zwyVs Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A4484067D; Mon, 30 Nov 2026 12:12:02 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTPS id 1B4F240263 for ; Fri, 27 Nov 2026 10:54:08 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AR7Iwen3430769 for ; Fri, 27 Nov 2026 01:54:07 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=+ jPBxzuxdaZco/aeKuFOJckwDwQf5byvcUdtTkNABw8=; b=Om5zwyVsSq9HMiDPz Z+RAuq1sarGfLYEtQ8ugVx7C1zVtbF5LY4tZ3fLn/RomsF8QxaY1hmMFcI8exON/ +UhmW/gddU6npev0jspU6RkF/u6M2XAqQ6pyPC6goqEqonyc/fn5AaWDj7QYYfUN L6va1GHUo/CAKYDgG/XR6/ge9hKteYl7QP82fAw30ed8tBKT4A2Dxy4nN4cbNloQ gwmfUwOADp2tcv1Builb0yzgM4x0MDSsGDxYwd4usgPRtS3BmeixZ0ZtsjOf4qjl 6rb6+Z3jCyGnisJeSNw2S1nBb+BIgMDe7Lmq/59fPfUOkOhHkg7dow2BbqcQ6GiX Zc2rQ== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 4j6w9q9g13-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Nov 2026 01:54:06 -0800 (PST) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Fri, 27 Nov 2026 01:54:06 -0800 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Fri, 27 Nov 2026 01:54:06 -0800 Received: from cavium-PowerEdge-T110-II.. (unknown [10.28.38.34]) by maili.marvell.com (Postfix) with ESMTP id DA0D73F7058; Fri, 27 Nov 2026 01:54:04 -0800 (PST) From: Pratik Senapati To: CC: Subject: [PATCH v5 5/5] app/crypto-perf: fix PQC test vector output buffer handling Date: Fri, 27 Nov 2026 15:23:54 +0530 Message-ID: <20261127095354.1676494-6-psenapati@marvell.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261127095354.1676494-1-psenapati@marvell.com> References: <20260929122044.1344518-1-psenapati@marvell.com> <20261127095354.1676494-1-psenapati@marvell.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 3bupNt2ZTqvCJrHTipOILyf0JNxL0A8k X-Proofpoint-ORIG-GUID: 3bupNt2ZTqvCJrHTipOILyf0JNxL0A8k X-Proofpoint-Spam-Info: AW1haW4tMjYxMTI3MDAzOSBTYWx0ZWRfX18DJAofrrovo +lOznvEeBjEKS9teWH+rb3uLdhKoffaCLeyDIHNnaEAp/GOOAnip86WcgBJefdzqVdH7WJhRff+ LWefrg1S0cwlZQomnAJoBRG958YfRko= X-Authority-Analysis: v=2.4 cv=N7G8hG9B c=1 sm=1 tr=0 ts=6b09533e cx=c_pps a=gIfcoYsirJbf48DBMSPrZA==:117 a=gIfcoYsirJbf48DBMSPrZA==:17 a=zJRp6_cAMcgA:10 a=VkNPw1HP01LnGYTKEx00:22 a=l0iWHRpgs5sLHlkKQ1IR:22 a=QXcCYyLzdtTjyudCfB6f:22 a=M5GUcnROAAAA:8 a=sj51MVlKzXoysE7E-fQA:9 a=OBjm3rFKGHvpk9ecZwUJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTI3MDAzOSBTYWx0ZWRfXyTPDN67ZfXmE uZyPkcolQPyJqWuRjS0DbcMsWpkgo8qcLP9FQpdLXkb86AJqc1CT+JyYp04i1E69CfYPHQf8jun fbAn3JJMzxLdFSOrr+6pJvUhRQ5r7sE5CPCRNogeKkzxZS88NSJhav1skg746lG6LUPB0Lfs+Mz Ggzboh0SR/niHlMWtsVSNwicAnyjxi4o4pWmnGfgZgOIBK8XG0eTPcChtQfKmxYPM/eBbAMdL+W /fDxr3JC4f5hMyibGz2I4MNhL52Nwvg3wzdDPyZBaTqT2V2JIYR5iGqgTY+EHoPAaeK0Uh6zKUr aS4n4kD5zU0BkvrxdBuv1BGtlirG4BSge8ZPSlWG5riba5PMjhWs58oeHmutSEUEDD/l7TZXTMi zB34ZsuYM4P0EXlJRfECQwGtNBoOitUZxcQnVPh7kMyW/LRiLlZqZYEBpxSFH6WZNjEZBvBqF4B RFM9idaUcE+lYDoCVmQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-27_01,2026-11-26_02,2025-10-01_01 X-Mailman-Approved-At: Mon, 30 Nov 2026 12:11:55 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Route ML-KEM and ML-DSA ops through the cperf_test_vector mechanism instead of accessing options->mlkem_data/mldsa_data directly in the per-op setup functions. Allocate writable rte_malloc'd buffers in cperf_test_vectors.c to hold copies of the input data for each field. Use rte_zmalloc for the test vector struct so unset pointer fields are NULL-initialized; rte_free(NULL) is a defined no-op in DPDK. Skip allocation for optional zero-length fields (ML-DSA privkey, pubkey; ML-KEM ek, dk, message, sk) which are absent depending on operation type. Use a single err_free label with free_test_vector() to clean up on any allocation failure. Pre-allocate output buffers (ML-DSA sign, ML-KEM cipher and sk) as a pool of nb_descriptors slots so each in-flight op gets its own writable slice, preventing cross-op clobbering in burst mode. Use rte_free_sensitive() for ML-KEM dk/sk and ML-DSA privkey to zero private key material before freeing. Validate op type before the per-op loop with an explicit panic on unsupported types. Signed-off-by: Pratik Senapati --- app/test-crypto-perf/cperf_ops.c | 154 ++++++----------- .../cperf_test_vector_parsing.c | 12 ++ app/test-crypto-perf/cperf_test_vectors.c | 159 ++++++++++++++---- app/test-crypto-perf/cperf_test_vectors.h | 78 +++++++-- 4 files changed, 256 insertions(+), 147 deletions(-) diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c index af30cb8359..01047ca76a 100644 --- a/app/test-crypto-perf/cperf_ops.c +++ b/app/test-crypto-perf/cperf_ops.c @@ -214,31 +214,17 @@ cperf_set_ops_asym_mlkem(struct rte_crypto_op **ops, 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, + const struct cperf_test_vector *test_vector, uint16_t iv_offset __rte_unused, uint32_t *imix_idx __rte_unused, uint64_t *tsc_start __rte_unused) { - /* Intermediate writable buffers for static const test vectors */ - static uint8_t ek_buf[1568]; /* ML-KEM-1024 ek max */ - static uint8_t dk_buf[3168]; /* ML-KEM-1024 dk max */ - static uint8_t msg_buf[32]; /* ML-KEM message (32 bytes) */ - static uint8_t cipher_buf[1568]; /* ML-KEM-1024 cipher max */ - static uint8_t sk_buf[32]; /* shared key (32 bytes) */ uint16_t i; - if (options->asym_op_type == RTE_CRYPTO_ASYM_OP_ENCRYPT) { - memcpy(ek_buf, options->mlkem_data->ek.data, - options->mlkem_data->ek.length); - if (options->mlkem_data->message.length) - memcpy(msg_buf, options->mlkem_data->message.data, - options->mlkem_data->message.length); - } else { - memcpy(dk_buf, options->mlkem_data->dk.data, - options->mlkem_data->dk.length); - memcpy(cipher_buf, options->mlkem_data->cipher.data, - options->mlkem_data->cipher.length); - } + if (options->asym_op_type != RTE_CRYPTO_ASYM_OP_ENCRYPT && + options->asym_op_type != RTE_CRYPTO_ASYM_OP_DECRYPT) + rte_panic("Unsupported ML-KEM operation type %d\n", + options->asym_op_type); for (i = 0; i < nb_ops; i++) { struct rte_crypto_asym_op *asym_op = ops[i]->asym; @@ -248,25 +234,25 @@ cperf_set_ops_asym_mlkem(struct rte_crypto_op **ops, if (options->asym_op_type == RTE_CRYPTO_ASYM_OP_ENCRYPT) { asym_op->mlkem.op = RTE_CRYPTO_ML_KEM_OP_ENCAP; - asym_op->mlkem.encap.ek.data = ek_buf; - asym_op->mlkem.encap.ek.length = options->mlkem_data->ek.length; - asym_op->mlkem.encap.cipher.data = cipher_buf; - asym_op->mlkem.encap.cipher.length = options->mlkem_data->cipher.length; - asym_op->mlkem.encap.sk.data = sk_buf; - asym_op->mlkem.encap.sk.length = options->mlkem_data->sk.length; - asym_op->mlkem.encap.message.data = msg_buf; - asym_op->mlkem.encap.message.length = options->mlkem_data->message.length; + asym_op->mlkem.encap.ek.data = test_vector->mlkem.ek.data; + asym_op->mlkem.encap.ek.length = test_vector->mlkem.ek.length; + asym_op->mlkem.encap.cipher.data = test_vector->mlkem.cipher.data + + (i * test_vector->mlkem.cipher.length); + asym_op->mlkem.encap.cipher.length = test_vector->mlkem.cipher.length; + asym_op->mlkem.encap.sk.data = test_vector->mlkem.sk.data + + (i * test_vector->mlkem.sk.length); + asym_op->mlkem.encap.sk.length = test_vector->mlkem.sk.length; + asym_op->mlkem.encap.message.data = test_vector->mlkem.message.data; + asym_op->mlkem.encap.message.length = test_vector->mlkem.message.length; } else if (options->asym_op_type == RTE_CRYPTO_ASYM_OP_DECRYPT) { asym_op->mlkem.op = RTE_CRYPTO_ML_KEM_OP_DECAP; - asym_op->mlkem.decap.dk.data = dk_buf; - asym_op->mlkem.decap.dk.length = options->mlkem_data->dk.length; - asym_op->mlkem.decap.cipher.data = cipher_buf; - asym_op->mlkem.decap.cipher.length = options->mlkem_data->cipher.length; - asym_op->mlkem.decap.sk.data = sk_buf; - asym_op->mlkem.decap.sk.length = options->mlkem_data->sk.length; - } else { - rte_panic("Unsupported ML-KEM operation type %d\n", - options->asym_op_type); + asym_op->mlkem.decap.dk.data = test_vector->mlkem.dk.data; + asym_op->mlkem.decap.dk.length = test_vector->mlkem.dk.length; + asym_op->mlkem.decap.cipher.data = test_vector->mlkem.cipher.data; + asym_op->mlkem.decap.cipher.length = test_vector->mlkem.cipher.length; + asym_op->mlkem.decap.sk.data = test_vector->mlkem.sk.data + + (i * test_vector->mlkem.sk.length); + asym_op->mlkem.decap.sk.length = test_vector->mlkem.sk.length; } } } @@ -277,52 +263,17 @@ cperf_set_ops_asym_mldsa(struct rte_crypto_op **ops, 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, + const struct cperf_test_vector *test_vector, uint16_t iv_offset __rte_unused, uint32_t *imix_idx __rte_unused, uint64_t *tsc_start __rte_unused) { - /* Intermediate writable buffers for static const test vectors */ - static uint8_t privkey_buf[4896]; /* ML-DSA-87 privkey max */ - static uint8_t pubkey_buf[2592]; /* ML-DSA-87 pubkey max */ - static uint8_t msg_buf[256]; /* message */ - static uint8_t sign_buf[4627]; /* ML-DSA-87 sign max */ - static uint8_t ctx_buf[256]; /* context */ - static uint8_t seed_buf[32]; /* seed */ - static uint8_t mu_buf[64]; /* mu */ uint16_t i; - if (options->asym_op_type == RTE_CRYPTO_ASYM_OP_SIGN) { - memcpy(privkey_buf, options->mldsa_data->privkey.data, - options->mldsa_data->privkey.length); - if (options->mldsa_data->message.length) - memcpy(msg_buf, options->mldsa_data->message.data, - options->mldsa_data->message.length); - if (options->mldsa_data->ctx.length) - memcpy(ctx_buf, options->mldsa_data->ctx.data, - options->mldsa_data->ctx.length); - if (options->mldsa_data->seed.length) - memcpy(seed_buf, options->mldsa_data->seed.data, - options->mldsa_data->seed.length); - if (options->mldsa_data->mu.length) - memcpy(mu_buf, options->mldsa_data->mu.data, - options->mldsa_data->mu.length); - } else { - memcpy(pubkey_buf, options->mldsa_data->pubkey.data, - options->mldsa_data->pubkey.length); - if (options->mldsa_data->message.length) - memcpy(msg_buf, options->mldsa_data->message.data, - options->mldsa_data->message.length); - if (options->mldsa_data->sign.length) - memcpy(sign_buf, options->mldsa_data->sign.data, - options->mldsa_data->sign.length); - if (options->mldsa_data->ctx.length) - memcpy(ctx_buf, options->mldsa_data->ctx.data, - options->mldsa_data->ctx.length); - if (options->mldsa_data->mu.length) - memcpy(mu_buf, options->mldsa_data->mu.data, - options->mldsa_data->mu.length); - } + if (options->asym_op_type != RTE_CRYPTO_ASYM_OP_SIGN && + options->asym_op_type != RTE_CRYPTO_ASYM_OP_VERIFY) + rte_panic("Unsupported ML-DSA operation type %d\n", + options->asym_op_type); for (i = 0; i < nb_ops; i++) { struct rte_crypto_asym_op *asym_op = ops[i]->asym; @@ -332,35 +283,33 @@ cperf_set_ops_asym_mldsa(struct rte_crypto_op **ops, if (options->asym_op_type == RTE_CRYPTO_ASYM_OP_SIGN) { asym_op->mldsa.op = RTE_CRYPTO_ML_DSA_OP_SIGN; - asym_op->mldsa.siggen.privkey.data = privkey_buf; - asym_op->mldsa.siggen.privkey.length = options->mldsa_data->privkey.length; - asym_op->mldsa.siggen.message.data = msg_buf; - asym_op->mldsa.siggen.message.length = options->mldsa_data->message.length; - asym_op->mldsa.siggen.sign.data = sign_buf; - asym_op->mldsa.siggen.sign.length = options->mldsa_data->sign.length; - asym_op->mldsa.siggen.ctx.data = ctx_buf; - asym_op->mldsa.siggen.ctx.length = options->mldsa_data->ctx.length; - asym_op->mldsa.siggen.seed.data = seed_buf; - asym_op->mldsa.siggen.seed.length = options->mldsa_data->seed.length; - asym_op->mldsa.siggen.mu.data = mu_buf; - asym_op->mldsa.siggen.mu.length = options->mldsa_data->mu.length; + asym_op->mldsa.siggen.privkey.data = test_vector->mldsa.privkey.data; + asym_op->mldsa.siggen.privkey.length = test_vector->mldsa.privkey.length; + asym_op->mldsa.siggen.message.data = test_vector->mldsa.message.data; + asym_op->mldsa.siggen.message.length = test_vector->mldsa.message.length; + asym_op->mldsa.siggen.sign.data = test_vector->mldsa.sign.data + + (i * test_vector->mldsa.sign.length); + asym_op->mldsa.siggen.sign.length = test_vector->mldsa.sign.length; + asym_op->mldsa.siggen.ctx.data = test_vector->mldsa.ctx.data; + asym_op->mldsa.siggen.ctx.length = test_vector->mldsa.ctx.length; + asym_op->mldsa.siggen.seed.data = test_vector->mldsa.seed.data; + asym_op->mldsa.siggen.seed.length = test_vector->mldsa.seed.length; + asym_op->mldsa.siggen.mu.data = test_vector->mldsa.mu.data; + asym_op->mldsa.siggen.mu.length = test_vector->mldsa.mu.length; asym_op->mldsa.siggen.hash = options->mldsa_data->hash; } else if (options->asym_op_type == RTE_CRYPTO_ASYM_OP_VERIFY) { asym_op->mldsa.op = RTE_CRYPTO_ML_DSA_OP_VERIFY; - asym_op->mldsa.sigver.pubkey.data = pubkey_buf; - asym_op->mldsa.sigver.pubkey.length = options->mldsa_data->pubkey.length; - asym_op->mldsa.sigver.message.data = msg_buf; - asym_op->mldsa.sigver.message.length = options->mldsa_data->message.length; - asym_op->mldsa.sigver.sign.data = sign_buf; - asym_op->mldsa.sigver.sign.length = options->mldsa_data->sign.length; - asym_op->mldsa.sigver.ctx.data = ctx_buf; - asym_op->mldsa.sigver.ctx.length = options->mldsa_data->ctx.length; - asym_op->mldsa.sigver.mu.data = mu_buf; - asym_op->mldsa.sigver.mu.length = options->mldsa_data->mu.length; + asym_op->mldsa.sigver.pubkey.data = test_vector->mldsa.pubkey.data; + asym_op->mldsa.sigver.pubkey.length = test_vector->mldsa.pubkey.length; + asym_op->mldsa.sigver.message.data = test_vector->mldsa.message.data; + asym_op->mldsa.sigver.message.length = test_vector->mldsa.message.length; + asym_op->mldsa.sigver.sign.data = test_vector->mldsa.sign.data; + asym_op->mldsa.sigver.sign.length = test_vector->mldsa.sign.length; + asym_op->mldsa.sigver.ctx.data = test_vector->mldsa.ctx.data; + asym_op->mldsa.sigver.ctx.length = test_vector->mldsa.ctx.length; + asym_op->mldsa.sigver.mu.data = test_vector->mldsa.mu.data; + asym_op->mldsa.sigver.mu.length = test_vector->mldsa.mu.length; asym_op->mldsa.sigver.hash = options->mldsa_data->hash; - } else { - rte_panic("Unsupported ML-DSA operation type %d\n", - options->asym_op_type); } } } @@ -470,8 +419,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops, ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED; rte_security_attach_session(ops[i], sess); sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset); - if (options->is_outbound) - rte_pktmbuf_reset(sym_op->m_src); sym_op->m_src->pkt_len = test_buffer_size; while ((m->next != NULL) && (offset >= m->data_len)) { @@ -1384,6 +1331,7 @@ cperf_create_session(struct rte_mempool *sess_mp, return asym_sess; } + switch (options->op_type) { case CPERF_ASYM_MLDSA44: case CPERF_ASYM_MLDSA65: diff --git a/app/test-crypto-perf/cperf_test_vector_parsing.c b/app/test-crypto-perf/cperf_test_vector_parsing.c index 5665fb425b..3d6df873cc 100644 --- a/app/test-crypto-perf/cperf_test_vector_parsing.c +++ b/app/test-crypto-perf/cperf_test_vector_parsing.c @@ -24,6 +24,18 @@ free_test_vector(struct cperf_test_vector *vector, struct cperf_options *opts) rte_free(vector->auth_iv.data); rte_free(vector->aad.data); rte_free(vector->digest.data); + rte_free(vector->mlkem.ek.data); + rte_free_sensitive(vector->mlkem.dk.data); + rte_free(vector->mlkem.message.data); + rte_free(vector->mlkem.cipher.data); + rte_free_sensitive(vector->mlkem.sk.data); + rte_free_sensitive(vector->mldsa.privkey.data); + rte_free(vector->mldsa.pubkey.data); + rte_free(vector->mldsa.message.data); + rte_free(vector->mldsa.sign.data); + rte_free(vector->mldsa.ctx.data); + rte_free(vector->mldsa.seed.data); + rte_free(vector->mldsa.mu.data); if (opts->test_file != NULL) { rte_free(vector->plaintext.data); diff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test-crypto-perf/cperf_test_vectors.c index 09e65476ea..2c8a1c82ce 100644 --- a/app/test-crypto-perf/cperf_test_vectors.c +++ b/app/test-crypto-perf/cperf_test_vectors.c @@ -6,6 +6,7 @@ #include #include "cperf_test_vectors.h" +#include "cperf_test_vector_parsing.h" struct cperf_modex_test_data modex_perf_data[10] = { @@ -5552,7 +5553,7 @@ uint8_t mldsa_44_extmu[] = { 0xF5, 0x2E, 0x4B, 0x7C, 0xD6, 0x2A, 0xF4, 0x2E, }; -static const uint8_t mldsa_44_message_5_iter[] = { +uint8_t mldsa_44_message_5_iter[] = { 0x5E, 0x42, 0x43, 0x44, 0x99, 0x76, 0x99, 0x99, 0xA3, 0x7F, 0x2B, 0xE1, 0x54, 0xC8, 0x0D, 0x6E, 0x31, 0xBB, 0x85, 0x92, 0xF0, 0x5A, 0xD7, 0x23, @@ -5568,7 +5569,7 @@ static const uint8_t mldsa_44_message_5_iter[] = { 0x99, 0x99, 0x99, 0x9D, 0xAC, 0x48, 0x59, 0x77, }; -static const uint8_t mldsa_44_message_10_iter[] = { +uint8_t mldsa_44_message_10_iter[] = { 0x3F, 0x42, 0x43, 0x44, 0x99, 0x76, 0x99, 0x99, 0xA3, 0x7F, 0x2B, 0xE1, 0x54, 0xC8, 0x0D, 0x6E, 0x31, 0xBB, 0x85, 0x92, 0xF0, 0x5A, 0xD7, 0x23, @@ -5584,7 +5585,7 @@ static const uint8_t mldsa_44_message_10_iter[] = { 0x99, 0x99, 0x99, 0x9D, 0xAC, 0x48, 0x59, 0x77, }; -static const uint8_t mldsa_44_sign_1_iter[] = { +uint8_t mldsa_44_sign_1_iter[] = { 0xFD, 0x1F, 0x49, 0x0A, 0xFF, 0x04, 0x28, 0x4A, 0xEF, 0xDE, 0x2F, 0xD2, 0x6E, 0x4B, 0x20, 0x12, 0xCC, 0xF1, 0x6C, 0x35, 0x02, 0xE0, 0xE6, 0xE6, @@ -5890,7 +5891,7 @@ static const uint8_t mldsa_44_sign_1_iter[] = { 0x0F, 0x1E, 0x31, 0x43, }; -static const uint8_t mldsa_44_sign_5_iter[] = { +uint8_t mldsa_44_sign_5_iter[] = { 0x96, 0x98, 0xF9, 0xE6, 0x22, 0xEF, 0x58, 0xF4, 0x57, 0x82, 0xF7, 0x40, 0x95, 0x1A, 0xE7, 0x9C, 0x0E, 0x95, 0x77, 0xEA, 0x32, 0x86, 0xAE, 0x81, @@ -6197,7 +6198,7 @@ static const uint8_t mldsa_44_sign_5_iter[] = { }; -static const uint8_t mldsa_44_sign_10_iter[] = { +uint8_t mldsa_44_sign_10_iter[] = { 0x21, 0x06, 0x63, 0xCE, 0xA8, 0xAA, 0x3A, 0x78, 0xD9, 0xF1, 0x8E, 0x75, 0xF8, 0xA0, 0xC9, 0x89, 0xD7, 0x85, 0xBF, 0xE4, 0x5C, 0xEB, 0x99, 0x45, @@ -6504,7 +6505,7 @@ static const uint8_t mldsa_44_sign_10_iter[] = { }; -static const uint8_t mlkem_768_dk[] = { +uint8_t mlkem_768_dk[] = { 0x29, 0x18, 0xA0, 0x56, 0x30, 0x51, 0x93, 0xF1, 0x80, 0xB9, 0xCB, 0xAE, 0xD3, 0x97, 0x02, 0x73, 0xAB, 0x7D, 0x7C, 0xEB, 0x44, 0x03, 0x60, 0x06, @@ -6807,7 +6808,7 @@ static const uint8_t mlkem_768_dk[] = { 0xBB, 0x2B, 0x37, 0x59, 0x85, 0x84, 0xE0, 0xF9, }; -static const uint8_t mlkem_768_ek[] = { +uint8_t mlkem_768_ek[] = { 0x7B, 0x15, 0x44, 0x17, 0xF9, 0x85, 0xAB, 0xF3, 0xCE, 0xDE, 0x04, 0x8A, 0xF1, 0xCA, 0x3A, 0x63, 0xB7, 0x79, 0xFA, 0x00, 0xAD, 0x20, 0x62, 0x31, @@ -6958,14 +6959,14 @@ static const uint8_t mlkem_768_ek[] = { 0x1D, 0x85, 0xA8, 0x04, 0xD6, 0xCD, 0x32, 0x5F, }; -static const uint8_t mlkem_768_message[] = { +uint8_t mlkem_768_message[] = { 0x16, 0x20, 0x03, 0x2E, 0xBD, 0xB3, 0x08, 0xF2, 0xBE, 0xF4, 0x07, 0x03, 0x06, 0xAF, 0x29, 0xFD, 0x2D, 0x30, 0x73, 0xA0, 0xE5, 0x79, 0xCF, 0x90, 0x78, 0x7C, 0xCE, 0xC8, 0x9C, 0x4D, 0x9F, 0x16, }; -static const uint8_t mlkem_768_cipher[] = { +uint8_t mlkem_768_cipher[] = { 0x0E, 0x0C, 0x21, 0xA5, 0x33, 0x7A, 0xFC, 0x3C, 0x76, 0x9A, 0x80, 0x14, 0xD7, 0x82, 0x8E, 0x7A, 0xBC, 0xCF, 0xF0, 0xA9, 0x77, 0xD7, 0x92, 0x9E, @@ -7104,14 +7105,14 @@ static const uint8_t mlkem_768_cipher[] = { 0xD3, 0xC9, 0xB5, 0x2A, 0x6C, 0xE8, 0x1F, 0xE1, }; -static const uint8_t mlkem_768_sk[] = { +uint8_t mlkem_768_sk[] = { 0x21, 0xA7, 0x5C, 0x6A, 0x1B, 0xC9, 0xA1, 0x0B, 0x3D, 0x99, 0x03, 0xBE, 0xE5, 0x5C, 0x26, 0x18, 0x0D, 0xF3, 0x1D, 0x21, 0x66, 0x1E, 0x39, 0x7B, 0x64, 0x6A, 0x57, 0x54, 0xAE, 0x70, 0xFB, 0x69, }; -static const uint8_t mlkem_1024_dk[] = { +uint8_t mlkem_1024_dk[] = { 0xBA, 0x60, 0x87, 0x43, 0x75, 0x8A, 0xB6, 0xCA, 0xCD, 0xFD, 0xAA, 0x89, 0xD3, 0x54, 0xA0, 0x21, 0x61, 0xCF, 0x3A, 0xCB, 0x62, 0x86, 0x5A, 0x11, @@ -7510,7 +7511,7 @@ static const uint8_t mlkem_1024_dk[] = { 0x58, 0x0B, 0xBB, 0x61, 0x45, 0x9C, 0xA3, 0xE1, }; -static const uint8_t mlkem_1024_ek[] = { +uint8_t mlkem_1024_ek[] = { 0x8E, 0x4B, 0xB1, 0x60, 0xF4, 0x62, 0xE1, 0xE9, 0xBA, 0xF9, 0x5C, 0x65, 0x4F, 0x00, 0x60, 0xBB, 0x94, 0x8C, 0xEF, 0x14, 0x87, 0x7B, 0x52, 0x2F, @@ -7709,14 +7710,14 @@ static const uint8_t mlkem_1024_ek[] = { 0x27, 0xF1, 0xC7, 0x3F, 0xD5, 0x54, 0x61, 0xF2, }; -static const uint8_t mlkem_1024_message[] = { +uint8_t mlkem_1024_message[] = { 0xA9, 0x91, 0x84, 0x52, 0x12, 0x42, 0xC8, 0xF4, 0x6C, 0x5D, 0x0F, 0x04, 0xCD, 0x9E, 0x82, 0x14, 0x15, 0x74, 0xDA, 0xD5, 0xF9, 0xF4, 0xF5, 0x9A, 0x6B, 0x17, 0x9B, 0xF8, 0x54, 0xF8, 0xFA, 0x9C, }; -static const uint8_t mlkem_1024_cipher[] = { +uint8_t mlkem_1024_cipher[] = { 0xCE, 0xE7, 0x81, 0x3D, 0x95, 0x80, 0x18, 0x33, 0x48, 0xC0, 0x05, 0xD1, 0x34, 0x69, 0x8E, 0x0B, 0xA9, 0x3E, 0xEC, 0x60, 0xE5, 0xBC, 0x55, 0x3B, @@ -7915,21 +7916,21 @@ static const uint8_t mlkem_1024_cipher[] = { 0xB3, 0x89, 0x73, 0xBA, 0x02, 0x76, 0x64, 0x24, }; -static const uint8_t mlkem_1024_sk[] = { +uint8_t mlkem_1024_sk[] = { 0x14, 0x0F, 0x5E, 0x1F, 0x11, 0x85, 0x16, 0x26, 0xE4, 0x65, 0x6C, 0x09, 0x7C, 0xE1, 0x9A, 0x32, 0x28, 0x4E, 0x31, 0x64, 0x58, 0xA5, 0xE6, 0x90, 0xDD, 0x06, 0xD9, 0x38, 0x10, 0x34, 0xC6, 0xB4, }; -const uint8_t mldsa_65_seed[] = { +uint8_t mldsa_65_seed[] = { 0xAF, 0xB4, 0x7E, 0x7A, 0x2B, 0x5C, 0x6B, 0xF9, 0xE7, 0x3E, 0xFE, 0xD6, 0x4B, 0x27, 0x90, 0x48, 0xD3, 0xA2, 0x35, 0x42, 0x11, 0xD2, 0xCA, 0x31, 0xE1, 0xA7, 0xA6, 0xC2, 0xD8, 0x28, 0xCF, 0xCF, }; -static const uint8_t mldsa_65_privkey_noseed[] = { +uint8_t mldsa_65_privkey_noseed[] = { 0x1D, 0x6D, 0xB9, 0x95, 0x3A, 0xB9, 0x93, 0x6C, 0x2B, 0x7D, 0xB2, 0xF6, 0xEE, 0x16, 0x69, 0x8C, 0x49, 0xF3, 0x74, 0xB1, 0x42, 0xE8, 0x88, 0x07, @@ -8436,7 +8437,7 @@ static const uint8_t mldsa_65_privkey_noseed[] = { 0xD3, 0x5D, 0x50, 0x2F, 0x70, 0x03, 0xE7, 0xDE, }; -static const uint8_t mldsa_65_pubkey_noseed[] = { +uint8_t mldsa_65_pubkey_noseed[] = { 0x1D, 0x6D, 0xB9, 0x95, 0x3A, 0xB9, 0x93, 0x6C, 0x2B, 0x7D, 0xB2, 0xF6, 0xEE, 0x16, 0x69, 0x8C, 0x49, 0xF3, 0x74, 0xB1, 0x42, 0xE8, 0x88, 0x07, @@ -8683,14 +8684,14 @@ static const uint8_t mldsa_65_pubkey_noseed[] = { 0xAD, 0x5C, 0x6C, 0xEF, 0x33, 0x13, 0x4D, 0x61, }; -static const uint8_t mldsa_65_message[] = { +uint8_t mldsa_65_message[] = { 0x1C, 0x00, 0x00, 0x00, 0x61, 0x6D, 0xB0, 0xB6, 0x0F, 0x54, 0x96, 0x5F, 0xDB, 0x21, 0x40, 0xB5, 0x33, 0xA3, 0x85, 0xFE, 0xA3, 0xCC, 0x76, 0x5C, 0x8C, 0xB0, 0xC0, 0x71, 0xE5, 0x6D, 0xFB, 0xDD, }; -static const uint8_t mldsa_65_sign_dtrm[] = { +uint8_t mldsa_65_sign_dtrm[] = { 0xD1, 0x54, 0x6B, 0x32, 0x93, 0xC2, 0xFE, 0xA1, 0x5F, 0x8D, 0x6C, 0xF4, 0x2A, 0x86, 0xFA, 0x5D, 0xAB, 0xFA, 0x0C, 0x42, 0x49, 0x48, 0x7E, 0x77, @@ -9107,14 +9108,14 @@ static const uint8_t mldsa_65_sign_dtrm[] = { 0x10, 0x14, 0x1C, 0x24, 0x2F, }; -const uint8_t mldsa_87_seed[] = { +uint8_t mldsa_87_seed[] = { 0x2F, 0xA5, 0xF2, 0x15, 0xFE, 0x26, 0x93, 0x2F, 0xF4, 0x7C, 0xF3, 0x03, 0x6F, 0xC4, 0x0F, 0x4A, 0x4B, 0x43, 0xA2, 0x70, 0xB3, 0x2A, 0xAD, 0xB0, 0x9D, 0x74, 0x8D, 0xFE, 0xD2, 0x07, 0x52, 0x8B, }; -static const uint8_t mldsa_87_privkey_noseed[] = { +uint8_t mldsa_87_privkey_noseed[] = { 0xD4, 0xFF, 0xA6, 0x98, 0xD8, 0x54, 0x53, 0xB6, 0xEE, 0xA1, 0xB2, 0x2C, 0xA3, 0xCB, 0xE1, 0x95, 0xA1, 0x92, 0x92, 0x54, 0x4B, 0xED, 0x50, 0x89, @@ -9729,7 +9730,7 @@ static const uint8_t mldsa_87_privkey_noseed[] = { 0x1A, 0x6E, 0xD8, 0x73, 0xC3, 0xDC, 0xF7, 0xDB, }; -static const uint8_t mldsa_87_pubkey_noseed[] = { +uint8_t mldsa_87_pubkey_noseed[] = { 0xD4, 0xFF, 0xA6, 0x98, 0xD8, 0x54, 0x53, 0xB6, 0xEE, 0xA1, 0xB2, 0x2C, 0xA3, 0xCB, 0xE1, 0x95, 0xA1, 0x92, 0x92, 0x54, 0x4B, 0xED, 0x50, 0x89, @@ -10056,14 +10057,14 @@ static const uint8_t mldsa_87_pubkey_noseed[] = { 0x62, 0x5A, 0x7D, 0x2F, 0xE2, 0xEC, 0xE8, 0xD5, }; -static const uint8_t mldsa_87_message[] = { +uint8_t mldsa_87_message[] = { 0x75, 0x35, 0x3E, 0x04, 0xF4, 0xB3, 0xD4, 0x7F, 0xD2, 0x7E, 0x02, 0xA5, 0x93, 0x80, 0x26, 0x90, 0xB6, 0xE9, 0xC3, 0xBC, 0xB0, 0xB9, 0x03, 0xC1, 0x36, 0xB4, 0x5B, 0xEF, 0xA5, 0x80, 0x50, 0xDD, }; -static const uint8_t mldsa_87_sign_dtrm[] = { +uint8_t mldsa_87_sign_dtrm[] = { 0x55, 0x63, 0x52, 0x72, 0xAA, 0xFF, 0x4C, 0xEC, 0x2F, 0x28, 0x5C, 0x59, 0x13, 0xAD, 0xFC, 0xA0, 0xBC, 0xDC, 0x96, 0x49, 0xFA, 0xDB, 0x7B, 0x57, @@ -10645,42 +10646,42 @@ static const uint8_t mldsa_87_sign_dtrm[] = { 0x28, 0x30, 0x3C, }; -static const uint8_t mldsa_65_message_1_iter[] = { +uint8_t mldsa_65_message_1_iter[] = { 0x13, 0xCD, 0x8C, 0x83, 0x61, 0x6D, 0xB0, 0xB6, 0x0F, 0x54, 0x96, 0x5F, 0xDB, 0x21, 0x40, 0xB5, 0x33, 0xA3, 0x85, 0xFE, 0xA3, 0xCC, 0x76, 0x5C, 0x8C, 0xB0, 0xC0, 0x71, 0xE5, 0x6D, 0xFB, 0xDD, }; -static const uint8_t mldsa_65_message_5_iter[] = { +uint8_t mldsa_65_message_5_iter[] = { 0xE3, 0xB3, 0xF1, 0x9F, 0x61, 0x6D, 0xB0, 0xB6, 0x0F, 0x54, 0x96, 0x5F, 0xDB, 0x21, 0x40, 0xB5, 0x33, 0xA3, 0x85, 0xFE, 0xA3, 0xCC, 0x76, 0x5C, 0x8C, 0xB0, 0xC0, 0x71, 0xE5, 0x6D, 0xFB, 0xDD, }; -static const uint8_t mldsa_65_message_10_iter[] = { +uint8_t mldsa_65_message_10_iter[] = { 0x83, 0x81, 0xBB, 0xD8, 0x61, 0x6D, 0xB0, 0xB6, 0x0F, 0x54, 0x96, 0x5F, 0xDB, 0x21, 0x40, 0xB5, 0x33, 0xA3, 0x85, 0xFE, 0xA3, 0xCC, 0x76, 0x5C, 0x8C, 0xB0, 0xC0, 0x71, 0xE5, 0x6D, 0xFB, 0xDD, }; -static const uint8_t mldsa_87_message_1_iter[] = { +uint8_t mldsa_87_message_1_iter[] = { 0x80, 0x1B, 0x53, 0xC5, 0xF4, 0xB3, 0xD4, 0x7F, 0xD2, 0x7E, 0x02, 0xA5, 0x93, 0x80, 0x26, 0x90, 0xB6, 0xE9, 0xC3, 0xBC, 0xB0, 0xB9, 0x03, 0xC1, 0x36, 0xB4, 0x5B, 0xEF, 0xA5, 0x80, 0x50, 0xDD, }; -static const uint8_t mldsa_87_message_5_iter[] = { +uint8_t mldsa_87_message_5_iter[] = { 0x50, 0x02, 0xB8, 0xE1, 0xF4, 0xB3, 0xD4, 0x7F, 0xD2, 0x7E, 0x02, 0xA5, 0x93, 0x80, 0x26, 0x90, 0xB6, 0xE9, 0xC3, 0xBC, 0xB0, 0xB9, 0x03, 0xC1, 0x36, 0xB4, 0x5B, 0xEF, 0xA5, 0x80, 0x50, 0xDD, }; -static const uint8_t mldsa_87_message_10_iter[] = { +uint8_t mldsa_87_message_10_iter[] = { 0xD2, 0xAD, 0x0A, 0xE5, 0xF4, 0xB3, 0xD4, 0x7F, 0xD2, 0x7E, 0x02, 0xA5, 0x93, 0x80, 0x26, 0x90, 0xB6, 0xE9, 0xC3, 0xBC, 0xB0, 0xB9, 0x03, 0xC1, @@ -11445,7 +11446,7 @@ cperf_test_vector_get_dummy(struct cperf_options *options) { struct cperf_test_vector *t_vec; - t_vec = (struct cperf_test_vector *)rte_malloc(NULL, + t_vec = (struct cperf_test_vector *)rte_zmalloc(NULL, sizeof(struct cperf_test_vector), 0); if (t_vec == NULL) return t_vec; @@ -11458,6 +11459,97 @@ cperf_test_vector_get_dummy(struct cperf_options *options) t_vec->modex.exp = options->modex_data->exponent.data; t_vec->modex.mlen = options->modex_data->modulus.len; t_vec->modex.elen = options->modex_data->exponent.len; + + } else if (options->op_type == CPERF_ASYM_MLKEM512 || + options->op_type == CPERF_ASYM_MLKEM768 || + options->op_type == CPERF_ASYM_MLKEM1024) { + const struct cperf_mlkem_test_data *d = options->mlkem_data; + + if (d->ek.length > 0) { + t_vec->mlkem.ek.data = rte_malloc(NULL, d->ek.length, 0); + if (t_vec->mlkem.ek.data == NULL) + goto err_free; + memcpy(t_vec->mlkem.ek.data, d->ek.data, d->ek.length); + t_vec->mlkem.ek.length = d->ek.length; + } + if (d->dk.length > 0) { + t_vec->mlkem.dk.data = rte_malloc(NULL, d->dk.length, 0); + if (t_vec->mlkem.dk.data == NULL) + goto err_free; + memcpy(t_vec->mlkem.dk.data, d->dk.data, d->dk.length); + t_vec->mlkem.dk.length = d->dk.length; + } + if (d->message.length > 0) { + t_vec->mlkem.message.data = rte_malloc(NULL, d->message.length, 0); + if (t_vec->mlkem.message.data == NULL) + goto err_free; + memcpy(t_vec->mlkem.message.data, d->message.data, d->message.length); + t_vec->mlkem.message.length = d->message.length; + } + t_vec->mlkem.cipher.data = rte_malloc(NULL, + (size_t)d->cipher.length * options->nb_descriptors, 0); + if (t_vec->mlkem.cipher.data == NULL) + goto err_free; + memcpy(t_vec->mlkem.cipher.data, d->cipher.data, d->cipher.length); + t_vec->mlkem.cipher.length = d->cipher.length; + if (d->sk.length > 0) { + t_vec->mlkem.sk.data = rte_malloc(NULL, + (size_t)d->sk.length * options->nb_descriptors, 0); + if (t_vec->mlkem.sk.data == NULL) + goto err_free; + t_vec->mlkem.sk.length = d->sk.length; + } + + } else if (options->op_type == CPERF_ASYM_MLDSA44 || + options->op_type == CPERF_ASYM_MLDSA65 || + options->op_type == CPERF_ASYM_MLDSA87) { + const struct cperf_mldsa_test_data *d = options->mldsa_data; + + if (d->privkey.length > 0) { + t_vec->mldsa.privkey.data = rte_malloc(NULL, d->privkey.length, 0); + if (t_vec->mldsa.privkey.data == NULL) + goto err_free; + memcpy(t_vec->mldsa.privkey.data, d->privkey.data, d->privkey.length); + t_vec->mldsa.privkey.length = d->privkey.length; + } + if (d->pubkey.length > 0) { + t_vec->mldsa.pubkey.data = rte_malloc(NULL, d->pubkey.length, 0); + if (t_vec->mldsa.pubkey.data == NULL) + goto err_free; + memcpy(t_vec->mldsa.pubkey.data, d->pubkey.data, d->pubkey.length); + t_vec->mldsa.pubkey.length = d->pubkey.length; + } + t_vec->mldsa.message.data = rte_malloc(NULL, d->message.length, 0); + if (t_vec->mldsa.message.data == NULL) + goto err_free; + memcpy(t_vec->mldsa.message.data, d->message.data, d->message.length); + t_vec->mldsa.message.length = d->message.length; + t_vec->mldsa.sign.data = rte_malloc(NULL, + (size_t)d->sign.length * options->nb_descriptors, 0); + if (t_vec->mldsa.sign.data == NULL) + goto err_free; + t_vec->mldsa.sign.length = d->sign.length; + if (d->ctx.length > 0) { + t_vec->mldsa.ctx.data = rte_malloc(NULL, d->ctx.length, 0); + if (t_vec->mldsa.ctx.data == NULL) + goto err_free; + memcpy(t_vec->mldsa.ctx.data, d->ctx.data, d->ctx.length); + t_vec->mldsa.ctx.length = d->ctx.length; + } + if (d->seed.length > 0) { + t_vec->mldsa.seed.data = rte_malloc(NULL, d->seed.length, 0); + if (t_vec->mldsa.seed.data == NULL) + goto err_free; + memcpy(t_vec->mldsa.seed.data, d->seed.data, d->seed.length); + t_vec->mldsa.seed.length = d->seed.length; + } + if (d->mu.length > 0) { + t_vec->mldsa.mu.data = rte_malloc(NULL, d->mu.length, 0); + if (t_vec->mldsa.mu.data == NULL) + goto err_free; + memcpy(t_vec->mldsa.mu.data, d->mu.data, d->mu.length); + t_vec->mldsa.mu.length = d->mu.length; + } } if (options->op_type == CPERF_PDCP || options->op_type == CPERF_TLS || @@ -11646,4 +11738,7 @@ cperf_test_vector_get_dummy(struct cperf_options *options) t_vec->aead_iv.length = options->aead_iv_sz; } return t_vec; +err_free: + free_test_vector(t_vec, options); + return NULL; } diff --git a/app/test-crypto-perf/cperf_test_vectors.h b/app/test-crypto-perf/cperf_test_vectors.h index c6ad7fdcb3..a11f0dfa42 100644 --- a/app/test-crypto-perf/cperf_test_vectors.h +++ b/app/test-crypto-perf/cperf_test_vectors.h @@ -85,6 +85,60 @@ struct cperf_test_vector { uint32_t msg_len; uint32_t cipher_len; } sm2; + + struct { + struct { + uint8_t *data; + uint32_t length; + } ek; + struct { + uint8_t *data; + uint32_t length; + } dk; + struct { + uint8_t *data; + uint32_t length; + } message; + struct { + uint8_t *data; + uint32_t length; + } cipher; + struct { + uint8_t *data; + uint32_t length; + } sk; + } mlkem; + + struct { + struct { + uint8_t *data; + uint32_t length; + } privkey; + struct { + uint8_t *data; + uint32_t length; + } pubkey; + struct { + uint8_t *data; + uint32_t length; + } message; + struct { + uint8_t *data; + uint32_t length; + } sign; + struct { + uint8_t *data; + uint32_t length; + } ctx; + struct { + uint8_t *data; + uint32_t length; + } seed; + struct { + uint8_t *data; + uint32_t length; + } mu; + } mldsa; }; struct cperf_modex_test_data { @@ -111,23 +165,23 @@ struct cperf_mlkem_test_data { const char *name; enum rte_crypto_ml_kem_type type; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } dk; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } ek; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } message; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } cipher; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } sk; }; @@ -192,31 +246,31 @@ struct cperf_mldsa_test_data { const char *name; enum rte_crypto_ml_dsa_type type; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } privkey; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } pubkey; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } message; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } sign; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } ctx; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } seed; struct { - const uint8_t *data; + uint8_t *data; uint32_t length; } mu; enum rte_crypto_auth_algorithm hash; -- 2.43.0