1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016-2021 Intel Corporation
5 #ifndef _PMD_KASUMI_PRIV_H_
6 #define _PMD_KASUMI_PRIV_H_
8 #include "ipsec_mb_private.h"
10 #define KASUMI_KEY_LENGTH 16
11 #define KASUMI_IV_LENGTH 8
12 #define KASUMI_MAX_BURST 4
14 #define KASUMI_DIGEST_LENGTH 4
16 uint8_t pmd_driver_id_kasumi;
18 static const struct rte_cryptodev_capabilities kasumi_capabilities[] = {
20 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
22 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
24 .algo = RTE_CRYPTO_AUTH_KASUMI_F9,
27 .min = KASUMI_KEY_LENGTH,
28 .max = KASUMI_KEY_LENGTH,
32 .min = KASUMI_DIGEST_LENGTH,
33 .max = KASUMI_DIGEST_LENGTH,
41 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
43 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
45 .algo = RTE_CRYPTO_CIPHER_KASUMI_F8,
48 .min = KASUMI_KEY_LENGTH,
49 .max = KASUMI_KEY_LENGTH,
53 .min = KASUMI_IV_LENGTH,
54 .max = KASUMI_IV_LENGTH,
60 RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
63 /** KASUMI private session structure */
64 struct kasumi_session {
65 /* Keys have to be 16-byte aligned */
66 kasumi_key_sched_t pKeySched_cipher;
67 kasumi_key_sched_t pKeySched_hash;
68 enum ipsec_mb_operation op;
69 enum rte_crypto_auth_operation auth_op;
70 uint16_t cipher_iv_offset;
71 } __rte_cache_aligned;
73 struct kasumi_qp_data {
74 uint8_t temp_digest[KASUMI_DIGEST_LENGTH];
75 /* *< Buffers used to store the digest generated
76 * by the driver when verifying a digest provided
77 * by the user (using authentication verify operation)
81 #endif /* _PMD_KASUMI_PRIV_H_ */