numam-dpdk/app/test/test_cryptodev_security_pdcp_test_func.h
Akhil Goyal 2d54b9ce12 test/crypto: add PDCP U-Plane decap cases
This patch add test cases for user plane PDCP
5/7/12/15/18 bit SN test cases for decapsulation of
cipher only and 12/18 bit for cipher + integrity
for all algo combinations.

Test vectors are reused from the encap cases
by swapping the input and output data.

The case are added to DPAA_SEC and DPAA2_SEC
testsuite.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
2019-10-09 11:50:12 +02:00

49 lines
1.2 KiB
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2019 NXP
*/
#ifndef SECURITY_PDCP_TEST_FUNC_H_
#define SECURITY_PDCP_TEST_FUNC_H_
#define PDCP_CPLANE_OFFSET 0
#define PDCP_CPLANE_LONG_SN_OFFSET 32
#define PDCP_UPLANE_OFFSET 64
#define LONG_SEQ_NUM_OFFSET 0
#define SHORT_SEQ_NUM_OFFSET 2
#define FIFTEEN_BIT_SEQ_NUM_OFFSET 4
#define EIGHTEEN_BIT_SEQ_NUM_OFFSET 6
#define UPLINK 0
#define DOWNLINK 1
/* key length(in bytes) for F8 */
#define F8_KEY_LEN 16
#define PDCP_UPLANE_12BIT_OFFSET (PDCP_UPLANE_OFFSET + 32)
#define PDCP_UPLANE_18BIT_OFFSET (PDCP_UPLANE_12BIT_OFFSET + 32)
enum enc_alg_off {
NULL_ENC = 0,
SNOW_ENC = 8,
AES_ENC = 16,
ZUC_ENC = 24
};
enum auth_alg_off {
NULL_AUTH = 0,
SNOW_AUTH = 2,
AES_AUTH = 4,
ZUC_AUTH = 6
};
int test_pdcp_proto_cplane_encap(int i);
int test_pdcp_proto_uplane_encap(int i);
int test_pdcp_proto_uplane_encap_with_int(int i);
int test_pdcp_proto_cplane_decap(int i);
int test_pdcp_proto_uplane_decap(int i);
int test_pdcp_proto_uplane_decap_with_int(int i);
int test_PDCP_PROTO_cplane_encap_all(void);
int test_PDCP_PROTO_cplane_decap_all(void);
int test_PDCP_PROTO_uplane_encap_all(void);
int test_PDCP_PROTO_uplane_decap_all(void);
#endif /* SECURITY_PDCP_TEST_FUNC_H_ */