intel-ipsec-mb: intel-ipsec-mb.h Source File

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 */
40 typedef struct {
41 uint64_t low;
42 uint64_t high;
43} imb_uint128_t;
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
113 typedef enum {
114 IMB_ARCH_NONE = 0,
115 IMB_ARCH_SSE,
116 IMB_ARCH_AVX2,
117 IMB_ARCH_AVX512,
118 IMB_ARCH_NUM,
119} IMB_ARCH;
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
182 typedef enum {
183 IMB_STATUS_BEING_PROCESSED = 0,
184 IMB_STATUS_COMPLETED_CIPHER = 1,
185 IMB_STATUS_COMPLETED_AUTH = 2,
186 IMB_STATUS_COMPLETED = 3,
188 IMB_STATUS_INVALID_ARGS = 4,
189 IMB_STATUS_INTERNAL_ERROR,
190 IMB_STATUS_ERROR
191} IMB_STATUS;
192
196 typedef enum {
197 IMB_ERR_MIN = 2000,
198 IMB_ERR_NULL_MBMGR,
199 IMB_ERR_JOB_NULL_SRC,
200 IMB_ERR_JOB_NULL_DST,
201 IMB_ERR_JOB_NULL_KEY,
202 IMB_ERR_JOB_NULL_IV,
203 IMB_ERR_JOB_NULL_AUTH,
204 IMB_ERR_JOB_NULL_AAD,
205 IMB_ERR_JOB_CIPH_LEN,
206 IMB_ERR_JOB_AUTH_LEN,
207 IMB_ERR_JOB_IV_LEN,
208 IMB_ERR_JOB_KEY_LEN,
209 IMB_ERR_JOB_AUTH_TAG_LEN,
210 IMB_ERR_JOB_AAD_LEN,
211 IMB_ERR_JOB_SRC_OFFSET,
212 IMB_ERR_JOB_CHAIN_ORDER,
213 IMB_ERR_CIPH_MODE,
214 IMB_ERR_HASH_ALGO,
215 IMB_ERR_JOB_NULL_AUTH_KEY,
216 IMB_ERR_JOB_NULL_SGL_CTX,
217 IMB_ERR_JOB_NULL_NEXT_IV,
218 IMB_ERR_JOB_PON_PLI,
219 IMB_ERR_NULL_SRC,
220 IMB_ERR_NULL_DST,
221 IMB_ERR_NULL_KEY,
222 IMB_ERR_NULL_EXP_KEY,
223 IMB_ERR_NULL_IV,
224 IMB_ERR_NULL_AUTH,
225 IMB_ERR_NULL_AAD,
226 IMB_ERR_CIPH_LEN,
227 IMB_ERR_AUTH_LEN,
228 IMB_ERR_IV_LEN,
229 IMB_ERR_KEY_LEN,
230 IMB_ERR_AUTH_TAG_LEN,
231 IMB_ERR_AAD_LEN,
232 IMB_ERR_SRC_OFFSET,
233 IMB_ERR_NULL_AUTH_KEY,
234 IMB_ERR_NULL_CTX,
235 IMB_ERR_JOB_NULL_HMAC_OPAD,
236 IMB_ERR_JOB_NULL_HMAC_IPAD,
237 IMB_ERR_JOB_NULL_XCBC_K1_EXP,
238 IMB_ERR_JOB_NULL_XCBC_K2,
239 IMB_ERR_JOB_NULL_XCBC_K3,
240 IMB_ERR_JOB_CIPH_DIR,
241 IMB_ERR_JOB_NULL_GHASH_INIT_TAG,
242 IMB_ERR_MISSING_CPUFLAGS_INIT_MGR,
243 IMB_ERR_NULL_JOB,
244 IMB_ERR_QUEUE_SPACE,
245 IMB_ERR_NULL_BURST,
246 IMB_ERR_BURST_SIZE,
247 IMB_ERR_BURST_OOO,
248 IMB_ERR_SELFTEST,
249 IMB_ERR_BURST_SUITE_ID,
250 IMB_ERR_JOB_SGL_STATE,
251 /* add new error types above this comment */
252 IMB_ERR_MAX /* don't move this one */
253} IMB_ERR;
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
265 typedef enum {
266 IMB_CIPHER_CBC = 1,
267 IMB_CIPHER_CNTR,
268 IMB_CIPHER_CTR = IMB_CIPHER_CNTR,
269 IMB_CIPHER_NULL,
270 IMB_CIPHER_DOCSIS_SEC_BPI,
271 IMB_CIPHER_GCM,
272 IMB_CIPHER_CUSTOM,
273 IMB_CIPHER_DES,
274 IMB_CIPHER_DOCSIS_DES,
275 IMB_CIPHER_CCM,
276 IMB_CIPHER_DES3,
277 IMB_CIPHER_PON_AES_CNTR,
278 IMB_CIPHER_PON_AES_CTR = IMB_CIPHER_PON_AES_CNTR,
279 IMB_CIPHER_ECB,
280 IMB_CIPHER_CNTR_BITLEN,
281 IMB_CIPHER_CTR_BITLEN = IMB_CIPHER_CNTR_BITLEN,
282 IMB_CIPHER_ZUC_EEA3,
283 IMB_CIPHER_SNOW3G_UEA2_BITLEN,
284 IMB_CIPHER_KASUMI_UEA1_BITLEN,
285 IMB_CIPHER_CBCS_1_9,
286 IMB_CIPHER_CHACHA20,
287 IMB_CIPHER_CHACHA20_POLY1305,
288 IMB_CIPHER_CHACHA20_POLY1305_SGL,
289 IMB_CIPHER_SNOW_V,
290 IMB_CIPHER_SNOW_V_AEAD,
291 IMB_CIPHER_GCM_SGL,
292 IMB_CIPHER_SM4_ECB,
293 IMB_CIPHER_SM4_CBC,
294 IMB_CIPHER_CFB,
295 IMB_CIPHER_SM4_CNTR,
296 IMB_CIPHER_SM4_CTR = IMB_CIPHER_SM4_CNTR,
297 IMB_CIPHER_SM4_GCM,
298 IMB_CIPHER_NUM
299} IMB_CIPHER_MODE;
300
301 typedef enum { IMB_DIR_ENCRYPT = 1, IMB_DIR_DECRYPT } IMB_CIPHER_DIRECTION;
302
303 typedef enum {
304 IMB_AUTH_HMAC_SHA_1 = 1,
305 IMB_AUTH_HMAC_SHA_224,
306 IMB_AUTH_HMAC_SHA_256,
307 IMB_AUTH_HMAC_SHA_384,
308 IMB_AUTH_HMAC_SHA_512,
309 IMB_AUTH_AES_XCBC,
310 IMB_AUTH_MD5,
311 IMB_AUTH_NULL,
312 IMB_AUTH_AES_GMAC,
313 IMB_AUTH_CUSTOM,
314 IMB_AUTH_AES_CCM,
315 IMB_AUTH_AES_CMAC,
316 IMB_AUTH_SHA_1,
317 IMB_AUTH_SHA_224,
318 IMB_AUTH_SHA_256,
319 IMB_AUTH_SHA_384,
320 IMB_AUTH_SHA_512,
321 IMB_AUTH_AES_CMAC_BITLEN,
322 IMB_AUTH_PON_CRC_BIP,
323 IMB_AUTH_ZUC_EIA3_BITLEN,
324 IMB_AUTH_DOCSIS_CRC32,
325 IMB_AUTH_SNOW3G_UIA2_BITLEN,
326 IMB_AUTH_KASUMI_UIA1,
327 IMB_AUTH_AES_GMAC_128,
328 IMB_AUTH_AES_GMAC_192,
329 IMB_AUTH_AES_GMAC_256,
330 IMB_AUTH_AES_CMAC_256,
331 IMB_AUTH_POLY1305,
332 IMB_AUTH_CHACHA20_POLY1305,
333 IMB_AUTH_CHACHA20_POLY1305_SGL,
334 IMB_AUTH_ZUC256_EIA3_BITLEN,
335 IMB_AUTH_SNOW_V_AEAD,
336 IMB_AUTH_GCM_SGL,
337 IMB_AUTH_CRC32_ETHERNET_FCS,
338 IMB_AUTH_CRC32_SCTP,
339 IMB_AUTH_CRC32_WIMAX_OFDMA_DATA,
340 IMB_AUTH_CRC24_LTE_A,
341 IMB_AUTH_CRC24_LTE_B,
342 IMB_AUTH_CRC16_X25,
343 IMB_AUTH_CRC16_FP_DATA,
344 IMB_AUTH_CRC11_FP_HEADER,
345 IMB_AUTH_CRC10_IUUP_DATA,
346 IMB_AUTH_CRC8_WIMAX_OFDMA_HCS,
347 IMB_AUTH_CRC7_FP_HEADER,
348 IMB_AUTH_CRC6_IUUP_HEADER,
349 IMB_AUTH_GHASH,
350 IMB_AUTH_SM3,
351 IMB_AUTH_HMAC_SM3,
352 IMB_AUTH_SM4_GCM,
353 IMB_AUTH_NUM
354} IMB_HASH_ALG;
355
356 typedef enum { IMB_ORDER_CIPHER_HASH = 1, IMB_ORDER_HASH_CIPHER } IMB_CHAIN_ORDER;
357
358 typedef enum {
359 IMB_KEY_64_BYTES = 8,
360 IMB_KEY_128_BYTES = 16,
361 IMB_KEY_192_BYTES = 24,
362 IMB_KEY_256_BYTES = 32
363} IMB_KEY_SIZE_BYTES;
364
365 typedef enum { IMB_SGL_INIT = 0, IMB_SGL_UPDATE, IMB_SGL_COMPLETE, IMB_SGL_ALL } IMB_SGL_STATE;
366
370 struct IMB_SGL_IOV {
371 const void *in;
372 void *out;
373 uint64_t len;
374};
375
395 typedef struct IMB_JOB {
396 const void *enc_keys;
397 const void *dec_keys;
398 uint64_t key_len_in_bytes;
399 union {
400 const uint8_t *src;
403 const struct IMB_SGL_IOV *sgl_io_segs;
405 };
406 union {
407 uint8_t *dst;
410 uint64_t num_sgl_io_segs;
412 };
413 union {
414 uint64_t cipher_start_src_offset_in_bytes;
416 uint64_t cipher_start_src_offset_in_bits;
418 uint64_t cipher_start_offset_in_bits;
420 };
421 union {
422 uint64_t msg_len_to_cipher_in_bytes;
424 uint64_t msg_len_to_cipher_in_bits;
426 };
427 uint64_t hash_start_src_offset_in_bytes;
428 union {
429 uint64_t msg_len_to_hash_in_bytes;
431 uint64_t msg_len_to_hash_in_bits;
433 };
434 const uint8_t *iv;
435 uint64_t iv_len_in_bytes;
436 uint8_t *auth_tag_output;
437 uint64_t auth_tag_output_len_in_bytes;
440 /* Start hash algorithm-specific fields */
441 union {
442 struct _HMAC_specific_fields {
443 const uint8_t *_hashed_auth_key_xor_ipad;
446 const uint8_t *_hashed_auth_key_xor_opad;
449 } HMAC;
450 struct _AES_XCBC_specific_fields {
451 const uint32_t *_k1_expanded;
453 const uint8_t *_k2;
455 const uint8_t *_k3;
457 } XCBC;
458 struct _AES_CCM_specific_fields {
459 const void *aad;
461 uint64_t aad_len_in_bytes;
462 } CCM;
463 struct _AES_CMAC_specific_fields {
464 const void *_key_expanded;
466 const void *_skey1;
467 const void *_skey2;
468 } CMAC;
469 struct _AES_GCM_specific_fields {
470 const void *aad;
472 uint64_t aad_len_in_bytes;
473 struct gcm_context_data *ctx;
475 } GCM;
476 struct _ZUC_EIA3_specific_fields {
477 const uint8_t *_key;
479 const uint8_t *_iv;
481 const uint8_t *_iv23;
483 } ZUC_EIA3;
484 struct _SNOW3G_UIA2_specific_fields {
485 const void *_key;
487 const void *_iv;
489 } SNOW3G_UIA2;
490 struct _KASUMI_UIA1_specific_fields {
491 const void *_key;
493 } KASUMI_UIA1;
494 struct _AES_GMAC_specific_fields {
495 const struct gcm_key_data *_key;
497 const void *_iv;
499 uint64_t iv_len_in_bytes;
501 } GMAC;
502 struct _GHASH_specific_fields {
503 const struct gcm_key_data *_key;
505 const void *_init_tag;
506 } GHASH;
507 struct _POLY1305_specific_fields {
508 const void *_key;
510 } POLY1305;
511 struct _CHACHA20_POLY1305_specific_fields {
512 const void *aad;
514 uint64_t aad_len_in_bytes;
516 struct chacha20_poly1305_context_data *ctx;
518 } CHACHA20_POLY1305;
519 struct _SNOW_V_AEAD_specific_fields {
520 const void *aad;
522 uint64_t aad_len_in_bytes;
524 void *reserved;
526 } SNOW_V_AEAD;
527 } u;
529 IMB_STATUS status;
530 IMB_CIPHER_MODE cipher_mode;
531 IMB_CIPHER_DIRECTION cipher_direction;
532 IMB_HASH_ALG hash_alg;
533 IMB_CHAIN_ORDER chain_order;
536 void *user_data;
537 void *user_data2;
539 int (*cipher_func)(struct IMB_JOB *);
541 int (*hash_func)(struct IMB_JOB *);
544 IMB_SGL_STATE sgl_state;
548 union {
549 struct _CBCS_specific_fields {
550 void *next_iv;
552 } CBCS;
553 } cipher_fields;
555 uint32_t suite_id[2];
556 uint32_t session_id;
557} IMB_JOB;
558
559/* KASUMI */
560
561/* 64 precomputed words for key schedule */
562#define KASUMI_KEY_SCHEDULE_SIZE 64
563
567 typedef struct kasumi_key_sched_s {
569 uint16_t sk16[KASUMI_KEY_SCHEDULE_SIZE];
570 uint16_t msk16[KASUMI_KEY_SCHEDULE_SIZE];
571} kasumi_key_sched_t;
572
573/* GCM data structures */
574#define IMB_GCM_BLOCK_LEN 16
575
581 struct gcm_context_data {
582 uint8_t aad_hash[IMB_GCM_BLOCK_LEN];
583 uint64_t aad_length;
584 uint64_t in_length;
585 uint8_t partial_block_enc_key[IMB_GCM_BLOCK_LEN];
586 uint8_t orig_IV[IMB_GCM_BLOCK_LEN];
587 uint8_t current_counter[IMB_GCM_BLOCK_LEN];
588 uint64_t partial_block_length;
589};
590#undef IMB_GCM_BLOCK_LEN
591
595 struct chacha20_poly1305_context_data {
596 uint64_t hash[3];
597 uint64_t aad_len;
598 uint64_t hash_len;
599 uint8_t last_ks[64];
600 uint8_t poly_key[IMB_CHACHA20_POLY1305_KEY_SIZE];
601 uint8_t poly_scratch[IMB_POLY1305_BLOCK_SIZE];
603 uint64_t last_block_count;
604 uint64_t remain_ks_bytes;
606 uint64_t remain_ct_bytes;
609 uint8_t IV[IMB_CHACHA20_POLY1305_IV_SIZE];
610};
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 */
653 struct gcm_key_data {
654 uint8_t expanded_keys[IMB_GCM_ENC_KEY_LEN * IMB_GCM_KEY_SETS];
655 union {
657 struct {
663 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 8];
672 uint8_t shifted_hkey_k[IMB_GCM_ENC_KEY_LEN * 8];
673 } sse_avx;
674 struct {
682 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 8 * 2];
683 } avx2_avx512;
684 struct {
695 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 32 * 2];
696 } vaes_avx512;
697 struct {
708 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 16 * 2];
709 } vaes_avx2;
710 } ghash_keys;
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
724 typedef void (*init_mb_mgr_t)(struct IMB_MGR *);
725 typedef IMB_JOB *(*get_next_job_t)(struct IMB_MGR *);
726 typedef IMB_JOB *(*submit_job_t)(struct IMB_MGR *);
727 typedef IMB_JOB *(*get_completed_job_t)(struct IMB_MGR *);
728 typedef IMB_JOB *(*flush_job_t)(struct IMB_MGR *);
729 typedef uint32_t (*queue_size_t)(struct IMB_MGR *);
730 typedef uint32_t (*burst_fn_t)(struct IMB_MGR *, const uint32_t, struct IMB_JOB **);
731 typedef 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);
735 typedef uint32_t (*submit_hash_burst_t)(struct IMB_MGR *, struct IMB_JOB *, const uint32_t,
736 const IMB_HASH_ALG hash);
737 typedef void (*keyexp_t)(const void *, void *, void *);
738 typedef void (*cmac_subkey_gen_t)(const void *, void *, void *);
739 typedef void (*hash_one_block_t)(const void *, void *);
740 typedef void (*hash_fn_t)(const void *, const uint64_t, void *);
741 typedef void (*xcbc_keyexp_t)(const void *, void *, void *, void *);
742 typedef int (*des_keysched_t)(uint64_t *, const void *);
743 typedef void (*aes_cfb_t)(void *, const void *, const void *, const void *, uint64_t);
744 typedef 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);
747 typedef 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);
751 typedef void (*aes_gcm_init_t)(const struct gcm_key_data *, struct gcm_context_data *,
752 const uint8_t *, uint8_t const *, uint64_t);
753 typedef 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);
756 typedef void (*aes_gcm_enc_dec_update_t)(const struct gcm_key_data *, struct gcm_context_data *,
757 uint8_t *, const uint8_t *, uint64_t);
758 typedef void (*aes_gcm_enc_dec_finalize_t)(const struct gcm_key_data *, struct gcm_context_data *,
759 uint8_t *, uint64_t);
760 typedef void (*aes_gcm_precomp_t)(struct gcm_key_data *);
761 typedef void (*aes_gcm_pre_t)(const void *, struct gcm_key_data *);
762
763 typedef void (*aes_gmac_init_t)(const struct gcm_key_data *, struct gcm_context_data *,
764 const uint8_t *, const uint64_t);
765 typedef void (*aes_gmac_update_t)(const struct gcm_key_data *, struct gcm_context_data *,
766 const uint8_t *, const uint64_t);
767 typedef void (*aes_gmac_finalize_t)(const struct gcm_key_data *, struct gcm_context_data *,
768 uint8_t *, const uint64_t);
769
770 typedef void (*chacha_poly_init_t)(const void *, struct chacha20_poly1305_context_data *,
771 const void *, const void *, const uint64_t);
772 typedef void (*chacha_poly_enc_dec_update_t)(const void *, struct chacha20_poly1305_context_data *,
773 void *, const void *, const uint64_t);
774 typedef void (*chacha_poly_finalize_t)(struct chacha20_poly1305_context_data *, void *,
775 const uint64_t);
776 typedef void (*ghash_t)(const struct gcm_key_data *, const void *, const uint64_t, void *,
777 const uint64_t);
778
779 typedef void (*zuc_eea3_1_buffer_t)(const void *, const void *, const void *, void *,
780 const uint32_t);
781
782 typedef void (*zuc_eea3_4_buffer_t)(const void *const *, const void *const *, const void *const *,
783 void **, const uint32_t *);
784
785 typedef void (*zuc_eea3_n_buffer_t)(const void *const *, const void *const *, const void *const *,
786 void **, const uint32_t *, const uint32_t);
787
788 typedef void (*zuc_eia3_1_buffer_t)(const void *, const void *, const void *, const uint32_t,
789 uint32_t *);
790
791 typedef 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
794 typedef void (*kasumi_f8_1_buffer_t)(const kasumi_key_sched_t *, const uint64_t, const void *,
795 void *, const uint32_t);
796 typedef 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);
798 typedef 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);
801 typedef 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);
804 typedef 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);
808 typedef 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);
811 typedef 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);
813 typedef void (*kasumi_f9_1_buffer_t)(const kasumi_key_sched_t *, const void *, const uint32_t,
814 void *);
815 typedef int (*kasumi_init_f8_key_sched_t)(const void *, kasumi_key_sched_t *);
816 typedef int (*kasumi_init_f9_key_sched_t)(const void *, kasumi_key_sched_t *);
817 typedef size_t (*kasumi_key_sched_size_t)(void);
818
822 typedef struct snow3g_key_schedule_s {
823 /* KEY */
824 uint32_t k[4];
825} snow3g_key_schedule_t;
826
827 typedef void (*snow3g_f8_1_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *,
828 void *, const uint32_t);
829
830 typedef 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
833 typedef 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
837 typedef 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
843 typedef 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
852 typedef void (*snow3g_f8_8_buffer_multikey_t)(const snow3g_key_schedule_t *const[],
853 const void *const[], const void *const[], void *[],
854 const uint32_t[]);
855
856 typedef 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
860 typedef void (*snow3g_f8_n_buffer_multikey_t)(const snow3g_key_schedule_t *const[],
861 const void *const[], const void *const[], void *[],
862 const uint32_t[], const uint32_t);
863
864 typedef void (*snow3g_f9_1_buffer_t)(const snow3g_key_schedule_t *, const void *, const void *,
865 const uint64_t, void *);
866
867 typedef int (*snow3g_init_key_sched_t)(const void *, snow3g_key_schedule_t *);
868
869 typedef size_t (*snow3g_key_sched_size_t)(void);
870
871 typedef uint32_t (*hec_32_t)(const uint8_t *);
872 typedef uint64_t (*hec_64_t)(const uint8_t *);
873
874 typedef uint32_t (*crc32_fn_t)(const void *, const uint64_t);
875
876 typedef void (*aes_ecb_quic_t)(const void *, const void *, void *out, uint64_t);
877
878 typedef IMB_JOB *(*chacha20_poly1305_quic_t)(struct IMB_MGR *, IMB_JOB *);
879
880 typedef void (*chacha20_hp_quic_t)(const void *, const void *const *, void **, const uint64_t);
881
882 typedef void (*sm4_keyexp_t)(const void *, void *, void *);
883
884/* Self-Test callback definitions */
885 typedef struct {
886 const char *phase;
887 const char *type;
888 const char *descr;
889} IMB_SELF_TEST_CALLBACK_DATA;
890
891 typedef 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
974 typedef struct IMB_MGR {
975
976 uint64_t flags;
977 uint64_t features;
979 uint64_t reserved[4];
980 uint8_t reserved2[7];
981 uint8_t used_arch_type;
982 uint32_t used_arch;
984 int imb_errno;
992 get_next_job_t get_next_job;
993 submit_job_t submit_job;
994 submit_job_t submit_job_nocheck;
995 get_completed_job_t get_completed_job;
996 flush_job_t flush_job;
997 queue_size_t queue_size;
998 keyexp_t keyexp_128;
999 keyexp_t keyexp_192;
1000 keyexp_t keyexp_256;
1001 cmac_subkey_gen_t cmac_subkey_gen_128;
1002 xcbc_keyexp_t xcbc_keyexp;
1003 des_keysched_t des_key_sched;
1004 hash_one_block_t sha1_one_block;
1005 hash_one_block_t sha224_one_block;
1006 hash_one_block_t sha256_one_block;
1007 hash_one_block_t sha384_one_block;
1008 hash_one_block_t sha512_one_block;
1009 hash_one_block_t md5_one_block;
1010 hash_fn_t sha1;
1011 hash_fn_t sha224;
1012 hash_fn_t sha256;
1013 hash_fn_t sha384;
1014 hash_fn_t sha512;
1015 aes_cfb_t aes128_cfb_one;
1016
1017 aes_gcm_enc_dec_t gcm128_enc;
1018 aes_gcm_enc_dec_t gcm192_enc;
1019 aes_gcm_enc_dec_t gcm256_enc;
1020 aes_gcm_enc_dec_t gcm128_dec;
1021 aes_gcm_enc_dec_t gcm192_dec;
1022 aes_gcm_enc_dec_t gcm256_dec;
1023 aes_gcm_init_t gcm128_init;
1024 aes_gcm_init_t gcm192_init;
1025 aes_gcm_init_t gcm256_init;
1026 aes_gcm_enc_dec_update_t gcm128_enc_update;
1027 aes_gcm_enc_dec_update_t gcm192_enc_update;
1028 aes_gcm_enc_dec_update_t gcm256_enc_update;
1029 aes_gcm_enc_dec_update_t gcm128_dec_update;
1030 aes_gcm_enc_dec_update_t gcm192_dec_update;
1031 aes_gcm_enc_dec_update_t gcm256_dec_update;
1032 aes_gcm_enc_dec_finalize_t gcm128_enc_finalize;
1033 aes_gcm_enc_dec_finalize_t gcm192_enc_finalize;
1034 aes_gcm_enc_dec_finalize_t gcm256_enc_finalize;
1035 aes_gcm_enc_dec_finalize_t gcm128_dec_finalize;
1036 aes_gcm_enc_dec_finalize_t gcm192_dec_finalize;
1037 aes_gcm_enc_dec_finalize_t gcm256_dec_finalize;
1038 aes_gcm_precomp_t gcm128_precomp;
1039 aes_gcm_precomp_t gcm192_precomp;
1040 aes_gcm_precomp_t gcm256_precomp;
1041 aes_gcm_pre_t gcm128_pre;
1042 aes_gcm_pre_t gcm192_pre;
1043 aes_gcm_pre_t gcm256_pre;
1044
1045 zuc_eea3_1_buffer_t eea3_1_buffer;
1046 zuc_eea3_4_buffer_t eea3_4_buffer;
1047 zuc_eea3_n_buffer_t eea3_n_buffer;
1048 zuc_eia3_1_buffer_t eia3_1_buffer;
1049
1050 kasumi_f8_1_buffer_t f8_1_buffer;
1051 kasumi_f8_1_buffer_bit_t f8_1_buffer_bit;
1052 kasumi_f8_2_buffer_t f8_2_buffer;
1053 kasumi_f8_3_buffer_t f8_3_buffer;
1054 kasumi_f8_4_buffer_t f8_4_buffer;
1055 kasumi_f8_n_buffer_t f8_n_buffer;
1056 kasumi_f9_1_buffer_t f9_1_buffer;
1057 kasumi_f9_1_buffer_user_t f9_1_buffer_user;
1058 kasumi_init_f8_key_sched_t kasumi_init_f8_key_sched;
1059 kasumi_init_f9_key_sched_t kasumi_init_f9_key_sched;
1060 kasumi_key_sched_size_t kasumi_key_sched_size;
1061
1062 snow3g_f8_1_buffer_bit_t snow3g_f8_1_buffer_bit;
1063 snow3g_f8_1_buffer_t snow3g_f8_1_buffer;
1064 snow3g_f8_2_buffer_t snow3g_f8_2_buffer;
1065 snow3g_f8_4_buffer_t snow3g_f8_4_buffer;
1066 snow3g_f8_8_buffer_t snow3g_f8_8_buffer;
1067 snow3g_f8_n_buffer_t snow3g_f8_n_buffer;
1068 snow3g_f8_8_buffer_multikey_t snow3g_f8_8_buffer_multikey;
1069 snow3g_f8_n_buffer_multikey_t snow3g_f8_n_buffer_multikey;
1070 snow3g_f9_1_buffer_t snow3g_f9_1_buffer;
1071 snow3g_init_key_sched_t snow3g_init_key_sched;
1072 snow3g_key_sched_size_t snow3g_key_sched_size;
1073
1074 ghash_t ghash;
1075 zuc_eia3_n_buffer_t eia3_n_buffer;
1076 aes_gcm_init_var_iv_t gcm128_init_var_iv;
1077 aes_gcm_init_var_iv_t gcm192_init_var_iv;
1078 aes_gcm_init_var_iv_t gcm256_init_var_iv;
1079
1080 aes_gmac_init_t gmac128_init;
1081 aes_gmac_init_t gmac192_init;
1082 aes_gmac_init_t gmac256_init;
1083 aes_gmac_update_t gmac128_update;
1084 aes_gmac_update_t gmac192_update;
1085 aes_gmac_update_t gmac256_update;
1086 aes_gmac_finalize_t gmac128_finalize;
1087 aes_gmac_finalize_t gmac192_finalize;
1088 aes_gmac_finalize_t gmac256_finalize;
1089 hec_32_t hec_32;
1090 hec_64_t hec_64;
1091 cmac_subkey_gen_t cmac_subkey_gen_256;
1092 aes_gcm_pre_t ghash_pre;
1093 crc32_fn_t crc32_ethernet_fcs;
1094 crc32_fn_t crc16_x25;
1095 crc32_fn_t crc32_sctp;
1096 crc32_fn_t crc24_lte_a;
1097 crc32_fn_t crc24_lte_b;
1098 crc32_fn_t crc16_fp_data;
1099 crc32_fn_t crc11_fp_header;
1100 crc32_fn_t crc7_fp_header;
1101 crc32_fn_t crc10_iuup_data;
1102 crc32_fn_t crc6_iuup_header;
1103 crc32_fn_t crc32_wimax_ofdma_data;
1104 crc32_fn_t crc8_wimax_ofdma_hcs;
1105
1106 chacha_poly_init_t chacha20_poly1305_init;
1107 chacha_poly_enc_dec_update_t chacha20_poly1305_enc_update;
1108 chacha_poly_enc_dec_update_t chacha20_poly1305_dec_update;
1109 chacha_poly_finalize_t chacha20_poly1305_finalize;
1110
1111 burst_fn_t get_next_burst;
1112 burst_fn_t submit_burst;
1113 burst_fn_t submit_burst_nocheck;
1114 burst_fn_t flush_burst;
1115 submit_cipher_burst_t submit_cipher_burst;
1116 submit_cipher_burst_t submit_cipher_burst_nocheck;
1117 submit_hash_burst_t submit_hash_burst;
1118 submit_hash_burst_t submit_hash_burst_nocheck;
1119 aes_cfb_t aes256_cfb_one;
1120
1121 aes_ecb_quic_t aes_ecb_128_quic;
1122 aes_ecb_quic_t aes_ecb_256_quic;
1123
1124 void (*set_suite_id)(struct IMB_MGR *, IMB_JOB *);
1125
1126 chacha20_poly1305_quic_t chacha20_poly1305_quic;
1127 chacha20_hp_quic_t chacha20_hp_quic;
1128
1129 sm4_keyexp_t sm4_keyexp;
1130
1131 imb_self_test_cb_t self_test_cb_fn;
1132 void *self_test_cb_arg;
1133
1134 submit_cipher_burst_t submit_aead_burst;
1135 submit_cipher_burst_t submit_aead_burst_nocheck;
1136
1137 /* in-order scheduler fields */
1138 int earliest_job;
1139 int next_job;
1140 IMB_JOB jobs[IMB_MAX_JOBS];
1141
1142 /* out of order managers */
1143 void *aes128_ooo;
1144 void *aes192_ooo;
1145 void *aes256_ooo;
1146 void *docsis128_sec_ooo;
1147 void *docsis128_crc32_sec_ooo;
1148 void *docsis256_sec_ooo;
1149 void *docsis256_crc32_sec_ooo;
1150 void *des_enc_ooo;
1151 void *des_dec_ooo;
1152 void *des3_enc_ooo;
1153 void *des3_dec_ooo;
1154 void *docsis_des_enc_ooo;
1155 void *docsis_des_dec_ooo;
1156
1157 void *hmac_sha_1_ooo;
1158 void *hmac_sha_224_ooo;
1159 void *hmac_sha_256_ooo;
1160 void *hmac_sha_384_ooo;
1161 void *hmac_sha_512_ooo;
1162 void *hmac_md5_ooo;
1163 void *aes_xcbc_ooo;
1164 void *aes_ccm_ooo;
1165 void *aes_cmac_ooo;
1166 void *zuc_eea3_ooo;
1167 void *zuc_eia3_ooo;
1168 void *aes128_cbcs_ooo;
1169 void *zuc256_eea3_ooo;
1170 void *zuc256_eia3_ooo;
1171 void *aes256_ccm_ooo;
1172 void *aes256_cmac_ooo;
1173 void *snow3g_uea2_ooo;
1174 void *snow3g_uia2_ooo;
1175 void *sha_1_ooo;
1176 void *sha_224_ooo;
1177 void *sha_256_ooo;
1178 void *sha_384_ooo;
1179 void *sha_512_ooo;
1180 void *zuc256_eia3_8B_ooo;
1181 void *zuc256_eia3_16B_ooo;
1182 void *aes_cfb_128_ooo;
1183 void *aes_cfb_192_ooo;
1184 void *aes_cfb_256_ooo;
1185 void *end_ooo; /* add new out-of-order managers above this line */
1186} IMB_MGR;
1187
1197 IMB_DLL_EXPORT const char *
1198imb_get_version_str(void);
1199
1208 IMB_DLL_EXPORT unsigned
1209imb_get_version(void);
1210
1218 IMB_DLL_EXPORT int
1219imb_get_errno(IMB_MGR *mb_mgr);
1220
1228 IMB_DLL_EXPORT const char *
1229imb_get_strerror(int errnum);
1230
1255 IMB_DLL_EXPORT IMB_MGR *
1256alloc_mb_mgr(uint64_t flags);
1257
1264 IMB_DLL_EXPORT void
1265free_mb_mgr(IMB_MGR *ptr);
1266
1272 IMB_DLL_EXPORT size_t
1273imb_get_mb_mgr_size(void);
1274
1296 IMB_DLL_EXPORT IMB_MGR *
1297imb_set_pointers_mb_mgr(void *ptr, const uint64_t flags, const unsigned reset_mgr);
1298
1305 IMB_DLL_EXPORT uint64_t
1306imb_get_feature_flags(void);
1307
1318 IMB_DLL_EXPORT void
1319init_mb_mgr_avx2(IMB_MGR *state);
1323 IMB_DLL_EXPORT void
1324init_mb_mgr_avx512(IMB_MGR *state);
1328 IMB_DLL_EXPORT void
1329init_mb_mgr_sse(IMB_MGR *state);
1330
1340 IMB_DLL_EXPORT IMB_JOB *
1341submit_job_avx2(IMB_MGR *state);
1345 IMB_DLL_EXPORT IMB_JOB *
1346submit_job_avx512(IMB_MGR *state);
1350 IMB_DLL_EXPORT IMB_JOB *
1351submit_job_sse(IMB_MGR *state);
1352
1362 IMB_DLL_EXPORT IMB_JOB *
1363submit_job_nocheck_avx2(IMB_MGR *state);
1367 IMB_DLL_EXPORT IMB_JOB *
1368submit_job_nocheck_avx512(IMB_MGR *state);
1372 IMB_DLL_EXPORT IMB_JOB *
1373submit_job_nocheck_sse(IMB_MGR *state);
1374
1382 IMB_DLL_EXPORT IMB_JOB *
1383flush_job_avx2(IMB_MGR *state);
1387 IMB_DLL_EXPORT IMB_JOB *
1388flush_job_avx512(IMB_MGR *state);
1392 IMB_DLL_EXPORT IMB_JOB *
1393flush_job_sse(IMB_MGR *state);
1394
1402 IMB_DLL_EXPORT uint32_t
1403queue_size_avx2(IMB_MGR *state);
1407 IMB_DLL_EXPORT uint32_t
1408queue_size_avx512(IMB_MGR *state);
1412 IMB_DLL_EXPORT uint32_t
1413queue_size_sse(IMB_MGR *state);
1414
1422 IMB_DLL_EXPORT IMB_JOB *
1423get_completed_job_avx2(IMB_MGR *state);
1427 IMB_DLL_EXPORT IMB_JOB *
1428get_completed_job_avx512(IMB_MGR *state);
1432 IMB_DLL_EXPORT IMB_JOB *
1433get_completed_job_sse(IMB_MGR *state);
1434
1442 IMB_DLL_EXPORT IMB_JOB *
1443get_next_job_avx2(IMB_MGR *state);
1447 IMB_DLL_EXPORT IMB_JOB *
1448get_next_job_avx512(IMB_MGR *state);
1452 IMB_DLL_EXPORT IMB_JOB *
1453get_next_job_sse(IMB_MGR *state);
1454
1463 IMB_DLL_EXPORT void
1464init_mb_mgr_auto(IMB_MGR *state, IMB_ARCH *arch);
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
2636 IMB_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
2653 IMB_DLL_EXPORT int
2654des_key_schedule(uint64_t *ks, const void *key);
2655
2666 IMB_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
2682 IMB_DLL_EXPORT void
2683des_cfb_one(void *out, const void *in, const uint64_t *iv, const uint64_t *ks, const int len);
2684
2691 IMB_DLL_EXPORT void
2692md5_one_block_sse(const void *data, void *digest);
2696 IMB_DLL_EXPORT void
2697md5_one_block_avx2(const void *data, void *digest);
2701 IMB_DLL_EXPORT void
2702md5_one_block_avx512(const void *data, void *digest);
2703
2711 IMB_DLL_EXPORT void
2712aes_keyexp_128_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2716 IMB_DLL_EXPORT void
2717aes_keyexp_128_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2721 IMB_DLL_EXPORT void
2722aes_keyexp_128_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2726 IMB_DLL_EXPORT void
2727aes_keyexp_128_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2728
2736 IMB_DLL_EXPORT void
2737aes_keyexp_192_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2741 IMB_DLL_EXPORT void
2742aes_keyexp_192_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2746 IMB_DLL_EXPORT void
2747aes_keyexp_192_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2751 IMB_DLL_EXPORT void
2752aes_keyexp_192_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2753
2761 IMB_DLL_EXPORT void
2762aes_keyexp_256_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2766 IMB_DLL_EXPORT void
2767aes_keyexp_256_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2771 IMB_DLL_EXPORT void
2772aes_keyexp_256_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2776 IMB_DLL_EXPORT void
2777aes_keyexp_256_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys);
2778
2785 IMB_DLL_EXPORT void
2786aes_keyexp_128_enc_sse(const void *key, void *enc_exp_keys);
2790 IMB_DLL_EXPORT void
2791aes_keyexp_128_enc_avx(const void *key, void *enc_exp_keys);
2795 IMB_DLL_EXPORT void
2796aes_keyexp_128_enc_avx2(const void *key, void *enc_exp_keys);
2800 IMB_DLL_EXPORT void
2801aes_keyexp_128_enc_avx512(const void *key, void *enc_exp_keys);
2802
2809 IMB_DLL_EXPORT void
2810aes_keyexp_192_enc_sse(const void *key, void *enc_exp_keys);
2814 IMB_DLL_EXPORT void
2815aes_keyexp_192_enc_avx(const void *key, void *enc_exp_keys);
2819 IMB_DLL_EXPORT void
2820aes_keyexp_192_enc_avx2(const void *key, void *enc_exp_keys);
2824 IMB_DLL_EXPORT void
2825aes_keyexp_192_enc_avx512(const void *key, void *enc_exp_keys);
2826
2833 IMB_DLL_EXPORT void
2834aes_keyexp_256_enc_sse(const void *key, void *enc_exp_keys);
2838 IMB_DLL_EXPORT void
2839aes_keyexp_256_enc_avx(const void *key, void *enc_exp_keys);
2843 IMB_DLL_EXPORT void
2844aes_keyexp_256_enc_avx2(const void *key, void *enc_exp_keys);
2848 IMB_DLL_EXPORT void
2849aes_keyexp_256_enc_avx512(const void *key, void *enc_exp_keys);
2850
2859 IMB_DLL_EXPORT void
2860aes_xcbc_expand_key_sse(const void *key, void *k1_exp, void *k2, void *k3);
2864 IMB_DLL_EXPORT void
2865aes_xcbc_expand_key_avx(const void *key, void *k1_exp, void *k2, void *k3);
2869 IMB_DLL_EXPORT void
2870aes_xcbc_expand_key_avx2(const void *key, void *k1_exp, void *k2, void *k3);
2874 IMB_DLL_EXPORT void
2875aes_xcbc_expand_key_avx512(const void *key, void *k1_exp, void *k2, void *k3);
2876
2884 IMB_DLL_EXPORT void
2885aes_cmac_subkey_gen_sse(const void *key_exp, void *key1, void *key2);
2889 IMB_DLL_EXPORT void
2890aes_cmac_subkey_gen_avx(const void *key_exp, void *key1, void *key2);
2894 IMB_DLL_EXPORT void
2895aes_cmac_subkey_gen_avx2(const void *key_exp, void *key1, void *key2);
2899 IMB_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
2925 IMB_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);
2932 IMB_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);
2955 IMB_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);
2962 IMB_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
2986 IMB_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);
2993 IMB_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
3017 IMB_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);
3024 IMB_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
3048 IMB_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);
3055 IMB_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
3079 IMB_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);
3086 IMB_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
3104 IMB_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);
3110 IMB_DLL_EXPORT void
3111aes_gcm_init_128_avx_gen4(const struct gcm_key_data *key_data,
3112 struct gcm_context_data *context_data, const uint8_t *iv,
3113 uint8_t const *aad, uint64_t aad_len);
3126 IMB_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);
3132 IMB_DLL_EXPORT void
3133aes_gcm_init_192_avx_gen4(const struct gcm_key_data *key_data,
3134 struct gcm_context_data *context_data, const uint8_t *iv,
3135 uint8_t const *aad, uint64_t aad_len);
3148 IMB_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);
3154 IMB_DLL_EXPORT void
3155aes_gcm_init_256_avx_gen4(const struct gcm_key_data *key_data,
3156 struct gcm_context_data *context_data, const uint8_t *iv,
3157 uint8_t const *aad, uint64_t aad_len);
3158
3168 IMB_DLL_EXPORT void
3169aes_gcm_enc_128_update_sse(const struct gcm_key_data *key_data,
3170 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3171 uint64_t len);
3175 IMB_DLL_EXPORT void
3176aes_gcm_enc_128_update_avx_gen4(const struct gcm_key_data *key_data,
3177 struct gcm_context_data *context_data, uint8_t *out,
3178 const uint8_t *in, uint64_t len);
3179
3189 IMB_DLL_EXPORT void
3190aes_gcm_enc_192_update_sse(const struct gcm_key_data *key_data,
3191 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3192 uint64_t len);
3196 IMB_DLL_EXPORT void
3197aes_gcm_enc_192_update_avx_gen4(const struct gcm_key_data *key_data,
3198 struct gcm_context_data *context_data, uint8_t *out,
3199 const uint8_t *in, uint64_t len);
3200
3210 IMB_DLL_EXPORT void
3211aes_gcm_enc_256_update_sse(const struct gcm_key_data *key_data,
3212 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3213 uint64_t len);
3217 IMB_DLL_EXPORT void
3218aes_gcm_enc_256_update_avx_gen4(const struct gcm_key_data *key_data,
3219 struct gcm_context_data *context_data, uint8_t *out,
3220 const uint8_t *in, uint64_t len);
3221
3231 IMB_DLL_EXPORT void
3232aes_gcm_dec_128_update_sse(const struct gcm_key_data *key_data,
3233 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3234 uint64_t len);
3238 IMB_DLL_EXPORT void
3239aes_gcm_dec_128_update_avx_gen4(const struct gcm_key_data *key_data,
3240 struct gcm_context_data *context_data, uint8_t *out,
3241 const uint8_t *in, uint64_t len);
3242
3252 IMB_DLL_EXPORT void
3253aes_gcm_dec_192_update_sse(const struct gcm_key_data *key_data,
3254 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3255 uint64_t len);
3259 IMB_DLL_EXPORT void
3260aes_gcm_dec_192_update_avx_gen4(const struct gcm_key_data *key_data,
3261 struct gcm_context_data *context_data, uint8_t *out,
3262 const uint8_t *in, uint64_t len);
3263
3273 IMB_DLL_EXPORT void
3274aes_gcm_dec_256_update_sse(const struct gcm_key_data *key_data,
3275 struct gcm_context_data *context_data, uint8_t *out, const uint8_t *in,
3276 uint64_t len);
3280 IMB_DLL_EXPORT void
3281aes_gcm_dec_256_update_avx_gen4(const struct gcm_key_data *key_data,
3282 struct gcm_context_data *context_data, uint8_t *out,
3283 const uint8_t *in, uint64_t len);
3284
3295 IMB_DLL_EXPORT void
3296aes_gcm_enc_128_finalize_sse(const struct gcm_key_data *key_data,
3297 struct gcm_context_data *context_data, uint8_t *auth_tag,
3298 uint64_t auth_tag_len);
3302 IMB_DLL_EXPORT void
3303aes_gcm_enc_128_finalize_avx_gen4(const struct gcm_key_data *key_data,
3304 struct gcm_context_data *context_data, uint8_t *auth_tag,
3305 uint64_t auth_tag_len);
3306
3317 IMB_DLL_EXPORT void
3318aes_gcm_enc_192_finalize_sse(const struct gcm_key_data *key_data,
3319 struct gcm_context_data *context_data, uint8_t *auth_tag,
3320 uint64_t auth_tag_len);
3324 IMB_DLL_EXPORT void
3325aes_gcm_enc_192_finalize_avx_gen4(const struct gcm_key_data *key_data,
3326 struct gcm_context_data *context_data, uint8_t *auth_tag,
3327 uint64_t auth_tag_len);
3328
3339 IMB_DLL_EXPORT void
3340aes_gcm_enc_256_finalize_sse(const struct gcm_key_data *key_data,
3341 struct gcm_context_data *context_data, uint8_t *auth_tag,
3342 uint64_t auth_tag_len);
3346 IMB_DLL_EXPORT void
3347aes_gcm_enc_256_finalize_avx_gen4(const struct gcm_key_data *key_data,
3348 struct gcm_context_data *context_data, uint8_t *auth_tag,
3349 uint64_t auth_tag_len);
3350
3361 IMB_DLL_EXPORT void
3362aes_gcm_dec_128_finalize_sse(const struct gcm_key_data *key_data,
3363 struct gcm_context_data *context_data, uint8_t *auth_tag,
3364 uint64_t auth_tag_len);
3368 IMB_DLL_EXPORT void
3369aes_gcm_dec_128_finalize_avx_gen4(const struct gcm_key_data *key_data,
3370 struct gcm_context_data *context_data, uint8_t *auth_tag,
3371 uint64_t auth_tag_len);
3372
3383 IMB_DLL_EXPORT void
3384aes_gcm_dec_192_finalize_sse(const struct gcm_key_data *key_data,
3385 struct gcm_context_data *context_data, uint8_t *auth_tag,
3386 uint64_t auth_tag_len);
3390 IMB_DLL_EXPORT void
3391aes_gcm_dec_192_finalize_avx_gen4(const struct gcm_key_data *key_data,
3392 struct gcm_context_data *context_data, uint8_t *auth_tag,
3393 uint64_t auth_tag_len);
3394
3405 IMB_DLL_EXPORT void
3406aes_gcm_dec_256_finalize_sse(const struct gcm_key_data *key_data,
3407 struct gcm_context_data *context_data, uint8_t *auth_tag,
3408 uint64_t auth_tag_len);
3412 IMB_DLL_EXPORT void
3413aes_gcm_dec_256_finalize_avx_gen4(const struct gcm_key_data *key_data,
3414 struct gcm_context_data *context_data, uint8_t *auth_tag,
3415 uint64_t auth_tag_len);
3416
3425 IMB_DLL_EXPORT void
3426aes_gcm_precomp_128_sse(struct gcm_key_data *key_data);
3427
3431 IMB_DLL_EXPORT void
3432aes_gcm_precomp_128_avx_gen4(struct gcm_key_data *key_data);
3433
3442 IMB_DLL_EXPORT void
3443aes_gcm_precomp_192_sse(struct gcm_key_data *key_data);
3444
3448 IMB_DLL_EXPORT void
3449aes_gcm_precomp_192_avx_gen4(struct gcm_key_data *key_data);
3450
3459 IMB_DLL_EXPORT void
3460aes_gcm_precomp_256_sse(struct gcm_key_data *key_data);
3461
3465 IMB_DLL_EXPORT void
3466aes_gcm_precomp_256_avx_gen4(struct gcm_key_data *key_data);
3467
3477 IMB_DLL_EXPORT void
3478aes_gcm_pre_128_sse(const void *key, struct gcm_key_data *key_data);
3482 IMB_DLL_EXPORT void
3483aes_gcm_pre_128_avx_gen4(const void *key, struct gcm_key_data *key_data);
3493 IMB_DLL_EXPORT void
3494aes_gcm_pre_192_sse(const void *key, struct gcm_key_data *key_data);
3498 IMB_DLL_EXPORT void
3499aes_gcm_pre_192_avx_gen4(const void *key, struct gcm_key_data *key_data);
3509 IMB_DLL_EXPORT void
3510aes_gcm_pre_256_sse(const void *key, struct gcm_key_data *key_data);
3514 IMB_DLL_EXPORT void
3515aes_gcm_pre_256_avx_gen4(const void *key, struct gcm_key_data *key_data);
3516
3529 IMB_DLL_EXPORT int
3530zuc_eea3_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr);
3543 IMB_DLL_EXPORT int
3544zuc_eia3_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr);
3545
3558 IMB_DLL_EXPORT int
3559kasumi_f8_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr);
3571 IMB_DLL_EXPORT int
3572kasumi_f9_iv_gen(const uint32_t count, const uint32_t fresh, void *iv_ptr);
3573
3589 IMB_DLL_EXPORT int
3590snow3g_f8_iv_gen(const uint32_t count, const uint8_t bearer, const uint8_t dir, void *iv_ptr);
3606 IMB_DLL_EXPORT int
3607snow3g_f9_iv_gen(const uint32_t count, const uint32_t fresh, const uint8_t dir, void *iv_ptr);
3614 IMB_DLL_EXPORT void
3615imb_clear_mem(void *mem, const size_t size);
3616
3638 IMB_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
3660 IMB_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
3682 IMB_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
3702 IMB_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
3745 IMB_DLL_EXPORT uint32_t
3746imb_set_session(IMB_MGR *state, IMB_JOB *job);
3747
3760 IMB_DLL_EXPORT int
3761imb_self_test_set_cb(IMB_MGR *state, imb_self_test_cb_t cb_fn, void *cb_arg);
3762
3776 IMB_DLL_EXPORT int
3777imb_self_test_get_cb(IMB_MGR *state, imb_self_test_cb_t *cb_fn, void **cb_arg);
3778
3793 IMB_DLL_EXPORT int
3794imb_get_arch_type_string(const IMB_MGR *state, const char **arch_type, const char **description);
3795
3819 IMB_DLL_EXPORT int
3820imb_hash_burst_get_size(const IMB_MGR *mb_mgr, const IMB_HASH_ALG algo, unsigned *out_burst_size);
3821
3840 IMB_DLL_EXPORT int
3841imb_cipher_burst_get_size(const IMB_MGR *mb_mgr, const IMB_CIPHER_MODE cipher_mode,
3842 unsigned *out_burst_size);
3843
3862 IMB_DLL_EXPORT int
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 */
aes_gcm_enc_128_finalize_avx_gen4
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.
get_next_job_sse
IMB_DLL_EXPORT IMB_JOB * get_next_job_sse(IMB_MGR *state)
Get next available job.
KASUMI_KEY_SCHEDULE_SIZE
#define KASUMI_KEY_SCHEDULE_SIZE
Definition intel-ipsec-mb.h:562
sm4_keyexp_t
void(* sm4_keyexp_t)(const void *, void *, void *)
Definition intel-ipsec-mb.h:882
aes_gcm_pre_256_avx_gen4
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.
aes_gcm_dec_128_finalize_sse
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.
aes_gcm_init_256_sse
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.
zuc_eea3_1_buffer_t
void(* zuc_eea3_1_buffer_t)(const void *, const void *, const void *, void *, const uint32_t)
Definition intel-ipsec-mb.h:779
aes_keyexp_192_enc_sse
IMB_DLL_EXPORT void aes_keyexp_192_enc_sse(const void *key, void *enc_exp_keys)
IMB_GCM_ENC_KEY_LEN
#define IMB_GCM_ENC_KEY_LEN
Definition intel-ipsec-mb.h:635
imb_hash_burst_get_size
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.
aes_gcm_dec_192_finalize_sse
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.
aes_gcm_pre_t
void(* aes_gcm_pre_t)(const void *, struct gcm_key_data *)
Definition intel-ipsec-mb.h:761
ghash_t
void(* ghash_t)(const struct gcm_key_data *, const void *, const uint64_t, void *, const uint64_t)
Definition intel-ipsec-mb.h:776
aes_xcbc_expand_key_avx512
IMB_DLL_EXPORT void aes_xcbc_expand_key_avx512(const void *key, void *k1_exp, void *k2, void *k3)
aes_gcm_dec_256_update_avx_gen4
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_self_test_get_cb
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.
aes_gcm_enc_192_update_avx_gen4
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_aead_burst_get_size
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.
aes_gcm_precomp_256_sse
IMB_DLL_EXPORT void aes_gcm_precomp_256_sse(struct gcm_key_data *key_data)
Precomputation of AES-GCM-256 HashKey constants.
aes_gcm_pre_256_sse
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_quic_chacha20_poly1305
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.
chacha_poly_finalize_t
void(* chacha_poly_finalize_t)(struct chacha20_poly1305_context_data *, void *, const uint64_t)
Definition intel-ipsec-mb.h:774
chacha20_poly1305_quic_t
IMB_JOB *(* chacha20_poly1305_quic_t)(struct IMB_MGR *, IMB_JOB *)
Definition intel-ipsec-mb.h:878
aes_keyexp_192_avx512
IMB_DLL_EXPORT void aes_keyexp_192_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_KEY_SIZE_BYTES
IMB_KEY_SIZE_BYTES
Definition intel-ipsec-mb.h:358
IMB_KEY_192_BYTES
@ IMB_KEY_192_BYTES
Definition intel-ipsec-mb.h:361
IMB_KEY_64_BYTES
@ IMB_KEY_64_BYTES
Definition intel-ipsec-mb.h:359
IMB_KEY_256_BYTES
@ IMB_KEY_256_BYTES
Definition intel-ipsec-mb.h:362
IMB_KEY_128_BYTES
@ IMB_KEY_128_BYTES
Definition intel-ipsec-mb.h:360
aes_keyexp_256_enc_avx
IMB_DLL_EXPORT void aes_keyexp_256_enc_avx(const void *key, void *enc_exp_keys)
aes_gcm_dec_128_update_sse
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.
free_mb_mgr
IMB_DLL_EXPORT void free_mb_mgr(IMB_MGR *ptr)
Frees memory allocated previously by alloc_mb_mgr()
get_completed_job_sse
IMB_DLL_EXPORT IMB_JOB * get_completed_job_sse(IMB_MGR *state)
Get next completed job.
aes_keyexp_128_enc_sse
IMB_DLL_EXPORT void aes_keyexp_128_enc_sse(const void *key, void *enc_exp_keys)
snow3g_f8_1_buffer_t
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
init_mb_mgr_sse
IMB_DLL_EXPORT void init_mb_mgr_sse(IMB_MGR *state)
Initialize Multi-Buffer Manager structure.
init_mb_mgr_auto
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.
snow3g_f8_iv_gen
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.
zuc_eea3_n_buffer_t
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
aes_gmac_init_t
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
IMB_CHACHA20_POLY1305_KEY_SIZE
#define IMB_CHACHA20_POLY1305_KEY_SIZE
Definition intel-ipsec-mb.h:167
aes_keyexp_128_sse
IMB_DLL_EXPORT void aes_keyexp_128_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys)
submit_job_nocheck_sse
IMB_DLL_EXPORT IMB_JOB * submit_job_nocheck_sse(IMB_MGR *state)
Submit job for processing without validating.
aes_keyexp_256_avx512
IMB_DLL_EXPORT void aes_keyexp_256_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys)
kasumi_f8_iv_gen
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_set_pointers_mb_mgr
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.
aes_keyexp_192_avx
IMB_DLL_EXPORT void aes_keyexp_192_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys)
IMB_CIPHER_MODE
IMB_CIPHER_MODE
Definition intel-ipsec-mb.h:265
IMB_CIPHER_DES
@ IMB_CIPHER_DES
Definition intel-ipsec-mb.h:273
IMB_CIPHER_NULL
@ IMB_CIPHER_NULL
Definition intel-ipsec-mb.h:269
IMB_CIPHER_CBC
@ IMB_CIPHER_CBC
Definition intel-ipsec-mb.h:266
IMB_CIPHER_GCM
@ IMB_CIPHER_GCM
Definition intel-ipsec-mb.h:271
IMB_CIPHER_ECB
@ IMB_CIPHER_ECB
Definition intel-ipsec-mb.h:279
IMB_CIPHER_ZUC_EEA3
@ IMB_CIPHER_ZUC_EEA3
Definition intel-ipsec-mb.h:282
IMB_CIPHER_CHACHA20
@ IMB_CIPHER_CHACHA20
Definition intel-ipsec-mb.h:286
IMB_CIPHER_KASUMI_UEA1_BITLEN
@ IMB_CIPHER_KASUMI_UEA1_BITLEN
Definition intel-ipsec-mb.h:284
IMB_CIPHER_CHACHA20_POLY1305_SGL
@ IMB_CIPHER_CHACHA20_POLY1305_SGL
Definition intel-ipsec-mb.h:288
IMB_CIPHER_CUSTOM
@ IMB_CIPHER_CUSTOM
Definition intel-ipsec-mb.h:272
IMB_CIPHER_GCM_SGL
@ IMB_CIPHER_GCM_SGL
Definition intel-ipsec-mb.h:291
IMB_CIPHER_CNTR
@ IMB_CIPHER_CNTR
Definition intel-ipsec-mb.h:267
IMB_CIPHER_PON_AES_CTR
@ IMB_CIPHER_PON_AES_CTR
Definition intel-ipsec-mb.h:278
IMB_CIPHER_DES3
@ IMB_CIPHER_DES3
Definition intel-ipsec-mb.h:276
IMB_CIPHER_CNTR_BITLEN
@ IMB_CIPHER_CNTR_BITLEN
Definition intel-ipsec-mb.h:280
IMB_CIPHER_CBCS_1_9
@ IMB_CIPHER_CBCS_1_9
Definition intel-ipsec-mb.h:285
IMB_CIPHER_NUM
@ IMB_CIPHER_NUM
Definition intel-ipsec-mb.h:298
IMB_CIPHER_SM4_ECB
@ IMB_CIPHER_SM4_ECB
Definition intel-ipsec-mb.h:292
IMB_CIPHER_CCM
@ IMB_CIPHER_CCM
Definition intel-ipsec-mb.h:275
IMB_CIPHER_SNOW3G_UEA2_BITLEN
@ IMB_CIPHER_SNOW3G_UEA2_BITLEN
Definition intel-ipsec-mb.h:283
IMB_CIPHER_PON_AES_CNTR
@ IMB_CIPHER_PON_AES_CNTR
Definition intel-ipsec-mb.h:277
IMB_CIPHER_SM4_CNTR
@ IMB_CIPHER_SM4_CNTR
Definition intel-ipsec-mb.h:295
IMB_CIPHER_SM4_GCM
@ IMB_CIPHER_SM4_GCM
Definition intel-ipsec-mb.h:297
IMB_CIPHER_CHACHA20_POLY1305
@ IMB_CIPHER_CHACHA20_POLY1305
Definition intel-ipsec-mb.h:287
IMB_CIPHER_SM4_CTR
@ IMB_CIPHER_SM4_CTR
Definition intel-ipsec-mb.h:296
IMB_CIPHER_SM4_CBC
@ IMB_CIPHER_SM4_CBC
Definition intel-ipsec-mb.h:293
IMB_CIPHER_SNOW_V_AEAD
@ IMB_CIPHER_SNOW_V_AEAD
Definition intel-ipsec-mb.h:290
IMB_CIPHER_CTR
@ IMB_CIPHER_CTR
Definition intel-ipsec-mb.h:268
IMB_CIPHER_CFB
@ IMB_CIPHER_CFB
Definition intel-ipsec-mb.h:294
IMB_CIPHER_CTR_BITLEN
@ IMB_CIPHER_CTR_BITLEN
Definition intel-ipsec-mb.h:281
IMB_CIPHER_DOCSIS_SEC_BPI
@ IMB_CIPHER_DOCSIS_SEC_BPI
Definition intel-ipsec-mb.h:270
IMB_CIPHER_DOCSIS_DES
@ IMB_CIPHER_DOCSIS_DES
Definition intel-ipsec-mb.h:274
IMB_CIPHER_SNOW_V
@ IMB_CIPHER_SNOW_V
Definition intel-ipsec-mb.h:289
imb_hmac_ipad_opad
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.
aes_gcm_pre_128_avx_gen4
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_quic_hp_chacha20
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.
get_next_job_avx512
IMB_DLL_EXPORT IMB_JOB * get_next_job_avx512(IMB_MGR *state)
Get next available job.
submit_job_t
IMB_JOB *(* submit_job_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:726
chacha_poly_enc_dec_update_t
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
aes_gcm_dec_128_update_avx_gen4
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_get_version_str
IMB_DLL_EXPORT const char * imb_get_version_str(void)
Get library version in string format.
aes_keyexp_192_enc_avx2
IMB_DLL_EXPORT void aes_keyexp_192_enc_avx2(const void *key, void *enc_exp_keys)
aes_gcm_enc_256_sse
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.
aes_gcm_precomp_128_sse
IMB_DLL_EXPORT void aes_gcm_precomp_128_sse(struct gcm_key_data *key_data)
Precomputation of AES-GCM-128 HashKey constants.
aes_gcm_enc_192_update_sse
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_self_test_set_cb
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.
zuc_eea3_iv_gen
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.
get_next_job_avx2
IMB_DLL_EXPORT IMB_JOB * get_next_job_avx2(IMB_MGR *state)
Get next available job.
IMB_CHAIN_ORDER
IMB_CHAIN_ORDER
Definition intel-ipsec-mb.h:356
IMB_ORDER_HASH_CIPHER
@ IMB_ORDER_HASH_CIPHER
Definition intel-ipsec-mb.h:356
IMB_ORDER_CIPHER_HASH
@ IMB_ORDER_CIPHER_HASH
Definition intel-ipsec-mb.h:356
chacha_poly_init_t
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
aes_cmac_subkey_gen_sse
IMB_DLL_EXPORT void aes_cmac_subkey_gen_sse(const void *key_exp, void *key1, void *key2)
snow3g_f8_2_buffer_t
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
submit_hash_burst_t
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
aes_gcm_enc_192_finalize_avx_gen4
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.
aes_keyexp_128_avx2
IMB_DLL_EXPORT void aes_keyexp_128_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys)
aes_keyexp_256_sse
IMB_DLL_EXPORT void aes_keyexp_256_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys)
kasumi_f8_n_buffer_t
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
queue_size_avx512
IMB_DLL_EXPORT uint32_t queue_size_avx512(IMB_MGR *state)
Get number of jobs queued to be processed.
aes_gcm_enc_256_avx_gen4
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.
aes_keyexp_192_enc_avx
IMB_DLL_EXPORT void aes_keyexp_192_enc_avx(const void *key, void *enc_exp_keys)
kasumi_f8_3_buffer_t
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
crc32_fn_t
uint32_t(* crc32_fn_t)(const void *, const uint64_t)
Definition intel-ipsec-mb.h:874
imb_cipher_burst_get_size
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.
aes_gcm_dec_192_update_sse
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.
IMB_GCM_BLOCK_LEN
#define IMB_GCM_BLOCK_LEN
Definition intel-ipsec-mb.h:574
get_next_job_t
IMB_JOB *(* get_next_job_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:725
submit_job_nocheck_avx512
IMB_DLL_EXPORT IMB_JOB * submit_job_nocheck_avx512(IMB_MGR *state)
Submit job for processing without validating.
aes_keyexp_256_avx
IMB_DLL_EXPORT void aes_keyexp_256_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys)
aes_gcm_init_192_sse
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.
aes_gcm_dec_192_avx_gen4
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.
aes_gcm_pre_128_sse
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.
aes_gcm_enc_192_finalize_sse
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.
IMB_POLY1305_BLOCK_SIZE
#define IMB_POLY1305_BLOCK_SIZE
Definition intel-ipsec-mb.h:169
des_keysched_t
int(* des_keysched_t)(uint64_t *, const void *)
Definition intel-ipsec-mb.h:742
keyexp_t
void(* keyexp_t)(const void *, void *, void *)
Definition intel-ipsec-mb.h:737
snow3g_f8_8_buffer_t
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
aes_gcm_dec_192_update_avx_gen4
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_get_strerror
IMB_DLL_EXPORT const char * imb_get_strerror(int errnum)
API to get description for errnum.
aes_cmac_subkey_gen_avx
IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx(const void *key_exp, void *key1, void *key2)
aes_gcm_init_var_iv_t
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
IMB_CHACHA20_POLY1305_IV_SIZE
#define IMB_CHACHA20_POLY1305_IV_SIZE
Definition intel-ipsec-mb.h:168
aes_keyexp_128_enc_avx512
IMB_DLL_EXPORT void aes_keyexp_128_enc_avx512(const void *key, void *enc_exp_keys)
aes_cmac_subkey_gen_avx2
IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx2(const void *key_exp, void *key1, void *key2)
get_completed_job_avx512
IMB_DLL_EXPORT IMB_JOB * get_completed_job_avx512(IMB_MGR *state)
Get next completed job.
imb_sm4_gcm_pre
IMB_DLL_EXPORT void imb_sm4_gcm_pre(IMB_MGR *mb_mgr, const void *key, struct gcm_key_data *key_data)
IMB_SGL_STATE
IMB_SGL_STATE
Definition intel-ipsec-mb.h:365
IMB_SGL_UPDATE
@ IMB_SGL_UPDATE
Definition intel-ipsec-mb.h:365
IMB_SGL_ALL
@ IMB_SGL_ALL
Definition intel-ipsec-mb.h:365
IMB_SGL_COMPLETE
@ IMB_SGL_COMPLETE
Definition intel-ipsec-mb.h:365
IMB_SGL_INIT
@ IMB_SGL_INIT
Definition intel-ipsec-mb.h:365
aes_gcm_precomp_192_avx_gen4
IMB_DLL_EXPORT void aes_gcm_precomp_192_avx_gen4(struct gcm_key_data *key_data)
Precomputation of AES-GCM-192 HashKey constants.
imb_self_test_cb_t
int(* imb_self_test_cb_t)(void *cb_arg, const IMB_SELF_TEST_CALLBACK_DATA *data)
Definition intel-ipsec-mb.h:891
des_cfb_one
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.
init_mb_mgr_avx2
IMB_DLL_EXPORT void init_mb_mgr_avx2(IMB_MGR *state)
Initialize Multi-Buffer Manager structure.
aes_gcm_enc_dec_t
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_get_feature_flags
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...
aes_keyexp_192_enc_avx512
IMB_DLL_EXPORT void aes_keyexp_192_enc_avx512(const void *key, void *enc_exp_keys)
submit_job_nocheck_avx2
IMB_DLL_EXPORT IMB_JOB * submit_job_nocheck_avx2(IMB_MGR *state)
Submit job for processing without validating.
aes_gcm_precomp_192_sse
IMB_DLL_EXPORT void aes_gcm_precomp_192_sse(struct gcm_key_data *key_data)
Precomputation of AES-GCM-192 HashKey constants.
aes_cmac_subkey_gen_avx512
IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx512(const void *key_exp, void *key1, void *key2)
IMB_GCM_KEY_SETS
#define IMB_GCM_KEY_SETS
Definition intel-ipsec-mb.h:636
aes_keyexp_256_enc_avx2
IMB_DLL_EXPORT void aes_keyexp_256_enc_avx2(const void *key, void *enc_exp_keys)
aes_gcm_init_192_avx_gen4
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.
submit_job_avx512
IMB_DLL_EXPORT IMB_JOB * submit_job_avx512(IMB_MGR *state)
Submit job for processing after validating.
aes_keyexp_192_sse
IMB_DLL_EXPORT void aes_keyexp_192_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys)
submit_job_sse
IMB_DLL_EXPORT IMB_JOB * submit_job_sse(IMB_MGR *state)
Submit job for processing after validating.
aes_gcm_dec_256_finalize_avx_gen4
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_get_errno
IMB_DLL_EXPORT int imb_get_errno(IMB_MGR *mb_mgr)
API to get error status.
aes_gcm_enc_128_update_sse
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.
snow3g_f8_1_buffer_bit_t
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
kasumi_init_f8_key_sched_t
int(* kasumi_init_f8_key_sched_t)(const void *, kasumi_key_sched_t *)
Definition intel-ipsec-mb.h:815
zuc_eea3_4_buffer_t
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
queue_size_sse
IMB_DLL_EXPORT uint32_t queue_size_sse(IMB_MGR *state)
Get number of jobs queued to be processed.
kasumi_f8_1_buffer_bit_t
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
kasumi_key_sched_t
struct kasumi_key_sched_s kasumi_key_sched_t
IMB_HASH_ALG
IMB_HASH_ALG
Definition intel-ipsec-mb.h:303
IMB_AUTH_AES_CMAC_256
@ IMB_AUTH_AES_CMAC_256
Definition intel-ipsec-mb.h:330
IMB_AUTH_AES_XCBC
@ IMB_AUTH_AES_XCBC
Definition intel-ipsec-mb.h:309
IMB_AUTH_ZUC_EIA3_BITLEN
@ IMB_AUTH_ZUC_EIA3_BITLEN
Definition intel-ipsec-mb.h:323
IMB_AUTH_AES_GMAC_128
@ IMB_AUTH_AES_GMAC_128
Definition intel-ipsec-mb.h:327
IMB_AUTH_CRC16_X25
@ IMB_AUTH_CRC16_X25
Definition intel-ipsec-mb.h:342
IMB_AUTH_NULL
@ IMB_AUTH_NULL
Definition intel-ipsec-mb.h:311
IMB_AUTH_PON_CRC_BIP
@ IMB_AUTH_PON_CRC_BIP
Definition intel-ipsec-mb.h:322
IMB_AUTH_SHA_224
@ IMB_AUTH_SHA_224
Definition intel-ipsec-mb.h:317
IMB_AUTH_CRC24_LTE_A
@ IMB_AUTH_CRC24_LTE_A
Definition intel-ipsec-mb.h:340
IMB_AUTH_CRC32_ETHERNET_FCS
@ IMB_AUTH_CRC32_ETHERNET_FCS
Definition intel-ipsec-mb.h:337
IMB_AUTH_KASUMI_UIA1
@ IMB_AUTH_KASUMI_UIA1
Definition intel-ipsec-mb.h:326
IMB_AUTH_HMAC_SHA_1
@ IMB_AUTH_HMAC_SHA_1
Definition intel-ipsec-mb.h:304
IMB_AUTH_SHA_256
@ IMB_AUTH_SHA_256
Definition intel-ipsec-mb.h:318
IMB_AUTH_SNOW3G_UIA2_BITLEN
@ IMB_AUTH_SNOW3G_UIA2_BITLEN
Definition intel-ipsec-mb.h:325
IMB_AUTH_SNOW_V_AEAD
@ IMB_AUTH_SNOW_V_AEAD
Definition intel-ipsec-mb.h:335
IMB_AUTH_CRC32_SCTP
@ IMB_AUTH_CRC32_SCTP
Definition intel-ipsec-mb.h:338
IMB_AUTH_NUM
@ IMB_AUTH_NUM
Definition intel-ipsec-mb.h:353
IMB_AUTH_HMAC_SHA_256
@ IMB_AUTH_HMAC_SHA_256
Definition intel-ipsec-mb.h:306
IMB_AUTH_GHASH
@ IMB_AUTH_GHASH
Definition intel-ipsec-mb.h:349
IMB_AUTH_CUSTOM
@ IMB_AUTH_CUSTOM
Definition intel-ipsec-mb.h:313
IMB_AUTH_CHACHA20_POLY1305_SGL
@ IMB_AUTH_CHACHA20_POLY1305_SGL
Definition intel-ipsec-mb.h:333
IMB_AUTH_CRC24_LTE_B
@ IMB_AUTH_CRC24_LTE_B
Definition intel-ipsec-mb.h:341
IMB_AUTH_ZUC256_EIA3_BITLEN
@ IMB_AUTH_ZUC256_EIA3_BITLEN
Definition intel-ipsec-mb.h:334
IMB_AUTH_AES_CCM
@ IMB_AUTH_AES_CCM
Definition intel-ipsec-mb.h:314
IMB_AUTH_CRC6_IUUP_HEADER
@ IMB_AUTH_CRC6_IUUP_HEADER
Definition intel-ipsec-mb.h:348
IMB_AUTH_SM4_GCM
@ IMB_AUTH_SM4_GCM
Definition intel-ipsec-mb.h:352
IMB_AUTH_POLY1305
@ IMB_AUTH_POLY1305
Definition intel-ipsec-mb.h:331
IMB_AUTH_MD5
@ IMB_AUTH_MD5
Definition intel-ipsec-mb.h:310
IMB_AUTH_SHA_512
@ IMB_AUTH_SHA_512
Definition intel-ipsec-mb.h:320
IMB_AUTH_AES_GMAC
@ IMB_AUTH_AES_GMAC
Definition intel-ipsec-mb.h:312
IMB_AUTH_CRC16_FP_DATA
@ IMB_AUTH_CRC16_FP_DATA
Definition intel-ipsec-mb.h:343
IMB_AUTH_AES_CMAC_BITLEN
@ IMB_AUTH_AES_CMAC_BITLEN
Definition intel-ipsec-mb.h:321
IMB_AUTH_CRC11_FP_HEADER
@ IMB_AUTH_CRC11_FP_HEADER
Definition intel-ipsec-mb.h:344
IMB_AUTH_CHACHA20_POLY1305
@ IMB_AUTH_CHACHA20_POLY1305
Definition intel-ipsec-mb.h:332
IMB_AUTH_CRC7_FP_HEADER
@ IMB_AUTH_CRC7_FP_HEADER
Definition intel-ipsec-mb.h:347
IMB_AUTH_HMAC_SM3
@ IMB_AUTH_HMAC_SM3
Definition intel-ipsec-mb.h:351
IMB_AUTH_CRC10_IUUP_DATA
@ IMB_AUTH_CRC10_IUUP_DATA
Definition intel-ipsec-mb.h:345
IMB_AUTH_HMAC_SHA_224
@ IMB_AUTH_HMAC_SHA_224
Definition intel-ipsec-mb.h:305
IMB_AUTH_CRC32_WIMAX_OFDMA_DATA
@ IMB_AUTH_CRC32_WIMAX_OFDMA_DATA
Definition intel-ipsec-mb.h:339
IMB_AUTH_HMAC_SHA_512
@ IMB_AUTH_HMAC_SHA_512
Definition intel-ipsec-mb.h:308
IMB_AUTH_GCM_SGL
@ IMB_AUTH_GCM_SGL
Definition intel-ipsec-mb.h:336
IMB_AUTH_SHA_1
@ IMB_AUTH_SHA_1
Definition intel-ipsec-mb.h:316
IMB_AUTH_AES_GMAC_192
@ IMB_AUTH_AES_GMAC_192
Definition intel-ipsec-mb.h:328
IMB_AUTH_DOCSIS_CRC32
@ IMB_AUTH_DOCSIS_CRC32
Definition intel-ipsec-mb.h:324
IMB_AUTH_CRC8_WIMAX_OFDMA_HCS
@ IMB_AUTH_CRC8_WIMAX_OFDMA_HCS
Definition intel-ipsec-mb.h:346
IMB_AUTH_AES_GMAC_256
@ IMB_AUTH_AES_GMAC_256
Definition intel-ipsec-mb.h:329
IMB_AUTH_SM3
@ IMB_AUTH_SM3
Definition intel-ipsec-mb.h:350
IMB_AUTH_HMAC_SHA_384
@ IMB_AUTH_HMAC_SHA_384
Definition intel-ipsec-mb.h:307
IMB_AUTH_AES_CMAC
@ IMB_AUTH_AES_CMAC
Definition intel-ipsec-mb.h:315
IMB_AUTH_SHA_384
@ IMB_AUTH_SHA_384
Definition intel-ipsec-mb.h:319
aes_keyexp_128_enc_avx2
IMB_DLL_EXPORT void aes_keyexp_128_enc_avx2(const void *key, void *enc_exp_keys)
aes_gcm_enc_256_finalize_avx_gen4
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.
snow3g_f8_n_buffer_t
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
submit_job_avx2
IMB_DLL_EXPORT IMB_JOB * submit_job_avx2(IMB_MGR *state)
Submit job for processing after validating.
imb_quic_hp_aes_ecb
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.
kasumi_f8_1_buffer_t
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
queue_size_avx2
IMB_DLL_EXPORT uint32_t queue_size_avx2(IMB_MGR *state)
Get number of jobs queued to be processed.
kasumi_f9_1_buffer_t
void(* kasumi_f9_1_buffer_t)(const kasumi_key_sched_t *, const void *, const uint32_t, void *)
Definition intel-ipsec-mb.h:813
kasumi_init_f9_key_sched_t
int(* kasumi_init_f9_key_sched_t)(const void *, kasumi_key_sched_t *)
Definition intel-ipsec-mb.h:816
md5_one_block_avx2
IMB_DLL_EXPORT void md5_one_block_avx2(const void *data, void *digest)
aes_gcm_enc_dec_finalize_t
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
aes_gcm_init_128_avx_gen4
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.
aes_gcm_dec_128_finalize_avx_gen4
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_quic_aes_gcm
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.
snow3g_f9_iv_gen
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.
zuc_eia3_1_buffer_t
void(* zuc_eia3_1_buffer_t)(const void *, const void *, const void *, const uint32_t, uint32_t *)
Definition intel-ipsec-mb.h:788
flush_job_sse
IMB_DLL_EXPORT IMB_JOB * flush_job_sse(IMB_MGR *state)
Force processing until next job in queue is completed.
IMB_DLL_EXPORT
#define IMB_DLL_EXPORT
Definition intel-ipsec-mb.h:80
queue_size_t
uint32_t(* queue_size_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:729
init_mb_mgr_avx512
IMB_DLL_EXPORT void init_mb_mgr_avx512(IMB_MGR *state)
Initialize Multi-Buffer Manager structure.
des_key_schedule
IMB_DLL_EXPORT int des_key_schedule(uint64_t *ks, const void *key)
DES key schedule set up.
aes_gcm_init_256_avx_gen4
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.
aes_gcm_enc_192_avx_gen4
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.
aes_keyexp_128_avx512
IMB_DLL_EXPORT void aes_keyexp_128_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys)
md5_one_block_sse
IMB_DLL_EXPORT void md5_one_block_sse(const void *data, void *digest)
aes_keyexp_256_enc_avx512
IMB_DLL_EXPORT void aes_keyexp_256_enc_avx512(const void *key, void *enc_exp_keys)
IMB_ERR
IMB_ERR
Definition intel-ipsec-mb.h:196
IMB_ERR_NULL_JOB
@ IMB_ERR_NULL_JOB
Definition intel-ipsec-mb.h:243
IMB_ERR_JOB_NULL_SGL_CTX
@ IMB_ERR_JOB_NULL_SGL_CTX
Definition intel-ipsec-mb.h:216
IMB_ERR_AAD_LEN
@ IMB_ERR_AAD_LEN
Definition intel-ipsec-mb.h:231
IMB_ERR_NULL_CTX
@ IMB_ERR_NULL_CTX
Definition intel-ipsec-mb.h:234
IMB_ERR_JOB_NULL_IV
@ IMB_ERR_JOB_NULL_IV
Definition intel-ipsec-mb.h:202
IMB_ERR_JOB_NULL_HMAC_IPAD
@ IMB_ERR_JOB_NULL_HMAC_IPAD
Definition intel-ipsec-mb.h:236
IMB_ERR_SELFTEST
@ IMB_ERR_SELFTEST
Definition intel-ipsec-mb.h:248
IMB_ERR_NULL_DST
@ IMB_ERR_NULL_DST
Definition intel-ipsec-mb.h:220
IMB_ERR_JOB_AUTH_TAG_LEN
@ IMB_ERR_JOB_AUTH_TAG_LEN
Definition intel-ipsec-mb.h:209
IMB_ERR_NULL_AUTH
@ IMB_ERR_NULL_AUTH
Definition intel-ipsec-mb.h:224
IMB_ERR_JOB_SRC_OFFSET
@ IMB_ERR_JOB_SRC_OFFSET
Definition intel-ipsec-mb.h:211
IMB_ERR_SRC_OFFSET
@ IMB_ERR_SRC_OFFSET
Definition intel-ipsec-mb.h:232
IMB_ERR_JOB_NULL_KEY
@ IMB_ERR_JOB_NULL_KEY
Definition intel-ipsec-mb.h:201
IMB_ERR_NULL_SRC
@ IMB_ERR_NULL_SRC
Definition intel-ipsec-mb.h:219
IMB_ERR_JOB_AAD_LEN
@ IMB_ERR_JOB_AAD_LEN
Definition intel-ipsec-mb.h:210
IMB_ERR_JOB_IV_LEN
@ IMB_ERR_JOB_IV_LEN
Definition intel-ipsec-mb.h:207
IMB_ERR_NULL_EXP_KEY
@ IMB_ERR_NULL_EXP_KEY
Definition intel-ipsec-mb.h:222
IMB_ERR_JOB_NULL_AAD
@ IMB_ERR_JOB_NULL_AAD
Definition intel-ipsec-mb.h:204
IMB_ERR_MIN
@ IMB_ERR_MIN
Definition intel-ipsec-mb.h:197
IMB_ERR_BURST_SUITE_ID
@ IMB_ERR_BURST_SUITE_ID
Definition intel-ipsec-mb.h:249
IMB_ERR_JOB_NULL_SRC
@ IMB_ERR_JOB_NULL_SRC
Definition intel-ipsec-mb.h:199
IMB_ERR_QUEUE_SPACE
@ IMB_ERR_QUEUE_SPACE
Definition intel-ipsec-mb.h:244
IMB_ERR_JOB_NULL_AUTH
@ IMB_ERR_JOB_NULL_AUTH
Definition intel-ipsec-mb.h:203
IMB_ERR_JOB_NULL_DST
@ IMB_ERR_JOB_NULL_DST
Definition intel-ipsec-mb.h:200
IMB_ERR_CIPH_MODE
@ IMB_ERR_CIPH_MODE
Definition intel-ipsec-mb.h:213
IMB_ERR_NULL_KEY
@ IMB_ERR_NULL_KEY
Definition intel-ipsec-mb.h:221
IMB_ERR_JOB_NULL_XCBC_K1_EXP
@ IMB_ERR_JOB_NULL_XCBC_K1_EXP
Definition intel-ipsec-mb.h:237
IMB_ERR_JOB_AUTH_LEN
@ IMB_ERR_JOB_AUTH_LEN
Definition intel-ipsec-mb.h:206
IMB_ERR_AUTH_TAG_LEN
@ IMB_ERR_AUTH_TAG_LEN
Definition intel-ipsec-mb.h:230
IMB_ERR_JOB_NULL_GHASH_INIT_TAG
@ IMB_ERR_JOB_NULL_GHASH_INIT_TAG
Definition intel-ipsec-mb.h:241
IMB_ERR_HASH_ALGO
@ IMB_ERR_HASH_ALGO
Definition intel-ipsec-mb.h:214
IMB_ERR_KEY_LEN
@ IMB_ERR_KEY_LEN
Definition intel-ipsec-mb.h:229
IMB_ERR_JOB_SGL_STATE
@ IMB_ERR_JOB_SGL_STATE
Definition intel-ipsec-mb.h:250
IMB_ERR_JOB_NULL_AUTH_KEY
@ IMB_ERR_JOB_NULL_AUTH_KEY
Definition intel-ipsec-mb.h:215
IMB_ERR_JOB_NULL_NEXT_IV
@ IMB_ERR_JOB_NULL_NEXT_IV
Definition intel-ipsec-mb.h:217
IMB_ERR_NULL_BURST
@ IMB_ERR_NULL_BURST
Definition intel-ipsec-mb.h:245
IMB_ERR_NULL_MBMGR
@ IMB_ERR_NULL_MBMGR
Definition intel-ipsec-mb.h:198
IMB_ERR_NULL_AUTH_KEY
@ IMB_ERR_NULL_AUTH_KEY
Definition intel-ipsec-mb.h:233
IMB_ERR_IV_LEN
@ IMB_ERR_IV_LEN
Definition intel-ipsec-mb.h:228
IMB_ERR_CIPH_LEN
@ IMB_ERR_CIPH_LEN
Definition intel-ipsec-mb.h:226
IMB_ERR_MISSING_CPUFLAGS_INIT_MGR
@ IMB_ERR_MISSING_CPUFLAGS_INIT_MGR
Definition intel-ipsec-mb.h:242
IMB_ERR_MAX
@ IMB_ERR_MAX
Definition intel-ipsec-mb.h:252
IMB_ERR_JOB_CHAIN_ORDER
@ IMB_ERR_JOB_CHAIN_ORDER
Definition intel-ipsec-mb.h:212
IMB_ERR_JOB_NULL_HMAC_OPAD
@ IMB_ERR_JOB_NULL_HMAC_OPAD
Definition intel-ipsec-mb.h:235
IMB_ERR_JOB_CIPH_DIR
@ IMB_ERR_JOB_CIPH_DIR
Definition intel-ipsec-mb.h:240
IMB_ERR_JOB_PON_PLI
@ IMB_ERR_JOB_PON_PLI
Definition intel-ipsec-mb.h:218
IMB_ERR_JOB_NULL_XCBC_K2
@ IMB_ERR_JOB_NULL_XCBC_K2
Definition intel-ipsec-mb.h:238
IMB_ERR_NULL_AAD
@ IMB_ERR_NULL_AAD
Definition intel-ipsec-mb.h:225
IMB_ERR_JOB_KEY_LEN
@ IMB_ERR_JOB_KEY_LEN
Definition intel-ipsec-mb.h:208
IMB_ERR_JOB_CIPH_LEN
@ IMB_ERR_JOB_CIPH_LEN
Definition intel-ipsec-mb.h:205
IMB_ERR_BURST_SIZE
@ IMB_ERR_BURST_SIZE
Definition intel-ipsec-mb.h:246
IMB_ERR_BURST_OOO
@ IMB_ERR_BURST_OOO
Definition intel-ipsec-mb.h:247
IMB_ERR_JOB_NULL_XCBC_K3
@ IMB_ERR_JOB_NULL_XCBC_K3
Definition intel-ipsec-mb.h:239
IMB_ERR_NULL_IV
@ IMB_ERR_NULL_IV
Definition intel-ipsec-mb.h:223
IMB_ERR_AUTH_LEN
@ IMB_ERR_AUTH_LEN
Definition intel-ipsec-mb.h:227
aes_gcm_enc_128_avx_gen4
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.
hec_32_t
uint32_t(* hec_32_t)(const uint8_t *)
Definition intel-ipsec-mb.h:871
hec_64_t
uint64_t(* hec_64_t)(const uint8_t *)
Definition intel-ipsec-mb.h:872
cmac_subkey_gen_t
void(* cmac_subkey_gen_t)(const void *, void *, void *)
Definition intel-ipsec-mb.h:738
aes_gcm_enc_128_sse
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.
hash_one_block_t
void(* hash_one_block_t)(const void *, void *)
Definition intel-ipsec-mb.h:739
snow3g_f8_8_buffer_multikey_t
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
burst_fn_t
uint32_t(* burst_fn_t)(struct IMB_MGR *, const uint32_t, struct IMB_JOB **)
Definition intel-ipsec-mb.h:730
IMB_MAX_JOBS
#define IMB_MAX_JOBS
Definition intel-ipsec-mb.h:972
aes_gcm_dec_256_update_sse
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.
aes_gcm_precomp_t
void(* aes_gcm_precomp_t)(struct gcm_key_data *)
Definition intel-ipsec-mb.h:760
aes_gcm_pre_192_avx_gen4
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.
aes_gcm_enc_256_update_sse
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.
alloc_mb_mgr
IMB_DLL_EXPORT IMB_MGR * alloc_mb_mgr(uint64_t flags)
Allocates memory for multi-buffer manager instance.
aes_gmac_update_t
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
aes_keyexp_192_avx2
IMB_DLL_EXPORT void aes_keyexp_192_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys)
xcbc_keyexp_t
void(* xcbc_keyexp_t)(const void *, void *, void *, void *)
Definition intel-ipsec-mb.h:741
aes_gcm_enc_128_update_avx_gen4
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
IMB_CIPHER_DIRECTION
Definition intel-ipsec-mb.h:301
IMB_DIR_DECRYPT
@ IMB_DIR_DECRYPT
Definition intel-ipsec-mb.h:301
IMB_DIR_ENCRYPT
@ IMB_DIR_ENCRYPT
Definition intel-ipsec-mb.h:301
aes_gcm_precomp_256_avx_gen4
IMB_DLL_EXPORT void aes_gcm_precomp_256_avx_gen4(struct gcm_key_data *key_data)
Precomputation of AES-GCM-256 HashKey constants.
aes_gcm_pre_192_sse
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.
aes_gcm_dec_256_avx_gen4
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.
kasumi_f9_1_buffer_user_t
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_get_arch_type_string
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.
aes_xcbc_expand_key_avx2
IMB_DLL_EXPORT void aes_xcbc_expand_key_avx2(const void *key, void *k1_exp, void *k2, void *k3)
submit_cipher_burst_t
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
aes_gcm_enc_dec_iv_t
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
flush_job_avx512
IMB_DLL_EXPORT IMB_JOB * flush_job_avx512(IMB_MGR *state)
Force processing until next job in queue is completed.
aes_keyexp_128_enc_avx
IMB_DLL_EXPORT void aes_keyexp_128_enc_avx(const void *key, void *enc_exp_keys)
md5_one_block_avx512
IMB_DLL_EXPORT void md5_one_block_avx512(const void *data, void *digest)
imb_get_mb_mgr_size
IMB_DLL_EXPORT size_t imb_get_mb_mgr_size(void)
Calculates necessary memory size for IMB_MGR.
kasumi_f9_iv_gen
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.
get_completed_job_t
IMB_JOB *(* get_completed_job_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:727
aes_gcm_init_128_sse
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.
aes_gcm_dec_192_sse
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.
kasumi_f8_4_buffer_t
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
IMB_ARCH
Definition intel-ipsec-mb.h:113
IMB_ARCH_AVX512
@ IMB_ARCH_AVX512
Definition intel-ipsec-mb.h:117
IMB_ARCH_NONE
@ IMB_ARCH_NONE
Definition intel-ipsec-mb.h:114
IMB_ARCH_SSE
@ IMB_ARCH_SSE
Definition intel-ipsec-mb.h:115
IMB_ARCH_AVX2
@ IMB_ARCH_AVX2
Definition intel-ipsec-mb.h:116
IMB_ARCH_NUM
@ IMB_ARCH_NUM
Definition intel-ipsec-mb.h:118
kasumi_key_sched_size_t
size_t(* kasumi_key_sched_size_t)(void)
Definition intel-ipsec-mb.h:817
snow3g_key_sched_size_t
size_t(* snow3g_key_sched_size_t)(void)
Definition intel-ipsec-mb.h:869
get_completed_job_avx2
IMB_DLL_EXPORT IMB_JOB * get_completed_job_avx2(IMB_MGR *state)
Get next completed job.
aes_ecb_quic_t
void(* aes_ecb_quic_t)(const void *, const void *, void *out, uint64_t)
Definition intel-ipsec-mb.h:876
aes_gcm_enc_256_update_avx_gen4
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_set_session
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.
zuc_eia3_n_buffer_t
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
aes_gcm_dec_128_sse
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.
aes_gcm_enc_192_sse
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.
aes_gcm_init_t
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
aes_gcm_dec_256_finalize_sse
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.
snow3g_init_key_sched_t
int(* snow3g_init_key_sched_t)(const void *, snow3g_key_schedule_t *)
Definition intel-ipsec-mb.h:867
snow3g_f8_4_buffer_t
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
aes_gcm_dec_128_avx_gen4
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.
flush_job_avx2
IMB_DLL_EXPORT IMB_JOB * flush_job_avx2(IMB_MGR *state)
Force processing until next job in queue is completed.
zuc_eia3_iv_gen
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.
snow3g_key_schedule_t
struct snow3g_key_schedule_s snow3g_key_schedule_t
flush_job_t
IMB_JOB *(* flush_job_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:728
snow3g_f9_1_buffer_t
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
aes_cfb_t
void(* aes_cfb_t)(void *, const void *, const void *, const void *, uint64_t)
Definition intel-ipsec-mb.h:743
aes_keyexp_128_avx
IMB_DLL_EXPORT void aes_keyexp_128_avx(const void *key, void *enc_exp_keys, void *dec_exp_keys)
imb_clear_mem
IMB_DLL_EXPORT void imb_clear_mem(void *mem, const size_t size)
Force clearing/zeroing of memory.
aes_gcm_precomp_128_avx_gen4
IMB_DLL_EXPORT void aes_gcm_precomp_128_avx_gen4(struct gcm_key_data *key_data)
Precomputation of AES-GCM-128 HashKey constants.
snow3g_f8_n_buffer_multikey_t
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
chacha20_hp_quic_t
void(* chacha20_hp_quic_t)(const void *, const void *const *, void **, const uint64_t)
Definition intel-ipsec-mb.h:880
imb_get_version
IMB_DLL_EXPORT unsigned imb_get_version(void)
Get library version in numerical format.
aes_xcbc_expand_key_sse
IMB_DLL_EXPORT void aes_xcbc_expand_key_sse(const void *key, void *k1_exp, void *k2, void *k3)
init_mb_mgr_t
void(* init_mb_mgr_t)(struct IMB_MGR *)
Definition intel-ipsec-mb.h:724
kasumi_f8_2_buffer_t
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
aes_keyexp_256_avx2
IMB_DLL_EXPORT void aes_keyexp_256_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys)
aes_gmac_finalize_t
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
aes_gcm_enc_128_finalize_sse
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.
aes_gcm_enc_dec_update_t
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
aes_gcm_dec_192_finalize_avx_gen4
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.
aes_keyexp_256_enc_sse
IMB_DLL_EXPORT void aes_keyexp_256_enc_sse(const void *key, void *enc_exp_keys)
hash_fn_t
void(* hash_fn_t)(const void *, const uint64_t, void *)
Definition intel-ipsec-mb.h:740
aes_gcm_enc_256_finalize_sse
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
IMB_STATUS
Definition intel-ipsec-mb.h:182
IMB_STATUS_ERROR
@ IMB_STATUS_ERROR
Definition intel-ipsec-mb.h:190
IMB_STATUS_COMPLETED
@ IMB_STATUS_COMPLETED
Definition intel-ipsec-mb.h:186
IMB_STATUS_INTERNAL_ERROR
@ IMB_STATUS_INTERNAL_ERROR
Definition intel-ipsec-mb.h:189
IMB_STATUS_COMPLETED_CIPHER
@ IMB_STATUS_COMPLETED_CIPHER
Definition intel-ipsec-mb.h:184
IMB_STATUS_COMPLETED_AUTH
@ IMB_STATUS_COMPLETED_AUTH
Definition intel-ipsec-mb.h:185
IMB_STATUS_BEING_PROCESSED
@ IMB_STATUS_BEING_PROCESSED
Definition intel-ipsec-mb.h:183
IMB_STATUS_INVALID_ARGS
@ IMB_STATUS_INVALID_ARGS
Definition intel-ipsec-mb.h:188
aes_gcm_dec_256_sse
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.
aes_xcbc_expand_key_avx
IMB_DLL_EXPORT void aes_xcbc_expand_key_avx(const void *key, void *k1_exp, void *k2, void *k3)
IMB_JOB
Definition intel-ipsec-mb.h:395
IMB_JOB::cipher_fields
union IMB_JOB::@11 cipher_fields
IMB_JOB::ctx
struct gcm_context_data * ctx
Definition intel-ipsec-mb.h:473
IMB_JOB::GMAC
struct IMB_JOB::@10::_AES_GMAC_specific_fields GMAC
IMB_JOB::KASUMI_UIA1
struct IMB_JOB::@10::_KASUMI_UIA1_specific_fields KASUMI_UIA1
IMB_JOB::cipher_direction
IMB_CIPHER_DIRECTION cipher_direction
Definition intel-ipsec-mb.h:531
IMB_JOB::POLY1305
struct IMB_JOB::@10::_POLY1305_specific_fields POLY1305
IMB_JOB::num_sgl_io_segs
uint64_t num_sgl_io_segs
Definition intel-ipsec-mb.h:410
IMB_JOB::_init_tag
const void * _init_tag
Definition intel-ipsec-mb.h:505
IMB_JOB::sgl_io_segs
const struct IMB_SGL_IOV * sgl_io_segs
Definition intel-ipsec-mb.h:403
IMB_JOB::iv_len_in_bytes
uint64_t iv_len_in_bytes
Definition intel-ipsec-mb.h:435
IMB_JOB::SNOW3G_UIA2
struct IMB_JOB::@10::_SNOW3G_UIA2_specific_fields SNOW3G_UIA2
IMB_JOB::_iv23
const uint8_t * _iv23
Definition intel-ipsec-mb.h:481
IMB_JOB::_hashed_auth_key_xor_ipad
const uint8_t * _hashed_auth_key_xor_ipad
Definition intel-ipsec-mb.h:443
IMB_JOB::XCBC
struct IMB_JOB::@10::_AES_XCBC_specific_fields XCBC
IMB_JOB::_key
const struct gcm_key_data * _key
Definition intel-ipsec-mb.h:495
IMB_JOB::sgl_state
IMB_SGL_STATE sgl_state
Definition intel-ipsec-mb.h:544
IMB_JOB::msg_len_to_hash_in_bytes
uint64_t msg_len_to_hash_in_bytes
Definition intel-ipsec-mb.h:429
IMB_JOB::chain_order
IMB_CHAIN_ORDER chain_order
Definition intel-ipsec-mb.h:533
IMB_JOB::msg_len_to_cipher_in_bits
uint64_t msg_len_to_cipher_in_bits
Definition intel-ipsec-mb.h:424
IMB_JOB::_iv
const void * _iv
Definition intel-ipsec-mb.h:487
IMB_JOB::CMAC
struct IMB_JOB::@10::_AES_CMAC_specific_fields CMAC
IMB_JOB::ctx
struct chacha20_poly1305_context_data * ctx
Definition intel-ipsec-mb.h:516
IMB_JOB::aad
const void * aad
Definition intel-ipsec-mb.h:459
IMB_JOB::user_data2
void * user_data2
Definition intel-ipsec-mb.h:537
IMB_JOB::next_iv
void * next_iv
Definition intel-ipsec-mb.h:550
IMB_JOB::u
union IMB_JOB::@10 u
IMB_JOB::cipher_start_offset_in_bits
uint64_t cipher_start_offset_in_bits
Definition intel-ipsec-mb.h:418
IMB_JOB::hash_func
int(* hash_func)(struct IMB_JOB *)
Definition intel-ipsec-mb.h:541
IMB_JOB::cipher_func
int(* cipher_func)(struct IMB_JOB *)
Definition intel-ipsec-mb.h:539
IMB_JOB::_hashed_auth_key_xor_opad
const uint8_t * _hashed_auth_key_xor_opad
Definition intel-ipsec-mb.h:446
IMB_JOB::auth_tag_output_len_in_bytes
uint64_t auth_tag_output_len_in_bytes
Definition intel-ipsec-mb.h:437
IMB_JOB::_k1_expanded
const uint32_t * _k1_expanded
Definition intel-ipsec-mb.h:451
IMB_JOB::cipher_mode
IMB_CIPHER_MODE cipher_mode
Definition intel-ipsec-mb.h:530
IMB_JOB::_key
const void * _key
Definition intel-ipsec-mb.h:485
IMB_JOB::_key
const uint8_t * _key
Definition intel-ipsec-mb.h:477
IMB_JOB::CBCS
struct IMB_JOB::@11::_CBCS_specific_fields CBCS
IMB_JOB::_skey2
const void * _skey2
Definition intel-ipsec-mb.h:467
IMB_JOB::_key_expanded
const void * _key_expanded
Definition intel-ipsec-mb.h:464
IMB_JOB::iv
const uint8_t * iv
Definition intel-ipsec-mb.h:434
IMB_JOB::msg_len_to_cipher_in_bytes
uint64_t msg_len_to_cipher_in_bytes
Definition intel-ipsec-mb.h:422
IMB_JOB::reserved
void * reserved
Definition intel-ipsec-mb.h:524
IMB_JOB::hash_alg
IMB_HASH_ALG hash_alg
Definition intel-ipsec-mb.h:532
IMB_JOB::aad_len_in_bytes
uint64_t aad_len_in_bytes
Definition intel-ipsec-mb.h:461
IMB_JOB::HMAC
struct IMB_JOB::@10::_HMAC_specific_fields HMAC
IMB_JOB::ZUC_EIA3
struct IMB_JOB::@10::_ZUC_EIA3_specific_fields ZUC_EIA3
IMB_JOB::session_id
uint32_t session_id
Definition intel-ipsec-mb.h:556
IMB_JOB::_skey1
const void * _skey1
Definition intel-ipsec-mb.h:466
IMB_JOB::user_data
void * user_data
Definition intel-ipsec-mb.h:536
IMB_JOB::key_len_in_bytes
uint64_t key_len_in_bytes
Definition intel-ipsec-mb.h:398
IMB_JOB::SNOW_V_AEAD
struct IMB_JOB::@10::_SNOW_V_AEAD_specific_fields SNOW_V_AEAD
IMB_JOB::dst
uint8_t * dst
Definition intel-ipsec-mb.h:407
IMB_JOB::auth_tag_output
uint8_t * auth_tag_output
Definition intel-ipsec-mb.h:436
IMB_JOB::enc_keys
const void * enc_keys
Definition intel-ipsec-mb.h:396
IMB_JOB::GCM
struct IMB_JOB::@10::_AES_GCM_specific_fields GCM
IMB_JOB::CHACHA20_POLY1305
struct IMB_JOB::@10::_CHACHA20_POLY1305_specific_fields CHACHA20_POLY1305
IMB_JOB::CCM
struct IMB_JOB::@10::_AES_CCM_specific_fields CCM
IMB_JOB::status
IMB_STATUS status
Definition intel-ipsec-mb.h:529
IMB_JOB::_k2
const uint8_t * _k2
Definition intel-ipsec-mb.h:453
IMB_JOB::cipher_start_src_offset_in_bytes
uint64_t cipher_start_src_offset_in_bytes
Definition intel-ipsec-mb.h:414
IMB_JOB::suite_id
uint32_t suite_id[2]
Definition intel-ipsec-mb.h:555
IMB_JOB::msg_len_to_hash_in_bits
uint64_t msg_len_to_hash_in_bits
Definition intel-ipsec-mb.h:431
IMB_JOB::_iv
const uint8_t * _iv
Definition intel-ipsec-mb.h:479
IMB_JOB::GHASH
struct IMB_JOB::@10::_GHASH_specific_fields GHASH
IMB_JOB::cipher_start_src_offset_in_bits
uint64_t cipher_start_src_offset_in_bits
Definition intel-ipsec-mb.h:416
IMB_JOB::dec_keys
const void * dec_keys
Definition intel-ipsec-mb.h:397
IMB_JOB::hash_start_src_offset_in_bytes
uint64_t hash_start_src_offset_in_bytes
Definition intel-ipsec-mb.h:427
IMB_JOB::src
const uint8_t * src
Definition intel-ipsec-mb.h:400
IMB_JOB::_k3
const uint8_t * _k3
Definition intel-ipsec-mb.h:455
IMB_MGR
Definition intel-ipsec-mb.h:974
IMB_MGR::gmac192_finalize
aes_gmac_finalize_t gmac192_finalize
Definition intel-ipsec-mb.h:1087
IMB_MGR::gcm192_init
aes_gcm_init_t gcm192_init
Definition intel-ipsec-mb.h:1024
IMB_MGR::reserved
uint64_t reserved[4]
Definition intel-ipsec-mb.h:979
IMB_MGR::gmac128_finalize
aes_gmac_finalize_t gmac128_finalize
Definition intel-ipsec-mb.h:1086
IMB_MGR::zuc256_eia3_16B_ooo
void * zuc256_eia3_16B_ooo
Definition intel-ipsec-mb.h:1181
IMB_MGR::aes256_ccm_ooo
void * aes256_ccm_ooo
Definition intel-ipsec-mb.h:1171
IMB_MGR::crc24_lte_a
crc32_fn_t crc24_lte_a
Definition intel-ipsec-mb.h:1096
IMB_MGR::gmac256_update
aes_gmac_update_t gmac256_update
Definition intel-ipsec-mb.h:1085
IMB_MGR::hec_32
hec_32_t hec_32
Definition intel-ipsec-mb.h:1089
IMB_MGR::imb_errno
int imb_errno
Definition intel-ipsec-mb.h:984
IMB_MGR::chacha20_poly1305_quic
chacha20_poly1305_quic_t chacha20_poly1305_quic
Definition intel-ipsec-mb.h:1126
IMB_MGR::aes_cmac_ooo
void * aes_cmac_ooo
Definition intel-ipsec-mb.h:1165
IMB_MGR::next_job
int next_job
Definition intel-ipsec-mb.h:1139
IMB_MGR::gmac128_init
aes_gmac_init_t gmac128_init
Definition intel-ipsec-mb.h:1080
IMB_MGR::gcm192_pre
aes_gcm_pre_t gcm192_pre
Definition intel-ipsec-mb.h:1042
IMB_MGR::snow3g_f8_4_buffer
snow3g_f8_4_buffer_t snow3g_f8_4_buffer
Definition intel-ipsec-mb.h:1065
IMB_MGR::gcm256_precomp
aes_gcm_precomp_t gcm256_precomp
Definition intel-ipsec-mb.h:1040
IMB_MGR::gcm128_pre
aes_gcm_pre_t gcm128_pre
Definition intel-ipsec-mb.h:1041
IMB_MGR::submit_hash_burst
submit_hash_burst_t submit_hash_burst
Definition intel-ipsec-mb.h:1117
IMB_MGR::flush_job
flush_job_t flush_job
Definition intel-ipsec-mb.h:996
IMB_MGR::snow3g_f8_2_buffer
snow3g_f8_2_buffer_t snow3g_f8_2_buffer
Definition intel-ipsec-mb.h:1064
IMB_MGR::zuc_eea3_ooo
void * zuc_eea3_ooo
Definition intel-ipsec-mb.h:1166
IMB_MGR::gcm128_dec_update
aes_gcm_enc_dec_update_t gcm128_dec_update
Definition intel-ipsec-mb.h:1029
IMB_MGR::des3_dec_ooo
void * des3_dec_ooo
Definition intel-ipsec-mb.h:1153
IMB_MGR::keyexp_192
keyexp_t keyexp_192
Definition intel-ipsec-mb.h:999
IMB_MGR::gcm128_dec
aes_gcm_enc_dec_t gcm128_dec
Definition intel-ipsec-mb.h:1020
IMB_MGR::submit_burst_nocheck
burst_fn_t submit_burst_nocheck
Definition intel-ipsec-mb.h:1113
IMB_MGR::get_next_job
get_next_job_t get_next_job
Definition intel-ipsec-mb.h:992
IMB_MGR::sha_256_ooo
void * sha_256_ooo
Definition intel-ipsec-mb.h:1177
IMB_MGR::snow3g_init_key_sched
snow3g_init_key_sched_t snow3g_init_key_sched
Definition intel-ipsec-mb.h:1071
IMB_MGR::gcm192_enc_update
aes_gcm_enc_dec_update_t gcm192_enc_update
Definition intel-ipsec-mb.h:1027
IMB_MGR::gmac256_finalize
aes_gmac_finalize_t gmac256_finalize
Definition intel-ipsec-mb.h:1088
IMB_MGR::docsis_des_dec_ooo
void * docsis_des_dec_ooo
Definition intel-ipsec-mb.h:1155
IMB_MGR::gmac192_init
aes_gmac_init_t gmac192_init
Definition intel-ipsec-mb.h:1081
IMB_MGR::eia3_1_buffer
zuc_eia3_1_buffer_t eia3_1_buffer
Definition intel-ipsec-mb.h:1048
IMB_MGR::aes_ccm_ooo
void * aes_ccm_ooo
Definition intel-ipsec-mb.h:1164
IMB_MGR::submit_aead_burst_nocheck
submit_cipher_burst_t submit_aead_burst_nocheck
Definition intel-ipsec-mb.h:1135
IMB_MGR::hec_64
hec_64_t hec_64
Definition intel-ipsec-mb.h:1090
IMB_MGR::keyexp_256
keyexp_t keyexp_256
Definition intel-ipsec-mb.h:1000
IMB_MGR::aes_ecb_128_quic
aes_ecb_quic_t aes_ecb_128_quic
Definition intel-ipsec-mb.h:1121
IMB_MGR::gcm256_pre
aes_gcm_pre_t gcm256_pre
Definition intel-ipsec-mb.h:1043
IMB_MGR::used_arch
uint32_t used_arch
Definition intel-ipsec-mb.h:982
IMB_MGR::hmac_sha_1_ooo
void * hmac_sha_1_ooo
Definition intel-ipsec-mb.h:1157
IMB_MGR::crc32_sctp
crc32_fn_t crc32_sctp
Definition intel-ipsec-mb.h:1095
IMB_MGR::crc11_fp_header
crc32_fn_t crc11_fp_header
Definition intel-ipsec-mb.h:1099
IMB_MGR::gcm192_dec_finalize
aes_gcm_enc_dec_finalize_t gcm192_dec_finalize
Definition intel-ipsec-mb.h:1036
IMB_MGR::f9_1_buffer_user
kasumi_f9_1_buffer_user_t f9_1_buffer_user
Definition intel-ipsec-mb.h:1057
IMB_MGR::sha_384_ooo
void * sha_384_ooo
Definition intel-ipsec-mb.h:1178
IMB_MGR::gmac192_update
aes_gmac_update_t gmac192_update
Definition intel-ipsec-mb.h:1084
IMB_MGR::crc16_x25
crc32_fn_t crc16_x25
Definition intel-ipsec-mb.h:1094
IMB_MGR::sha224
hash_fn_t sha224
Definition intel-ipsec-mb.h:1011
IMB_MGR::zuc256_eia3_8B_ooo
void * zuc256_eia3_8B_ooo
Definition intel-ipsec-mb.h:1180
IMB_MGR::md5_one_block
hash_one_block_t md5_one_block
Definition intel-ipsec-mb.h:1009
IMB_MGR::des_enc_ooo
void * des_enc_ooo
Definition intel-ipsec-mb.h:1150
IMB_MGR::kasumi_init_f9_key_sched
kasumi_init_f9_key_sched_t kasumi_init_f9_key_sched
Definition intel-ipsec-mb.h:1059
IMB_MGR::queue_size
queue_size_t queue_size
Definition intel-ipsec-mb.h:997
IMB_MGR::gcm256_dec_finalize
aes_gcm_enc_dec_finalize_t gcm256_dec_finalize
Definition intel-ipsec-mb.h:1037
IMB_MGR::snow3g_key_sched_size
snow3g_key_sched_size_t snow3g_key_sched_size
Definition intel-ipsec-mb.h:1072
IMB_MGR::aes_ecb_256_quic
aes_ecb_quic_t aes_ecb_256_quic
Definition intel-ipsec-mb.h:1122
IMB_MGR::crc8_wimax_ofdma_hcs
crc32_fn_t crc8_wimax_ofdma_hcs
Definition intel-ipsec-mb.h:1104
IMB_MGR::zuc256_eia3_ooo
void * zuc256_eia3_ooo
Definition intel-ipsec-mb.h:1170
IMB_MGR::snow3g_f8_8_buffer
snow3g_f8_8_buffer_t snow3g_f8_8_buffer
Definition intel-ipsec-mb.h:1066
IMB_MGR::sha512
hash_fn_t sha512
Definition intel-ipsec-mb.h:1014
IMB_MGR::hmac_sha_256_ooo
void * hmac_sha_256_ooo
Definition intel-ipsec-mb.h:1159
IMB_MGR::snow3g_f8_n_buffer_multikey
snow3g_f8_n_buffer_multikey_t snow3g_f8_n_buffer_multikey
Definition intel-ipsec-mb.h:1069
IMB_MGR::gcm192_dec_update
aes_gcm_enc_dec_update_t gcm192_dec_update
Definition intel-ipsec-mb.h:1030
IMB_MGR::chacha20_poly1305_init
chacha_poly_init_t chacha20_poly1305_init
Definition intel-ipsec-mb.h:1106
IMB_MGR::eea3_n_buffer
zuc_eea3_n_buffer_t eea3_n_buffer
Definition intel-ipsec-mb.h:1047
IMB_MGR::gcm128_precomp
aes_gcm_precomp_t gcm128_precomp
Definition intel-ipsec-mb.h:1038
IMB_MGR::aes256_ooo
void * aes256_ooo
Definition intel-ipsec-mb.h:1145
IMB_MGR::zuc256_eea3_ooo
void * zuc256_eea3_ooo
Definition intel-ipsec-mb.h:1169
IMB_MGR::end_ooo
void * end_ooo
Definition intel-ipsec-mb.h:1185
IMB_MGR::sha_512_ooo
void * sha_512_ooo
Definition intel-ipsec-mb.h:1179
IMB_MGR::chacha20_poly1305_dec_update
chacha_poly_enc_dec_update_t chacha20_poly1305_dec_update
Definition intel-ipsec-mb.h:1108
IMB_MGR::gcm256_enc
aes_gcm_enc_dec_t gcm256_enc
Definition intel-ipsec-mb.h:1019
IMB_MGR::gcm192_init_var_iv
aes_gcm_init_var_iv_t gcm192_init_var_iv
Definition intel-ipsec-mb.h:1077
IMB_MGR::keyexp_128
keyexp_t keyexp_128
Definition intel-ipsec-mb.h:998
IMB_MGR::crc10_iuup_data
crc32_fn_t crc10_iuup_data
Definition intel-ipsec-mb.h:1101
IMB_MGR::submit_hash_burst_nocheck
submit_hash_burst_t submit_hash_burst_nocheck
Definition intel-ipsec-mb.h:1118
IMB_MGR::sha1_one_block
hash_one_block_t sha1_one_block
Definition intel-ipsec-mb.h:1004
IMB_MGR::snow3g_f8_n_buffer
snow3g_f8_n_buffer_t snow3g_f8_n_buffer
Definition intel-ipsec-mb.h:1067
IMB_MGR::sha1
hash_fn_t sha1
Definition intel-ipsec-mb.h:1010
IMB_MGR::used_arch_type
uint8_t used_arch_type
Definition intel-ipsec-mb.h:981
IMB_MGR::crc32_ethernet_fcs
crc32_fn_t crc32_ethernet_fcs
Definition intel-ipsec-mb.h:1093
IMB_MGR::hmac_md5_ooo
void * hmac_md5_ooo
Definition intel-ipsec-mb.h:1162
IMB_MGR::des3_enc_ooo
void * des3_enc_ooo
Definition intel-ipsec-mb.h:1152
IMB_MGR::sha512_one_block
hash_one_block_t sha512_one_block
Definition intel-ipsec-mb.h:1008
IMB_MGR::gcm256_init
aes_gcm_init_t gcm256_init
Definition intel-ipsec-mb.h:1025
IMB_MGR::snow3g_f8_8_buffer_multikey
snow3g_f8_8_buffer_multikey_t snow3g_f8_8_buffer_multikey
Definition intel-ipsec-mb.h:1068
IMB_MGR::submit_cipher_burst
submit_cipher_burst_t submit_cipher_burst
Definition intel-ipsec-mb.h:1115
IMB_MGR::get_next_burst
burst_fn_t get_next_burst
Definition intel-ipsec-mb.h:1111
IMB_MGR::sha256
hash_fn_t sha256
Definition intel-ipsec-mb.h:1012
IMB_MGR::sm4_keyexp
sm4_keyexp_t sm4_keyexp
Definition intel-ipsec-mb.h:1129
IMB_MGR::gcm128_enc_finalize
aes_gcm_enc_dec_finalize_t gcm128_enc_finalize
Definition intel-ipsec-mb.h:1032
IMB_MGR::submit_aead_burst
submit_cipher_burst_t submit_aead_burst
Definition intel-ipsec-mb.h:1134
IMB_MGR::gmac128_update
aes_gmac_update_t gmac128_update
Definition intel-ipsec-mb.h:1083
IMB_MGR::reserved2
uint8_t reserved2[7]
Definition intel-ipsec-mb.h:980
IMB_MGR::zuc_eia3_ooo
void * zuc_eia3_ooo
Definition intel-ipsec-mb.h:1167
IMB_MGR::gcm192_enc_finalize
aes_gcm_enc_dec_finalize_t gcm192_enc_finalize
Definition intel-ipsec-mb.h:1033
IMB_MGR::f8_3_buffer
kasumi_f8_3_buffer_t f8_3_buffer
Definition intel-ipsec-mb.h:1053
IMB_MGR::sha384_one_block
hash_one_block_t sha384_one_block
Definition intel-ipsec-mb.h:1007
IMB_MGR::docsis_des_enc_ooo
void * docsis_des_enc_ooo
Definition intel-ipsec-mb.h:1154
IMB_MGR::docsis128_sec_ooo
void * docsis128_sec_ooo
Definition intel-ipsec-mb.h:1146
IMB_MGR::set_suite_id
void(* set_suite_id)(struct IMB_MGR *, IMB_JOB *)
Definition intel-ipsec-mb.h:1124
IMB_MGR::gcm256_enc_finalize
aes_gcm_enc_dec_finalize_t gcm256_enc_finalize
Definition intel-ipsec-mb.h:1034
IMB_MGR::aes128_ooo
void * aes128_ooo
Definition intel-ipsec-mb.h:1143
IMB_MGR::get_completed_job
get_completed_job_t get_completed_job
Definition intel-ipsec-mb.h:995
IMB_MGR::gcm256_dec_update
aes_gcm_enc_dec_update_t gcm256_dec_update
Definition intel-ipsec-mb.h:1031
IMB_MGR::snow3g_f9_1_buffer
snow3g_f9_1_buffer_t snow3g_f9_1_buffer
Definition intel-ipsec-mb.h:1070
IMB_MGR::aes128_cbcs_ooo
void * aes128_cbcs_ooo
Definition intel-ipsec-mb.h:1168
IMB_MGR::gcm128_enc
aes_gcm_enc_dec_t gcm128_enc
Definition intel-ipsec-mb.h:1017
IMB_MGR::sha384
hash_fn_t sha384
Definition intel-ipsec-mb.h:1013
IMB_MGR::flush_burst
burst_fn_t flush_burst
Definition intel-ipsec-mb.h:1114
IMB_MGR::sha_224_ooo
void * sha_224_ooo
Definition intel-ipsec-mb.h:1176
IMB_MGR::cmac_subkey_gen_128
cmac_subkey_gen_t cmac_subkey_gen_128
Definition intel-ipsec-mb.h:1001
IMB_MGR::crc6_iuup_header
crc32_fn_t crc6_iuup_header
Definition intel-ipsec-mb.h:1102
IMB_MGR::submit_burst
burst_fn_t submit_burst
Definition intel-ipsec-mb.h:1112
IMB_MGR::snow3g_uia2_ooo
void * snow3g_uia2_ooo
Definition intel-ipsec-mb.h:1174
IMB_MGR::gcm192_enc
aes_gcm_enc_dec_t gcm192_enc
Definition intel-ipsec-mb.h:1018
IMB_MGR::submit_job_nocheck
submit_job_t submit_job_nocheck
Definition intel-ipsec-mb.h:994
IMB_MGR::f8_1_buffer_bit
kasumi_f8_1_buffer_bit_t f8_1_buffer_bit
Definition intel-ipsec-mb.h:1051
IMB_MGR::sha224_one_block
hash_one_block_t sha224_one_block
Definition intel-ipsec-mb.h:1005
IMB_MGR::des_key_sched
des_keysched_t des_key_sched
Definition intel-ipsec-mb.h:1003
IMB_MGR::snow3g_uea2_ooo
void * snow3g_uea2_ooo
Definition intel-ipsec-mb.h:1173
IMB_MGR::submit_job
submit_job_t submit_job
Definition intel-ipsec-mb.h:993
IMB_MGR::chacha20_poly1305_finalize
chacha_poly_finalize_t chacha20_poly1305_finalize
Definition intel-ipsec-mb.h:1109
IMB_MGR::chacha20_poly1305_enc_update
chacha_poly_enc_dec_update_t chacha20_poly1305_enc_update
Definition intel-ipsec-mb.h:1107
IMB_MGR::kasumi_init_f8_key_sched
kasumi_init_f8_key_sched_t kasumi_init_f8_key_sched
Definition intel-ipsec-mb.h:1058
IMB_MGR::jobs
IMB_JOB jobs[IMB_MAX_JOBS]
Definition intel-ipsec-mb.h:1140
IMB_MGR::aes256_cfb_one
aes_cfb_t aes256_cfb_one
Definition intel-ipsec-mb.h:1119
IMB_MGR::eia3_n_buffer
zuc_eia3_n_buffer_t eia3_n_buffer
Definition intel-ipsec-mb.h:1075
IMB_MGR::chacha20_hp_quic
chacha20_hp_quic_t chacha20_hp_quic
Definition intel-ipsec-mb.h:1127
IMB_MGR::snow3g_f8_1_buffer
snow3g_f8_1_buffer_t snow3g_f8_1_buffer
Definition intel-ipsec-mb.h:1063
IMB_MGR::hmac_sha_224_ooo
void * hmac_sha_224_ooo
Definition intel-ipsec-mb.h:1158
IMB_MGR::self_test_cb_fn
imb_self_test_cb_t self_test_cb_fn
Definition intel-ipsec-mb.h:1131
IMB_MGR::kasumi_key_sched_size
kasumi_key_sched_size_t kasumi_key_sched_size
Definition intel-ipsec-mb.h:1060
IMB_MGR::aes128_cfb_one
aes_cfb_t aes128_cfb_one
Definition intel-ipsec-mb.h:1015
IMB_MGR::cmac_subkey_gen_256
cmac_subkey_gen_t cmac_subkey_gen_256
Definition intel-ipsec-mb.h:1091
IMB_MGR::crc24_lte_b
crc32_fn_t crc24_lte_b
Definition intel-ipsec-mb.h:1097
IMB_MGR::gcm192_precomp
aes_gcm_precomp_t gcm192_precomp
Definition intel-ipsec-mb.h:1039
IMB_MGR::gcm256_enc_update
aes_gcm_enc_dec_update_t gcm256_enc_update
Definition intel-ipsec-mb.h:1028
IMB_MGR::self_test_cb_arg
void * self_test_cb_arg
Definition intel-ipsec-mb.h:1132
IMB_MGR::eea3_4_buffer
zuc_eea3_4_buffer_t eea3_4_buffer
Definition intel-ipsec-mb.h:1046
IMB_MGR::earliest_job
int earliest_job
Definition intel-ipsec-mb.h:1138
IMB_MGR::f8_2_buffer
kasumi_f8_2_buffer_t f8_2_buffer
Definition intel-ipsec-mb.h:1052
IMB_MGR::crc7_fp_header
crc32_fn_t crc7_fp_header
Definition intel-ipsec-mb.h:1100
IMB_MGR::gmac256_init
aes_gmac_init_t gmac256_init
Definition intel-ipsec-mb.h:1082
IMB_MGR::submit_cipher_burst_nocheck
submit_cipher_burst_t submit_cipher_burst_nocheck
Definition intel-ipsec-mb.h:1116
IMB_MGR::docsis256_sec_ooo
void * docsis256_sec_ooo
Definition intel-ipsec-mb.h:1148
IMB_MGR::aes256_cmac_ooo
void * aes256_cmac_ooo
Definition intel-ipsec-mb.h:1172
IMB_MGR::sha_1_ooo
void * sha_1_ooo
Definition intel-ipsec-mb.h:1175
IMB_MGR::docsis128_crc32_sec_ooo
void * docsis128_crc32_sec_ooo
Definition intel-ipsec-mb.h:1147
IMB_MGR::gcm256_dec
aes_gcm_enc_dec_t gcm256_dec
Definition intel-ipsec-mb.h:1022
IMB_MGR::crc32_wimax_ofdma_data
crc32_fn_t crc32_wimax_ofdma_data
Definition intel-ipsec-mb.h:1103
IMB_MGR::gcm128_enc_update
aes_gcm_enc_dec_update_t gcm128_enc_update
Definition intel-ipsec-mb.h:1026
IMB_MGR::aes_xcbc_ooo
void * aes_xcbc_ooo
Definition intel-ipsec-mb.h:1163
IMB_MGR::crc16_fp_data
crc32_fn_t crc16_fp_data
Definition intel-ipsec-mb.h:1098
IMB_MGR::snow3g_f8_1_buffer_bit
snow3g_f8_1_buffer_bit_t snow3g_f8_1_buffer_bit
Definition intel-ipsec-mb.h:1062
IMB_MGR::gcm128_init
aes_gcm_init_t gcm128_init
Definition intel-ipsec-mb.h:1023
IMB_MGR::sha256_one_block
hash_one_block_t sha256_one_block
Definition intel-ipsec-mb.h:1006
IMB_MGR::gcm192_dec
aes_gcm_enc_dec_t gcm192_dec
Definition intel-ipsec-mb.h:1021
IMB_MGR::f8_n_buffer
kasumi_f8_n_buffer_t f8_n_buffer
Definition intel-ipsec-mb.h:1055
IMB_MGR::flags
uint64_t flags
Definition intel-ipsec-mb.h:976
IMB_MGR::aes_cfb_128_ooo
void * aes_cfb_128_ooo
Definition intel-ipsec-mb.h:1182
IMB_MGR::xcbc_keyexp
xcbc_keyexp_t xcbc_keyexp
Definition intel-ipsec-mb.h:1002
IMB_MGR::gcm128_init_var_iv
aes_gcm_init_var_iv_t gcm128_init_var_iv
Definition intel-ipsec-mb.h:1076
IMB_MGR::aes_cfb_256_ooo
void * aes_cfb_256_ooo
Definition intel-ipsec-mb.h:1184
IMB_MGR::eea3_1_buffer
zuc_eea3_1_buffer_t eea3_1_buffer
Definition intel-ipsec-mb.h:1045
IMB_MGR::des_dec_ooo
void * des_dec_ooo
Definition intel-ipsec-mb.h:1151
IMB_MGR::f8_4_buffer
kasumi_f8_4_buffer_t f8_4_buffer
Definition intel-ipsec-mb.h:1054
IMB_MGR::hmac_sha_512_ooo
void * hmac_sha_512_ooo
Definition intel-ipsec-mb.h:1161
IMB_MGR::aes_cfb_192_ooo
void * aes_cfb_192_ooo
Definition intel-ipsec-mb.h:1183
IMB_MGR::docsis256_crc32_sec_ooo
void * docsis256_crc32_sec_ooo
Definition intel-ipsec-mb.h:1149
IMB_MGR::ghash_pre
aes_gcm_pre_t ghash_pre
Definition intel-ipsec-mb.h:1092
IMB_MGR::f8_1_buffer
kasumi_f8_1_buffer_t f8_1_buffer
Definition intel-ipsec-mb.h:1050
IMB_MGR::features
uint64_t features
Definition intel-ipsec-mb.h:977
IMB_MGR::gcm128_dec_finalize
aes_gcm_enc_dec_finalize_t gcm128_dec_finalize
Definition intel-ipsec-mb.h:1035
IMB_MGR::gcm256_init_var_iv
aes_gcm_init_var_iv_t gcm256_init_var_iv
Definition intel-ipsec-mb.h:1078
IMB_MGR::f9_1_buffer
kasumi_f9_1_buffer_t f9_1_buffer
Definition intel-ipsec-mb.h:1056
IMB_MGR::ghash
ghash_t ghash
Definition intel-ipsec-mb.h:1074
IMB_MGR::hmac_sha_384_ooo
void * hmac_sha_384_ooo
Definition intel-ipsec-mb.h:1160
IMB_MGR::aes192_ooo
void * aes192_ooo
Definition intel-ipsec-mb.h:1144
IMB_SELF_TEST_CALLBACK_DATA
Definition intel-ipsec-mb.h:885
IMB_SELF_TEST_CALLBACK_DATA::type
const char * type
Definition intel-ipsec-mb.h:887
IMB_SELF_TEST_CALLBACK_DATA::descr
const char * descr
Definition intel-ipsec-mb.h:888
IMB_SELF_TEST_CALLBACK_DATA::phase
const char * phase
Definition intel-ipsec-mb.h:886
IMB_SGL_IOV
Definition intel-ipsec-mb.h:370
IMB_SGL_IOV::len
uint64_t len
Definition intel-ipsec-mb.h:373
IMB_SGL_IOV::out
void * out
Definition intel-ipsec-mb.h:372
IMB_SGL_IOV::in
const void * in
Definition intel-ipsec-mb.h:371
chacha20_poly1305_context_data
holds Chacha20-Poly1305 operation context
Definition intel-ipsec-mb.h:595
chacha20_poly1305_context_data::IV
uint8_t IV[IMB_CHACHA20_POLY1305_IV_SIZE]
Definition intel-ipsec-mb.h:609
chacha20_poly1305_context_data::poly_scratch
uint8_t poly_scratch[IMB_POLY1305_BLOCK_SIZE]
Definition intel-ipsec-mb.h:601
chacha20_poly1305_context_data::remain_ct_bytes
uint64_t remain_ct_bytes
Definition intel-ipsec-mb.h:606
chacha20_poly1305_context_data::aad_len
uint64_t aad_len
Definition intel-ipsec-mb.h:597
chacha20_poly1305_context_data::poly_key
uint8_t poly_key[IMB_CHACHA20_POLY1305_KEY_SIZE]
Definition intel-ipsec-mb.h:600
chacha20_poly1305_context_data::remain_ks_bytes
uint64_t remain_ks_bytes
Definition intel-ipsec-mb.h:604
chacha20_poly1305_context_data::last_block_count
uint64_t last_block_count
Definition intel-ipsec-mb.h:603
chacha20_poly1305_context_data::hash_len
uint64_t hash_len
Definition intel-ipsec-mb.h:598
chacha20_poly1305_context_data::hash
uint64_t hash[3]
Definition intel-ipsec-mb.h:596
chacha20_poly1305_context_data::last_ks
uint8_t last_ks[64]
Definition intel-ipsec-mb.h:599
gcm_context_data
holds GCM operation context
Definition intel-ipsec-mb.h:581
gcm_context_data::in_length
uint64_t in_length
Definition intel-ipsec-mb.h:584
gcm_context_data::current_counter
uint8_t current_counter[IMB_GCM_BLOCK_LEN]
Definition intel-ipsec-mb.h:587
gcm_context_data::partial_block_enc_key
uint8_t partial_block_enc_key[IMB_GCM_BLOCK_LEN]
Definition intel-ipsec-mb.h:585
gcm_context_data::orig_IV
uint8_t orig_IV[IMB_GCM_BLOCK_LEN]
Definition intel-ipsec-mb.h:586
gcm_context_data::partial_block_length
uint64_t partial_block_length
Definition intel-ipsec-mb.h:588
gcm_context_data::aad_hash
uint8_t aad_hash[IMB_GCM_BLOCK_LEN]
Definition intel-ipsec-mb.h:582
gcm_context_data::aad_length
uint64_t aad_length
Definition intel-ipsec-mb.h:583
gcm_key_data
holds intermediate key data needed to improve performance
Definition intel-ipsec-mb.h:653
gcm_key_data::avx2_avx512
struct gcm_key_data::@12::@14 avx2_avx512
gcm_key_data::shifted_hkey_k
uint8_t shifted_hkey_k[IMB_GCM_ENC_KEY_LEN *8]
Definition intel-ipsec-mb.h:672
gcm_key_data::vaes_avx512
struct gcm_key_data::@12::@15 vaes_avx512
gcm_key_data::sse_avx
struct gcm_key_data::@12::@13 sse_avx
gcm_key_data::vaes_avx2
struct gcm_key_data::@12::@16 vaes_avx2
gcm_key_data::expanded_keys
uint8_t expanded_keys[IMB_GCM_ENC_KEY_LEN *IMB_GCM_KEY_SETS]
Definition intel-ipsec-mb.h:654
gcm_key_data::shifted_hkey
uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN *8]
Definition intel-ipsec-mb.h:663
gcm_key_data::ghash_keys
union gcm_key_data::@12 ghash_keys
imb_uint128_t
Definition intel-ipsec-mb.h:40
imb_uint128_t::low
uint64_t low
Definition intel-ipsec-mb.h:41
imb_uint128_t::high
uint64_t high
Definition intel-ipsec-mb.h:42
kasumi_key_sched_s
Definition intel-ipsec-mb.h:567
kasumi_key_sched_s::msk16
uint16_t msk16[KASUMI_KEY_SCHEDULE_SIZE]
Definition intel-ipsec-mb.h:570
kasumi_key_sched_s::sk16
uint16_t sk16[KASUMI_KEY_SCHEDULE_SIZE]
Definition intel-ipsec-mb.h:569
snow3g_key_schedule_s
Definition intel-ipsec-mb.h:822
snow3g_key_schedule_s::k
uint32_t k[4]
Definition intel-ipsec-mb.h:824