2017-12-19 15:48:59 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
* Copyright(c) 2016-2017 Intel Corporation
|
2017-01-25 16:27:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CPERF_TEST_VECTRORS_
|
|
|
|
#define _CPERF_TEST_VECTRORS_
|
|
|
|
|
|
|
|
#include "cperf_options.h"
|
|
|
|
|
|
|
|
struct cperf_test_vector {
|
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
|
|
|
uint32_t length;
|
|
|
|
} plaintext;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
|
|
|
uint16_t length;
|
|
|
|
} cipher_key;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
|
|
|
uint16_t length;
|
|
|
|
} auth_key;
|
|
|
|
|
2017-07-02 05:41:23 +00:00
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
|
|
|
uint16_t length;
|
|
|
|
} aead_key;
|
|
|
|
|
2017-01-25 16:27:33 +00:00
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
|
|
|
uint16_t length;
|
2017-07-02 05:41:15 +00:00
|
|
|
} cipher_iv;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
|
|
|
uint16_t length;
|
|
|
|
} auth_iv;
|
2017-01-25 16:27:33 +00:00
|
|
|
|
2017-07-02 05:41:23 +00:00
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
|
|
|
uint16_t length;
|
|
|
|
} aead_iv;
|
|
|
|
|
2017-01-25 16:27:33 +00:00
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
|
|
|
uint32_t length;
|
|
|
|
} ciphertext;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
2017-10-20 12:31:31 +00:00
|
|
|
rte_iova_t phys_addr;
|
2017-01-25 16:27:33 +00:00
|
|
|
uint16_t length;
|
|
|
|
} aad;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
uint8_t *data;
|
2017-10-20 12:31:31 +00:00
|
|
|
rte_iova_t phys_addr;
|
2017-01-25 16:27:33 +00:00
|
|
|
uint16_t length;
|
|
|
|
} digest;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
uint32_t auth_offset;
|
|
|
|
uint32_t auth_length;
|
|
|
|
uint32_t cipher_offset;
|
|
|
|
uint32_t cipher_length;
|
2017-07-02 05:41:23 +00:00
|
|
|
uint32_t aead_offset;
|
|
|
|
uint32_t aead_length;
|
2017-01-25 16:27:33 +00:00
|
|
|
} data;
|
2021-09-16 08:38:38 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
uint8_t *mod;
|
|
|
|
uint8_t *exp;
|
|
|
|
uint32_t mlen;
|
|
|
|
uint32_t elen;
|
|
|
|
} modex;
|
2017-01-25 16:27:33 +00:00
|
|
|
};
|
|
|
|
|
2022-04-29 06:23:15 +00:00
|
|
|
struct cperf_modex_test_data {
|
|
|
|
#define DATA_SIZE 512
|
|
|
|
struct {
|
|
|
|
uint8_t data[DATA_SIZE];
|
|
|
|
uint16_t len;
|
|
|
|
} base;
|
|
|
|
struct {
|
|
|
|
uint8_t data[DATA_SIZE];
|
|
|
|
uint16_t len;
|
|
|
|
} exponent;
|
|
|
|
struct {
|
|
|
|
uint8_t data[DATA_SIZE];
|
|
|
|
uint16_t len;
|
|
|
|
} modulus;
|
|
|
|
struct {
|
|
|
|
uint8_t data[DATA_SIZE];
|
|
|
|
uint16_t len;
|
|
|
|
} result;
|
|
|
|
};
|
|
|
|
|
2017-01-25 16:27:33 +00:00
|
|
|
struct cperf_test_vector*
|
|
|
|
cperf_test_vector_get_dummy(struct cperf_options *options);
|
|
|
|
|
|
|
|
extern uint8_t ciphertext[2048];
|
|
|
|
|
|
|
|
extern uint8_t cipher_key[];
|
|
|
|
extern uint8_t auth_key[];
|
|
|
|
|
|
|
|
extern uint8_t iv[];
|
|
|
|
extern uint8_t aad[];
|
|
|
|
|
|
|
|
extern uint8_t digest[2048];
|
|
|
|
|
2022-04-29 06:23:15 +00:00
|
|
|
extern struct cperf_modex_test_data modex_perf_data[4];
|
2021-09-16 08:38:38 +00:00
|
|
|
|
2017-01-25 16:27:33 +00:00
|
|
|
#endif
|