1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016-2021 Intel Corporation
5 #ifndef _PMD_ZUC_PRIV_H_
6 #define _PMD_ZUC_PRIV_H_
8 #include "ipsec_mb_private.h"
10 #define ZUC_IV_KEY_LENGTH 16
11 #define ZUC_DIGEST_LENGTH 4
12 #define ZUC_MAX_BURST 16
15 uint8_t pmd_driver_id_zuc;
17 static const struct rte_cryptodev_capabilities zuc_capabilities[] = {
19 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
21 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
23 .algo = RTE_CRYPTO_AUTH_ZUC_EIA3,
31 .min = ZUC_DIGEST_LENGTH,
32 .max = ZUC_DIGEST_LENGTH,
36 .min = ZUC_IV_KEY_LENGTH,
37 .max = ZUC_IV_KEY_LENGTH,
44 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
46 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
48 .algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,
56 .min = ZUC_IV_KEY_LENGTH,
57 .max = ZUC_IV_KEY_LENGTH,
63 RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
66 /** ZUC private session structure */
68 enum ipsec_mb_operation op;
69 enum rte_crypto_auth_operation auth_op;
70 uint8_t pKey_cipher[ZUC_IV_KEY_LENGTH];
71 uint8_t pKey_hash[ZUC_IV_KEY_LENGTH];
72 uint16_t cipher_iv_offset;
73 uint16_t auth_iv_offset;
74 } __rte_cache_aligned;
78 uint8_t temp_digest[ZUC_MAX_BURST][ZUC_DIGEST_LENGTH];
79 /* *< Buffers used to store the digest generated
80 * by the driver when verifying a digest provided
81 * by the user (using authentication verify operation)
85 #endif /* _PMD_ZUC_PRIV_H_ */