intel-ipsec-mb v2.0
Documentation of the Intel(R) IPSec Multi-Buffer library
 
Loading...
Searching...
No Matches
intel-ipsec-mb.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright (c) 2012-2024, Intel Corporation
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6
7 * Redistributions of source code must retain the above copyright notice,
8 this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of Intel Corporation nor the names of its contributors
13 may be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*******************************************************************************/
27
28#ifndef IMB_IPSEC_MB_H
29#define IMB_IPSEC_MB_H
30
31#include <stdlib.h>
32#include <stdint.h>
33#include <errno.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/* 128-bit data type that is not in sdtint.h */
40typedef struct {
41 uint64_t low;
42 uint64_t high;
44
48#if defined __linux__ || defined __FreeBSD__
50#define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
51#define __forceinline static inline __attribute__((always_inline))
52
53#if __GNUC__ >= 4
54#define IMB_DLL_EXPORT __attribute__((visibility("default")))
55#define IMB_DLL_LOCAL __attribute__((visibility("hidden")))
56#else /* GNU C 4.0 and later */
57#define IMB_DLL_EXPORT
58#define IMB_DLL_LOCAL
59#endif
61#else
62/* Windows */
63
64#ifdef __MINGW32__
65/* MinGW-w64 */
66#define DECLARE_ALIGNED(decl, alignval) decl __attribute__((aligned(alignval)))
67#undef __forceinline
68#define __forceinline static inline __attribute__((always_inline))
69
70#else
71/* MSVS */
72#define DECLARE_ALIGNED(decl, alignval) __declspec(align(alignval)) decl
73#define __forceinline static __forceinline
74
75#endif /* __MINGW__ */
76
80#define IMB_DLL_EXPORT
81#define IMB_DLL_LOCAL
82
83#endif /* defined __linux__ || defined __FreeBSD__ */
84
88#define IMB_VERSION_STR "2.0.0"
89#define IMB_VERSION_NUM 0x20000
90
94#define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
95
99#ifdef DEBUG
100#include <assert.h>
101#define IMB_ASSERT(x) assert(x)
102#else
103#define IMB_ASSERT(x)
104#endif
105
106#ifndef IMB_DIM
107#define IMB_DIM(x) (sizeof(x) / sizeof(x[0]))
108#endif
109
120
124#define IMB_DES_KEY_SCHED_SIZE (16 * 8)
125#define IMB_DES_BLOCK_SIZE 8
126
127#define IMB_AES_BLOCK_SIZE 16
128
129#define IMB_SM4_BLOCK_SIZE 16
130
131#define IMB_SHA1_DIGEST_SIZE_IN_BYTES 20
132#define IMB_SHA224_DIGEST_SIZE_IN_BYTES 28
133#define IMB_SHA256_DIGEST_SIZE_IN_BYTES 32
134#define IMB_SHA384_DIGEST_SIZE_IN_BYTES 48
135#define IMB_SHA512_DIGEST_SIZE_IN_BYTES 64
136
137#define IMB_MD5_DIGEST_SIZE_IN_BYTES 16
138
139#define IMB_SHA1_BLOCK_SIZE 64
140#define IMB_SHA_224_BLOCK_SIZE 64
141#define IMB_SHA_256_BLOCK_SIZE 64
142#define IMB_SHA_384_BLOCK_SIZE 128
143#define IMB_SHA_512_BLOCK_SIZE 128
144
145#define IMB_MD5_BLOCK_SIZE 64
146
147#define IMB_KASUMI_KEY_SIZE 16
148#define IMB_KASUMI_IV_SIZE 8
149#define IMB_KASUMI_BLOCK_SIZE 8
150#define IMB_KASUMI_DIGEST_SIZE 4
151
152#define IMB_ZUC_KEY_LEN_IN_BYTES 16
153#define IMB_ZUC_IV_LEN_IN_BYTES 16
154#define IMB_ZUC256_KEY_LEN_IN_BYTES 32
155#define IMB_ZUC256_IV_LEN_IN_BYTES_MIN 23
156#define IMB_ZUC256_IV_LEN_IN_BYTES_MAX 25
157#define IMB_ZUC_DIGEST_LEN_IN_BYTES 4
158#define IMB_ZUC256_DIGEST_LEN_IN_BYTES_MIN 4
159#define IMB_ZUC256_DIGEST_LEN_IN_BYTES_MAX 16
160
161#define IMB_SNOW3G_DIGEST_LEN 4
162#define IMB_SNOW3G_IV_LEN_IN_BYTES 16
163
164#define IMB_SM3_DIGEST_SIZE 32
165#define IMB_SM3_BLOCK_SIZE 64
166
167#define IMB_CHACHA20_POLY1305_KEY_SIZE 32
168#define IMB_CHACHA20_POLY1305_IV_SIZE 12
169#define IMB_POLY1305_BLOCK_SIZE 16
170
175#define IMB_DOCSIS_CRC32_MIN_ETH_PDU_SIZE 14
176#define IMB_DOCSIS_CRC32_TAG_SIZE 4
177
192
196typedef enum {
251 /* add new error types above this comment */
252 IMB_ERR_MAX /* don't move this one */
254
259#ifdef __ELASTERROR
260#if __ELASTERROR > 2000
261#error "Library error codes conflict with errno.h - please update IMB_ERR_MIN!"
262#endif
263#endif
264
300
302
355
357
364
366
371 const void *in;
372 void *out;
373 uint64_t len;
374};
375
395typedef struct IMB_JOB {
396 const void *enc_keys;
397 const void *dec_keys;
399 union {
400 const uint8_t *src;
405 };
406 union {
407 uint8_t *dst;
412 };
413 union {
420 };
421 union {
426 };
428 union {
433 };
434 const uint8_t *iv;
440 /* Start hash algorithm-specific fields */
441 union {
442 struct _HMAC_specific_fields {
450 struct _AES_XCBC_specific_fields {
451 const uint32_t *_k1_expanded;
453 const uint8_t *_k2;
455 const uint8_t *_k3;
458 struct _AES_CCM_specific_fields {
459 const void *aad;
462 } CCM;
463 struct _AES_CMAC_specific_fields {
464 const void *_key_expanded;
466 const void *_skey1;
467 const void *_skey2;
469 struct _AES_GCM_specific_fields {
470 const void *aad;
472 uint64_t aad_len_in_bytes;
475 } GCM;
476 struct _ZUC_EIA3_specific_fields {
477 const uint8_t *_key;
479 const uint8_t *_iv;
481 const uint8_t *_iv23;
484 struct _SNOW3G_UIA2_specific_fields {
485 const void *_key;
487 const void *_iv;
490 struct _KASUMI_UIA1_specific_fields {
491 const void *_key;
494 struct _AES_GMAC_specific_fields {
495 const struct gcm_key_data *_key;
497 const void *_iv;
499 uint64_t iv_len_in_bytes;
502 struct _GHASH_specific_fields {
503 const struct gcm_key_data *_key;
505 const void *_init_tag;
507 struct _POLY1305_specific_fields {
508 const void *_key;
511 struct _CHACHA20_POLY1305_specific_fields {
512 const void *aad;
514 uint64_t aad_len_in_bytes;
519 struct _SNOW_V_AEAD_specific_fields {
520 const void *aad;
522 uint64_t aad_len_in_bytes;
524 void *reserved;
527 } u;
536 void *user_data;
539 int (*cipher_func)(struct IMB_JOB *);
541 int (*hash_func)(struct IMB_JOB *);
548 union {
549 struct _CBCS_specific_fields {
550 void *next_iv;
555 uint32_t suite_id[2];
556 uint32_t session_id;
558
559/* KASUMI */
560
561/* 64 precomputed words for key schedule */
562#define KASUMI_KEY_SCHEDULE_SIZE 64
563
572
573/* GCM data structures */
574#define IMB_GCM_BLOCK_LEN 16
575
590#undef IMB_GCM_BLOCK_LEN
591
611
612/* 32 precomputed (4-byte) rounds for SM4 key schedule (128 bytes in total) */
613#define IMB_SM4_KEY_SCHEDULE_ROUNDS 32
614
618#define IMB_MAX_TAG_LEN (64)
619
629#define IMB_GCM_IV_DATA_LEN (12)
630
631#define IMB_GCM_128_KEY_LEN (16)
632#define IMB_GCM_192_KEY_LEN (24)
633#define IMB_GCM_256_KEY_LEN (32)
634
635#define IMB_GCM_ENC_KEY_LEN 16
636#define IMB_GCM_KEY_SETS (15)
638/* NIST SP 800-38-D, section 5.2.1.1: len(P) < 2^39 - 256 [bits] */
639#define IMB_GCM_MAX_LEN UINT64_C((((1ULL << 39) - 256) / 8) - 1)
640
641/* Per RFC 7539, max cipher size is (2^32 - 1) x 64 */
642#define IMB_CHACHA20_POLY1305_MAX_LEN UINT64_C((1ULL << 38) - 64)
643
644#define IMB_CCM_AAD_MAX_SIZE (46) /* Maximum CCM AAD size */
650#ifdef __WIN32
651__declspec(align(64))
652#endif /* WIN32 */
655 union {
657 struct {
674 struct {
682 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 8 * 2];
684 struct {
695 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 32 * 2];
697 struct {
708 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 16 * 2];
711}
712#ifdef LINUX
713__attribute__((aligned(64)));
714#else
715;
716#endif
717
718#undef IMB_GCM_ENC_KEY_LEN
719#undef IMB_GCM_KEY_SETS
720
721/* API data type definitions */
722struct IMB_MGR;
723
724typedef void (*init_mb_mgr_t)(struct IMB_MGR *);
725typedef IMB_JOB *(*get_next_job_t)(struct IMB_MGR *);
726typedef IMB_JOB *(*submit_job_t)(struct IMB_MGR *);
727typedef IMB_JOB *(*get_completed_job_t)(struct IMB_MGR *);
728typedef IMB_JOB *(*flush_job_t)(struct IMB_MGR *);
729typedef uint32_t (*queue_size_t)(struct IMB_MGR *);
730typedef uint32_t (*burst_fn_t)(struct IMB_MGR *, const uint32_t, struct IMB_JOB **);
731typedef uint32_t (*submit_cipher_burst_t)(struct IMB_MGR *, struct IMB_JOB *, const uint32_t,
732 const IMB_CIPHER_MODE cipher,
733 const IMB_CIPHER_DIRECTION dir,
734 const IMB_KEY_SIZE_BYTES key_size);
735typedef uint32_t (*submit_hash_burst_t)(struct IMB_MGR *, struct IMB_JOB *, const uint32_t,
736 const IMB_HASH_ALG hash);
737typedef void (*keyexp_t)(const void *, void *, void *);
738typedef void (*cmac_subkey_gen_t)(const void *, void *, void *);
739typedef void (*hash_one_block_t)(const void *, void *);
740typedef void (*hash_fn_t)(const void *, const uint64_t, void *);
741typedef void (*xcbc_keyexp_t)(const void *, void *, void *, void *);
742typedef int (*des_keysched_t)(uint64_t *, const void *);
743typedef void (*aes_cfb_t)(void *, const void *, const void *, const void *, uint64_t);
744typedef void (*aes_gcm_enc_dec_t)(const struct gcm_key_data *, struct gcm_context_data *, uint8_t *,
745 uint8_t const *, uint64_t, const uint8_t *, uint8_t const *,
746 uint64_t, uint8_t *, uint64_t);
747typedef void (*aes_gcm_enc_dec_iv_t)(const struct gcm_key_data *, struct gcm_context_data *,
748 uint8_t *, uint8_t const *, const uint64_t, const uint8_t *,
749 uint8_t const *, const uint64_t, uint8_t *, const uint64_t,
750 const uint64_t);
751typedef void (*aes_gcm_init_t)(const struct gcm_key_data *, struct gcm_context_data *,
752 const uint8_t *, uint8_t const *, uint64_t);
753typedef void (*aes_gcm_init_var_iv_t)(const struct gcm_key_data *, struct gcm_context_data *,
754 const uint8_t *, const uint64_t, const uint8_t *,
755 const uint64_t);
756typedef void (*aes_gcm_enc_dec_update_t)(const struct gcm_key_data *, struct gcm_context_data *,
757 uint8_t *, const uint8_t *, uint64_t);
758typedef void (*aes_gcm_enc_dec_finalize_t)(const struct gcm_key_data *, struct gcm_context_data *,
759 uint8_t *, uint64_t);
760typedef void (*aes_gcm_precomp_t)(struct gcm_key_data *);
761typedef void (*aes_gcm_pre_t)(const void *, struct gcm_key_data *);
762
763typedef void (*aes_gmac_init_t)(const struct gcm_key_data *, struct gcm_context_data *,
764 const uint8_t *, const uint64_t);
765typedef void (*aes_gmac_update_t)(const struct gcm_key_data *, struct gcm_context_data *,
766 const uint8_t *, const uint64_t);
767typedef void (*aes_gmac_finalize_t)(const struct gcm_key_data *, struct gcm_context_data *,
768 uint8_t *, const uint64_t);
769
770typedef void (*chacha_poly_init_t)(const void *, struct chacha20_poly1305_context_data *,
771 const void *, const void *, const uint64_t);
773 void *, const void *, const uint64_t);
775 const uint64_t);
776typedef void (*ghash_t)(const struct gcm_key_data *, const void *, const uint64_t, void *,
777 const uint64_t);
778
779typedef void (*zuc_eea3_1_buffer_t)(const void *, const void *, const void *, void *,
780 const uint32_t);
781
782typedef void (*zuc_eea3_4_buffer_t)(const void *const *, const void *const *, const void *const *,
783 void **, const uint32_t *);
784
785typedef void (*zuc_eea3_n_buffer_t)(const void *const *, const void *const *, const void *const *,
786 void **, const uint32_t *, const uint32_t);
787
788typedef void (*zuc_eia3_1_buffer_t)(const void *, const void *, const void *, const uint32_t,
789 uint32_t *);
790
791typedef void (*zuc_eia3_n_buffer_t)(const void *const *, const void *const *, const void *const *,
792 const uint32_t *, uint32_t **, const uint32_t);
793
794typedef void (*kasumi_f8_1_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const void *,
795 void *, const uint32_t);
796typedef void (*kasumi_f8_1_buffer_bit_t)(const kasumi_key_sched_t *, const uint64_t, const void *,
797 void *, const uint32_t, const uint32_t);
798typedef void (*kasumi_f8_2_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const uint64_t,
799 const void *, void *, const uint32_t, const void *, void *,
800 const uint32_t);
801typedef void (*kasumi_f8_3_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const uint64_t,
802 const uint64_t, const void *, void *, const void *, void *,
803 const void *, void *, const uint32_t);
804typedef void (*kasumi_f8_4_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const uint64_t,
805 const uint64_t, const uint64_t, const void *, void *,
806 const void *, void *, const void *, void *, const void *,
807 void *, const uint32_t);
808typedef void (*kasumi_f8_n_buffer_t)(const kasumi_key_sched_t *, const uint64_t *,
809 const void *const *, void **, const uint32_t *,
810 const uint32_t);
811typedef void (*kasumi_f9_1_buffer_user_t)(const kasumi_key_sched_t *, const uint64_t, const void *,
812 const uint32_t, void *, const uint32_t);
813typedef void (*kasumi_f9_1_buffer_t)(const kasumi_key_sched_t *, const void *, const uint32_t,
814 void *);
815typedef int (*kasumi_init_f8_key_sched_t)(const void *, kasumi_key_sched_t *);
816typedef int (*kasumi_init_f9_key_sched_t)(const void *, kasumi_key_sched_t *);
817typedef size_t (*kasumi_key_sched_size_t)(void);
818
822typedef struct snow3g_key_schedule_s {
823 /* KEY */
824 uint32_t k[4];
826
827typedef void (*snow3g_f8_1_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *,
828 void *, const uint32_t);
829
830typedef void (*snow3g_f8_1_buffer_bit_t)(const snow3g_key_schedule_t *, const void *, const void *,
831 void *, const uint32_t, const uint32_t);
832
833typedef void (*snow3g_f8_2_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *,
834 const void *, void *, const uint32_t, const void *, void *,
835 const uint32_t);
836
837typedef void (*snow3g_f8_4_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *,
838 const void *, const void *, const void *, void *,
839 const uint32_t, const void *, void *, const uint32_t,
840 const void *, void *, const uint32_t, const void *, void *,
841 const uint32_t);
842
843typedef void (*snow3g_f8_8_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *,
844 const void *, const void *, const void *, const void *,
845 const void *, const void *, const void *, void *,
846 const uint32_t, const void *, void *, const uint32_t,
847 const void *, void *, const uint32_t, const void *, void *,
848 const uint32_t, const void *, void *, const uint32_t,
849 const void *, void *, const uint32_t, const void *, void *,
850 const uint32_t, const void *, void *, const uint32_t);
851
853 const void *const[], const void *const[], void *[],
854 const uint32_t[]);
855
856typedef void (*snow3g_f8_n_buffer_t)(const snow3g_key_schedule_t *, const void *const[],
857 const void *const[], void *[], const uint32_t[],
858 const uint32_t);
859
861 const void *const[], const void *const[], void *[],
862 const uint32_t[], const uint32_t);
863
864typedef void (*snow3g_f9_1_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *,
865 const uint64_t, void *);
866
867typedef int (*snow3g_init_key_sched_t)(const void *, snow3g_key_schedule_t *);
868
869typedef size_t (*snow3g_key_sched_size_t)(void);
870
871typedef uint32_t (*hec_32_t)(const uint8_t *);
872typedef uint64_t (*hec_64_t)(const uint8_t *);
873
874typedef uint32_t (*crc32_fn_t)(const void *, const uint64_t);
875
876typedef void (*aes_ecb_quic_t)(const void *, const void *, void *out, uint64_t);
877
878typedef IMB_JOB *(*chacha20_poly1305_quic_t)(struct IMB_MGR *, IMB_JOB *);
879
880typedef void (*chacha20_hp_quic_t)(const void *, const void *const *, void **, const uint64_t);
881
882typedef void (*sm4_keyexp_t)(const void *, void *, void *);
883
884/* Self-Test callback definitions */
885typedef struct {
886 const char *phase;
887 const char *type;
888 const char *descr;
890
891typedef int (*imb_self_test_cb_t)(void *cb_arg, const IMB_SELF_TEST_CALLBACK_DATA *data);
892/* Multi-buffer manager flags passed to alloc_mb_mgr() */
893
894#define IMB_FLAG_SHANI_OFF (1ULL << 0)
895#define IMB_FLAG_GFNI_OFF (1ULL << 1)
904#define IMB_FEATURE_SHANI (1ULL << 0)
905#define IMB_FEATURE_AESNI (1ULL << 1)
906#define IMB_FEATURE_PCLMULQDQ (1ULL << 2)
907#define IMB_FEATURE_CMOV (1ULL << 3)
908#define IMB_FEATURE_SSE4_2 (1ULL << 4)
909#define IMB_FEATURE_AVX (1ULL << 5)
910#define IMB_FEATURE_AVX2 (1ULL << 6)
911#define IMB_FEATURE_AVX512F (1ULL << 7)
912#define IMB_FEATURE_AVX512DQ (1ULL << 8)
913#define IMB_FEATURE_AVX512CD (1ULL << 9)
914#define IMB_FEATURE_AVX512BW (1ULL << 10)
915#define IMB_FEATURE_AVX512VL (1ULL << 11)
916#define IMB_FEATURE_AVX512_SKX \
917 (IMB_FEATURE_AVX512F | IMB_FEATURE_AVX512DQ | IMB_FEATURE_AVX512CD | \
918 IMB_FEATURE_AVX512BW | IMB_FEATURE_AVX512VL)
919#define IMB_FEATURE_VAES (1ULL << 12)
920#define IMB_FEATURE_VPCLMULQDQ (1ULL << 13)
921#define IMB_FEATURE_SAFE_DATA (1ULL << 14)
922#define IMB_FEATURE_SAFE_PARAM (1ULL << 15)
923#define IMB_FEATURE_GFNI (1ULL << 16)
924#define IMB_FEATURE_AVX512_IFMA (1ULL << 17)
925#define IMB_FEATURE_BMI2 (1ULL << 18)
926#define IMB_FEATURE_SELF_TEST (1ULL << 19) /* self-test feature present */
927#define IMB_FEATURE_SELF_TEST_PASS (1ULL << 20) /* self-test passed */
928#define IMB_FEATURE_AVX_IFMA (1ULL << 21)
929#define IMB_FEATURE_HYBRID (1ULL << 22) /* Hybrid core */
930#define IMB_FEATURE_SM3NI (1ULL << 23)
931#define IMB_FEATURE_SM4NI (1ULL << 24)
932#define IMB_FEATURE_SHA512NI (1ULL << 25)
933#define IMB_FEATURE_XSAVE (1ULL << 26)
934#define IMB_FEATURE_OSXSAVE (1ULL << 27) /* OS-enabled XSAVE */
935
939#define IMB_SELF_TEST_PHASE_START "START"
940#define IMB_SELF_TEST_PHASE_PASS "PASS"
941#define IMB_SELF_TEST_PHASE_FAIL "FAIL"
942#define IMB_SELF_TEST_PHASE_CORRUPT "CORRUPT"
943
944#define IMB_SELF_TEST_TYPE_KAT_CIPHER "KAT_Cipher"
945#define IMB_SELF_TEST_TYPE_KAT_AUTH "KAT_Auth"
946#define IMB_SELF_TEST_TYPE_KAT_AEAD "KAT_AEAD"
947
951#define IMB_CPUFLAGS_NO_AESNI (IMB_FEATURE_SSE4_2 | IMB_FEATURE_CMOV)
952#define IMB_CPUFLAGS_SSE (IMB_CPUFLAGS_NO_AESNI | IMB_FEATURE_AESNI | IMB_FEATURE_PCLMULQDQ)
953#define IMB_CPUFLAGS_SSE_T2 (IMB_CPUFLAGS_SSE | IMB_FEATURE_SHANI)
954#define IMB_CPUFLAGS_SSE_T3 (IMB_CPUFLAGS_SSE_T2 | IMB_FEATURE_GFNI)
955#define IMB_CPUFLAGS_AVX2 \
956 (IMB_CPUFLAGS_SSE | IMB_FEATURE_AVX | IMB_FEATURE_XSAVE | IMB_FEATURE_OSXSAVE | \
957 IMB_FEATURE_AVX2 | IMB_FEATURE_BMI2)
958#define IMB_CPUFLAGS_AVX512 (IMB_CPUFLAGS_AVX2 | IMB_FEATURE_AVX512_SKX)
959#define IMB_CPUFLAGS_AVX512_T2 \
960 (IMB_CPUFLAGS_AVX512 | IMB_FEATURE_VAES | IMB_FEATURE_VPCLMULQDQ | IMB_FEATURE_GFNI | \
961 IMB_FEATURE_AVX512_IFMA | IMB_FEATURE_SHANI)
962#define IMB_CPUFLAGS_AVX2_T2 \
963 (IMB_CPUFLAGS_AVX2 | IMB_FEATURE_SHANI | IMB_FEATURE_VAES | IMB_FEATURE_VPCLMULQDQ | \
964 IMB_FEATURE_GFNI)
965#define IMB_CPUFLAGS_AVX2_T3 (IMB_CPUFLAGS_AVX2_T2 | IMB_FEATURE_AVX_IFMA)
966#define IMB_CPUFLAGS_AVX2_T4 \
967 (IMB_CPUFLAGS_AVX2_T3 | IMB_FEATURE_SM3NI | IMB_FEATURE_SM4NI | IMB_FEATURE_SHA512NI)
968
969/* TOP LEVEL (IMB_MGR) Data structure fields */
970
971#define IMB_MAX_BURST_SIZE 128
972#define IMB_MAX_JOBS (IMB_MAX_BURST_SIZE * 2)
973
974typedef struct IMB_MGR {
975
976 uint64_t flags;
977 uint64_t features;
979 uint64_t reserved[4];
980 uint8_t reserved2[7];
982 uint32_t used_arch;
1016
1044
1049
1061
1073
1079
1105
1110
1120
1123
1124 void (*set_suite_id)(struct IMB_MGR *, IMB_JOB *);
1125
1128
1130
1133
1136
1137 /* in-order scheduler fields */
1141
1142 /* out of order managers */
1156
1185 void *end_ooo; /* add new out-of-order managers above this line */
1187
1197IMB_DLL_EXPORT const char *
1199
1208IMB_DLL_EXPORT unsigned
1210
1220
1228IMB_DLL_EXPORT const char *
1230
1257
1264IMB_DLL_EXPORT void
1266
1272IMB_DLL_EXPORT size_t
1274
1297imb_set_pointers_mb_mgr(void *ptr, const uint64_t flags, const unsigned reset_mgr);
1298
1305IMB_DLL_EXPORT uint64_t
1307
1318IMB_DLL_EXPORT void
1323IMB_DLL_EXPORT void
1328IMB_DLL_EXPORT void
1330
1352
1374
1394
1402IMB_DLL_EXPORT uint32_t
1407IMB_DLL_EXPORT uint32_t
1412IMB_DLL_EXPORT uint32_t
1414
1434
1454
1463IMB_DLL_EXPORT void
1465
1466/*
1467 * Wrapper macros to call arch API's set up
1468 * at init phase of multi-buffer manager.
1469 *
1470 * For example, after calling init_mb_mgr_sse(&mgr)
1471 * The 'mgr' structure be set up so that:
1472 * mgr.get_next_job will point to get_next_job_sse(),
1473 * mgr.submit_job will point to submit_job_sse(),
1474 * mgr.submit_job_nocheck will point to submit_job_nocheck_sse(),
1475 * mgr.get_completed_job will point to get_completed_job_sse(),
1476 * mgr.flush_job will point to flush_job_sse(),
1477 * mgr.queue_size will point to queue_size_sse()
1478 * mgr.keyexp_128 will point to aes_keyexp_128_sse()
1479 * mgr.keyexp_192 will point to aes_keyexp_192_sse()
1480 * mgr.keyexp_256 will point to aes_keyexp_256_sse()
1481 * etc.
1482 *
1483 * Direct use of arch API's may result in better performance.
1484 * Using below indirect interface may produce slightly worse performance but
1485 * it can simplify application implementation.
1486 * The test app provides example of using the indirect interface.
1487 */
1488
1496#define IMB_GET_NEXT_JOB(_mgr) ((_mgr)->get_next_job((_mgr)))
1497
1507#define IMB_SUBMIT_JOB(_mgr) ((_mgr)->submit_job((_mgr)))
1508
1518#define IMB_SUBMIT_JOB_NOCHECK(_mgr) ((_mgr)->submit_job_nocheck((_mgr)))
1519
1527#define IMB_GET_COMPLETED_JOB(_mgr) ((_mgr)->get_completed_job((_mgr)))
1528
1536#define IMB_FLUSH_JOB(_mgr) ((_mgr)->flush_job((_mgr)))
1537
1545#define IMB_QUEUE_SIZE(_mgr) ((_mgr)->queue_size((_mgr)))
1546
1559#define IMB_GET_NEXT_BURST(_mgr, _n_jobs, _jobs) \
1560 ((_mgr)->get_next_burst((_mgr), (_n_jobs), (_jobs)))
1561
1578#define IMB_SUBMIT_BURST(_mgr, _n_jobs, _jobs) ((_mgr)->submit_burst((_mgr), (_n_jobs), (_jobs)))
1579
1594#define IMB_SUBMIT_BURST_NOCHECK(_mgr, _n_jobs, _jobs) \
1595 ((_mgr)->submit_burst_nocheck((_mgr), (_n_jobs), (_jobs)))
1596
1606#define IMB_FLUSH_BURST(_mgr, _max_jobs, _jobs) ((_mgr)->flush_burst((_mgr), (_max_jobs), (_jobs)))
1607
1620#define IMB_SUBMIT_CIPHER_BURST(_mgr, _jobs, _n_jobs, _cipher, _dir, _key_size) \
1621 ((_mgr)->submit_cipher_burst((_mgr), (_jobs), (_n_jobs), (_cipher), (_dir), (_key_size)))
1636#define IMB_SUBMIT_CIPHER_BURST_NOCHECK(_mgr, _jobs, _n_jobs, _cipher, _dir, _key_size) \
1637 ((_mgr)->submit_cipher_burst_nocheck((_mgr), (_jobs), (_n_jobs), (_cipher), (_dir), \
1638 (_key_size)))
1649#define IMB_SUBMIT_HASH_BURST(_mgr, _jobs, _n_jobs, _hash) \
1650 ((_mgr)->submit_hash_burst((_mgr), (_jobs), (_n_jobs), (_hash)))
1651
1664#define IMB_SUBMIT_HASH_BURST_NOCHECK(_mgr, _jobs, _n_jobs, _hash) \
1665 ((_mgr)->submit_hash_burst_nocheck((_mgr), (_jobs), (_n_jobs), (_hash)))
1666
1679#define IMB_SUBMIT_AEAD_BURST(_mgr, _jobs, _n_jobs, _cipher, _dir, _key_size) \
1680 ((_mgr)->submit_aead_burst((_mgr), (_jobs), (_n_jobs), (_cipher), (_dir), (_key_size)))
1695#define IMB_SUBMIT_AEAD_BURST_NOCHECK(_mgr, _jobs, _n_jobs, _cipher, _dir, _key_size) \
1696 ((_mgr)->submit_aead_burst_nocheck((_mgr), (_jobs), (_n_jobs), (_cipher), (_dir), \
1697 (_key_size)))
1698
1699/* Key expansion and generation API's */
1700
1709#define IMB_AES_KEYEXP_128(_mgr, _key, _enc_exp_key, _dec_exp_key) \
1710 ((_mgr)->keyexp_128((_key), (_enc_exp_key), (_dec_exp_key)))
1719#define IMB_AES_KEYEXP_192(_mgr, _key, _enc_exp_key, _dec_exp_key) \
1720 ((_mgr)->keyexp_192((_key), (_enc_exp_key), (_dec_exp_key)))
1729#define IMB_AES_KEYEXP_256(_mgr, _key, _enc_exp_key, _dec_exp_key) \
1730 ((_mgr)->keyexp_256((_key), (_enc_exp_key), (_dec_exp_key)))
1731
1740#define IMB_AES_CMAC_SUBKEY_GEN_128(_mgr, _exp_key, _key1, _key2) \
1741 ((_mgr)->cmac_subkey_gen_128((_exp_key), (_key1), (_key2)))
1742
1751#define IMB_AES_CMAC_SUBKEY_GEN_256(_mgr, _exp_key, _key1, _key2) \
1752 ((_mgr)->cmac_subkey_gen_256((_exp_key), (_key1), (_key2)))
1753
1763#define IMB_AES_XCBC_KEYEXP(_mgr, _key, _exp_key, _exp_key2, _exp_key3) \
1764 ((_mgr)->xcbc_keyexp((_key), (_exp_key), (_exp_key2), (_exp_key3)))
1765
1773#define IMB_DES_KEYSCHED(_mgr, _exp_key, _key) ((_mgr)->des_key_sched((_exp_key), (_key)))
1774
1775/* Hash API's */
1776
1784#define IMB_SHA1_ONE_BLOCK(_mgr, _src, _tag) ((_mgr)->sha1_one_block((_src), (_tag)))
1785
1794#define IMB_SHA1(_mgr, _src, _length, _tag) ((_mgr)->sha1((_src), (_length), (_tag)))
1806#define IMB_SHA224_ONE_BLOCK(_mgr, _src, _tag) ((_mgr)->sha224_one_block((_src), (_tag)))
1807
1816#define IMB_SHA224(_mgr, _src, _length, _tag) ((_mgr)->sha224((_src), (_length), (_tag)))
1824#define IMB_SHA256_ONE_BLOCK(_mgr, _src, _tag) ((_mgr)->sha256_one_block((_src), (_tag)))
1833#define IMB_SHA256(_mgr, _src, _length, _tag) ((_mgr)->sha256((_src), (_length), (_tag)))
1845#define IMB_SHA384_ONE_BLOCK(_mgr, _src, _tag) ((_mgr)->sha384_one_block((_src), (_tag)))
1854#define IMB_SHA384(_mgr, _src, _length, _tag) ((_mgr)->sha384((_src), (_length), (_tag)))
1862#define IMB_SHA512_ONE_BLOCK(_mgr, _src, _tag) ((_mgr)->sha512_one_block((_src), (_tag)))
1871#define IMB_SHA512(_mgr, _src, _length, _tag) ((_mgr)->sha512((_src), (_length), (_tag)))
1879#define IMB_MD5_ONE_BLOCK(_mgr, _src, _tag) ((_mgr)->md5_one_block((_src), (_tag)))
1880
1894#define IMB_AES128_CFB_ONE(_mgr, _dst, _src, _iv, _exp_key, _len) \
1895 ((_mgr)->aes128_cfb_one((_dst), (_src), (_iv), (_exp_key), (_len)))
1896
1910#define IMB_AES256_CFB_ONE(_mgr, _dst, _src, _iv, _exp_key, _len) \
1911 ((_mgr)->aes256_cfb_one((_dst), (_src), (_iv), (_exp_key), (_len)))
1912
1913/* AES-GCM API's */
1914#define IMB_AES128_GCM_ENC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, _aadl, _tag, _tagl) \
1915 ((_mgr)->gcm128_enc((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), (_aad), (_aadl), \
1916 (_tag), (_tagl)))
1917#define IMB_AES192_GCM_ENC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, _aadl, _tag, _tagl) \
1918 ((_mgr)->gcm192_enc((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), (_aad), (_aadl), \
1919 (_tag), (_tagl)))
1920#define IMB_AES256_GCM_ENC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, _aadl, _tag, _tagl) \
1921 ((_mgr)->gcm256_enc((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), (_aad), (_aadl), \
1922 (_tag), (_tagl)))
1923
1924#define IMB_AES128_GCM_DEC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, _aadl, _tag, _tagl) \
1925 ((_mgr)->gcm128_dec((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), (_aad), (_aadl), \
1926 (_tag), (_tagl)))
1927#define IMB_AES192_GCM_DEC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, _aadl, _tag, _tagl) \
1928 ((_mgr)->gcm192_dec((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), (_aad), (_aadl), \
1929 (_tag), (_tagl)))
1930#define IMB_AES256_GCM_DEC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, _aadl, _tag, _tagl) \
1931 ((_mgr)->gcm256_dec((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), (_aad), (_aadl), \
1932 (_tag), (_tagl)))
1933
1934#define IMB_AES128_GCM_INIT(_mgr, _exp_key, _ctx, _iv, _aad, _aadl) \
1935 ((_mgr)->gcm128_init((_exp_key), (_ctx), (_iv), (_aad), (_aadl)))
1936#define IMB_AES192_GCM_INIT(_mgr, _exp_key, _ctx, _iv, _aad, _aadl) \
1937 ((_mgr)->gcm192_init((_exp_key), (_ctx), (_iv), (_aad), (_aadl)))
1938#define IMB_AES256_GCM_INIT(_mgr, _exp_key, _ctx, _iv, _aad, _aadl) \
1939 ((_mgr)->gcm256_init((_exp_key), (_ctx), (_iv), (_aad), (_aadl)))
1940
1941#define IMB_AES128_GCM_INIT_VAR_IV(_mgr, _exp_key, _ctx, _iv, _ivl, _aad, _aadl) \
1942 ((_mgr)->gcm128_init_var_iv((_exp_key), (_ctx), (_iv), (_ivl), (_aad), (_aadl)))
1943#define IMB_AES192_GCM_INIT_VAR_IV(_mgr, _exp_key, _ctx, _iv, _ivl, _aad, _aadl) \
1944 ((_mgr)->gcm192_init_var_iv((_exp_key), (_ctx), (_iv), (_ivl), (_aad), (_aadl)))
1945#define IMB_AES256_GCM_INIT_VAR_IV(_mgr, _exp_key, _ctx, _iv, _ivl, _aad, _aadl) \
1946 ((_mgr)->gcm256_init_var_iv((_exp_key), (_ctx), (_iv), (_ivl), (_aad), (_aadl)))
1947
1948#define IMB_AES128_GCM_ENC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1949 ((_mgr)->gcm128_enc_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1950#define IMB_AES192_GCM_ENC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1951 ((_mgr)->gcm192_enc_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1952#define IMB_AES256_GCM_ENC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1953 ((_mgr)->gcm256_enc_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1954
1955#define IMB_AES128_GCM_DEC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1956 ((_mgr)->gcm128_dec_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1957#define IMB_AES192_GCM_DEC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1958 ((_mgr)->gcm192_dec_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1959#define IMB_AES256_GCM_DEC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1960 ((_mgr)->gcm256_dec_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1961
1962#define IMB_AES128_GCM_ENC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1963 ((_mgr)->gcm128_enc_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1964#define IMB_AES192_GCM_ENC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1965 ((_mgr)->gcm192_enc_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1966#define IMB_AES256_GCM_ENC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1967 ((_mgr)->gcm256_enc_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1968
1969#define IMB_AES128_GCM_DEC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1970 ((_mgr)->gcm128_dec_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1971#define IMB_AES192_GCM_DEC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1972 ((_mgr)->gcm192_dec_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1973#define IMB_AES256_GCM_DEC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1974 ((_mgr)->gcm256_dec_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1975
1976#define IMB_AES128_GMAC_INIT(_mgr, _exp_key, _ctx, _iv, _ivl) \
1977 ((_mgr)->gmac128_init((_exp_key), (_ctx), (_iv), (_ivl)))
1978#define IMB_AES192_GMAC_INIT(_mgr, _exp_key, _ctx, _iv, _ivl) \
1979 ((_mgr)->gmac192_init((_exp_key), (_ctx), (_iv), (_ivl)))
1980#define IMB_AES256_GMAC_INIT(_mgr, _exp_key, _ctx, _iv, _ivl) \
1981 ((_mgr)->gmac256_init((_exp_key), (_ctx), (_iv), (_ivl)))
1982
1983#define IMB_AES128_GMAC_UPDATE(_mgr, _exp_key, _ctx, _src, _len) \
1984 ((_mgr)->gmac128_update((_exp_key), (_ctx), (_src), (_len)))
1985#define IMB_AES192_GMAC_UPDATE(_mgr, _exp_key, _ctx, _src, _len) \
1986 ((_mgr)->gmac192_update((_exp_key), (_ctx), (_src), (_len)))
1987#define IMB_AES256_GMAC_UPDATE(_mgr, _exp_key, _ctx, _src, _len) \
1988 ((_mgr)->gmac256_update((_exp_key), (_ctx), (_src), (_len)))
1989
1990#define IMB_AES128_GMAC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1991 ((_mgr)->gmac128_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1992#define IMB_AES192_GMAC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1993 ((_mgr)->gmac192_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1994#define IMB_AES256_GMAC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1995 ((_mgr)->gmac256_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1996
1997#define IMB_AES128_GCM_PRECOMP(_mgr, _key) ((_mgr)->gcm128_precomp((_key)))
1998#define IMB_AES192_GCM_PRECOMP(_mgr, _key) ((_mgr)->gcm192_precomp((_key)))
1999#define IMB_AES256_GCM_PRECOMP(_mgr, _key) ((_mgr)->gcm256_precomp((_key)))
2000
2001#define IMB_AES128_GCM_PRE(_mgr, _key, _exp_key) ((_mgr)->gcm128_pre((_key), (_exp_key)))
2002#define IMB_AES192_GCM_PRE(_mgr, _key, _exp_key) ((_mgr)->gcm192_pre((_key), (_exp_key)))
2003#define IMB_AES256_GCM_PRE(_mgr, _key, _exp_key) ((_mgr)->gcm256_pre((_key), (_exp_key)))
2004
2005#define IMB_GHASH_PRE(_mgr, _key, _exp_key) ((_mgr)->ghash_pre((_key), (_exp_key)))
2006#define IMB_GHASH(_mgr, _exp_key, _src, _len, _tag, _tagl) \
2007 ((_mgr)->ghash((_exp_key), (_src), (_len), (_tag), (_tagl)))
2008
2009/* Chacha20-Poly1305 direct API's */
2010#define IMB_CHACHA20_POLY1305_INIT(_mgr, _key, _ctx, _iv, _aad, _aadl) \
2011 ((_mgr)->chacha20_poly1305_init((_key), (_ctx), (_iv), (_aad), (_aadl)))
2012
2013#define IMB_CHACHA20_POLY1305_ENC_UPDATE(_mgr, _key, _ctx, _dst, _src, _len) \
2014 ((_mgr)->chacha20_poly1305_enc_update((_key), (_ctx), (_dst), (_src), (_len)))
2015#define IMB_CHACHA20_POLY1305_DEC_UPDATE(_mgr, _key, _ctx, _dst, _src, _len) \
2016 ((_mgr)->chacha20_poly1305_dec_update((_key), (_ctx), (_dst), (_src), (_len)))
2017
2018#define IMB_CHACHA20_POLY1305_ENC_FINALIZE(_mgr, _ctx, _tag, _tagl) \
2019 ((_mgr)->chacha20_poly1305_finalize((_ctx), (_tag), (_tagl)))
2020
2021#define IMB_CHACHA20_POLY1305_DEC_FINALIZE(_mgr, _ctx, _tag, _tagl) \
2022 ((_mgr)->chacha20_poly1305_finalize((_ctx), (_tag), (_tagl)))
2023
2024/* ZUC EEA3/EIA3 functions */
2025
2038#define IMB_ZUC_EEA3_1_BUFFER(_mgr, _key, _iv, _src, _dst, _len) \
2039 ((_mgr)->eea3_1_buffer((_key), (_iv), (_src), (_dst), (_len)))
2043#define IMB_ZUC_EEA3_4_BUFFER(_mgr, _key, _iv, _src, _dst, _len) \
2044 ((_mgr)->eea3_4_buffer((_key), (_iv), (_src), (_dst), (_len)))
2048#define IMB_ZUC_EEA3_N_BUFFER(_mgr, _key, _iv, _src, _dst, _len, _count) \
2049 ((_mgr)->eea3_n_buffer((_key), (_iv), (_src), (_dst), (_len), (_count)))
2050
2063#define IMB_ZUC_EIA3_1_BUFFER(_mgr, _key, _iv, _src, _len, _tag) \
2064 ((_mgr)->eia3_1_buffer((_key), (_iv), (_src), (_len), (_tag)))
2068#define IMB_ZUC_EIA3_N_BUFFER(_mgr, _key, _iv, _src, _len, _tag, _count) \
2069 ((_mgr)->eia3_n_buffer((_key), (_iv), (_src), (_len), (_tag), (_count)))
2070
2071/* KASUMI F8/F9 functions */
2072
2090#define IMB_KASUMI_F8_1_BUFFER(_mgr, _exp_key, _iv, _src, _dst, _len) \
2091 ((_mgr)->f8_1_buffer((_exp_key), (_iv), (_src), (_dst), (_len)))
2092
2111#define IMB_KASUMI_F8_1_BUFFER_BIT(_mgr, _exp_key, _iv, _src, _dst, _len, _offset) \
2112 ((_mgr)->f8_1_buffer_bit((_exp_key), (_iv), (_src), (_dst), (_len), (_offset)))
2113
2135#define IMB_KASUMI_F8_2_BUFFER(_mgr, _exp_key, _iv1, _iv2, _src1, _dst1, _len1, _src2, _dst2, \
2136 _len2) \
2137 ((_mgr)->f8_2_buffer((_exp_key), (_iv1), (_iv2), (_src1), (_dst1), (_len1), (_src2), \
2138 (_dst2), (_len2)))
2162#define IMB_KASUMI_F8_3_BUFFER(_mgr, _exp_key, _iv1, _iv2, _iv3, _src1, _dst1, _src2, _dst2, \
2163 _src3, _dst3, _len) \
2164 ((_mgr)->f8_3_buffer((_exp_key), (_iv1), (_iv2), (_iv3), (_src1), (_dst1), (_src2), \
2165 (_dst2), (_src3), (_dst3), (_len)))
2192#define IMB_KASUMI_F8_4_BUFFER(_mgr, _exp_key, _iv1, _iv2, _iv3, _iv4, _src1, _dst1, _src2, _dst2, \
2193 _src3, _dst3, _src4, _dst4, _len) \
2194 ((_mgr)->f8_4_buffer((_exp_key), (_iv1), (_iv2), (_iv3), (_iv4), (_src1), (_dst1), \
2195 (_src2), (_dst2), (_src3), (_dst3), (_src4), (_dst4), (_len)))
2213#define IMB_KASUMI_F8_N_BUFFER(_mgr, _exp_key, _iv, _src, _dst, _len, _count) \
2214 ((_mgr)->f8_n_buffer((_exp_key), (_iv), (_src), (_dst), (_len), (_count)))
2232#define IMB_KASUMI_F9_1_BUFFER(_mgr, _exp_key, _src, _len, _tag) \
2233 ((_mgr)->f9_1_buffer((_exp_key), (_src), (_len), (_tag)))
2234
2251#define IMB_KASUMI_F9_1_BUFFER_USER(_mgr, _exp_key, _iv, _src, _len, _tag, _dir) \
2252 ((_mgr)->f9_1_buffer_user((_exp_key), (_iv), (_src), (_len), (_tag), (_dir)))
2253
2263#define IMB_KASUMI_INIT_F8_KEY_SCHED(_mgr, _key, _exp_key) \
2264 ((_mgr)->kasumi_init_f8_key_sched((_key), (_exp_key)))
2265
2275#define IMB_KASUMI_INIT_F9_KEY_SCHED(_mgr, _key, _exp_key) \
2276 ((_mgr)->kasumi_init_f9_key_sched((_key), (_exp_key)))
2277
2287#define IMB_KASUMI_KEY_SCHED_SIZE(_mgr) ((_mgr)->kasumi_key_sched_size())
2288
2289/* SNOW3G F8/F9 functions */
2290
2308#define IMB_SNOW3G_F8_1_BUFFER_BIT(_mgr, _exp_key, _iv, _src, _dst, _len, _offset) \
2309 ((_mgr)->snow3g_f8_1_buffer_bit((_exp_key), (_iv), (_src), (_dst), (_len), (_offset)))
2310
2327#define IMB_SNOW3G_F8_1_BUFFER(_mgr, _exp_key, _iv, _src, _dst, _len) \
2328 ((_mgr)->snow3g_f8_1_buffer((_exp_key), (_iv), (_src), (_dst), (_len)))
2329
2348#define IMB_SNOW3G_F8_2_BUFFER(_mgr, _exp_key, _iv1, _iv2, _src1, _dst1, _len1, _src2, _dst2, \
2349 _len2) \
2350 ((_mgr)->snow3g_f8_2_buffer((_exp_key), (_iv1), (_iv2), (_src1), (_dst1), (_len1), \
2351 (_src2), (_dst2), (_len2)))
2352
2380#define IMB_SNOW3G_F8_4_BUFFER(_mgr, _exp_key, _iv1, _iv2, _iv3, _iv4, _src1, _dst1, _len1, _src2, \
2381 _dst2, _len2, _src3, _dst3, _len3, _src4, _dst4, _len4) \
2382 ((_mgr)->snow3g_f8_4_buffer((_exp_key), (_iv1), (_iv2), (_iv3), (_iv4), (_src1), (_dst1), \
2383 (_len1), (_src2), (_dst2), (_len2), (_src3), (_dst3), (_len3), \
2384 (_src4), (_dst4), (_len4)))
2385
2429#define IMB_SNOW3G_F8_8_BUFFER(_mgr, _exp_key, _iv1, _iv2, _iv3, _iv4, _iv5, _iv6, _iv7, _iv8, \
2430 _src1, _dst1, _len1, _src2, _dst2, _len2, _src3, _dst3, _len3, \
2431 _src4, _dst4, _len4, _src5, _dst5, _len5, _src6, _dst6, _len6, \
2432 _src7, _dst7, _len7, _src8, _dst8, _len8) \
2433 ((_mgr)->snow3g_f8_8_buffer((_exp_key), (_iv1), (_iv2), (_iv3), (_iv4), (_iv5), (_iv6), \
2434 (_iv7), (_iv8), (_src1), (_dst1), (_len1), (_src2), (_dst2), \
2435 (_len2), (_src3), (_dst3), (_len3), (_src4), (_dst4), (_len4), \
2436 (_src5), (_dst5), (_len5), (_src6), (_dst6), (_len6), (_src7), \
2437 (_dst7), (_len7), (_src8), (_dst8), (_len8)))
2453#define IMB_SNOW3G_F8_8_BUFFER_MULTIKEY(_mgr, _exp_key, _iv, _src, _dst, _len) \
2454 ((_mgr)->snow3g_f8_8_buffer_multikey((_exp_key), (_iv), (_src), (_dst), (_len)))
2455
2472#define IMB_SNOW3G_F8_N_BUFFER(_mgr, _exp_key, _iv, _src, _dst, _len, _count) \
2473 ((_mgr)->snow3g_f8_n_buffer((_exp_key), (_iv), (_src), (_dst), (_len), (_count)))
2474
2491#define IMB_SNOW3G_F8_N_BUFFER_MULTIKEY(_mgr, _exp_key, _iv, _src, _dst, _len, _count) \
2492 ((_mgr)->snow3g_f8_n_buffer_multikey((_exp_key), (_iv), (_src), (_dst), (_len), (_count)))
2493
2511#define IMB_SNOW3G_F9_1_BUFFER(_mgr, _exp_key, _iv, _src, _len, _tag) \
2512 ((_mgr)->snow3g_f9_1_buffer((_exp_key), (_iv), (_src), (_len), (_tag)))
2513
2524#define IMB_SNOW3G_INIT_KEY_SCHED(_mgr, _key, _exp_key) \
2525 ((_mgr)->snow3g_init_key_sched((_key), (_exp_key)))
2526
2536#define IMB_SNOW3G_KEY_SCHED_SIZE(_mgr) ((_mgr)->snow3g_key_sched_size())
2537
2546#define IMB_HEC_32(_mgr, _src) ((_mgr)->hec_32(_src))
2547
2556#define IMB_HEC_64(_mgr, _src) ((_mgr)->hec_64(_src))
2557
2561#define IMB_CRC32_ETHERNET_FCS(_mgr, _src, _len) (_mgr)->crc32_ethernet_fcs(_src, _len)
2562
2566#define IMB_CRC16_X25(_mgr, _src, _len) (_mgr)->crc16_x25(_src, _len)
2567
2571#define IMB_CRC32_SCTP(_mgr, _src, _len) (_mgr)->crc32_sctp(_src, _len)
2572
2576#define IMB_CRC24_LTE_A(_mgr, _src, _len) (_mgr)->crc24_lte_a(_src, _len)
2577
2581#define IMB_CRC24_LTE_B(_mgr, _src, _len) (_mgr)->crc24_lte_b(_src, _len)
2582
2586#define IMB_CRC16_FP_DATA(_mgr, _src, _len) (_mgr)->crc16_fp_data(_src, _len)
2587
2591#define IMB_CRC11_FP_HEADER(_mgr, _src, _len) (_mgr)->crc11_fp_header(_src, _len)
2592
2596#define IMB_CRC7_FP_HEADER(_mgr, _src, _len) (_mgr)->crc7_fp_header(_src, _len)
2597
2601#define IMB_CRC10_IUUP_DATA(_mgr, _src, _len) (_mgr)->crc10_iuup_data(_src, _len)
2602
2606#define IMB_CRC6_IUUP_HEADER(_mgr, _src, _len) (_mgr)->crc6_iuup_header(_src, _len)
2607
2611#define IMB_CRC32_WIMAX_OFDMA_DATA(_mgr, _src, _len) (_mgr)->crc32_wimax_ofdma_data(_src, _len)
2612
2616#define IMB_CRC8_WIMAX_OFDMA_HCS(_mgr, _src, _len) (_mgr)->crc8_wimax_ofdma_hcs(_src, _len)
2617
2626#define IMB_SM4_KEYEXP(_mgr, _key, _exp_enc_key, _exp_dec_key) \
2627 ((_mgr)->sm4_keyexp((_key), (_exp_enc_key), (_exp_dec_key)))
2628
2636IMB_DLL_EXPORT void
2637imb_sm4_gcm_pre(IMB_MGR *mb_mgr, const void *key, struct gcm_key_data *key_data);
2638
2639/* Auxiliary functions */
2640
2654des_key_schedule(uint64_t *ks, const void *key);
2655
2666IMB_DLL_EXPORT void
2667imb_hmac_ipad_opad(IMB_MGR *mb_mgr, const IMB_HASH_ALG sha_type, const void *pkey,
2668 const size_t key_len, void *ipad_hash, void *opad_hash);
2669
2682IMB_DLL_EXPORT void
2683des_cfb_one(void *out, const void *in, const uint64_t *iv, const uint64_t *ks, const int len);
2684
2691IMB_DLL_EXPORT void
2692md5_one_block_sse(const void *data, void *digest);
2696IMB_DLL_EXPORT void
2697md5_one_block_avx2(const void *data, void *digest);
2701IMB_DLL_EXPORT void
2702md5_one_block_avx512(const void *data, void *digest);
2703
2711IMB_DLL_EXPORT void
2712aes_keyexp_128_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2716IMB_DLL_EXPORT void
2717aes_keyexp_128_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2721IMB_DLL_EXPORT void
2722aes_keyexp_128_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2726IMB_DLL_EXPORT void
2727aes_keyexp_128_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2728
2736IMB_DLL_EXPORT void
2737aes_keyexp_192_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2741IMB_DLL_EXPORT void
2742aes_keyexp_192_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2746IMB_DLL_EXPORT void
2747aes_keyexp_192_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2751IMB_DLL_EXPORT void
2752aes_keyexp_192_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2753
2761IMB_DLL_EXPORT void
2762aes_keyexp_256_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2766IMB_DLL_EXPORT void
2767aes_keyexp_256_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2771IMB_DLL_EXPORT void
2772aes_keyexp_256_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2776IMB_DLL_EXPORT void
2777aes_keyexp_256_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2778
2785IMB_DLL_EXPORT void
2786aes_keyexp_128_enc_sse(const void *key, void *enc_exp_keys);
2790IMB_DLL_EXPORT void
2791aes_keyexp_128_enc_avx(const void *key, void *enc_exp_keys);
2795IMB_DLL_EXPORT void
2796aes_keyexp_128_enc_avx2(const void *key, void *enc_exp_keys);
2800IMB_DLL_EXPORT void
2801aes_keyexp_128_enc_avx512(const void *key, void *enc_exp_keys);
2802
2809IMB_DLL_EXPORT void
2810aes_keyexp_192_enc_sse(const void *key, void *enc_exp_keys);
2814IMB_DLL_EXPORT void
2815aes_keyexp_192_enc_avx(const void *key, void *enc_exp_keys);
2819IMB_DLL_EXPORT void
2820aes_keyexp_192_enc_avx2(const void *key, void *enc_exp_keys);
2824IMB_DLL_EXPORT void
2825aes_keyexp_192_enc_avx512(const void *key, void *enc_exp_keys);
2826
2833IMB_DLL_EXPORT void
2834aes_keyexp_256_enc_sse(const void *key, void *enc_exp_keys);
2838IMB_DLL_EXPORT void
2839aes_keyexp_256_enc_avx(const void *key, void *enc_exp_keys);
2843IMB_DLL_EXPORT void
2844aes_keyexp_256_enc_avx2(const void *key, void *enc_exp_keys);
2848IMB_DLL_EXPORT void
2849aes_keyexp_256_enc_avx512(const void *key, void *enc_exp_keys);
2850
2859IMB_DLL_EXPORT void
2860aes_xcbc_expand_key_sse(const void *key, void *k1_exp, void *k2, void *k3);
2864IMB_DLL_EXPORT void
2865aes_xcbc_expand_key_avx(const void *key, void *k1_exp, void *k2, void *k3);
2869IMB_DLL_EXPORT void
2870aes_xcbc_expand_key_avx2(const void *key, void *k1_exp, void *k2, void *k3);
2874IMB_DLL_EXPORT void
2875aes_xcbc_expand_key_avx512(const void *key, void *k1_exp, void *k2, void *k3);
2876
2884IMB_DLL_EXPORT void
2885aes_cmac_subkey_gen_sse(const void *key_exp, void *key1, void *key2);
2889IMB_DLL_EXPORT void
2890aes_cmac_subkey_gen_avx(const void *key_exp, void *key1, void *key2);
2894IMB_DLL_EXPORT void
2895aes_cmac_subkey_gen_avx2(const void *key_exp, void *key1, void *key2);
2899IMB_DLL_EXPORT void
2900aes_cmac_subkey_gen_avx512(const void *key_exp, void *key1, void *key2);
2901
2902/*
2903 * Direct GCM API.
2904 * Note that GCM is also available through job API.
2905 */
2906
2925IMB_DLL_EXPORT void
2926aes_gcm_enc_128_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
2927 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
2928 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len);
2932IMB_DLL_EXPORT void
2933aes_gcm_enc_128_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
2934 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
2935 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag,
2936 uint64_t auth_tag_len);
2955IMB_DLL_EXPORT void
2956aes_gcm_enc_192_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
2957 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
2958 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len);
2962IMB_DLL_EXPORT void
2963aes_gcm_enc_192_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
2964 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
2965 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag,
2966 uint64_t auth_tag_len);
2967
2986IMB_DLL_EXPORT void
2987aes_gcm_enc_256_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
2988 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
2989 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len);
2993IMB_DLL_EXPORT void
2994aes_gcm_enc_256_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
2995 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
2996 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag,
2997 uint64_t auth_tag_len);
2998
3017IMB_DLL_EXPORT void
3018aes_gcm_dec_128_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3019 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
3020 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len);
3024IMB_DLL_EXPORT void
3025aes_gcm_dec_128_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3026 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
3027 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag,
3028 uint64_t auth_tag_len);
3029
3048IMB_DLL_EXPORT void
3049aes_gcm_dec_192_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3050 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
3051 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len);
3055IMB_DLL_EXPORT void
3056aes_gcm_dec_192_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3057 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
3058 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag,
3059 uint64_t auth_tag_len);
3060
3079IMB_DLL_EXPORT void
3080aes_gcm_dec_256_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3081 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
3082 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len);
3086IMB_DLL_EXPORT void
3087aes_gcm_dec_256_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3088 uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv,
3089 uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag,
3090 uint64_t auth_tag_len);
3091
3104IMB_DLL_EXPORT void
3105aes_gcm_init_128_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3106 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len);
3110IMB_DLL_EXPORT void
3112 struct gcm_context_data *context_data, const uint8_t *iv,
3113 uint8_t const *aad, uint64_t aad_len);
3126IMB_DLL_EXPORT void
3127aes_gcm_init_192_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3128 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len);
3132IMB_DLL_EXPORT void
3134 struct gcm_context_data *context_data, const uint8_t *iv,
3135 uint8_t const *aad, uint64_t aad_len);
3148IMB_DLL_EXPORT void
3149aes_gcm_init_256_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data,
3150 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len);
3154IMB_DLL_EXPORT void
3156 struct gcm_context_data *context_data, const uint8_t *iv,
3157 uint8_t const *aad, uint64_t aad_len);
3158
3168IMB_DLL_EXPORT void
3170 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3171 uint64_t len);
3175IMB_DLL_EXPORT void
3177 struct gcm_context_data *context_data, uint8_t *out,
3178 const uint8_t *in, uint64_t len);
3179
3189IMB_DLL_EXPORT void
3191 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3192 uint64_t len);
3196IMB_DLL_EXPORT void
3198 struct gcm_context_data *context_data, uint8_t *out,
3199 const uint8_t *in, uint64_t len);
3200
3210IMB_DLL_EXPORT void
3212 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3213 uint64_t len);
3217IMB_DLL_EXPORT void
3219 struct gcm_context_data *context_data, uint8_t *out,
3220 const uint8_t *in, uint64_t len);
3221
3231IMB_DLL_EXPORT void
3233 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3234 uint64_t len);
3238IMB_DLL_EXPORT void
3240 struct gcm_context_data *context_data, uint8_t *out,
3241 const uint8_t *in, uint64_t len);
3242
3252IMB_DLL_EXPORT void
3254 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3255 uint64_t len);
3259IMB_DLL_EXPORT void
3261 struct gcm_context_data *context_data, uint8_t *out,
3262 const uint8_t *in, uint64_t len);
3263
3273IMB_DLL_EXPORT void
3275 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3276 uint64_t len);
3280IMB_DLL_EXPORT void
3282 struct gcm_context_data *context_data, uint8_t *out,
3283 const uint8_t *in, uint64_t len);
3284
3295IMB_DLL_EXPORT void
3297 struct gcm_context_data *context_data, uint8_t *auth_tag,
3298 uint64_t auth_tag_len);
3302IMB_DLL_EXPORT void
3304 struct gcm_context_data *context_data, uint8_t *auth_tag,
3305 uint64_t auth_tag_len);
3306
3317IMB_DLL_EXPORT void
3319 struct gcm_context_data *context_data, uint8_t *auth_tag,
3320 uint64_t auth_tag_len);
3324IMB_DLL_EXPORT void
3326 struct gcm_context_data *context_data, uint8_t *auth_tag,
3327 uint64_t auth_tag_len);
3328
3339IMB_DLL_EXPORT void
3341 struct gcm_context_data *context_data, uint8_t *auth_tag,
3342 uint64_t auth_tag_len);
3346IMB_DLL_EXPORT void
3348 struct gcm_context_data *context_data, uint8_t *auth_tag,
3349 uint64_t auth_tag_len);
3350
3361IMB_DLL_EXPORT void
3363 struct gcm_context_data *context_data, uint8_t *auth_tag,
3364 uint64_t auth_tag_len);
3368IMB_DLL_EXPORT void
3370 struct gcm_context_data *context_data, uint8_t *auth_tag,
3371 uint64_t auth_tag_len);
3372
3383IMB_DLL_EXPORT void
3385 struct gcm_context_data *context_data, uint8_t *auth_tag,
3386 uint64_t auth_tag_len);
3390IMB_DLL_EXPORT void
3392 struct gcm_context_data *context_data, uint8_t *auth_tag,
3393 uint64_t auth_tag_len);
3394
3405IMB_DLL_EXPORT void
3407 struct gcm_context_data *context_data, uint8_t *auth_tag,
3408 uint64_t auth_tag_len);
3412IMB_DLL_EXPORT void
3414 struct gcm_context_data *context_data, uint8_t *auth_tag,
3415 uint64_t auth_tag_len);
3416
3425IMB_DLL_EXPORT void
3427
3431IMB_DLL_EXPORT void
3433
3442IMB_DLL_EXPORT void
3444
3448IMB_DLL_EXPORT void
3450
3459IMB_DLL_EXPORT void
3461
3465IMB_DLL_EXPORT void
3467
3477IMB_DLL_EXPORT void
3478aes_gcm_pre_128_sse(const void *key, struct gcm_key_data *key_data);
3482IMB_DLL_EXPORT void
3483aes_gcm_pre_128_avx_gen4(const void *key, struct gcm_key_data *key_data);
3493IMB_DLL_EXPORT void
3494aes_gcm_pre_192_sse(const void *key, struct gcm_key_data *key_data);
3498IMB_DLL_EXPORT void
3499aes_gcm_pre_192_avx_gen4(const void *key, struct gcm_key_data *key_data);
3509IMB_DLL_EXPORT void
3510aes_gcm_pre_256_sse(const void *key, struct gcm_key_data *key_data);
3514IMB_DLL_EXPORT void
3515aes_gcm_pre_256_avx_gen4(const void *key, struct gcm_key_data *key_data);
3516
3530zuc_eea3_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr);
3544zuc_eia3_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr);
3545
3559kasumi_f8_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr);
3572kasumi_f9_iv_gen(const uint32_t count, const uint32_t fresh, void *iv_ptr);
3573
3590snow3g_f8_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr);
3607snow3g_f9_iv_gen(const uint32_t count, const uint32_t fresh, const uint8_t dir, void *iv_ptr);
3614IMB_DLL_EXPORT void
3615imb_clear_mem(void *mem, const size_t size);
3616
3638IMB_DLL_EXPORT void
3639imb_quic_aes_gcm(IMB_MGR *state, const struct gcm_key_data *key_data,
3640 const IMB_KEY_SIZE_BYTES key_size, const IMB_CIPHER_DIRECTION cipher_dir,
3641 void *dst_ptr_array[], const void *const src_ptr_array[],
3642 const uint64_t len_array[], const void *const iv_ptr_array[],
3643 const void *const aad_ptr_array[], const uint64_t aad_len, void *tag_ptr_array[],
3644 const uint64_t tag_len, const uint64_t num_packets);
3645
3660IMB_DLL_EXPORT void
3661imb_quic_hp_aes_ecb(IMB_MGR *state, const void *exp_key_data, void *dst_ptr_array[],
3662 const void *const src_ptr_array[], const uint64_t num_packets,
3663 const IMB_KEY_SIZE_BYTES key_size);
3664
3682IMB_DLL_EXPORT void
3683imb_quic_chacha20_poly1305(IMB_MGR *state, const void *key, const IMB_CIPHER_DIRECTION cipher_dir,
3684 void *dst_ptr_array[], const void *const src_ptr_array[],
3685 const uint64_t len_array[], const void *const iv_ptr_array[],
3686 const void *const aad_ptr_array[], const uint64_t aad_len,
3687 void *tag_ptr_array[], const uint64_t num_packets);
3688
3702IMB_DLL_EXPORT void
3703imb_quic_hp_chacha20(IMB_MGR *state, const void *key, void *dst_ptr_array[],
3704 const void *const src_ptr_array[], const uint64_t num_packets);
3705
3745IMB_DLL_EXPORT uint32_t
3747
3762
3777imb_self_test_get_cb(IMB_MGR *state, imb_self_test_cb_t *cb_fn, void **cb_arg);
3778
3794imb_get_arch_type_string(const IMB_MGR *state, const char **arch_type, const char **description);
3795
3820imb_hash_burst_get_size(const IMB_MGR *mb_mgr, const IMB_HASH_ALG algo, unsigned *out_burst_size);
3821
3841imb_cipher_burst_get_size(const IMB_MGR *mb_mgr, const IMB_CIPHER_MODE cipher_mode,
3842 unsigned *out_burst_size);
3843
3863imb_aead_burst_get_size(const IMB_MGR *mb_mgr, const IMB_CIPHER_MODE cipher_mode,
3864 unsigned *out_burst_size);
3865
3866#ifdef __cplusplus
3867}
3868#endif
3869
3870#endif /* IMB_IPSEC_MB_H */
IMB_DLL_EXPORT void aes_gcm_enc_128_finalize_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End encryption of a AES-GCM-128 encryption message.
IMB_DLL_EXPORT IMB_JOB * get_next_job_sse(IMB_MGR *state)
Get next available job.
#define KASUMI_KEY_SCHEDULE_SIZE
Definition intel-ipsec-mb.h:562
void(* sm4_keyexp_t)(const void *, void *, void *)
Definition intel-ipsec-mb.h:882
IMB_DLL_EXPORT void aes_gcm_pre_256_avx_gen4(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-256 key data.
IMB_DLL_EXPORT void aes_gcm_dec_128_finalize_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End decryption of a AES-GCM-128 encryption message.
IMB_DLL_EXPORT void aes_gcm_init_256_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len)
Initialize a gcm_context_data structure to prepare for AES-GCM-256 Encryption.
void(* zuc_eea3_1_buffer_t)(const void *, const void *, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:779
IMB_DLL_EXPORT void aes_keyexp_192_enc_sse(const void *key, void *enc_exp_keys)
#define IMB_GCM_ENC_KEY_LEN
Definition intel-ipsec-mb.h:635
IMB_DLL_EXPORT int imb_hash_burst_get_size(const IMB_MGR *mb_mgr, const IMB_HASH_ALG algo, unsigned *out_burst_size)
Retrieves minimum burst size for good performance on hash algorithms.
IMB_DLL_EXPORT void aes_gcm_dec_192_finalize_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End decryption of a AES-GCM-192 encryption message.
void(* aes_gcm_pre_t)(const void *, struct gcm_key_data *)
Definition intel-ipsec-mb.h:761
void(* ghash_t)(const struct gcm_key_data *, const void *, const uint64_t, void *, const uint64_t)
Definition intel-ipsec-mb.h:776
IMB_DLL_EXPORT void aes_xcbc_expand_key_avx512(const void *key, void *k1_exp, void *k2, void *k3)
IMB_DLL_EXPORT void aes_gcm_dec_256_update_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Decrypt a block of a AES-GCM-256 encryption message.
IMB_DLL_EXPORT int imb_self_test_get_cb(IMB_MGR *state, imb_self_test_cb_t *cb_fn, void **cb_arg)
Retrieves details of callback function to be invoked when running a self test.
IMB_DLL_EXPORT void aes_gcm_enc_192_update_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Encrypt a block of a AES-GCM-192 encryption message.
IMB_DLL_EXPORT int imb_aead_burst_get_size(const IMB_MGR *mb_mgr, const IMB_CIPHER_MODE cipher_mode, unsigned *out_burst_size)
Retrieves minimum burst size for good performance on AEAD algorithms.
IMB_DLL_EXPORT void aes_gcm_precomp_256_sse(struct gcm_key_data *key_data)
Precomputation of AES-GCM-256 HashKey constants.
IMB_DLL_EXPORT void aes_gcm_pre_256_sse(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-256 key data.
IMB_DLL_EXPORT void imb_quic_chacha20_poly1305(IMB_MGR *state, const void *key, const IMB_CIPHER_DIRECTION cipher_dir, void *dst_ptr_array[], const void *const src_ptr_array[], const uint64_t len_array[], const void *const iv_ptr_array[], const void *const aad_ptr_array[], const uint64_t aad_len, void *tag_ptr_array[], const uint64_t num_packets)
Batch of CHACHA20-POLY1305 encrypt/decrypt operations with the same key.
void(* chacha_poly_finalize_t)(struct chacha20_poly1305_context_data *, void *, const uint64_t)
Definition intel-ipsec-mb.h:774
IMB_JOB *(* chacha20_poly1305_quic_t)(struct IMB_MGR *, IMB_JOB *)
Definition intel-ipsec-mb.h:878
IMB_DLL_EXPORT void aes_keyexp_192_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_KEY_SIZE_BYTES
Definition intel-ipsec-mb.h:358
@ IMB_KEY_192_BYTES
Definition intel-ipsec-mb.h:361
@ IMB_KEY_64_BYTES
Definition intel-ipsec-mb.h:359
@ IMB_KEY_256_BYTES
Definition intel-ipsec-mb.h:362
@ IMB_KEY_128_BYTES
Definition intel-ipsec-mb.h:360
IMB_DLL_EXPORT void aes_keyexp_256_enc_avx(const void *key, void *enc_exp_keys)
IMB_DLL_EXPORT void aes_gcm_dec_128_update_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Decrypt a block of a AES-GCM-128 encryption message.
IMB_DLL_EXPORT void free_mb_mgr(IMB_MGR *ptr)
Frees memory allocated previously by alloc_mb_mgr()
IMB_DLL_EXPORT IMB_JOB * get_completed_job_sse(IMB_MGR *state)
Get next completed job.
IMB_DLL_EXPORT void aes_keyexp_128_enc_sse(const void *key, void *enc_exp_keys)
void(* snow3g_f8_1_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:827
IMB_DLL_EXPORT void init_mb_mgr_sse(IMB_MGR *state)
Initialize Multi-Buffer Manager structure.
IMB_DLL_EXPORT void init_mb_mgr_auto(IMB_MGR *state, IMB_ARCH *arch)
Automatically initialize most performant Multi-buffer manager based on CPU features.
IMB_DLL_EXPORT int snow3g_f8_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr)
Generation of SNOW3G F8 Initialization Vector.
void(* zuc_eea3_n_buffer_t)(const void *const *, const void *const *, const void *const *, void **, const uint32_t *, const uint32_t)
Definition intel-ipsec-mb.h:785
void(* aes_gmac_init_t)(const struct gcm_key_data *, struct gcm_context_data *, const uint8_t *, const uint64_t)
Definition intel-ipsec-mb.h:763
#define IMB_CHACHA20_POLY1305_KEY_SIZE
Definition intel-ipsec-mb.h:167
IMB_DLL_EXPORT void aes_keyexp_128_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_DLL_EXPORT IMB_JOB * submit_job_nocheck_sse(IMB_MGR *state)
Submit job for processing without validating.
IMB_DLL_EXPORT void aes_keyexp_256_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_DLL_EXPORT int kasumi_f8_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr)
Generation of KASUMI F8 Initialization Vector.
IMB_DLL_EXPORT IMB_MGR * imb_set_pointers_mb_mgr(void *ptr, const uint64_t flags, const unsigned reset_mgr)
Initializes IMB_MGR pointers to out-of-order managers with use of externally allocated memory.
IMB_DLL_EXPORT void aes_keyexp_192_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_CIPHER_MODE
Definition intel-ipsec-mb.h:265
@ IMB_CIPHER_DES
Definition intel-ipsec-mb.h:273
@ IMB_CIPHER_NULL
Definition intel-ipsec-mb.h:269
@ IMB_CIPHER_CBC
Definition intel-ipsec-mb.h:266
@ IMB_CIPHER_GCM
Definition intel-ipsec-mb.h:271
@ IMB_CIPHER_ECB
Definition intel-ipsec-mb.h:279
@ IMB_CIPHER_ZUC_EEA3
Definition intel-ipsec-mb.h:282
@ IMB_CIPHER_CHACHA20
Definition intel-ipsec-mb.h:286
@ IMB_CIPHER_KASUMI_UEA1_BITLEN
Definition intel-ipsec-mb.h:284
@ IMB_CIPHER_CHACHA20_POLY1305_SGL
Definition intel-ipsec-mb.h:288
@ IMB_CIPHER_CUSTOM
Definition intel-ipsec-mb.h:272
@ IMB_CIPHER_GCM_SGL
Definition intel-ipsec-mb.h:291
@ IMB_CIPHER_CNTR
Definition intel-ipsec-mb.h:267
@ IMB_CIPHER_PON_AES_CTR
Definition intel-ipsec-mb.h:278
@ IMB_CIPHER_DES3
Definition intel-ipsec-mb.h:276
@ IMB_CIPHER_CNTR_BITLEN
Definition intel-ipsec-mb.h:280
@ IMB_CIPHER_CBCS_1_9
Definition intel-ipsec-mb.h:285
@ IMB_CIPHER_NUM
Definition intel-ipsec-mb.h:298
@ IMB_CIPHER_SM4_ECB
Definition intel-ipsec-mb.h:292
@ IMB_CIPHER_CCM
Definition intel-ipsec-mb.h:275
@ IMB_CIPHER_SNOW3G_UEA2_BITLEN
Definition intel-ipsec-mb.h:283
@ IMB_CIPHER_PON_AES_CNTR
Definition intel-ipsec-mb.h:277
@ IMB_CIPHER_SM4_CNTR
Definition intel-ipsec-mb.h:295
@ IMB_CIPHER_SM4_GCM
Definition intel-ipsec-mb.h:297
@ IMB_CIPHER_CHACHA20_POLY1305
Definition intel-ipsec-mb.h:287
@ IMB_CIPHER_SM4_CTR
Definition intel-ipsec-mb.h:296
@ IMB_CIPHER_SM4_CBC
Definition intel-ipsec-mb.h:293
@ IMB_CIPHER_SNOW_V_AEAD
Definition intel-ipsec-mb.h:290
@ IMB_CIPHER_CTR
Definition intel-ipsec-mb.h:268
@ IMB_CIPHER_CFB
Definition intel-ipsec-mb.h:294
@ IMB_CIPHER_CTR_BITLEN
Definition intel-ipsec-mb.h:281
@ IMB_CIPHER_DOCSIS_SEC_BPI
Definition intel-ipsec-mb.h:270
@ IMB_CIPHER_DOCSIS_DES
Definition intel-ipsec-mb.h:274
@ IMB_CIPHER_SNOW_V
Definition intel-ipsec-mb.h:289
IMB_DLL_EXPORT void imb_hmac_ipad_opad(IMB_MGR *mb_mgr, const IMB_HASH_ALG sha_type, const void *pkey, const size_t key_len, void *ipad_hash, void *opad_hash)
Ipad Opad padding for HMAC.
IMB_DLL_EXPORT void aes_gcm_pre_128_avx_gen4(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-128 key data.
IMB_DLL_EXPORT void imb_quic_hp_chacha20(IMB_MGR *state, const void *key, void *dst_ptr_array[], const void *const src_ptr_array[], const uint64_t num_packets)
Batch of ChaCha20 encrypt operations with the same key.
IMB_DLL_EXPORT IMB_JOB * get_next_job_avx512(IMB_MGR *state)
Get next available job.
IMB_JOB *(* submit_job_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:726
void(* chacha_poly_enc_dec_update_t)(const void *, struct chacha20_poly1305_context_data *, void *, const void *, const uint64_t)
Definition intel-ipsec-mb.h:772
IMB_DLL_EXPORT void aes_gcm_dec_128_update_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Decrypt a block of a AES-GCM-128 encryption message.
IMB_DLL_EXPORT const char * imb_get_version_str(void)
Get library version in string format.
IMB_DLL_EXPORT void aes_keyexp_192_enc_avx2(const void *key, void *enc_exp_keys)
IMB_DLL_EXPORT void aes_gcm_enc_256_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-256 Encryption.
IMB_DLL_EXPORT void aes_gcm_precomp_128_sse(struct gcm_key_data *key_data)
Precomputation of AES-GCM-128 HashKey constants.
IMB_DLL_EXPORT void aes_gcm_enc_192_update_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Encrypt a block of a AES-GCM-192 encryption message.
IMB_DLL_EXPORT int imb_self_test_set_cb(IMB_MGR *state, imb_self_test_cb_t cb_fn, void *cb_arg)
Sets callback function to be invoked when running a self test.
IMB_DLL_EXPORT int zuc_eea3_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr)
Generation of ZUC-EEA3 Initialization Vector.
IMB_DLL_EXPORT IMB_JOB * get_next_job_avx2(IMB_MGR *state)
Get next available job.
IMB_CHAIN_ORDER
Definition intel-ipsec-mb.h:356
@ IMB_ORDER_HASH_CIPHER
Definition intel-ipsec-mb.h:356
@ IMB_ORDER_CIPHER_HASH
Definition intel-ipsec-mb.h:356
void(* chacha_poly_init_t)(const void *, struct chacha20_poly1305_context_data *, const void *, const void *, const uint64_t)
Definition intel-ipsec-mb.h:770
IMB_DLL_EXPORT void aes_cmac_subkey_gen_sse(const void *key_exp, void *key1, void *key2)
void(* snow3g_f8_2_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *, const void *, void *, const uint32_t, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:833
uint32_t(* submit_hash_burst_t)(struct IMB_MGR *, struct IMB_JOB *, const uint32_t, const IMB_HASH_ALG hash)
Definition intel-ipsec-mb.h:735
IMB_DLL_EXPORT void aes_gcm_enc_192_finalize_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End encryption of a AES-GCM-192 encryption message.
IMB_DLL_EXPORT void aes_keyexp_128_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_DLL_EXPORT void aes_keyexp_256_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys)
void(* kasumi_f8_n_buffer_t)(const kasumi_key_sched_t *, const uint64_t *, const void *const *, void **, const uint32_t *, const uint32_t)
Definition intel-ipsec-mb.h:808
IMB_DLL_EXPORT uint32_t queue_size_avx512(IMB_MGR *state)
Get number of jobs queued to be processed.
IMB_DLL_EXPORT void aes_gcm_enc_256_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-256 Encryption.
IMB_DLL_EXPORT void aes_keyexp_192_enc_avx(const void *key, void *enc_exp_keys)
void(* kasumi_f8_3_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const uint64_t, const uint64_t, const void *, void *, const void *, void *, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:801
uint32_t(* crc32_fn_t)(const void *, const uint64_t)
Definition intel-ipsec-mb.h:874
IMB_DLL_EXPORT int imb_cipher_burst_get_size(const IMB_MGR *mb_mgr, const IMB_CIPHER_MODE cipher_mode, unsigned *out_burst_size)
Retrieves minimum burst size for good performance on cipher algorithms.
IMB_DLL_EXPORT void aes_gcm_dec_192_update_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Decrypt a block of a AES-GCM-192 encryption message.
#define IMB_GCM_BLOCK_LEN
Definition intel-ipsec-mb.h:574
IMB_JOB *(* get_next_job_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:725
IMB_DLL_EXPORT IMB_JOB * submit_job_nocheck_avx512(IMB_MGR *state)
Submit job for processing without validating.
IMB_DLL_EXPORT void aes_keyexp_256_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_DLL_EXPORT void aes_gcm_init_192_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len)
Initialize a gcm_context_data structure to prepare for AES-GCM-192 Encryption.
IMB_DLL_EXPORT void aes_gcm_dec_192_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-192 Decryption.
IMB_DLL_EXPORT void aes_gcm_pre_128_sse(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-128 key data.
IMB_DLL_EXPORT void aes_gcm_enc_192_finalize_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End encryption of a AES-GCM-192 encryption message.
#define IMB_POLY1305_BLOCK_SIZE
Definition intel-ipsec-mb.h:169
int(* des_keysched_t)(uint64_t *, const void *)
Definition intel-ipsec-mb.h:742
void(* keyexp_t)(const void *, void *, void *)
Definition intel-ipsec-mb.h:737
void(* snow3g_f8_8_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *, const void *, const void *, const void *, const void *, const void *, const void *, const void *, void *, const uint32_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:843
IMB_DLL_EXPORT void aes_gcm_dec_192_update_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Decrypt a block of a AES-GCM-192 encryption message.
IMB_DLL_EXPORT const char * imb_get_strerror(int errnum)
API to get description for errnum.
IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx(const void *key_exp, void *key1, void *key2)
void(* aes_gcm_init_var_iv_t)(const struct gcm_key_data *, struct gcm_context_data *, const uint8_t *, const uint64_t, const uint8_t *, const uint64_t)
Definition intel-ipsec-mb.h:753
#define IMB_CHACHA20_POLY1305_IV_SIZE
Definition intel-ipsec-mb.h:168
IMB_DLL_EXPORT void aes_keyexp_128_enc_avx512(const void *key, void *enc_exp_keys)
IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx2(const void *key_exp, void *key1, void *key2)
IMB_DLL_EXPORT IMB_JOB * get_completed_job_avx512(IMB_MGR *state)
Get next completed job.
IMB_DLL_EXPORT void imb_sm4_gcm_pre(IMB_MGR *mb_mgr, const void *key, struct gcm_key_data *key_data)
IMB_SGL_STATE
Definition intel-ipsec-mb.h:365
@ IMB_SGL_UPDATE
Definition intel-ipsec-mb.h:365
@ IMB_SGL_ALL
Definition intel-ipsec-mb.h:365
@ IMB_SGL_COMPLETE
Definition intel-ipsec-mb.h:365
@ IMB_SGL_INIT
Definition intel-ipsec-mb.h:365
IMB_DLL_EXPORT void aes_gcm_precomp_192_avx_gen4(struct gcm_key_data *key_data)
Precomputation of AES-GCM-192 HashKey constants.
int(* imb_self_test_cb_t)(void *cb_arg, const IMB_SELF_TEST_CALLBACK_DATA *data)
Definition intel-ipsec-mb.h:891
IMB_DLL_EXPORT void des_cfb_one(void *out, const void *in, const uint64_t *iv, const uint64_t *ks, const int len)
DES-CFB Encrypt/Decrypt up to one block.
IMB_DLL_EXPORT void init_mb_mgr_avx2(IMB_MGR *state)
Initialize Multi-Buffer Manager structure.
void(* aes_gcm_enc_dec_t)(const struct gcm_key_data *, struct gcm_context_data *, uint8_t *, uint8_t const *, uint64_t, const uint8_t *, uint8_t const *, uint64_t, uint8_t *, uint64_t)
Definition intel-ipsec-mb.h:744
IMB_DLL_EXPORT uint64_t imb_get_feature_flags(void)
Retrieves the bitmask with the features supported by the library, without having to allocate/initiali...
IMB_DLL_EXPORT void aes_keyexp_192_enc_avx512(const void *key, void *enc_exp_keys)
IMB_DLL_EXPORT IMB_JOB * submit_job_nocheck_avx2(IMB_MGR *state)
Submit job for processing without validating.
IMB_DLL_EXPORT void aes_gcm_precomp_192_sse(struct gcm_key_data *key_data)
Precomputation of AES-GCM-192 HashKey constants.
IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx512(const void *key_exp, void *key1, void *key2)
#define IMB_GCM_KEY_SETS
Definition intel-ipsec-mb.h:636
IMB_DLL_EXPORT void aes_keyexp_256_enc_avx2(const void *key, void *enc_exp_keys)
IMB_DLL_EXPORT void aes_gcm_init_192_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len)
Initialize a gcm_context_data structure to prepare for AES-GCM-192 Encryption.
IMB_DLL_EXPORT IMB_JOB * submit_job_avx512(IMB_MGR *state)
Submit job for processing after validating.
IMB_DLL_EXPORT void aes_keyexp_192_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_DLL_EXPORT IMB_JOB * submit_job_sse(IMB_MGR *state)
Submit job for processing after validating.
IMB_DLL_EXPORT void aes_gcm_dec_256_finalize_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End decryption of a AES-GCM-256 encryption message.
IMB_DLL_EXPORT int imb_get_errno(IMB_MGR *mb_mgr)
API to get error status.
IMB_DLL_EXPORT void aes_gcm_enc_128_update_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Encrypt a block of a AES-GCM-128 encryption message.
void(* snow3g_f8_1_buffer_bit_t)(const snow3g_key_schedule_t *, const void *, const void *, void *, const uint32_t, const uint32_t)
Definition intel-ipsec-mb.h:830
int(* kasumi_init_f8_key_sched_t)(const void *, kasumi_key_sched_t *)
Definition intel-ipsec-mb.h:815
void(* zuc_eea3_4_buffer_t)(const void *const *, const void *const *, const void *const *, void **, const uint32_t *)
Definition intel-ipsec-mb.h:782
IMB_DLL_EXPORT uint32_t queue_size_sse(IMB_MGR *state)
Get number of jobs queued to be processed.
void(* kasumi_f8_1_buffer_bit_t)(const kasumi_key_sched_t *, const uint64_t, const void *, void *, const uint32_t, const uint32_t)
Definition intel-ipsec-mb.h:796
struct kasumi_key_sched_s kasumi_key_sched_t
IMB_HASH_ALG
Definition intel-ipsec-mb.h:303
@ IMB_AUTH_AES_CMAC_256
Definition intel-ipsec-mb.h:330
@ IMB_AUTH_AES_XCBC
Definition intel-ipsec-mb.h:309
@ IMB_AUTH_ZUC_EIA3_BITLEN
Definition intel-ipsec-mb.h:323
@ IMB_AUTH_AES_GMAC_128
Definition intel-ipsec-mb.h:327
@ IMB_AUTH_CRC16_X25
Definition intel-ipsec-mb.h:342
@ IMB_AUTH_NULL
Definition intel-ipsec-mb.h:311
@ IMB_AUTH_PON_CRC_BIP
Definition intel-ipsec-mb.h:322
@ IMB_AUTH_SHA_224
Definition intel-ipsec-mb.h:317
@ IMB_AUTH_CRC24_LTE_A
Definition intel-ipsec-mb.h:340
@ IMB_AUTH_CRC32_ETHERNET_FCS
Definition intel-ipsec-mb.h:337
@ IMB_AUTH_KASUMI_UIA1
Definition intel-ipsec-mb.h:326
@ IMB_AUTH_HMAC_SHA_1
Definition intel-ipsec-mb.h:304
@ IMB_AUTH_SHA_256
Definition intel-ipsec-mb.h:318
@ IMB_AUTH_SNOW3G_UIA2_BITLEN
Definition intel-ipsec-mb.h:325
@ IMB_AUTH_SNOW_V_AEAD
Definition intel-ipsec-mb.h:335
@ IMB_AUTH_CRC32_SCTP
Definition intel-ipsec-mb.h:338
@ IMB_AUTH_NUM
Definition intel-ipsec-mb.h:353
@ IMB_AUTH_HMAC_SHA_256
Definition intel-ipsec-mb.h:306
@ IMB_AUTH_GHASH
Definition intel-ipsec-mb.h:349
@ IMB_AUTH_CUSTOM
Definition intel-ipsec-mb.h:313
@ IMB_AUTH_CHACHA20_POLY1305_SGL
Definition intel-ipsec-mb.h:333
@ IMB_AUTH_CRC24_LTE_B
Definition intel-ipsec-mb.h:341
@ IMB_AUTH_ZUC256_EIA3_BITLEN
Definition intel-ipsec-mb.h:334
@ IMB_AUTH_AES_CCM
Definition intel-ipsec-mb.h:314
@ IMB_AUTH_CRC6_IUUP_HEADER
Definition intel-ipsec-mb.h:348
@ IMB_AUTH_SM4_GCM
Definition intel-ipsec-mb.h:352
@ IMB_AUTH_POLY1305
Definition intel-ipsec-mb.h:331
@ IMB_AUTH_MD5
Definition intel-ipsec-mb.h:310
@ IMB_AUTH_SHA_512
Definition intel-ipsec-mb.h:320
@ IMB_AUTH_AES_GMAC
Definition intel-ipsec-mb.h:312
@ IMB_AUTH_CRC16_FP_DATA
Definition intel-ipsec-mb.h:343
@ IMB_AUTH_AES_CMAC_BITLEN
Definition intel-ipsec-mb.h:321
@ IMB_AUTH_CRC11_FP_HEADER
Definition intel-ipsec-mb.h:344
@ IMB_AUTH_CHACHA20_POLY1305
Definition intel-ipsec-mb.h:332
@ IMB_AUTH_CRC7_FP_HEADER
Definition intel-ipsec-mb.h:347
@ IMB_AUTH_HMAC_SM3
Definition intel-ipsec-mb.h:351
@ IMB_AUTH_CRC10_IUUP_DATA
Definition intel-ipsec-mb.h:345
@ IMB_AUTH_HMAC_SHA_224
Definition intel-ipsec-mb.h:305
@ IMB_AUTH_CRC32_WIMAX_OFDMA_DATA
Definition intel-ipsec-mb.h:339
@ IMB_AUTH_HMAC_SHA_512
Definition intel-ipsec-mb.h:308
@ IMB_AUTH_GCM_SGL
Definition intel-ipsec-mb.h:336
@ IMB_AUTH_SHA_1
Definition intel-ipsec-mb.h:316
@ IMB_AUTH_AES_GMAC_192
Definition intel-ipsec-mb.h:328
@ IMB_AUTH_DOCSIS_CRC32
Definition intel-ipsec-mb.h:324
@ IMB_AUTH_CRC8_WIMAX_OFDMA_HCS
Definition intel-ipsec-mb.h:346
@ IMB_AUTH_AES_GMAC_256
Definition intel-ipsec-mb.h:329
@ IMB_AUTH_SM3
Definition intel-ipsec-mb.h:350
@ IMB_AUTH_HMAC_SHA_384
Definition intel-ipsec-mb.h:307
@ IMB_AUTH_AES_CMAC
Definition intel-ipsec-mb.h:315
@ IMB_AUTH_SHA_384
Definition intel-ipsec-mb.h:319
IMB_DLL_EXPORT void aes_keyexp_128_enc_avx2(const void *key, void *enc_exp_keys)
IMB_DLL_EXPORT void aes_gcm_enc_256_finalize_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End encryption of a AES-GCM-256 encryption message.
void(* snow3g_f8_n_buffer_t)(const snow3g_key_schedule_t *, const void *const[], const void *const[], void *[], const uint32_t[], const uint32_t)
Definition intel-ipsec-mb.h:856
IMB_DLL_EXPORT IMB_JOB * submit_job_avx2(IMB_MGR *state)
Submit job for processing after validating.
IMB_DLL_EXPORT void imb_quic_hp_aes_ecb(IMB_MGR *state, const void *exp_key_data, void *dst_ptr_array[], const void *const src_ptr_array[], const uint64_t num_packets, const IMB_KEY_SIZE_BYTES key_size)
Batch of AES-ECB encrypt/decrypt operations with the same key.
void(* kasumi_f8_1_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:794
IMB_DLL_EXPORT uint32_t queue_size_avx2(IMB_MGR *state)
Get number of jobs queued to be processed.
void(* kasumi_f9_1_buffer_t)(const kasumi_key_sched_t *, const void *, const uint32_t, void *)
Definition intel-ipsec-mb.h:813
int(* kasumi_init_f9_key_sched_t)(const void *, kasumi_key_sched_t *)
Definition intel-ipsec-mb.h:816
IMB_DLL_EXPORT void md5_one_block_avx2(const void *data, void *digest)
void(* aes_gcm_enc_dec_finalize_t)(const struct gcm_key_data *, struct gcm_context_data *, uint8_t *, uint64_t)
Definition intel-ipsec-mb.h:758
IMB_DLL_EXPORT void aes_gcm_init_128_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len)
Initialize a gcm_context_data structure to prepare for AES-GCM-128 Encryption.
IMB_DLL_EXPORT void aes_gcm_dec_128_finalize_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End decryption of a AES-GCM-128 encryption message.
IMB_DLL_EXPORT void imb_quic_aes_gcm(IMB_MGR *state, const struct gcm_key_data *key_data, const IMB_KEY_SIZE_BYTES key_size, const IMB_CIPHER_DIRECTION cipher_dir, void *dst_ptr_array[], const void *const src_ptr_array[], const uint64_t len_array[], const void *const iv_ptr_array[], const void *const aad_ptr_array[], const uint64_t aad_len, void *tag_ptr_array[], const uint64_t tag_len, const uint64_t num_packets)
Batch of GCM encrypt/decrypt operations with the same key.
IMB_DLL_EXPORT int snow3g_f9_iv_gen(const uint32_t count, const uint32_t fresh, const uint8_t dir, void *iv_ptr)
Generation of SNOW3G F9 Initialization Vector.
void(* zuc_eia3_1_buffer_t)(const void *, const void *, const void *, const uint32_t, uint32_t *)
Definition intel-ipsec-mb.h:788
IMB_DLL_EXPORT IMB_JOB * flush_job_sse(IMB_MGR *state)
Force processing until next job in queue is completed.
#define IMB_DLL_EXPORT
Definition intel-ipsec-mb.h:80
uint32_t(* queue_size_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:729
IMB_DLL_EXPORT void init_mb_mgr_avx512(IMB_MGR *state)
Initialize Multi-Buffer Manager structure.
IMB_DLL_EXPORT int des_key_schedule(uint64_t *ks, const void *key)
DES key schedule set up.
IMB_DLL_EXPORT void aes_gcm_init_256_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len)
Initialize a gcm_context_data structure to prepare for AES-GCM-256 Encryption.
IMB_DLL_EXPORT void aes_gcm_enc_192_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-192 Encryption.
IMB_DLL_EXPORT void aes_keyexp_128_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_DLL_EXPORT void md5_one_block_sse(const void *data, void *digest)
IMB_DLL_EXPORT void aes_keyexp_256_enc_avx512(const void *key, void *enc_exp_keys)
IMB_ERR
Definition intel-ipsec-mb.h:196
@ IMB_ERR_NULL_JOB
Definition intel-ipsec-mb.h:243
@ IMB_ERR_JOB_NULL_SGL_CTX
Definition intel-ipsec-mb.h:216
@ IMB_ERR_AAD_LEN
Definition intel-ipsec-mb.h:231
@ IMB_ERR_NULL_CTX
Definition intel-ipsec-mb.h:234
@ IMB_ERR_JOB_NULL_IV
Definition intel-ipsec-mb.h:202
@ IMB_ERR_JOB_NULL_HMAC_IPAD
Definition intel-ipsec-mb.h:236
@ IMB_ERR_SELFTEST
Definition intel-ipsec-mb.h:248
@ IMB_ERR_NULL_DST
Definition intel-ipsec-mb.h:220
@ IMB_ERR_JOB_AUTH_TAG_LEN
Definition intel-ipsec-mb.h:209
@ IMB_ERR_NULL_AUTH
Definition intel-ipsec-mb.h:224
@ IMB_ERR_JOB_SRC_OFFSET
Definition intel-ipsec-mb.h:211
@ IMB_ERR_SRC_OFFSET
Definition intel-ipsec-mb.h:232
@ IMB_ERR_JOB_NULL_KEY
Definition intel-ipsec-mb.h:201
@ IMB_ERR_NULL_SRC
Definition intel-ipsec-mb.h:219
@ IMB_ERR_JOB_AAD_LEN
Definition intel-ipsec-mb.h:210
@ IMB_ERR_JOB_IV_LEN
Definition intel-ipsec-mb.h:207
@ IMB_ERR_NULL_EXP_KEY
Definition intel-ipsec-mb.h:222
@ IMB_ERR_JOB_NULL_AAD
Definition intel-ipsec-mb.h:204
@ IMB_ERR_MIN
Definition intel-ipsec-mb.h:197
@ IMB_ERR_BURST_SUITE_ID
Definition intel-ipsec-mb.h:249
@ IMB_ERR_JOB_NULL_SRC
Definition intel-ipsec-mb.h:199
@ IMB_ERR_QUEUE_SPACE
Definition intel-ipsec-mb.h:244
@ IMB_ERR_JOB_NULL_AUTH
Definition intel-ipsec-mb.h:203
@ IMB_ERR_JOB_NULL_DST
Definition intel-ipsec-mb.h:200
@ IMB_ERR_CIPH_MODE
Definition intel-ipsec-mb.h:213
@ IMB_ERR_NULL_KEY
Definition intel-ipsec-mb.h:221
@ IMB_ERR_JOB_NULL_XCBC_K1_EXP
Definition intel-ipsec-mb.h:237
@ IMB_ERR_JOB_AUTH_LEN
Definition intel-ipsec-mb.h:206
@ IMB_ERR_AUTH_TAG_LEN
Definition intel-ipsec-mb.h:230
@ IMB_ERR_JOB_NULL_GHASH_INIT_TAG
Definition intel-ipsec-mb.h:241
@ IMB_ERR_HASH_ALGO
Definition intel-ipsec-mb.h:214
@ IMB_ERR_KEY_LEN
Definition intel-ipsec-mb.h:229
@ IMB_ERR_JOB_SGL_STATE
Definition intel-ipsec-mb.h:250
@ IMB_ERR_JOB_NULL_AUTH_KEY
Definition intel-ipsec-mb.h:215
@ IMB_ERR_JOB_NULL_NEXT_IV
Definition intel-ipsec-mb.h:217
@ IMB_ERR_NULL_BURST
Definition intel-ipsec-mb.h:245
@ IMB_ERR_NULL_MBMGR
Definition intel-ipsec-mb.h:198
@ IMB_ERR_NULL_AUTH_KEY
Definition intel-ipsec-mb.h:233
@ IMB_ERR_IV_LEN
Definition intel-ipsec-mb.h:228
@ IMB_ERR_CIPH_LEN
Definition intel-ipsec-mb.h:226
@ IMB_ERR_MISSING_CPUFLAGS_INIT_MGR
Definition intel-ipsec-mb.h:242
@ IMB_ERR_MAX
Definition intel-ipsec-mb.h:252
@ IMB_ERR_JOB_CHAIN_ORDER
Definition intel-ipsec-mb.h:212
@ IMB_ERR_JOB_NULL_HMAC_OPAD
Definition intel-ipsec-mb.h:235
@ IMB_ERR_JOB_CIPH_DIR
Definition intel-ipsec-mb.h:240
@ IMB_ERR_JOB_PON_PLI
Definition intel-ipsec-mb.h:218
@ IMB_ERR_JOB_NULL_XCBC_K2
Definition intel-ipsec-mb.h:238
@ IMB_ERR_NULL_AAD
Definition intel-ipsec-mb.h:225
@ IMB_ERR_JOB_KEY_LEN
Definition intel-ipsec-mb.h:208
@ IMB_ERR_JOB_CIPH_LEN
Definition intel-ipsec-mb.h:205
@ IMB_ERR_BURST_SIZE
Definition intel-ipsec-mb.h:246
@ IMB_ERR_BURST_OOO
Definition intel-ipsec-mb.h:247
@ IMB_ERR_JOB_NULL_XCBC_K3
Definition intel-ipsec-mb.h:239
@ IMB_ERR_NULL_IV
Definition intel-ipsec-mb.h:223
@ IMB_ERR_AUTH_LEN
Definition intel-ipsec-mb.h:227
IMB_DLL_EXPORT void aes_gcm_enc_128_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-128 Encryption.
uint32_t(* hec_32_t)(const uint8_t *)
Definition intel-ipsec-mb.h:871
uint64_t(* hec_64_t)(const uint8_t *)
Definition intel-ipsec-mb.h:872
void(* cmac_subkey_gen_t)(const void *, void *, void *)
Definition intel-ipsec-mb.h:738
IMB_DLL_EXPORT void aes_gcm_enc_128_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-128 Encryption.
void(* hash_one_block_t)(const void *, void *)
Definition intel-ipsec-mb.h:739
void(* snow3g_f8_8_buffer_multikey_t)(const snow3g_key_schedule_t *const[], const void *const[], const void *const[], void *[], const uint32_t[])
Definition intel-ipsec-mb.h:852
uint32_t(* burst_fn_t)(struct IMB_MGR *, const uint32_t, struct IMB_JOB **)
Definition intel-ipsec-mb.h:730
#define IMB_MAX_JOBS
Definition intel-ipsec-mb.h:972
IMB_DLL_EXPORT void aes_gcm_dec_256_update_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Decrypt a block of a AES-GCM-256 encryption message.
void(* aes_gcm_precomp_t)(struct gcm_key_data *)
Definition intel-ipsec-mb.h:760
IMB_DLL_EXPORT void aes_gcm_pre_192_avx_gen4(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-192 key data.
IMB_DLL_EXPORT void aes_gcm_enc_256_update_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Encrypt a block of a AES-GCM-256 encryption message.
IMB_DLL_EXPORT IMB_MGR * alloc_mb_mgr(uint64_t flags)
Allocates memory for multi-buffer manager instance.
void(* aes_gmac_update_t)(const struct gcm_key_data *, struct gcm_context_data *, const uint8_t *, const uint64_t)
Definition intel-ipsec-mb.h:765
IMB_DLL_EXPORT void aes_keyexp_192_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys)
void(* xcbc_keyexp_t)(const void *, void *, void *, void *)
Definition intel-ipsec-mb.h:741
IMB_DLL_EXPORT void aes_gcm_enc_128_update_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Encrypt a block of a AES-GCM-128 encryption message.
IMB_CIPHER_DIRECTION
Definition intel-ipsec-mb.h:301
@ IMB_DIR_DECRYPT
Definition intel-ipsec-mb.h:301
@ IMB_DIR_ENCRYPT
Definition intel-ipsec-mb.h:301
IMB_DLL_EXPORT void aes_gcm_precomp_256_avx_gen4(struct gcm_key_data *key_data)
Precomputation of AES-GCM-256 HashKey constants.
IMB_DLL_EXPORT void aes_gcm_pre_192_sse(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-192 key data.
IMB_DLL_EXPORT void aes_gcm_dec_256_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-256 Decryption.
void(* kasumi_f9_1_buffer_user_t)(const kasumi_key_sched_t *, const uint64_t, const void *, const uint32_t, void *, const uint32_t)
Definition intel-ipsec-mb.h:811
IMB_DLL_EXPORT int imb_get_arch_type_string(const IMB_MGR *state, const char **arch_type, const char **description)
API to get a string with the architecture type being used.
IMB_DLL_EXPORT void aes_xcbc_expand_key_avx2(const void *key, void *k1_exp, void *k2, void *k3)
uint32_t(* submit_cipher_burst_t)(struct IMB_MGR *, struct IMB_JOB *, const uint32_t, const IMB_CIPHER_MODE cipher, const IMB_CIPHER_DIRECTION dir, const IMB_KEY_SIZE_BYTES key_size)
Definition intel-ipsec-mb.h:731
void(* aes_gcm_enc_dec_iv_t)(const struct gcm_key_data *, struct gcm_context_data *, uint8_t *, uint8_t const *, const uint64_t, const uint8_t *, uint8_t const *, const uint64_t, uint8_t *, const uint64_t, const uint64_t)
Definition intel-ipsec-mb.h:747
IMB_DLL_EXPORT IMB_JOB * flush_job_avx512(IMB_MGR *state)
Force processing until next job in queue is completed.
IMB_DLL_EXPORT void aes_keyexp_128_enc_avx(const void *key, void *enc_exp_keys)
IMB_DLL_EXPORT void md5_one_block_avx512(const void *data, void *digest)
IMB_DLL_EXPORT size_t imb_get_mb_mgr_size(void)
Calculates necessary memory size for IMB_MGR.
IMB_DLL_EXPORT int kasumi_f9_iv_gen(const uint32_t count, const uint32_t fresh, void *iv_ptr)
Generation of KASUMI F9 Initialization Vector.
IMB_JOB *(* get_completed_job_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:727
IMB_DLL_EXPORT void aes_gcm_init_128_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len)
Initialize a gcm_context_data structure to prepare for AES-GCM-128 Encryption.
IMB_DLL_EXPORT void aes_gcm_dec_192_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-192 Decryption.
void(* kasumi_f8_4_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const uint64_t, const uint64_t, const uint64_t, const void *, void *, const void *, void *, const void *, void *, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:804
IMB_ARCH
Definition intel-ipsec-mb.h:113
@ IMB_ARCH_AVX512
Definition intel-ipsec-mb.h:117
@ IMB_ARCH_NONE
Definition intel-ipsec-mb.h:114
@ IMB_ARCH_SSE
Definition intel-ipsec-mb.h:115
@ IMB_ARCH_AVX2
Definition intel-ipsec-mb.h:116
@ IMB_ARCH_NUM
Definition intel-ipsec-mb.h:118
size_t(* kasumi_key_sched_size_t)(void)
Definition intel-ipsec-mb.h:817
size_t(* snow3g_key_sched_size_t)(void)
Definition intel-ipsec-mb.h:869
IMB_DLL_EXPORT IMB_JOB * get_completed_job_avx2(IMB_MGR *state)
Get next completed job.
void(* aes_ecb_quic_t)(const void *, const void *, void *out, uint64_t)
Definition intel-ipsec-mb.h:876
IMB_DLL_EXPORT void aes_gcm_enc_256_update_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in, uint64_t len)
Encrypt a block of a AES-GCM-256 encryption message.
IMB_DLL_EXPORT uint32_t imb_set_session(IMB_MGR *state, IMB_JOB *job)
Sets up suite_id and session_id fields for selected cipher suite in provided job structure.
void(* zuc_eia3_n_buffer_t)(const void *const *, const void *const *, const void *const *, const uint32_t *, uint32_t **, const uint32_t)
Definition intel-ipsec-mb.h:791
IMB_DLL_EXPORT void aes_gcm_dec_128_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-128 Decryption.
IMB_DLL_EXPORT void aes_gcm_enc_192_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-192 Encryption.
void(* aes_gcm_init_t)(const struct gcm_key_data *, struct gcm_context_data *, const uint8_t *, uint8_t const *, uint64_t)
Definition intel-ipsec-mb.h:751
IMB_DLL_EXPORT void aes_gcm_dec_256_finalize_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End decryption of a AES-GCM-256 encryption message.
int(* snow3g_init_key_sched_t)(const void *, snow3g_key_schedule_t *)
Definition intel-ipsec-mb.h:867
void(* snow3g_f8_4_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *, const void *, const void *, const void *, void *, const uint32_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:837
IMB_DLL_EXPORT void aes_gcm_dec_128_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-128 Decryption.
IMB_DLL_EXPORT IMB_JOB * flush_job_avx2(IMB_MGR *state)
Force processing until next job in queue is completed.
IMB_DLL_EXPORT int zuc_eia3_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr)
Generation of ZUC-EIA3 Initialization Vector.
struct snow3g_key_schedule_s snow3g_key_schedule_t
IMB_JOB *(* flush_job_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:728
void(* snow3g_f9_1_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *, const uint64_t, void *)
Definition intel-ipsec-mb.h:864
void(* aes_cfb_t)(void *, const void *, const void *, const void *, uint64_t)
Definition intel-ipsec-mb.h:743
IMB_DLL_EXPORT void aes_keyexp_128_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_DLL_EXPORT void imb_clear_mem(void *mem, const size_t size)
Force clearing/zeroing of memory.
IMB_DLL_EXPORT void aes_gcm_precomp_128_avx_gen4(struct gcm_key_data *key_data)
Precomputation of AES-GCM-128 HashKey constants.
void(* snow3g_f8_n_buffer_multikey_t)(const snow3g_key_schedule_t *const[], const void *const[], const void *const[], void *[], const uint32_t[], const uint32_t)
Definition intel-ipsec-mb.h:860
void(* chacha20_hp_quic_t)(const void *, const void *const *, void **, const uint64_t)
Definition intel-ipsec-mb.h:880
IMB_DLL_EXPORT unsigned imb_get_version(void)
Get library version in numerical format.
IMB_DLL_EXPORT void aes_xcbc_expand_key_sse(const void *key, void *k1_exp, void *k2, void *k3)
void(* init_mb_mgr_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:724
void(* kasumi_f8_2_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const uint64_t, const void *, void *, const uint32_t, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:798
IMB_DLL_EXPORT void aes_keyexp_256_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys)
void(* aes_gmac_finalize_t)(const struct gcm_key_data *, struct gcm_context_data *, uint8_t *, const uint64_t)
Definition intel-ipsec-mb.h:767
IMB_DLL_EXPORT void aes_gcm_enc_128_finalize_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End encryption of a AES-GCM-128 encryption message.
void(* aes_gcm_enc_dec_update_t)(const struct gcm_key_data *, struct gcm_context_data *, uint8_t *, const uint8_t *, uint64_t)
Definition intel-ipsec-mb.h:756
IMB_DLL_EXPORT void aes_gcm_dec_192_finalize_avx_gen4(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End decryption of a AES-GCM-192 encryption message.
IMB_DLL_EXPORT void aes_keyexp_256_enc_sse(const void *key, void *enc_exp_keys)
void(* hash_fn_t)(const void *, const uint64_t, void *)
Definition intel-ipsec-mb.h:740
IMB_DLL_EXPORT void aes_gcm_enc_256_finalize_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *auth_tag, uint64_t auth_tag_len)
End encryption of a AES-GCM-256 encryption message.
IMB_STATUS
Definition intel-ipsec-mb.h:182
@ IMB_STATUS_ERROR
Definition intel-ipsec-mb.h:190
@ IMB_STATUS_COMPLETED
Definition intel-ipsec-mb.h:186
@ IMB_STATUS_INTERNAL_ERROR
Definition intel-ipsec-mb.h:189
@ IMB_STATUS_COMPLETED_CIPHER
Definition intel-ipsec-mb.h:184
@ IMB_STATUS_COMPLETED_AUTH
Definition intel-ipsec-mb.h:185
@ IMB_STATUS_BEING_PROCESSED
Definition intel-ipsec-mb.h:183
@ IMB_STATUS_INVALID_ARGS
Definition intel-ipsec-mb.h:188
IMB_DLL_EXPORT void aes_gcm_dec_256_sse(const struct gcm_key_data *key_data, struct gcm_context_data *context_data, uint8_t *out, uint8_t const *in, uint64_t len, const uint8_t *iv, uint8_t const *aad, uint64_t aad_len, uint8_t *auth_tag, uint64_t auth_tag_len)
AES-GCM-256 Decryption.
IMB_DLL_EXPORT void aes_xcbc_expand_key_avx(const void *key, void *k1_exp, void *k2, void *k3)
Definition intel-ipsec-mb.h:395
union IMB_JOB::@11 cipher_fields
struct gcm_context_data * ctx
Definition intel-ipsec-mb.h:473
struct IMB_JOB::@10::_AES_GMAC_specific_fields GMAC
struct IMB_JOB::@10::_KASUMI_UIA1_specific_fields KASUMI_UIA1
IMB_CIPHER_DIRECTION cipher_direction
Definition intel-ipsec-mb.h:531
struct IMB_JOB::@10::_POLY1305_specific_fields POLY1305
uint64_t num_sgl_io_segs
Definition intel-ipsec-mb.h:410
const void * _init_tag
Definition intel-ipsec-mb.h:505
const struct IMB_SGL_IOV * sgl_io_segs
Definition intel-ipsec-mb.h:403
uint64_t iv_len_in_bytes
Definition intel-ipsec-mb.h:435
struct IMB_JOB::@10::_SNOW3G_UIA2_specific_fields SNOW3G_UIA2
const uint8_t * _iv23
Definition intel-ipsec-mb.h:481
const uint8_t * _hashed_auth_key_xor_ipad
Definition intel-ipsec-mb.h:443
struct IMB_JOB::@10::_AES_XCBC_specific_fields XCBC
const struct gcm_key_data * _key
Definition intel-ipsec-mb.h:495
IMB_SGL_STATE sgl_state
Definition intel-ipsec-mb.h:544
uint64_t msg_len_to_hash_in_bytes
Definition intel-ipsec-mb.h:429
IMB_CHAIN_ORDER chain_order
Definition intel-ipsec-mb.h:533
uint64_t msg_len_to_cipher_in_bits
Definition intel-ipsec-mb.h:424
const void * _iv
Definition intel-ipsec-mb.h:487
struct IMB_JOB::@10::_AES_CMAC_specific_fields CMAC
struct chacha20_poly1305_context_data * ctx
Definition intel-ipsec-mb.h:516
const void * aad
Definition intel-ipsec-mb.h:459
void * user_data2
Definition intel-ipsec-mb.h:537
void * next_iv
Definition intel-ipsec-mb.h:550
union IMB_JOB::@10 u
uint64_t cipher_start_offset_in_bits
Definition intel-ipsec-mb.h:418
int(* hash_func)(struct IMB_JOB *)
Definition intel-ipsec-mb.h:541
int(* cipher_func)(struct IMB_JOB *)
Definition intel-ipsec-mb.h:539
const uint8_t * _hashed_auth_key_xor_opad
Definition intel-ipsec-mb.h:446
uint64_t auth_tag_output_len_in_bytes
Definition intel-ipsec-mb.h:437
const uint32_t * _k1_expanded
Definition intel-ipsec-mb.h:451
IMB_CIPHER_MODE cipher_mode
Definition intel-ipsec-mb.h:530
const void * _key
Definition intel-ipsec-mb.h:485
const uint8_t * _key
Definition intel-ipsec-mb.h:477
struct IMB_JOB::@11::_CBCS_specific_fields CBCS
const void * _skey2
Definition intel-ipsec-mb.h:467
const void * _key_expanded
Definition intel-ipsec-mb.h:464
const uint8_t * iv
Definition intel-ipsec-mb.h:434
uint64_t msg_len_to_cipher_in_bytes
Definition intel-ipsec-mb.h:422
void * reserved
Definition intel-ipsec-mb.h:524
IMB_HASH_ALG hash_alg
Definition intel-ipsec-mb.h:532
uint64_t aad_len_in_bytes
Definition intel-ipsec-mb.h:461
struct IMB_JOB::@10::_HMAC_specific_fields HMAC
struct IMB_JOB::@10::_ZUC_EIA3_specific_fields ZUC_EIA3
uint32_t session_id
Definition intel-ipsec-mb.h:556
const void * _skey1
Definition intel-ipsec-mb.h:466
void * user_data
Definition intel-ipsec-mb.h:536
uint64_t key_len_in_bytes
Definition intel-ipsec-mb.h:398
struct IMB_JOB::@10::_SNOW_V_AEAD_specific_fields SNOW_V_AEAD
uint8_t * dst
Definition intel-ipsec-mb.h:407
uint8_t * auth_tag_output
Definition intel-ipsec-mb.h:436
const void * enc_keys
Definition intel-ipsec-mb.h:396
struct IMB_JOB::@10::_AES_GCM_specific_fields GCM
struct IMB_JOB::@10::_CHACHA20_POLY1305_specific_fields CHACHA20_POLY1305
struct IMB_JOB::@10::_AES_CCM_specific_fields CCM
IMB_STATUS status
Definition intel-ipsec-mb.h:529
const uint8_t * _k2
Definition intel-ipsec-mb.h:453
uint64_t cipher_start_src_offset_in_bytes
Definition intel-ipsec-mb.h:414
uint32_t suite_id[2]
Definition intel-ipsec-mb.h:555
uint64_t msg_len_to_hash_in_bits
Definition intel-ipsec-mb.h:431
const uint8_t * _iv
Definition intel-ipsec-mb.h:479
struct IMB_JOB::@10::_GHASH_specific_fields GHASH
uint64_t cipher_start_src_offset_in_bits
Definition intel-ipsec-mb.h:416
const void * dec_keys
Definition intel-ipsec-mb.h:397
uint64_t hash_start_src_offset_in_bytes
Definition intel-ipsec-mb.h:427
const uint8_t * src
Definition intel-ipsec-mb.h:400
const uint8_t * _k3
Definition intel-ipsec-mb.h:455
Definition intel-ipsec-mb.h:974
aes_gmac_finalize_t gmac192_finalize
Definition intel-ipsec-mb.h:1087
aes_gcm_init_t gcm192_init
Definition intel-ipsec-mb.h:1024
uint64_t reserved[4]
Definition intel-ipsec-mb.h:979
aes_gmac_finalize_t gmac128_finalize
Definition intel-ipsec-mb.h:1086
void * zuc256_eia3_16B_ooo
Definition intel-ipsec-mb.h:1181
void * aes256_ccm_ooo
Definition intel-ipsec-mb.h:1171
crc32_fn_t crc24_lte_a
Definition intel-ipsec-mb.h:1096
aes_gmac_update_t gmac256_update
Definition intel-ipsec-mb.h:1085
hec_32_t hec_32
Definition intel-ipsec-mb.h:1089
int imb_errno
Definition intel-ipsec-mb.h:984
chacha20_poly1305_quic_t chacha20_poly1305_quic
Definition intel-ipsec-mb.h:1126
void * aes_cmac_ooo
Definition intel-ipsec-mb.h:1165
int next_job
Definition intel-ipsec-mb.h:1139
aes_gmac_init_t gmac128_init
Definition intel-ipsec-mb.h:1080
aes_gcm_pre_t gcm192_pre
Definition intel-ipsec-mb.h:1042
snow3g_f8_4_buffer_t snow3g_f8_4_buffer
Definition intel-ipsec-mb.h:1065
aes_gcm_precomp_t gcm256_precomp
Definition intel-ipsec-mb.h:1040
aes_gcm_pre_t gcm128_pre
Definition intel-ipsec-mb.h:1041
submit_hash_burst_t submit_hash_burst
Definition intel-ipsec-mb.h:1117
flush_job_t flush_job
Definition intel-ipsec-mb.h:996
snow3g_f8_2_buffer_t snow3g_f8_2_buffer
Definition intel-ipsec-mb.h:1064
void * zuc_eea3_ooo
Definition intel-ipsec-mb.h:1166
aes_gcm_enc_dec_update_t gcm128_dec_update
Definition intel-ipsec-mb.h:1029
void * des3_dec_ooo
Definition intel-ipsec-mb.h:1153
keyexp_t keyexp_192
Definition intel-ipsec-mb.h:999
aes_gcm_enc_dec_t gcm128_dec
Definition intel-ipsec-mb.h:1020
burst_fn_t submit_burst_nocheck
Definition intel-ipsec-mb.h:1113
get_next_job_t get_next_job
Definition intel-ipsec-mb.h:992
void * sha_256_ooo
Definition intel-ipsec-mb.h:1177
snow3g_init_key_sched_t snow3g_init_key_sched
Definition intel-ipsec-mb.h:1071
aes_gcm_enc_dec_update_t gcm192_enc_update
Definition intel-ipsec-mb.h:1027
aes_gmac_finalize_t gmac256_finalize
Definition intel-ipsec-mb.h:1088
void * docsis_des_dec_ooo
Definition intel-ipsec-mb.h:1155
aes_gmac_init_t gmac192_init
Definition intel-ipsec-mb.h:1081
zuc_eia3_1_buffer_t eia3_1_buffer
Definition intel-ipsec-mb.h:1048
void * aes_ccm_ooo
Definition intel-ipsec-mb.h:1164
submit_cipher_burst_t submit_aead_burst_nocheck
Definition intel-ipsec-mb.h:1135
hec_64_t hec_64
Definition intel-ipsec-mb.h:1090
keyexp_t keyexp_256
Definition intel-ipsec-mb.h:1000
aes_ecb_quic_t aes_ecb_128_quic
Definition intel-ipsec-mb.h:1121
aes_gcm_pre_t gcm256_pre
Definition intel-ipsec-mb.h:1043
uint32_t used_arch
Definition intel-ipsec-mb.h:982
void * hmac_sha_1_ooo
Definition intel-ipsec-mb.h:1157
crc32_fn_t crc32_sctp
Definition intel-ipsec-mb.h:1095
crc32_fn_t crc11_fp_header
Definition intel-ipsec-mb.h:1099
aes_gcm_enc_dec_finalize_t gcm192_dec_finalize
Definition intel-ipsec-mb.h:1036
kasumi_f9_1_buffer_user_t f9_1_buffer_user
Definition intel-ipsec-mb.h:1057
void * sha_384_ooo
Definition intel-ipsec-mb.h:1178
aes_gmac_update_t gmac192_update
Definition intel-ipsec-mb.h:1084
crc32_fn_t crc16_x25
Definition intel-ipsec-mb.h:1094
hash_fn_t sha224
Definition intel-ipsec-mb.h:1011
void * zuc256_eia3_8B_ooo
Definition intel-ipsec-mb.h:1180
hash_one_block_t md5_one_block
Definition intel-ipsec-mb.h:1009
void * des_enc_ooo
Definition intel-ipsec-mb.h:1150
kasumi_init_f9_key_sched_t kasumi_init_f9_key_sched
Definition intel-ipsec-mb.h:1059
queue_size_t queue_size
Definition intel-ipsec-mb.h:997
aes_gcm_enc_dec_finalize_t gcm256_dec_finalize
Definition intel-ipsec-mb.h:1037
snow3g_key_sched_size_t snow3g_key_sched_size
Definition intel-ipsec-mb.h:1072
aes_ecb_quic_t aes_ecb_256_quic
Definition intel-ipsec-mb.h:1122
crc32_fn_t crc8_wimax_ofdma_hcs
Definition intel-ipsec-mb.h:1104
void * zuc256_eia3_ooo
Definition intel-ipsec-mb.h:1170
snow3g_f8_8_buffer_t snow3g_f8_8_buffer
Definition intel-ipsec-mb.h:1066
hash_fn_t sha512
Definition intel-ipsec-mb.h:1014
void * hmac_sha_256_ooo
Definition intel-ipsec-mb.h:1159
snow3g_f8_n_buffer_multikey_t snow3g_f8_n_buffer_multikey
Definition intel-ipsec-mb.h:1069
aes_gcm_enc_dec_update_t gcm192_dec_update
Definition intel-ipsec-mb.h:1030
chacha_poly_init_t chacha20_poly1305_init
Definition intel-ipsec-mb.h:1106
zuc_eea3_n_buffer_t eea3_n_buffer
Definition intel-ipsec-mb.h:1047
aes_gcm_precomp_t gcm128_precomp
Definition intel-ipsec-mb.h:1038
void * aes256_ooo
Definition intel-ipsec-mb.h:1145
void * zuc256_eea3_ooo
Definition intel-ipsec-mb.h:1169
void * end_ooo
Definition intel-ipsec-mb.h:1185
void * sha_512_ooo
Definition intel-ipsec-mb.h:1179
chacha_poly_enc_dec_update_t chacha20_poly1305_dec_update
Definition intel-ipsec-mb.h:1108
aes_gcm_enc_dec_t gcm256_enc
Definition intel-ipsec-mb.h:1019
aes_gcm_init_var_iv_t gcm192_init_var_iv
Definition intel-ipsec-mb.h:1077
keyexp_t keyexp_128
Definition intel-ipsec-mb.h:998
crc32_fn_t crc10_iuup_data
Definition intel-ipsec-mb.h:1101
submit_hash_burst_t submit_hash_burst_nocheck
Definition intel-ipsec-mb.h:1118
hash_one_block_t sha1_one_block
Definition intel-ipsec-mb.h:1004
snow3g_f8_n_buffer_t snow3g_f8_n_buffer
Definition intel-ipsec-mb.h:1067
hash_fn_t sha1
Definition intel-ipsec-mb.h:1010
uint8_t used_arch_type
Definition intel-ipsec-mb.h:981
crc32_fn_t crc32_ethernet_fcs
Definition intel-ipsec-mb.h:1093
void * hmac_md5_ooo
Definition intel-ipsec-mb.h:1162
void * des3_enc_ooo
Definition intel-ipsec-mb.h:1152
hash_one_block_t sha512_one_block
Definition intel-ipsec-mb.h:1008
aes_gcm_init_t gcm256_init
Definition intel-ipsec-mb.h:1025
snow3g_f8_8_buffer_multikey_t snow3g_f8_8_buffer_multikey
Definition intel-ipsec-mb.h:1068
submit_cipher_burst_t submit_cipher_burst
Definition intel-ipsec-mb.h:1115
burst_fn_t get_next_burst
Definition intel-ipsec-mb.h:1111
hash_fn_t sha256
Definition intel-ipsec-mb.h:1012
sm4_keyexp_t sm4_keyexp
Definition intel-ipsec-mb.h:1129
aes_gcm_enc_dec_finalize_t gcm128_enc_finalize
Definition intel-ipsec-mb.h:1032
submit_cipher_burst_t submit_aead_burst
Definition intel-ipsec-mb.h:1134
aes_gmac_update_t gmac128_update
Definition intel-ipsec-mb.h:1083
uint8_t reserved2[7]
Definition intel-ipsec-mb.h:980
void * zuc_eia3_ooo
Definition intel-ipsec-mb.h:1167
aes_gcm_enc_dec_finalize_t gcm192_enc_finalize
Definition intel-ipsec-mb.h:1033
kasumi_f8_3_buffer_t f8_3_buffer
Definition intel-ipsec-mb.h:1053
hash_one_block_t sha384_one_block
Definition intel-ipsec-mb.h:1007
void * docsis_des_enc_ooo
Definition intel-ipsec-mb.h:1154
void * docsis128_sec_ooo
Definition intel-ipsec-mb.h:1146
void(* set_suite_id)(struct IMB_MGR *, IMB_JOB *)
Definition intel-ipsec-mb.h:1124
aes_gcm_enc_dec_finalize_t gcm256_enc_finalize
Definition intel-ipsec-mb.h:1034
void * aes128_ooo
Definition intel-ipsec-mb.h:1143
get_completed_job_t get_completed_job
Definition intel-ipsec-mb.h:995
aes_gcm_enc_dec_update_t gcm256_dec_update
Definition intel-ipsec-mb.h:1031
snow3g_f9_1_buffer_t snow3g_f9_1_buffer
Definition intel-ipsec-mb.h:1070
void * aes128_cbcs_ooo
Definition intel-ipsec-mb.h:1168
aes_gcm_enc_dec_t gcm128_enc
Definition intel-ipsec-mb.h:1017
hash_fn_t sha384
Definition intel-ipsec-mb.h:1013
burst_fn_t flush_burst
Definition intel-ipsec-mb.h:1114
void * sha_224_ooo
Definition intel-ipsec-mb.h:1176
cmac_subkey_gen_t cmac_subkey_gen_128
Definition intel-ipsec-mb.h:1001
crc32_fn_t crc6_iuup_header
Definition intel-ipsec-mb.h:1102
burst_fn_t submit_burst
Definition intel-ipsec-mb.h:1112
void * snow3g_uia2_ooo
Definition intel-ipsec-mb.h:1174
aes_gcm_enc_dec_t gcm192_enc
Definition intel-ipsec-mb.h:1018
submit_job_t submit_job_nocheck
Definition intel-ipsec-mb.h:994
kasumi_f8_1_buffer_bit_t f8_1_buffer_bit
Definition intel-ipsec-mb.h:1051
hash_one_block_t sha224_one_block
Definition intel-ipsec-mb.h:1005
des_keysched_t des_key_sched
Definition intel-ipsec-mb.h:1003
void * snow3g_uea2_ooo
Definition intel-ipsec-mb.h:1173
submit_job_t submit_job
Definition intel-ipsec-mb.h:993
chacha_poly_finalize_t chacha20_poly1305_finalize
Definition intel-ipsec-mb.h:1109
chacha_poly_enc_dec_update_t chacha20_poly1305_enc_update
Definition intel-ipsec-mb.h:1107
kasumi_init_f8_key_sched_t kasumi_init_f8_key_sched
Definition intel-ipsec-mb.h:1058
IMB_JOB jobs[IMB_MAX_JOBS]
Definition intel-ipsec-mb.h:1140
aes_cfb_t aes256_cfb_one
Definition intel-ipsec-mb.h:1119
zuc_eia3_n_buffer_t eia3_n_buffer
Definition intel-ipsec-mb.h:1075
chacha20_hp_quic_t chacha20_hp_quic
Definition intel-ipsec-mb.h:1127
snow3g_f8_1_buffer_t snow3g_f8_1_buffer
Definition intel-ipsec-mb.h:1063
void * hmac_sha_224_ooo
Definition intel-ipsec-mb.h:1158
imb_self_test_cb_t self_test_cb_fn
Definition intel-ipsec-mb.h:1131
kasumi_key_sched_size_t kasumi_key_sched_size
Definition intel-ipsec-mb.h:1060
aes_cfb_t aes128_cfb_one
Definition intel-ipsec-mb.h:1015
cmac_subkey_gen_t cmac_subkey_gen_256
Definition intel-ipsec-mb.h:1091
crc32_fn_t crc24_lte_b
Definition intel-ipsec-mb.h:1097
aes_gcm_precomp_t gcm192_precomp
Definition intel-ipsec-mb.h:1039
aes_gcm_enc_dec_update_t gcm256_enc_update
Definition intel-ipsec-mb.h:1028
void * self_test_cb_arg
Definition intel-ipsec-mb.h:1132
zuc_eea3_4_buffer_t eea3_4_buffer
Definition intel-ipsec-mb.h:1046
int earliest_job
Definition intel-ipsec-mb.h:1138
kasumi_f8_2_buffer_t f8_2_buffer
Definition intel-ipsec-mb.h:1052
crc32_fn_t crc7_fp_header
Definition intel-ipsec-mb.h:1100
aes_gmac_init_t gmac256_init
Definition intel-ipsec-mb.h:1082
submit_cipher_burst_t submit_cipher_burst_nocheck
Definition intel-ipsec-mb.h:1116
void * docsis256_sec_ooo
Definition intel-ipsec-mb.h:1148
void * aes256_cmac_ooo
Definition intel-ipsec-mb.h:1172
void * sha_1_ooo
Definition intel-ipsec-mb.h:1175
void * docsis128_crc32_sec_ooo
Definition intel-ipsec-mb.h:1147
aes_gcm_enc_dec_t gcm256_dec
Definition intel-ipsec-mb.h:1022
crc32_fn_t crc32_wimax_ofdma_data
Definition intel-ipsec-mb.h:1103
aes_gcm_enc_dec_update_t gcm128_enc_update
Definition intel-ipsec-mb.h:1026
void * aes_xcbc_ooo
Definition intel-ipsec-mb.h:1163
crc32_fn_t crc16_fp_data
Definition intel-ipsec-mb.h:1098
snow3g_f8_1_buffer_bit_t snow3g_f8_1_buffer_bit
Definition intel-ipsec-mb.h:1062
aes_gcm_init_t gcm128_init
Definition intel-ipsec-mb.h:1023
hash_one_block_t sha256_one_block
Definition intel-ipsec-mb.h:1006
aes_gcm_enc_dec_t gcm192_dec
Definition intel-ipsec-mb.h:1021
kasumi_f8_n_buffer_t f8_n_buffer
Definition intel-ipsec-mb.h:1055
uint64_t flags
Definition intel-ipsec-mb.h:976
void * aes_cfb_128_ooo
Definition intel-ipsec-mb.h:1182
xcbc_keyexp_t xcbc_keyexp
Definition intel-ipsec-mb.h:1002
aes_gcm_init_var_iv_t gcm128_init_var_iv
Definition intel-ipsec-mb.h:1076
void * aes_cfb_256_ooo
Definition intel-ipsec-mb.h:1184
zuc_eea3_1_buffer_t eea3_1_buffer
Definition intel-ipsec-mb.h:1045
void * des_dec_ooo
Definition intel-ipsec-mb.h:1151
kasumi_f8_4_buffer_t f8_4_buffer
Definition intel-ipsec-mb.h:1054
void * hmac_sha_512_ooo
Definition intel-ipsec-mb.h:1161
void * aes_cfb_192_ooo
Definition intel-ipsec-mb.h:1183
void * docsis256_crc32_sec_ooo
Definition intel-ipsec-mb.h:1149
aes_gcm_pre_t ghash_pre
Definition intel-ipsec-mb.h:1092
kasumi_f8_1_buffer_t f8_1_buffer
Definition intel-ipsec-mb.h:1050
uint64_t features
Definition intel-ipsec-mb.h:977
aes_gcm_enc_dec_finalize_t gcm128_dec_finalize
Definition intel-ipsec-mb.h:1035
aes_gcm_init_var_iv_t gcm256_init_var_iv
Definition intel-ipsec-mb.h:1078
kasumi_f9_1_buffer_t f9_1_buffer
Definition intel-ipsec-mb.h:1056
ghash_t ghash
Definition intel-ipsec-mb.h:1074
void * hmac_sha_384_ooo
Definition intel-ipsec-mb.h:1160
void * aes192_ooo
Definition intel-ipsec-mb.h:1144
Definition intel-ipsec-mb.h:885
const char * type
Definition intel-ipsec-mb.h:887
const char * descr
Definition intel-ipsec-mb.h:888
const char * phase
Definition intel-ipsec-mb.h:886
Definition intel-ipsec-mb.h:370
uint64_t len
Definition intel-ipsec-mb.h:373
void * out
Definition intel-ipsec-mb.h:372
const void * in
Definition intel-ipsec-mb.h:371
holds Chacha20-Poly1305 operation context
Definition intel-ipsec-mb.h:595
uint8_t IV[IMB_CHACHA20_POLY1305_IV_SIZE]
Definition intel-ipsec-mb.h:609
uint8_t poly_scratch[IMB_POLY1305_BLOCK_SIZE]
Definition intel-ipsec-mb.h:601
uint64_t remain_ct_bytes
Definition intel-ipsec-mb.h:606
uint64_t aad_len
Definition intel-ipsec-mb.h:597
uint8_t poly_key[IMB_CHACHA20_POLY1305_KEY_SIZE]
Definition intel-ipsec-mb.h:600
uint64_t remain_ks_bytes
Definition intel-ipsec-mb.h:604
uint64_t last_block_count
Definition intel-ipsec-mb.h:603
uint64_t hash_len
Definition intel-ipsec-mb.h:598
uint64_t hash[3]
Definition intel-ipsec-mb.h:596
uint8_t last_ks[64]
Definition intel-ipsec-mb.h:599
holds GCM operation context
Definition intel-ipsec-mb.h:581
uint64_t in_length
Definition intel-ipsec-mb.h:584
uint8_t current_counter[IMB_GCM_BLOCK_LEN]
Definition intel-ipsec-mb.h:587
uint8_t partial_block_enc_key[IMB_GCM_BLOCK_LEN]
Definition intel-ipsec-mb.h:585
uint8_t orig_IV[IMB_GCM_BLOCK_LEN]
Definition intel-ipsec-mb.h:586
uint64_t partial_block_length
Definition intel-ipsec-mb.h:588
uint8_t aad_hash[IMB_GCM_BLOCK_LEN]
Definition intel-ipsec-mb.h:582
uint64_t aad_length
Definition intel-ipsec-mb.h:583
holds intermediate key data needed to improve performance
Definition intel-ipsec-mb.h:653
struct gcm_key_data::@12::@14 avx2_avx512
uint8_t shifted_hkey_k[IMB_GCM_ENC_KEY_LEN *8]
Definition intel-ipsec-mb.h:672
struct gcm_key_data::@12::@15 vaes_avx512
struct gcm_key_data::@12::@13 sse_avx
struct gcm_key_data::@12::@16 vaes_avx2
uint8_t expanded_keys[IMB_GCM_ENC_KEY_LEN *IMB_GCM_KEY_SETS]
Definition intel-ipsec-mb.h:654
uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN *8]
Definition intel-ipsec-mb.h:663
union gcm_key_data::@12 ghash_keys
Definition intel-ipsec-mb.h:40
uint64_t low
Definition intel-ipsec-mb.h:41
uint64_t high
Definition intel-ipsec-mb.h:42
Definition intel-ipsec-mb.h:567
uint16_t msk16[KASUMI_KEY_SCHEDULE_SIZE]
Definition intel-ipsec-mb.h:570
uint16_t sk16[KASUMI_KEY_SCHEDULE_SIZE]
Definition intel-ipsec-mb.h:569
Definition intel-ipsec-mb.h:822
uint32_t k[4]
Definition intel-ipsec-mb.h:824