test/crypto: add PDCP C-Plane encap cases
PDCP control plane can support 5 bit and 12 bit
sequence number. This patch add test cases and test
vectors for all supported algo combinations of cipher+integrity
(NULL+NULL, NULL+AES, NULL+SNOW, NULL+ZUC,
AES+NULL, AES+SNOW, AES+AES, AES+ZUC,
SNOW+NULL, SNOW+AES, SNOW+SNOW, SNOW+ZUC,
ZUC+NULL, ZUC+AES, ZUC+SNOW, ZUC+ZUC).
The test cases are added in DPAA_SEC and DPAA2_SEC
test suite as a reference.
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-09-30 19:27:40 +00:00
|
|
|
/* 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
|
2019-09-30 19:27:42 +00:00
|
|
|
#define PDCP_UPLANE_OFFSET 64
|
test/crypto: add PDCP C-Plane encap cases
PDCP control plane can support 5 bit and 12 bit
sequence number. This patch add test cases and test
vectors for all supported algo combinations of cipher+integrity
(NULL+NULL, NULL+AES, NULL+SNOW, NULL+ZUC,
AES+NULL, AES+SNOW, AES+AES, AES+ZUC,
SNOW+NULL, SNOW+AES, SNOW+SNOW, SNOW+ZUC,
ZUC+NULL, ZUC+AES, ZUC+SNOW, ZUC+ZUC).
The test cases are added in DPAA_SEC and DPAA2_SEC
test suite as a reference.
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-09-30 19:27:40 +00:00
|
|
|
#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
|
|
|
|
|
2019-09-30 19:27:42 +00:00
|
|
|
#define PDCP_UPLANE_12BIT_OFFSET (PDCP_UPLANE_OFFSET + 32)
|
|
|
|
#define PDCP_UPLANE_18BIT_OFFSET (PDCP_UPLANE_12BIT_OFFSET + 32)
|
|
|
|
|
test/crypto: add PDCP C-Plane encap cases
PDCP control plane can support 5 bit and 12 bit
sequence number. This patch add test cases and test
vectors for all supported algo combinations of cipher+integrity
(NULL+NULL, NULL+AES, NULL+SNOW, NULL+ZUC,
AES+NULL, AES+SNOW, AES+AES, AES+ZUC,
SNOW+NULL, SNOW+AES, SNOW+SNOW, SNOW+ZUC,
ZUC+NULL, ZUC+AES, ZUC+SNOW, ZUC+ZUC).
The test cases are added in DPAA_SEC and DPAA2_SEC
test suite as a reference.
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-09-30 19:27:40 +00:00
|
|
|
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);
|
2019-09-30 19:27:42 +00:00
|
|
|
int test_pdcp_proto_uplane_encap(int i);
|
2019-09-30 19:27:41 +00:00
|
|
|
int test_pdcp_proto_cplane_decap(int i);
|
test/crypto: add PDCP C-Plane encap cases
PDCP control plane can support 5 bit and 12 bit
sequence number. This patch add test cases and test
vectors for all supported algo combinations of cipher+integrity
(NULL+NULL, NULL+AES, NULL+SNOW, NULL+ZUC,
AES+NULL, AES+SNOW, AES+AES, AES+ZUC,
SNOW+NULL, SNOW+AES, SNOW+SNOW, SNOW+ZUC,
ZUC+NULL, ZUC+AES, ZUC+SNOW, ZUC+ZUC).
The test cases are added in DPAA_SEC and DPAA2_SEC
test suite as a reference.
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-09-30 19:27:40 +00:00
|
|
|
|
|
|
|
int test_PDCP_PROTO_cplane_encap_all(void);
|
2019-09-30 19:27:41 +00:00
|
|
|
int test_PDCP_PROTO_cplane_decap_all(void);
|
2019-09-30 19:27:42 +00:00
|
|
|
int test_PDCP_PROTO_uplane_encap_all(void);
|
test/crypto: add PDCP C-Plane encap cases
PDCP control plane can support 5 bit and 12 bit
sequence number. This patch add test cases and test
vectors for all supported algo combinations of cipher+integrity
(NULL+NULL, NULL+AES, NULL+SNOW, NULL+ZUC,
AES+NULL, AES+SNOW, AES+AES, AES+ZUC,
SNOW+NULL, SNOW+AES, SNOW+SNOW, SNOW+ZUC,
ZUC+NULL, ZUC+AES, ZUC+SNOW, ZUC+ZUC).
The test cases are added in DPAA_SEC and DPAA2_SEC
test suite as a reference.
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-09-30 19:27:40 +00:00
|
|
|
|
|
|
|
#endif /* SECURITY_PDCP_TEST_FUNC_H_ */
|