f-stack/dpdk/app/test-crypto-perf/cperf_test_vectors.h

99 lines
1.5 KiB
C
Raw Normal View History

2019-06-25 11:12:58 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2016-2017 Intel Corporation
2017-04-21 10:43:26 +00:00
*/
#ifndef _CPERF_TEST_VECTRORS_
#define _CPERF_TEST_VECTRORS_
2017-04-21 10:43:26 +00:00
#include "cperf_options.h"
2017-04-21 10:43:26 +00:00
struct cperf_test_vector {
struct {
uint8_t *data;
uint32_t length;
} plaintext;
2017-04-21 10:43:26 +00:00
struct {
uint8_t *data;
uint16_t length;
} cipher_key;
struct {
uint8_t *data;
uint16_t length;
} auth_key;
struct {
uint8_t *data;
uint16_t length;
} aead_key;
struct {
uint8_t *data;
uint16_t length;
} cipher_iv;
struct {
uint8_t *data;
uint16_t length;
} auth_iv;
struct {
uint8_t *data;
uint16_t length;
} aead_iv;
struct {
uint8_t *data;
uint32_t length;
} ciphertext;
struct {
uint8_t *data;
rte_iova_t phys_addr;
uint16_t length;
} aad;
struct {
uint8_t *data;
rte_iova_t phys_addr;
uint16_t length;
} digest;
2017-04-21 10:43:26 +00:00
struct {
uint32_t auth_offset;
uint32_t auth_length;
uint32_t cipher_offset;
uint32_t cipher_length;
uint32_t aead_offset;
uint32_t aead_length;
} data;
2022-09-06 04:00:10 +00:00
struct {
uint8_t *mod;
uint8_t *exp;
uint32_t mlen;
uint32_t elen;
} modex;
2017-04-21 10:43:26 +00:00
};
struct cperf_test_vector*
cperf_test_vector_get_dummy(struct cperf_options *options);
2017-04-21 10:43:26 +00:00
extern uint8_t ciphertext[2048];
2017-04-21 10:43:26 +00:00
extern uint8_t cipher_key[];
extern uint8_t auth_key[];
2017-04-21 10:43:26 +00:00
extern uint8_t iv[];
extern uint8_t aad[];
2017-04-21 10:43:26 +00:00
extern uint8_t digest[2048];
2017-04-21 10:43:26 +00:00
2022-09-06 04:00:10 +00:00
extern uint8_t perf_base[20];
extern uint8_t perf_mod_p[129];
extern uint8_t perf_mod_e[3];
extern uint8_t perf_mod_result[sizeof(perf_mod_p)];
2017-04-21 10:43:26 +00:00
#endif