1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016-2021 Intel Corporation
5 #ifndef _PMD_SNOW3G_PRIV_H_
6 #define _PMD_SNOW3G_PRIV_H_
8 #include "ipsec_mb_private.h"
10 #define SNOW3G_IV_LENGTH 16
11 #define SNOW3G_MAX_BURST 8
13 #define SNOW3G_DIGEST_LENGTH 4
14 #define SNOW3G_MAX_KEY_SIZE 128
16 uint8_t pmd_driver_id_snow3g;
18 static const struct rte_cryptodev_capabilities snow3g_capabilities[] = {
19 { /* SNOW 3G (UIA2) */
20 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
22 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
24 .algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2,
32 .min = SNOW3G_DIGEST_LENGTH,
33 .max = SNOW3G_DIGEST_LENGTH,
37 .min = SNOW3G_IV_LENGTH,
38 .max = SNOW3G_IV_LENGTH,
44 { /* SNOW 3G (UEA2) */
45 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
47 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
49 .algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
57 .min = SNOW3G_IV_LENGTH,
58 .max = SNOW3G_IV_LENGTH,
64 RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
67 /** SNOW 3G private session structure */
68 struct snow3g_session {
69 enum ipsec_mb_operation op;
70 enum rte_crypto_auth_operation auth_op;
71 snow3g_key_schedule_t pKeySched_cipher;
72 snow3g_key_schedule_t pKeySched_hash;
73 uint16_t cipher_iv_offset;
74 uint16_t auth_iv_offset;
75 } __rte_cache_aligned;
77 struct snow3g_qp_data {
78 uint8_t temp_digest[SNOW3G_DIGEST_LENGTH];
79 /**< Buffer 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_SNOW3G_PRIV_H_ */