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

intel-ipsec-mb Documentation of the Intel(R) IPSec Multi-Buffer library |

intel-ipsec-mb.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright (c) 2012-2022, 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) \
51 decl __attribute__((aligned(alignval)))
52#define __forceinline \
53 static inline __attribute__((always_inline))
54
55#if __GNUC__ >= 4
56#define IMB_DLL_EXPORT __attribute__((visibility("default")))
57#define IMB_DLL_LOCAL __attribute__((visibility("hidden")))
58#else /* GNU C 4.0 and later */
59#define IMB_DLL_EXPORT
60#define IMB_DLL_LOCAL
61#endif
63#else
64/* Windows */
65
66#ifdef __MINGW32__
67/* MinGW-w64 */
68#define DECLARE_ALIGNED(decl, alignval) \
69 decl __attribute__((aligned(alignval)))
70#undef __forceinline
71#define __forceinline \
72 static inline __attribute__((always_inline))
73
74#else
75/* MSVS */
76#define DECLARE_ALIGNED(decl, alignval) \
77 __declspec(align(alignval)) decl
78#define __forceinline \
79 static __forceinline
80
81#endif /* __MINGW__ */
82
86#define IMB_DLL_EXPORT
87#define IMB_DLL_LOCAL
88
89#endif /* defined __linux__ || defined __FreeBSD__ */
90
94#define IMB_VERSION_STR "1.2.0"
95#define IMB_VERSION_NUM 0x10200
96
100#define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
101
105#ifdef DEBUG
106#include <assert.h>
107#define IMB_ASSERT(x) assert(x)
108#else
109#define IMB_ASSERT(x)
110#endif
111
112#ifndef IMB_DIM
113#define IMB_DIM(x) (sizeof(x) / sizeof(x[0]))
114#endif
115
119 typedef enum {
120 IMB_ARCH_NONE = 0,
121 IMB_ARCH_NOAESNI,
122 IMB_ARCH_SSE,
123 IMB_ARCH_AVX,
124 IMB_ARCH_AVX2,
125 IMB_ARCH_AVX512,
126 IMB_ARCH_NUM,
127} IMB_ARCH;
128
132#define IMB_DES_KEY_SCHED_SIZE (16 * 8)
133#define IMB_DES_BLOCK_SIZE 8
134
135#define IMB_AES_BLOCK_SIZE 16
136
137#define IMB_SHA1_DIGEST_SIZE_IN_BYTES 20
138#define IMB_SHA224_DIGEST_SIZE_IN_BYTES 28
139#define IMB_SHA256_DIGEST_SIZE_IN_BYTES 32
140#define IMB_SHA384_DIGEST_SIZE_IN_BYTES 48
141#define IMB_SHA512_DIGEST_SIZE_IN_BYTES 64
142
143#define IMB_SHA1_BLOCK_SIZE 64
144#define IMB_SHA_256_BLOCK_SIZE 64
145#define IMB_SHA_384_BLOCK_SIZE 128
146#define IMB_SHA_512_BLOCK_SIZE 128
147
148#define IMB_KASUMI_KEY_SIZE 16
149#define IMB_KASUMI_IV_SIZE 8
150#define IMB_KASUMI_BLOCK_SIZE 8
151#define IMB_KASUMI_DIGEST_SIZE 4
152
157#define IMB_DOCSIS_CRC32_MIN_ETH_PDU_SIZE 14
158#define IMB_DOCSIS_CRC32_TAG_SIZE 4
159
164 typedef enum {
165 IMB_STATUS_BEING_PROCESSED = 0,
166 IMB_STATUS_COMPLETED_CIPHER = 1,
167 IMB_STATUS_COMPLETED_AUTH = 2,
168 IMB_STATUS_COMPLETED = 3,
170 IMB_STATUS_INVALID_ARGS = 4,
171 IMB_STATUS_INTERNAL_ERROR,
172 IMB_STATUS_ERROR
173} IMB_STATUS;
174
178 typedef enum {
179 IMB_ERR_MIN = 2000,
180 IMB_ERR_NULL_MBMGR,
181 IMB_ERR_JOB_NULL_SRC,
182 IMB_ERR_JOB_NULL_DST,
183 IMB_ERR_JOB_NULL_KEY,
184 IMB_ERR_JOB_NULL_IV,
185 IMB_ERR_JOB_NULL_AUTH,
186 IMB_ERR_JOB_NULL_AAD,
187 IMB_ERR_JOB_CIPH_LEN,
188 IMB_ERR_JOB_AUTH_LEN,
189 IMB_ERR_JOB_IV_LEN,
190 IMB_ERR_JOB_KEY_LEN,
191 IMB_ERR_JOB_AUTH_TAG_LEN,
192 IMB_ERR_JOB_AAD_LEN,
193 IMB_ERR_JOB_SRC_OFFSET,
194 IMB_ERR_JOB_CHAIN_ORDER,
195 IMB_ERR_CIPH_MODE,
196 IMB_ERR_HASH_ALGO,
197 IMB_ERR_JOB_NULL_AUTH_KEY,
198 IMB_ERR_JOB_NULL_SGL_CTX,
199 IMB_ERR_JOB_NULL_NEXT_IV,
200 IMB_ERR_JOB_PON_PLI,
201 IMB_ERR_NULL_SRC,
202 IMB_ERR_NULL_DST,
203 IMB_ERR_NULL_KEY,
204 IMB_ERR_NULL_EXP_KEY,
205 IMB_ERR_NULL_IV,
206 IMB_ERR_NULL_AUTH,
207 IMB_ERR_NULL_AAD,
208 IMB_ERR_CIPH_LEN,
209 IMB_ERR_AUTH_LEN,
210 IMB_ERR_IV_LEN,
211 IMB_ERR_KEY_LEN,
212 IMB_ERR_AUTH_TAG_LEN,
213 IMB_ERR_AAD_LEN,
214 IMB_ERR_SRC_OFFSET,
215 IMB_ERR_NULL_AUTH_KEY,
216 IMB_ERR_NULL_CTX,
217 IMB_ERR_NO_AESNI_EMU,
218 IMB_ERR_JOB_NULL_HMAC_OPAD,
219 IMB_ERR_JOB_NULL_HMAC_IPAD,
220 IMB_ERR_JOB_NULL_XCBC_K1_EXP,
221 IMB_ERR_JOB_NULL_XCBC_K2,
222 IMB_ERR_JOB_NULL_XCBC_K3,
223 IMB_ERR_JOB_CIPH_DIR,
224 IMB_ERR_JOB_NULL_GHASH_INIT_TAG,
225 IMB_ERR_MISSING_CPUFLAGS_INIT_MGR,
226 IMB_ERR_NULL_JOB,
227 /* add new error types above this comment */
228 IMB_ERR_MAX /* don't move this one */
229} IMB_ERR;
230
235#ifdef __ELASTERROR
236#if __ELASTERROR > 2000
237#error "Library error codes conflict with errno.h - please update IMB_ERR_MIN!"
238#endif
239#endif
240
247#ifndef NO_COMPAT_IMB_API_053
248/* Previous cipher mode enums */
249#define CBC IMB_CIPHER_CBC
250#define CNTR IMB_CIPHER_CNTR
251#define NULL_CIPHER IMB_CIPHER_NULL
252#define DOCSIS_SEC_BPI IMB_CIPHER_DOCSIS_SEC_BPI
253#define GCM IMB_CIPHER_GCM
254#define CUSTOM_CIPHER IMB_CIPHER_CUSTOM
255#define DES IMB_CIPHER_DES
256#define DOCSIS_DES IMB_CIPHER_DOCSIS_DES
257#define CCM IMB_CIPHER_CCM
258#define DES3 IMB_CIPHER_DES3
259#define PON_AES_CNTR IMB_CIPHER_PON_AES_CNTR
260#define ECB IMB_CIPHER_ECB
261#define CNTR_BITLEN IMB_CIPHER_CNTR_BITLEN
262
263/* Previous hash algo enums */
264#define SHA1 IMB_AUTH_HMAC_SHA_1
265#define SHA_224 IMB_AUTH_HMAC_SHA_224
266#define SHA_256 IMB_AUTH_HMAC_SHA_256
267#define SHA_384 IMB_AUTH_HMAC_SHA_384
268#define SHA_512 IMB_AUTH_HMAC_SHA_512
269#define AES_XCBC IMB_AUTH_AES_XCBC
270#define MD5 IMB_AUTH_MD5
271#define NULL_HASH IMB_AUTH_NULL
272#define AES_GMAC IMB_AUTH_AES_GMAC
273#define CUSTOM_HASH IMB_AUTH_CUSTOM
274#define AES_CCM IMB_AUTH_AES_CCM
275#define AES_CMAC IMB_AUTH_AES_CMAC
276#define PLAIN_SHA1 IMB_AUTH_SHA_1
277#define PLAIN_SHA_224 IMB_AUTH_SHA_224
278#define PLAIN_SHA_256 IMB_AUTH_SHA_256
279#define PLAIN_SHA_384 IMB_AUTH_SHA_384
280#define PLAIN_SHA_512 IMB_AUTH_SHA_512
281#define AES_CMAC_BITLEN IMB_AUTH_AES_CMAC_BITLEN
282#define PON_CRC_BIP IMB_AUTH_PON_CRC_BIP
283
284/* Previous cipher direction enums */
285#define ENCRYPT IMB_DIR_ENCRYPT
286#define DECRYPT IMB_DIR_DECRYPT
287
288/* Previous chain order enums */
289#define HASH_CIPHER IMB_ORDER_HASH_CIPHER
290#define CIPHER_HASH IMB_ORDER_CIPHER_HASH
291
292/* Previous key size enums */
293#define AES_128_BYTES IMB_KEY_128_BYTES
294#define AES_192_BYTES IMB_KEY_192_BYTES
295#define AES_256_BYTES IMB_KEY_256_BYTES
296#define IMB_KEY_AES_128_BYTES IMB_KEY_128_BYTES
297#define IMB_KEY_AES_192_BYTES IMB_KEY_192_BYTES
298#define IMB_KEY_AES_256_BYTES IMB_KEY_256_BYTES
299#define AES_KEY_SIZE_BYTES IMB_KEY_SIZE_BYTES
300
301#define MB_MGR IMB_MGR
302#define JOB_AES_HMAC IMB_JOB
303#define JOB_STS IMB_STATUS
304#define IMB_JOB_STS IMB_STATUS
305#define JOB_CIPHER_MODE IMB_CIPHER_MODE
306#define JOB_CIPHER_DIRECTION IMB_CIPHER_DIRECTION
307#define JOB_HASH_ALG IMB_HASH_ALG
308#define JOB_CHAIN_ORDER IMB_CHAIN_ORDER
309#define MAX_JOBS IMB_MAX_JOBS
310
311#define STS_BEING_PROCESSED IMB_STATUS_BEING_PROCESSED
312#define STS_COMPLETED_AES IMB_STATUS_COMPLETED_CIPHER
313#define STS_COMPLETED_HMAC IMB_STATUS_COMPLETED_AUTH
314#define STS_COMPLETED IMB_STATUS_COMPLETED
315#define STS_INVALID_ARGS IMB_STATUS_INVALID_ARGS
316#define STS_INTERNAL_ERROR IMB_STATUS_INTERNAL_ERROR
317#define STS_ERROR IMB_STATUS_ERROR
318
319#define MAX_TAG_LEN IMB_MAX_TAG_LEN
320#define GCM_IV_DATA_LEN IMB_GCM_IV_DATA_LEN
321#define GCM_128_KEY_LEN IMB_GCM_128_KEY_LEN
322#define GCM_192_KEY_LEN IMB_GCM_192_KEY_LEN
323#define GCM_256_KEY_LEN IMB_GCM_256_KEY_LEN
324
325#define DES_KEY_SCHED_SIZE IMB_DES_KEY_SCHED_SIZE
326#define DES_BLOCK_SIZE IMB_DES_BLOCK_SIZE
327
328#define AES_BLOCK_SIZE IMB_AES_BLOCK_SIZE
329
330#define SHA1_DIGEST_SIZE_IN_BYTES IMB_SHA1_DIGEST_SIZE_IN_BYTES
331#define SHA224_DIGEST_SIZE_IN_BYTES IMB_SHA224_DIGEST_SIZE_IN_BYTES
332#define SHA256_DIGEST_SIZE_IN_BYTES IMB_SHA256_DIGEST_SIZE_IN_BYTES
333#define SHA384_DIGEST_SIZE_IN_BYTES IMB_SHA384_DIGEST_SIZE_IN_BYTES
334#define SHA512_DIGEST_SIZE_IN_BYTES IMB_SHA512_DIGEST_SIZE_IN_BYTES
335
336#define SHA1_BLOCK_SIZE IMB_SHA1_BLOCK_SIZE
337#define SHA_256_BLOCK_SIZE IMB_SHA_256_BLOCK_SIZE
338#define SHA_384_BLOCK_SIZE IMB_SHA_384_BLOCK_SIZE
339#define SHA_512_BLOCK_SIZE IMB_SHA_512_BLOCK_SIZE
340
341#define KASUMI_KEY_SIZE IMB_KASUMI_KEY_SIZE
342#define KASUMI_IV_SIZE IMB_KASUMI_IV_SIZE
343#define KASUMI_BLOCK_SIZE IMB_KASUMI_BLOCK_SIZE
344#define KASUMI_DIGEST_SIZE IMB_KASUMI_DIGEST_SIZE
345
346#define DOCSIS_CRC32_MIN_ETH_PDU_SIZE IMB_DOCSIS_CRC32_MIN_ETH_PDU_SIZE
347#define DOCSIS_CRC32_TAG_SIZE IMB_DOCSIS_CRC32_TAG_SIZE
348
349/* Previous fields in IMB_JOB/JOB_AES_HMAC */
350#define aes_enc_key_expanded enc_keys
351#define aes_dec_key_expanded dec_keys
352#define aes_key_len_in_bytes key_len_in_bytes
353#endif /* !NO_COMPAT_IMB_API_053 */
354
355 typedef enum {
356 IMB_CIPHER_CBC = 1,
357 IMB_CIPHER_CNTR,
358 IMB_CIPHER_NULL,
359 IMB_CIPHER_DOCSIS_SEC_BPI,
360 IMB_CIPHER_GCM,
361 IMB_CIPHER_CUSTOM,
362 IMB_CIPHER_DES,
363 IMB_CIPHER_DOCSIS_DES,
364 IMB_CIPHER_CCM,
365 IMB_CIPHER_DES3,
366 IMB_CIPHER_PON_AES_CNTR,
367 IMB_CIPHER_ECB,
368 IMB_CIPHER_CNTR_BITLEN,
369 IMB_CIPHER_ZUC_EEA3,
370 IMB_CIPHER_SNOW3G_UEA2_BITLEN,
371 IMB_CIPHER_KASUMI_UEA1_BITLEN,
372 IMB_CIPHER_CBCS_1_9,
373 IMB_CIPHER_CHACHA20,
374 IMB_CIPHER_CHACHA20_POLY1305,
375 IMB_CIPHER_CHACHA20_POLY1305_SGL,
376 IMB_CIPHER_SNOW_V,
377 IMB_CIPHER_SNOW_V_AEAD,
378 IMB_CIPHER_GCM_SGL,
379 IMB_CIPHER_NUM
380} IMB_CIPHER_MODE;
381
382 typedef enum {
383 IMB_DIR_ENCRYPT = 1,
384 IMB_DIR_DECRYPT
385} IMB_CIPHER_DIRECTION;
386
387 typedef enum {
388 IMB_AUTH_HMAC_SHA_1 = 1,
389 IMB_AUTH_HMAC_SHA_224,
390 IMB_AUTH_HMAC_SHA_256,
391 IMB_AUTH_HMAC_SHA_384,
392 IMB_AUTH_HMAC_SHA_512,
393 IMB_AUTH_AES_XCBC,
394 IMB_AUTH_MD5,
395 IMB_AUTH_NULL,
396 IMB_AUTH_AES_GMAC,
397 IMB_AUTH_CUSTOM,
398 IMB_AUTH_AES_CCM,
399 IMB_AUTH_AES_CMAC,
400 IMB_AUTH_SHA_1,
401 IMB_AUTH_SHA_224,
402 IMB_AUTH_SHA_256,
403 IMB_AUTH_SHA_384,
404 IMB_AUTH_SHA_512,
405 IMB_AUTH_AES_CMAC_BITLEN,
406 IMB_AUTH_PON_CRC_BIP,
407 IMB_AUTH_ZUC_EIA3_BITLEN,
408 IMB_AUTH_DOCSIS_CRC32,
409 IMB_AUTH_SNOW3G_UIA2_BITLEN,
410 IMB_AUTH_KASUMI_UIA1,
411 IMB_AUTH_AES_GMAC_128,
412 IMB_AUTH_AES_GMAC_192,
413 IMB_AUTH_AES_GMAC_256,
414 IMB_AUTH_AES_CMAC_256,
415 IMB_AUTH_POLY1305,
416 IMB_AUTH_CHACHA20_POLY1305,
417 IMB_AUTH_CHACHA20_POLY1305_SGL,
418 IMB_AUTH_ZUC256_EIA3_BITLEN,
419 IMB_AUTH_SNOW_V_AEAD,
420 IMB_AUTH_GCM_SGL,
421 IMB_AUTH_CRC32_ETHERNET_FCS,
422 IMB_AUTH_CRC32_SCTP,
423 IMB_AUTH_CRC32_WIMAX_OFDMA_DATA,
424 IMB_AUTH_CRC24_LTE_A,
425 IMB_AUTH_CRC24_LTE_B,
426 IMB_AUTH_CRC16_X25,
427 IMB_AUTH_CRC16_FP_DATA,
428 IMB_AUTH_CRC11_FP_HEADER,
429 IMB_AUTH_CRC10_IUUP_DATA,
430 IMB_AUTH_CRC8_WIMAX_OFDMA_HCS,
431 IMB_AUTH_CRC7_FP_HEADER,
432 IMB_AUTH_CRC6_IUUP_HEADER,
433 IMB_AUTH_GHASH,
434 IMB_AUTH_NUM
435} IMB_HASH_ALG;
436
437 typedef enum {
438 IMB_ORDER_CIPHER_HASH = 1,
439 IMB_ORDER_HASH_CIPHER
440} IMB_CHAIN_ORDER;
441
442 typedef enum {
443 IMB_KEY_128_BYTES = 16,
444 IMB_KEY_192_BYTES = 24,
445 IMB_KEY_256_BYTES = 32
446} IMB_KEY_SIZE_BYTES;
447
448 typedef enum {
449 IMB_SGL_INIT = 0,
450 IMB_SGL_UPDATE,
451 IMB_SGL_COMPLETE,
452 IMB_SGL_ALL
453} IMB_SGL_STATE;
454
458 struct IMB_SGL_IOV {
459 const void *in;
460 void *out;
461 uint64_t len;
462};
463
483 typedef struct IMB_JOB {
484 const void *enc_keys;
485 const void *dec_keys;
486 uint64_t key_len_in_bytes;
487 union {
488 const uint8_t *src;
491 const struct IMB_SGL_IOV *sgl_io_segs;
493 };
494 union {
495 uint8_t *dst;
498 uint64_t num_sgl_io_segs;
500 };
501 union {
502 uint64_t cipher_start_src_offset_in_bytes;
504 uint64_t cipher_start_src_offset_in_bits;
506 uint64_t cipher_start_offset_in_bits;
508 };
509 union {
510 uint64_t msg_len_to_cipher_in_bytes;
512 uint64_t msg_len_to_cipher_in_bits;
514 };
515 uint64_t hash_start_src_offset_in_bytes;
516 union {
517 uint64_t msg_len_to_hash_in_bytes;
519 uint64_t msg_len_to_hash_in_bits;
521 };
522 const uint8_t *iv;
523 uint64_t iv_len_in_bytes;
524 uint8_t *auth_tag_output;
525 uint64_t auth_tag_output_len_in_bytes;
528 /* Start hash algorithm-specific fields */
529 union {
530 struct _HMAC_specific_fields {
531 const uint8_t *_hashed_auth_key_xor_ipad;
534 const uint8_t *_hashed_auth_key_xor_opad;
537 } HMAC;
538 struct _AES_XCBC_specific_fields {
539 const uint32_t *_k1_expanded;
541 const uint8_t *_k2;
543 const uint8_t *_k3;
545 } XCBC;
546 struct _AES_CCM_specific_fields {
547 const void *aad;
549 uint64_t aad_len_in_bytes;
550 } CCM;
551 struct _AES_CMAC_specific_fields {
552 const void *_key_expanded;
554 const void *_skey1;
555 const void *_skey2;
556 } CMAC;
557 struct _AES_GCM_specific_fields {
558 const void *aad;
560 uint64_t aad_len_in_bytes;
561 struct gcm_context_data *ctx;
563 } GCM;
564 struct _ZUC_EIA3_specific_fields {
565 const uint8_t *_key;
567 const uint8_t *_iv;
569 const uint8_t *_iv23;
571 } ZUC_EIA3;
572 struct _SNOW3G_UIA2_specific_fields {
573 const void *_key;
575 const void *_iv;
577 } SNOW3G_UIA2;
578 struct _KASUMI_UIA1_specific_fields {
579 const void *_key;
581 } KASUMI_UIA1;
582 struct _AES_GMAC_specific_fields {
583 const struct gcm_key_data *_key;
585 const void *_iv;
587 uint64_t iv_len_in_bytes;
589 } GMAC;
590 struct _GHASH_specific_fields {
591 const struct gcm_key_data *_key;
593 const void *_init_tag;
594 } GHASH;
595 struct _POLY1305_specific_fields {
596 const void *_key;
598 } POLY1305;
599 struct _CHACHA20_POLY1305_specific_fields {
600 const void *aad;
602 uint64_t aad_len_in_bytes;
604 struct chacha20_poly1305_context_data *ctx;
606 } CHACHA20_POLY1305;
607 struct _SNOW_V_AEAD_specific_fields {
608 const void *aad;
610 uint64_t aad_len_in_bytes;
612 void *reserved;
614 } SNOW_V_AEAD;
615 } u;
617 IMB_STATUS status;
618 IMB_CIPHER_MODE cipher_mode;
619 IMB_CIPHER_DIRECTION cipher_direction;
620 IMB_HASH_ALG hash_alg;
621 IMB_CHAIN_ORDER chain_order;
624 void *user_data;
625 void *user_data2;
627 int (*cipher_func)(struct IMB_JOB *);
629 int (*hash_func)(struct IMB_JOB *);
632 IMB_SGL_STATE sgl_state;
636 union {
637 struct _CBCS_specific_fields {
638 void *next_iv;
640 } CBCS;
641 } cipher_fields;
642} IMB_JOB;
643
644
645/* KASUMI */
646
647/* 64 precomputed words for key schedule */
648#define KASUMI_KEY_SCHEDULE_SIZE 64
649
653 typedef struct kasumi_key_sched_s {
655 uint16_t sk16[KASUMI_KEY_SCHEDULE_SIZE];
656 uint16_t msk16[KASUMI_KEY_SCHEDULE_SIZE];
657} kasumi_key_sched_t;
658
659/* GCM data structures */
660#define IMB_GCM_BLOCK_LEN 16
661
667 struct gcm_context_data {
668 uint8_t aad_hash[IMB_GCM_BLOCK_LEN];
669 uint64_t aad_length;
670 uint64_t in_length;
671 uint8_t partial_block_enc_key[IMB_GCM_BLOCK_LEN];
672 uint8_t orig_IV[IMB_GCM_BLOCK_LEN];
673 uint8_t current_counter[IMB_GCM_BLOCK_LEN];
674 uint64_t partial_block_length;
675};
676#undef IMB_GCM_BLOCK_LEN
677
681 struct chacha20_poly1305_context_data {
682 uint64_t hash[3];
683 uint64_t aad_len;
684 uint64_t hash_len;
685 uint8_t last_ks[64];
686 uint8_t poly_key[32];
687 uint8_t poly_scratch[16];
688 uint64_t last_block_count;
689 uint64_t remain_ks_bytes;
691 uint64_t remain_ct_bytes;
694 uint8_t IV[12];
695};
696
701#define IMB_MAX_TAG_LEN (16)
702
712#define IMB_GCM_IV_DATA_LEN (12)
713
714#define IMB_GCM_128_KEY_LEN (16)
715#define IMB_GCM_192_KEY_LEN (24)
716#define IMB_GCM_256_KEY_LEN (32)
717
718#define IMB_GCM_ENC_KEY_LEN 16
719#define IMB_GCM_KEY_SETS (15)
726#ifdef __WIN32
727__declspec(align(64))
728#endif /* WIN32 */
729 struct gcm_key_data {
730 uint8_t expanded_keys[IMB_GCM_ENC_KEY_LEN * IMB_GCM_KEY_SETS];
731 union {
733 struct {
739 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 8];
748 uint8_t shifted_hkey_k[IMB_GCM_ENC_KEY_LEN * 8];
749 } sse_avx;
750 struct {
756 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 8];
757 } avx2_avx512;
758 struct {
763 uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN * 48];
764 } vaes_avx512;
765 } ghash_keys;
766}
767#ifdef LINUX
768__attribute__((aligned(64)));
769#else
770;
771#endif
772
773#undef IMB_GCM_ENC_KEY_LEN
774#undef IMB_GCM_KEY_SETS
775
776/* API data type definitions */
777struct IMB_MGR;
778
779 typedef void (*init_mb_mgr_t)(struct IMB_MGR *);
780 typedef IMB_JOB *(*get_next_job_t)(struct IMB_MGR *);
781 typedef IMB_JOB *(*submit_job_t)(struct IMB_MGR *);
782 typedef IMB_JOB *(*get_completed_job_t)(struct IMB_MGR *);
783 typedef IMB_JOB *(*flush_job_t)(struct IMB_MGR *);
784 typedef uint32_t (*queue_size_t)(struct IMB_MGR *);
785 typedef uint32_t (*submit_burst_t)(struct IMB_MGR *,
786 struct IMB_JOB *, const uint32_t);
787 typedef uint32_t (*submit_cipher_burst_t)(struct IMB_MGR *,
788 struct IMB_JOB *,
789 const uint32_t,
790 const IMB_CIPHER_MODE cipher,
791 const IMB_CIPHER_DIRECTION dir,
792 const IMB_KEY_SIZE_BYTES key_size);
793 typedef uint32_t (*submit_hash_burst_t)(struct IMB_MGR *,
794 struct IMB_JOB *,
795 const uint32_t,
796 const IMB_HASH_ALG hash);
797 typedef void (*keyexp_t)(const void *, void *, void *);
798 typedef void (*cmac_subkey_gen_t)(const void *, void *, void *);
799 typedef void (*hash_one_block_t)(const void *, void *);
800 typedef void (*hash_fn_t)(const void *, const uint64_t, void *);
801 typedef void (*xcbc_keyexp_t)(const void *, void *, void *, void *);
802 typedef int (*des_keysched_t)(uint64_t *, const void *);
803 typedef void (*aes_cfb_t)(void *, const void *, const void *, const void *,
804 uint64_t);
805 typedef void (*aes_gcm_enc_dec_t)(const struct gcm_key_data *,
806 struct gcm_context_data *,
807 uint8_t *, uint8_t const *, uint64_t,
808 const uint8_t *, uint8_t const *, uint64_t,
809 uint8_t *, uint64_t);
810 typedef void (*aes_gcm_enc_dec_iv_t)(const struct gcm_key_data *,
811 struct gcm_context_data *, uint8_t *,
812 uint8_t const *, const uint64_t,
813 const uint8_t *, uint8_t const *,
814 const uint64_t, uint8_t *,
815 const uint64_t, const uint64_t);
816 typedef void (*aes_gcm_init_t)(const struct gcm_key_data *,
817 struct gcm_context_data *,
818 const uint8_t *, uint8_t const *, uint64_t);
819 typedef void (*aes_gcm_init_var_iv_t)(const struct gcm_key_data *,
820 struct gcm_context_data *,
821 const uint8_t *, const uint64_t,
822 const uint8_t *, const uint64_t);
823 typedef void (*aes_gcm_enc_dec_update_t)(const struct gcm_key_data *,
824 struct gcm_context_data *,
825 uint8_t *, const uint8_t *, uint64_t);
826 typedef void (*aes_gcm_enc_dec_finalize_t)(const struct gcm_key_data *,
827 struct gcm_context_data *,
828 uint8_t *, uint64_t);
829 typedef void (*aes_gcm_precomp_t)(struct gcm_key_data *);
830 typedef void (*aes_gcm_pre_t)(const void *, struct gcm_key_data *);
831
832 typedef void (*aes_gmac_init_t)(const struct gcm_key_data *,
833 struct gcm_context_data *,
834 const uint8_t *, const uint64_t);
835 typedef void (*aes_gmac_update_t)(const struct gcm_key_data *,
836 struct gcm_context_data *,
837 const uint8_t *, const uint64_t);
838 typedef void (*aes_gmac_finalize_t)(const struct gcm_key_data *,
839 struct gcm_context_data *,
840 uint8_t *, const uint64_t);
841
842 typedef void (*chacha_poly_init_t)(const void *,
843 struct chacha20_poly1305_context_data *,
844 const void *, const void *, const uint64_t);
845 typedef void (*chacha_poly_enc_dec_update_t)(const void *,
846 struct chacha20_poly1305_context_data *,
847 void *, const void *, const uint64_t);
848 typedef void (*chacha_poly_finalize_t)(struct chacha20_poly1305_context_data *,
849 void *, const uint64_t);
850 typedef void (*ghash_t)(const struct gcm_key_data *, const void *,
851 const uint64_t, void *, const uint64_t);
852
853 typedef void (*zuc_eea3_1_buffer_t)(const void *, const void *, const void *,
854 void *, const uint32_t);
855
856 typedef void (*zuc_eea3_4_buffer_t)(const void * const *, const void * const *,
857 const void * const *, void **,
858 const uint32_t *);
859
860 typedef void (*zuc_eea3_n_buffer_t)(const void * const *, const void * const *,
861 const void * const *, void **,
862 const uint32_t *, const uint32_t);
863
864 typedef void (*zuc_eia3_1_buffer_t)(const void *, const void *, const void *,
865 const uint32_t, uint32_t *);
866
867 typedef void (*zuc_eia3_n_buffer_t)(const void * const *, const void * const *,
868 const void * const *,
869 const uint32_t *, uint32_t **,
870 const uint32_t);
871
872
873 typedef void (*kasumi_f8_1_buffer_t)(const kasumi_key_sched_t *,
874 const uint64_t, const void *, void *,
875 const uint32_t);
876 typedef void (*kasumi_f8_1_buffer_bit_t)(const kasumi_key_sched_t *,
877 const uint64_t, const void *,
878 void *,
879 const uint32_t, const uint32_t);
880 typedef void (*kasumi_f8_2_buffer_t)(const kasumi_key_sched_t *,
881 const uint64_t, const uint64_t,
882 const void *, void *,
883 const uint32_t,
884 const void *, void *,
885 const uint32_t);
886 typedef void (*kasumi_f8_3_buffer_t)(const kasumi_key_sched_t *,
887 const uint64_t, const uint64_t,
888 const uint64_t,
889 const void *, void *,
890 const void *, void *,
891 const void *, void *,
892 const uint32_t);
893 typedef void (*kasumi_f8_4_buffer_t)(const kasumi_key_sched_t *,
894 const uint64_t, const uint64_t,
895 const uint64_t, const uint64_t,
896 const void *, void *,
897 const void *, void *,
898 const void *, void *,
899 const void *, void *,
900 const uint32_t);
901 typedef void (*kasumi_f8_n_buffer_t)(const kasumi_key_sched_t *,
902 const uint64_t *, const void * const *,
903 void **, const uint32_t *,
904 const uint32_t);
905 typedef void (*kasumi_f9_1_buffer_user_t)(const kasumi_key_sched_t *,
906 const uint64_t, const void *,
907 const uint32_t, void *,
908 const uint32_t);
909 typedef void (*kasumi_f9_1_buffer_t)(const kasumi_key_sched_t *,
910 const void *,
911 const uint32_t, void *);
912 typedef int (*kasumi_init_f8_key_sched_t)(const void *,
913 kasumi_key_sched_t *);
914 typedef int (*kasumi_init_f9_key_sched_t)(const void *,
915 kasumi_key_sched_t *);
916 typedef size_t (*kasumi_key_sched_size_t)(void);
917
918
922 typedef struct snow3g_key_schedule_s {
923 /* KEY */
924 uint32_t k[4];
925} snow3g_key_schedule_t;
926
927 typedef void (*snow3g_f8_1_buffer_t)(const snow3g_key_schedule_t *,
928 const void *, const void *,
929 void *, const uint32_t);
930
931 typedef void (*snow3g_f8_1_buffer_bit_t)(const snow3g_key_schedule_t *,
932 const void *, const void *, void *,
933 const uint32_t, const uint32_t);
934
935 typedef void (*snow3g_f8_2_buffer_t)(const snow3g_key_schedule_t *,
936 const void *, const void *,
937 const void *, void *, const uint32_t,
938 const void *, void *, const uint32_t);
939
940 typedef void (*snow3g_f8_4_buffer_t)(const snow3g_key_schedule_t *,
941 const void *, const void *, const void *,
942 const void *, const void *, void *,
943 const uint32_t, const void *, void *,
944 const uint32_t, const void *, void *,
945 const uint32_t, const void *, void *,
946 const uint32_t);
947
948 typedef void (*snow3g_f8_8_buffer_t)(const snow3g_key_schedule_t *,
949 const void *, const void *, const void *,
950 const void *, const void *, const void *,
951 const void *, const void *, const void *,
952 void *, const uint32_t, const void *,
953 void *, const uint32_t, const void *,
954 void *, const uint32_t, const void *,
955 void *, const uint32_t, const void *,
956 void *, const uint32_t, const void *,
957 void *, const uint32_t, const void *,
958 void *, const uint32_t, const void *,
959 void *, const uint32_t);
960
961 typedef void
962(*snow3g_f8_8_buffer_multikey_t)(const snow3g_key_schedule_t * const [],
963 const void * const [], const void * const [],
964 void *[], const uint32_t[]);
965
966 typedef void (*snow3g_f8_n_buffer_t)(const snow3g_key_schedule_t *,
967 const void * const [],
968 const void * const [],
969 void *[], const uint32_t[],
970 const uint32_t);
971
972 typedef void
973(*snow3g_f8_n_buffer_multikey_t)(const snow3g_key_schedule_t * const [],
974 const void * const [],
975 const void * const [],
976 void *[], const uint32_t[],
977 const uint32_t);
978
979 typedef void (*snow3g_f9_1_buffer_t)(const snow3g_key_schedule_t *,
980 const void *, const void *,
981 const uint64_t, void *);
982
983 typedef int (*snow3g_init_key_sched_t)(const void *,
984 snow3g_key_schedule_t *);
985
986 typedef size_t (*snow3g_key_sched_size_t)(void);
987
988 typedef uint32_t (*hec_32_t)(const uint8_t *);
989 typedef uint64_t (*hec_64_t)(const uint8_t *);
990
991 typedef uint32_t (*crc32_fn_t)(const void *, const uint64_t);
992/* Multi-buffer manager flags passed to alloc_mb_mgr() */
993
994#define IMB_FLAG_SHANI_OFF (1ULL << 0)
995#define IMB_FLAG_AESNI_OFF (1ULL << 1)
1004#define IMB_FEATURE_SHANI (1ULL << 0)
1005#define IMB_FEATURE_AESNI (1ULL << 1)
1006#define IMB_FEATURE_PCLMULQDQ (1ULL << 2)
1007#define IMB_FEATURE_CMOV (1ULL << 3)
1008#define IMB_FEATURE_SSE4_2 (1ULL << 4)
1009#define IMB_FEATURE_AVX (1ULL << 5)
1010#define IMB_FEATURE_AVX2 (1ULL << 6)
1011#define IMB_FEATURE_AVX512F (1ULL << 7)
1012#define IMB_FEATURE_AVX512DQ (1ULL << 8)
1013#define IMB_FEATURE_AVX512CD (1ULL << 9)
1014#define IMB_FEATURE_AVX512BW (1ULL << 10)
1015#define IMB_FEATURE_AVX512VL (1ULL << 11)
1016#define IMB_FEATURE_AVX512_SKX (IMB_FEATURE_AVX512F | IMB_FEATURE_AVX512DQ | \
1017 IMB_FEATURE_AVX512CD | IMB_FEATURE_AVX512BW | \
1018 IMB_FEATURE_AVX512VL)
1019#define IMB_FEATURE_VAES (1ULL << 12)
1020#define IMB_FEATURE_VPCLMULQDQ (1ULL << 13)
1021#define IMB_FEATURE_SAFE_DATA (1ULL << 14)
1022#define IMB_FEATURE_SAFE_PARAM (1ULL << 15)
1023#define IMB_FEATURE_GFNI (1ULL << 16)
1024#define IMB_FEATURE_AVX512_IFMA (1ULL << 17)
1025#define IMB_FEATURE_BMI2 (1ULL << 18)
1026#define IMB_FEATURE_AESNI_EMU (1ULL << 19)
1027
1031#define IMB_CPUFLAGS_NO_AESNI (IMB_FEATURE_SSE4_2 | IMB_FEATURE_CMOV)
1032#define IMB_CPUFLAGS_SSE (IMB_CPUFLAGS_NO_AESNI | IMB_FEATURE_AESNI | \
1033 IMB_FEATURE_PCLMULQDQ)
1034#define IMB_CPUFLAGS_AVX (IMB_CPUFLAGS_SSE | IMB_FEATURE_AVX)
1035#define IMB_CPUFLAGS_AVX2 (IMB_CPUFLAGS_AVX | IMB_FEATURE_AVX2 | \
1036 IMB_FEATURE_BMI2)
1037#define IMB_CPUFLAGS_AVX512 (IMB_CPUFLAGS_AVX2 | IMB_FEATURE_AVX512_SKX)
1038
1039/* TOP LEVEL (IMB_MGR) Data structure fields */
1040
1041#define IMB_MAX_JOBS 128
1042
1043 typedef struct IMB_MGR {
1044
1045 uint64_t flags;
1046 uint64_t features;
1048 uint64_t reserved[5];
1049 uint32_t used_arch;
1051 int imb_errno;
1059 get_next_job_t get_next_job;
1060 submit_job_t submit_job;
1061 submit_job_t submit_job_nocheck;
1062 get_completed_job_t get_completed_job;
1063 flush_job_t flush_job;
1064 queue_size_t queue_size;
1065 keyexp_t keyexp_128;
1066 keyexp_t keyexp_192;
1067 keyexp_t keyexp_256;
1068 cmac_subkey_gen_t cmac_subkey_gen_128;
1069 xcbc_keyexp_t xcbc_keyexp;
1070 des_keysched_t des_key_sched;
1071 hash_one_block_t sha1_one_block;
1072 hash_one_block_t sha224_one_block;
1073 hash_one_block_t sha256_one_block;
1074 hash_one_block_t sha384_one_block;
1075 hash_one_block_t sha512_one_block;
1076 hash_one_block_t md5_one_block;
1077 hash_fn_t sha1;
1078 hash_fn_t sha224;
1079 hash_fn_t sha256;
1080 hash_fn_t sha384;
1081 hash_fn_t sha512;
1082 aes_cfb_t aes128_cfb_one;
1083
1084 aes_gcm_enc_dec_t gcm128_enc;
1085 aes_gcm_enc_dec_t gcm192_enc;
1086 aes_gcm_enc_dec_t gcm256_enc;
1087 aes_gcm_enc_dec_t gcm128_dec;
1088 aes_gcm_enc_dec_t gcm192_dec;
1089 aes_gcm_enc_dec_t gcm256_dec;
1090 aes_gcm_init_t gcm128_init;
1091 aes_gcm_init_t gcm192_init;
1092 aes_gcm_init_t gcm256_init;
1093 aes_gcm_enc_dec_update_t gcm128_enc_update;
1094 aes_gcm_enc_dec_update_t gcm192_enc_update;
1095 aes_gcm_enc_dec_update_t gcm256_enc_update;
1096 aes_gcm_enc_dec_update_t gcm128_dec_update;
1097 aes_gcm_enc_dec_update_t gcm192_dec_update;
1098 aes_gcm_enc_dec_update_t gcm256_dec_update;
1099 aes_gcm_enc_dec_finalize_t gcm128_enc_finalize;
1100 aes_gcm_enc_dec_finalize_t gcm192_enc_finalize;
1101 aes_gcm_enc_dec_finalize_t gcm256_enc_finalize;
1102 aes_gcm_enc_dec_finalize_t gcm128_dec_finalize;
1103 aes_gcm_enc_dec_finalize_t gcm192_dec_finalize;
1104 aes_gcm_enc_dec_finalize_t gcm256_dec_finalize;
1105 aes_gcm_precomp_t gcm128_precomp;
1106 aes_gcm_precomp_t gcm192_precomp;
1107 aes_gcm_precomp_t gcm256_precomp;
1108 aes_gcm_pre_t gcm128_pre;
1109 aes_gcm_pre_t gcm192_pre;
1110 aes_gcm_pre_t gcm256_pre;
1111
1112 zuc_eea3_1_buffer_t eea3_1_buffer;
1113 zuc_eea3_4_buffer_t eea3_4_buffer;
1114 zuc_eea3_n_buffer_t eea3_n_buffer;
1115 zuc_eia3_1_buffer_t eia3_1_buffer;
1116
1117 kasumi_f8_1_buffer_t f8_1_buffer;
1118 kasumi_f8_1_buffer_bit_t f8_1_buffer_bit;
1119 kasumi_f8_2_buffer_t f8_2_buffer;
1120 kasumi_f8_3_buffer_t f8_3_buffer;
1121 kasumi_f8_4_buffer_t f8_4_buffer;
1122 kasumi_f8_n_buffer_t f8_n_buffer;
1123 kasumi_f9_1_buffer_t f9_1_buffer;
1124 kasumi_f9_1_buffer_user_t f9_1_buffer_user;
1125 kasumi_init_f8_key_sched_t kasumi_init_f8_key_sched;
1126 kasumi_init_f9_key_sched_t kasumi_init_f9_key_sched;
1127 kasumi_key_sched_size_t kasumi_key_sched_size;
1128
1129 snow3g_f8_1_buffer_bit_t snow3g_f8_1_buffer_bit;
1130 snow3g_f8_1_buffer_t snow3g_f8_1_buffer;
1131 snow3g_f8_2_buffer_t snow3g_f8_2_buffer;
1132 snow3g_f8_4_buffer_t snow3g_f8_4_buffer;
1133 snow3g_f8_8_buffer_t snow3g_f8_8_buffer;
1134 snow3g_f8_n_buffer_t snow3g_f8_n_buffer;
1135 snow3g_f8_8_buffer_multikey_t snow3g_f8_8_buffer_multikey;
1136 snow3g_f8_n_buffer_multikey_t snow3g_f8_n_buffer_multikey;
1137 snow3g_f9_1_buffer_t snow3g_f9_1_buffer;
1138 snow3g_init_key_sched_t snow3g_init_key_sched;
1139 snow3g_key_sched_size_t snow3g_key_sched_size;
1140
1141 ghash_t ghash;
1142 zuc_eia3_n_buffer_t eia3_n_buffer;
1143 aes_gcm_init_var_iv_t gcm128_init_var_iv;
1144 aes_gcm_init_var_iv_t gcm192_init_var_iv;
1145 aes_gcm_init_var_iv_t gcm256_init_var_iv;
1146
1147 aes_gmac_init_t gmac128_init;
1148 aes_gmac_init_t gmac192_init;
1149 aes_gmac_init_t gmac256_init;
1150 aes_gmac_update_t gmac128_update;
1151 aes_gmac_update_t gmac192_update;
1152 aes_gmac_update_t gmac256_update;
1153 aes_gmac_finalize_t gmac128_finalize;
1154 aes_gmac_finalize_t gmac192_finalize;
1155 aes_gmac_finalize_t gmac256_finalize;
1156 hec_32_t hec_32;
1157 hec_64_t hec_64;
1158 cmac_subkey_gen_t cmac_subkey_gen_256;
1159 aes_gcm_pre_t ghash_pre;
1160 crc32_fn_t crc32_ethernet_fcs;
1161 crc32_fn_t crc16_x25;
1162 crc32_fn_t crc32_sctp;
1163 crc32_fn_t crc24_lte_a;
1164 crc32_fn_t crc24_lte_b;
1165 crc32_fn_t crc16_fp_data;
1166 crc32_fn_t crc11_fp_header;
1167 crc32_fn_t crc7_fp_header;
1168 crc32_fn_t crc10_iuup_data;
1169 crc32_fn_t crc6_iuup_header;
1170 crc32_fn_t crc32_wimax_ofdma_data;
1171 crc32_fn_t crc8_wimax_ofdma_hcs;
1172
1173 chacha_poly_init_t chacha20_poly1305_init;
1174 chacha_poly_enc_dec_update_t chacha20_poly1305_enc_update;
1175 chacha_poly_enc_dec_update_t chacha20_poly1305_dec_update;
1176 chacha_poly_finalize_t chacha20_poly1305_finalize;
1177
1178 submit_burst_t submit_burst;
1179 submit_burst_t submit_burst_nocheck;
1180 submit_cipher_burst_t submit_cipher_burst;
1181 submit_cipher_burst_t submit_cipher_burst_nocheck;
1182 submit_hash_burst_t submit_hash_burst;
1183 submit_hash_burst_t submit_hash_burst_nocheck;
1184
1185 /* in-order scheduler fields */
1186 int earliest_job;
1187 int next_job;
1188 IMB_JOB jobs[IMB_MAX_JOBS];
1189
1190 /* out of order managers */
1191 void *aes128_ooo;
1192 void *aes192_ooo;
1193 void *aes256_ooo;
1194 void *docsis128_sec_ooo;
1195 void *docsis128_crc32_sec_ooo;
1196 void *docsis256_sec_ooo;
1197 void *docsis256_crc32_sec_ooo;
1198 void *des_enc_ooo;
1199 void *des_dec_ooo;
1200 void *des3_enc_ooo;
1201 void *des3_dec_ooo;
1202 void *docsis_des_enc_ooo;
1203 void *docsis_des_dec_ooo;
1204
1205 void *hmac_sha_1_ooo;
1206 void *hmac_sha_224_ooo;
1207 void *hmac_sha_256_ooo;
1208 void *hmac_sha_384_ooo;
1209 void *hmac_sha_512_ooo;
1210 void *hmac_md5_ooo;
1211 void *aes_xcbc_ooo;
1212 void *aes_ccm_ooo;
1213 void *aes_cmac_ooo;
1214 void *zuc_eea3_ooo;
1215 void *zuc_eia3_ooo;
1216 void *aes128_cbcs_ooo;
1217 void *zuc256_eea3_ooo;
1218 void *zuc256_eia3_ooo;
1219 void *aes256_ccm_ooo;
1220 void *aes256_cmac_ooo;
1221 void *snow3g_uea2_ooo;
1222 void *snow3g_uia2_ooo;
1223 void *sha_1_ooo;
1224 void *sha_224_ooo;
1225 void *sha_256_ooo;
1226 void *sha_384_ooo;
1227 void *sha_512_ooo;
1228 void *end_ooo; /* add new out-of-order managers above this line */
1229} IMB_MGR;
1230
1241 IMB_DLL_EXPORT const char *imb_get_version_str(void);
1242
1251 IMB_DLL_EXPORT unsigned imb_get_version(void);
1252
1253
1261 IMB_DLL_EXPORT int imb_get_errno(IMB_MGR *mb_mgr);
1262
1270 IMB_DLL_EXPORT const char *imb_get_strerror(int errnum);
1271
1295 IMB_DLL_EXPORT IMB_MGR *alloc_mb_mgr(uint64_t flags);
1296
1303 IMB_DLL_EXPORT void free_mb_mgr(IMB_MGR *ptr);
1304
1310 IMB_DLL_EXPORT size_t imb_get_mb_mgr_size(void);
1311
1332 IMB_DLL_EXPORT IMB_MGR *imb_set_pointers_mb_mgr(void *ptr, const uint64_t flags,
1333 const unsigned reset_mgr);
1334
1341 IMB_DLL_EXPORT uint64_t imb_get_feature_flags(void);
1342
1353 IMB_DLL_EXPORT void init_mb_mgr_avx(IMB_MGR *state);
1357 IMB_DLL_EXPORT void init_mb_mgr_avx2(IMB_MGR *state);
1361 IMB_DLL_EXPORT void init_mb_mgr_avx512(IMB_MGR *state);
1365 IMB_DLL_EXPORT void init_mb_mgr_sse(IMB_MGR *state);
1366
1367
1377 IMB_DLL_EXPORT IMB_JOB *submit_job_avx(IMB_MGR *state);
1381 IMB_DLL_EXPORT IMB_JOB *submit_job_avx2(IMB_MGR *state);
1385 IMB_DLL_EXPORT IMB_JOB *submit_job_avx512(IMB_MGR *state);
1389 IMB_DLL_EXPORT IMB_JOB *submit_job_sse(IMB_MGR *state);
1390
1400 IMB_DLL_EXPORT IMB_JOB *submit_job_nocheck_avx(IMB_MGR *state);
1404 IMB_DLL_EXPORT IMB_JOB *submit_job_nocheck_avx2(IMB_MGR *state);
1408 IMB_DLL_EXPORT IMB_JOB *submit_job_nocheck_avx512(IMB_MGR *state);
1412 IMB_DLL_EXPORT IMB_JOB *submit_job_nocheck_sse(IMB_MGR *state);
1413
1421 IMB_DLL_EXPORT IMB_JOB *flush_job_avx(IMB_MGR *state);
1425 IMB_DLL_EXPORT IMB_JOB *flush_job_avx2(IMB_MGR *state);
1429 IMB_DLL_EXPORT IMB_JOB *flush_job_avx512(IMB_MGR *state);
1433 IMB_DLL_EXPORT IMB_JOB *flush_job_sse(IMB_MGR *state);
1434
1442 IMB_DLL_EXPORT uint32_t queue_size_avx(IMB_MGR *state);
1446 IMB_DLL_EXPORT uint32_t queue_size_avx2(IMB_MGR *state);
1450 IMB_DLL_EXPORT uint32_t queue_size_avx512(IMB_MGR *state);
1454 IMB_DLL_EXPORT uint32_t queue_size_sse(IMB_MGR *state);
1455
1463 IMB_DLL_EXPORT IMB_JOB *get_completed_job_avx(IMB_MGR *state);
1467 IMB_DLL_EXPORT IMB_JOB *get_completed_job_avx2(IMB_MGR *state);
1471 IMB_DLL_EXPORT IMB_JOB *get_completed_job_avx512(IMB_MGR *state);
1475 IMB_DLL_EXPORT IMB_JOB *get_completed_job_sse(IMB_MGR *state);
1476
1484 IMB_DLL_EXPORT IMB_JOB *get_next_job_avx(IMB_MGR *state);
1488 IMB_DLL_EXPORT IMB_JOB *get_next_job_avx2(IMB_MGR *state);
1492 IMB_DLL_EXPORT IMB_JOB *get_next_job_avx512(IMB_MGR *state);
1496 IMB_DLL_EXPORT IMB_JOB *get_next_job_sse(IMB_MGR *state);
1497
1506 IMB_DLL_EXPORT void init_mb_mgr_auto(IMB_MGR *state, IMB_ARCH *arch);
1507
1508/*
1509 * Wrapper macros to call arch API's set up
1510 * at init phase of multi-buffer manager.
1511 *
1512 * For example, after calling init_mb_mgr_sse(&mgr)
1513 * The 'mgr' structure be set up so that:
1514 * mgr.get_next_job will point to get_next_job_sse(),
1515 * mgr.submit_job will point to submit_job_sse(),
1516 * mgr.submit_job_nocheck will point to submit_job_nocheck_sse(),
1517 * mgr.get_completed_job will point to get_completed_job_sse(),
1518 * mgr.flush_job will point to flush_job_sse(),
1519 * mgr.queue_size will point to queue_size_sse()
1520 * mgr.keyexp_128 will point to aes_keyexp_128_sse()
1521 * mgr.keyexp_192 will point to aes_keyexp_192_sse()
1522 * mgr.keyexp_256 will point to aes_keyexp_256_sse()
1523 * etc.
1524 *
1525 * Direct use of arch API's may result in better performance.
1526 * Using below indirect interface may produce slightly worse performance but
1527 * it can simplify application implementation.
1528 * The test app provides example of using the indirect interface.
1529 */
1530
1538#define IMB_GET_NEXT_JOB(_mgr) ((_mgr)->get_next_job((_mgr)))
1539
1549#define IMB_SUBMIT_JOB(_mgr) ((_mgr)->submit_job((_mgr)))
1550
1560#define IMB_SUBMIT_JOB_NOCHECK(_mgr) ((_mgr)->submit_job_nocheck((_mgr)))
1561
1569#define IMB_GET_COMPLETED_JOB(_mgr) ((_mgr)->get_completed_job((_mgr)))
1570
1578#define IMB_FLUSH_JOB(_mgr) ((_mgr)->flush_job((_mgr)))
1579
1587#define IMB_QUEUE_SIZE(_mgr) ((_mgr)->queue_size((_mgr)))
1588
1598#define IMB_SUBMIT_BURST(_mgr, _jobs, _n_jobs) \
1599 ((_mgr)->submit_burst((_mgr), (_jobs), (_n_jobs)))
1600
1612#define IMB_SUBMIT_BURST_NOCHECK(_mgr, _jobs, _n_jobs) \
1613 ((_mgr)->submit_burst_nocheck((_mgr), (_jobs), (_n_jobs)))
1614
1627#define IMB_SUBMIT_CIPHER_BURST(_mgr, _jobs, _n_jobs, _cipher, \
1628 _dir, _key_size) \
1629 ((_mgr)->submit_cipher_burst((_mgr), (_jobs), (_n_jobs), \
1630 (_cipher), (_dir), (_key_size)))
1645#define IMB_SUBMIT_CIPHER_BURST_NOCHECK(_mgr, _jobs, _n_jobs, _cipher, \
1646 _dir, _key_size) \
1647 ((_mgr)->submit_cipher_burst_nocheck((_mgr), (_jobs), (_n_jobs),\
1648 (_cipher), (_dir), (_key_size)))
1659#define IMB_SUBMIT_HASH_BURST(_mgr, _jobs, _n_jobs, _hash) \
1660 ((_mgr)->submit_hash_burst((_mgr), (_jobs), (_n_jobs), (_hash)))
1661
1674#define IMB_SUBMIT_HASH_BURST_NOCHECK(_mgr, _jobs, _n_jobs, _hash) \
1675 ((_mgr)->submit_hash_burst_nocheck((_mgr), (_jobs), (_n_jobs), (_hash)))
1676
1677/* Key expansion and generation API's */
1678
1687#define IMB_AES_KEYEXP_128(_mgr, _key, _enc_exp_key, _dec_exp_key) \
1688 ((_mgr)->keyexp_128((_key), (_enc_exp_key), (_dec_exp_key)))
1697#define IMB_AES_KEYEXP_192(_mgr, _key, _enc_exp_key, _dec_exp_key) \
1698 ((_mgr)->keyexp_192((_key), (_enc_exp_key), (_dec_exp_key)))
1707#define IMB_AES_KEYEXP_256(_mgr, _key, _enc_exp_key, _dec_exp_key) \
1708 ((_mgr)->keyexp_256((_key), (_enc_exp_key), (_dec_exp_key)))
1709
1718#define IMB_AES_CMAC_SUBKEY_GEN_128(_mgr, _exp_key, _key1, _key2) \
1719 ((_mgr)->cmac_subkey_gen_128((_exp_key), (_key1), (_key2)))
1720
1729#define IMB_AES_CMAC_SUBKEY_GEN_256(_mgr, _exp_key, _key1, _key2) \
1730 ((_mgr)->cmac_subkey_gen_256((_exp_key), (_key1), (_key2)))
1731
1741#define IMB_AES_XCBC_KEYEXP(_mgr, _key, _exp_key, _exp_key2, _exp_key3) \
1742 ((_mgr)->xcbc_keyexp((_key), (_exp_key), (_exp_key2), (_exp_key3)))
1743
1744#define IMB_DES_KEYSCHED(_mgr, _exp_key, _key) \
1745 ((_mgr)->des_key_sched((_exp_key), (_key)))
1746
1747/* Hash API's */
1748
1756#define IMB_SHA1_ONE_BLOCK(_mgr, _src, _tag) \
1757 ((_mgr)->sha1_one_block((_src), (_tag)))
1758
1767#define IMB_SHA1(_mgr, _src, _length, _tag) \
1768 ((_mgr)->sha1((_src), (_length), (_tag)))
1776#define IMB_SHA224_ONE_BLOCK(_mgr, _src, _tag) \
1777 ((_mgr)->sha224_one_block((_src), (_tag)))
1778
1787#define IMB_SHA224(_mgr, _src, _length, _tag) \
1788 ((_mgr)->sha224((_src), (_length), (_tag)))
1796#define IMB_SHA256_ONE_BLOCK(_mgr, _src, _tag) \
1797 ((_mgr)->sha256_one_block((_src), (_tag)))
1806#define IMB_SHA256(_mgr, _src, _length, _tag) \
1807 ((_mgr)->sha256((_src), (_length), (_tag)))
1815#define IMB_SHA384_ONE_BLOCK(_mgr, _src, _tag) \
1816 ((_mgr)->sha384_one_block((_src), (_tag)))
1825#define IMB_SHA384(_mgr, _src, _length, _tag) \
1826 ((_mgr)->sha384((_src), (_length), (_tag)))
1834#define IMB_SHA512_ONE_BLOCK(_mgr, _src, _tag) \
1835 ((_mgr)->sha512_one_block((_src), (_tag)))
1844#define IMB_SHA512(_mgr, _src, _length, _tag) \
1845 ((_mgr)->sha512((_src), (_length), (_tag)))
1853#define IMB_MD5_ONE_BLOCK(_mgr, _src, _tag) \
1854 ((_mgr)->md5_one_block((_src), (_tag)))
1855
1869#define IMB_AES128_CFB_ONE(_mgr, _dst, _src, _iv, _exp_key, _len) \
1870 ((_mgr)->aes128_cfb_one((_dst), (_src), (_iv), (_exp_key), (_len)))
1871
1872/* AES-GCM API's */
1873#define IMB_AES128_GCM_ENC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, \
1874 _aadl, _tag, _tagl) \
1875 ((_mgr)->gcm128_enc((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), \
1876 (_aad), (_aadl), (_tag), (_tagl)))
1877#define IMB_AES192_GCM_ENC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, \
1878 _aadl, _tag, _tagl) \
1879 ((_mgr)->gcm192_enc((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), \
1880 (_aad), (_aadl), (_tag), (_tagl)))
1881#define IMB_AES256_GCM_ENC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, \
1882 _aadl, _tag, _tagl) \
1883 ((_mgr)->gcm256_enc((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), \
1884 (_aad), (_aadl), (_tag), (_tagl)))
1885
1886#define IMB_AES128_GCM_DEC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, _aad, \
1887 _aadl, _tag, _tagl) \
1888 ((_mgr)->gcm128_dec((_exp_key), (_ctx), (_dst), (_src), (_len), (_iv), \
1889 (_aad), (_aadl), (_tag), (_tagl)))
1890#define IMB_AES192_GCM_DEC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, \
1891 _aad, _aadl, _tag, _tagl) \
1892 ((_mgr)->gcm192_dec((_exp_key), (_ctx), (_dst), (_src), (_len), \
1893 (_iv), (_aad), (_aadl), (_tag), (_tagl)))
1894#define IMB_AES256_GCM_DEC(_mgr, _exp_key, _ctx, _dst, _src, _len, _iv, \
1895 _aad, _aadl, _tag, _tagl) \
1896 ((_mgr)->gcm256_dec((_exp_key), (_ctx), (_dst), (_src), (_len), \
1897 (_iv), (_aad), (_aadl), (_tag), (_tagl)))
1898
1899#define IMB_AES128_GCM_INIT(_mgr, _exp_key, _ctx, _iv, _aad, _aadl) \
1900 ((_mgr)->gcm128_init((_exp_key), (_ctx), (_iv), (_aad), (_aadl)))
1901#define IMB_AES192_GCM_INIT(_mgr, _exp_key, _ctx, _iv, _aad, _aadl) \
1902 ((_mgr)->gcm192_init((_exp_key), (_ctx), (_iv), (_aad), (_aadl)))
1903#define IMB_AES256_GCM_INIT(_mgr, _exp_key, _ctx, _iv, _aad, _aadl) \
1904 ((_mgr)->gcm256_init((_exp_key), (_ctx), (_iv), (_aad), (_aadl)))
1905
1906#define IMB_AES128_GCM_INIT_VAR_IV(_mgr, _exp_key, _ctx, _iv, _ivl, _aad, \
1907 _aadl) \
1908 ((_mgr)->gcm128_init_var_iv((_exp_key), (_ctx), (_iv), (_ivl), \
1909 (_aad), (_aadl)))
1910#define IMB_AES192_GCM_INIT_VAR_IV(_mgr, _exp_key, _ctx, _iv, _ivl, _aad, \
1911 _aadl) \
1912 ((_mgr)->gcm192_init_var_iv((_exp_key), (_ctx), (_iv), (_ivl), \
1913 (_aad), (_aadl)))
1914#define IMB_AES256_GCM_INIT_VAR_IV(_mgr, _exp_key, _ctx, _iv, _ivl, _aad, \
1915 _aadl) \
1916 ((_mgr)->gcm256_init_var_iv((_exp_key), (_ctx), (_iv), (_ivl), \
1917 (_aad), (_aadl)))
1918
1919#define IMB_AES128_GCM_ENC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1920 ((_mgr)->gcm128_enc_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1921#define IMB_AES192_GCM_ENC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1922 ((_mgr)->gcm192_enc_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1923#define IMB_AES256_GCM_ENC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1924 ((_mgr)->gcm256_enc_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1925
1926#define IMB_AES128_GCM_DEC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1927 ((_mgr)->gcm128_dec_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1928#define IMB_AES192_GCM_DEC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1929 ((_mgr)->gcm192_dec_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1930#define IMB_AES256_GCM_DEC_UPDATE(_mgr, _exp_key, _ctx, _dst, _src, _len) \
1931 ((_mgr)->gcm256_dec_update((_exp_key), (_ctx), (_dst), (_src), (_len)))
1932
1933#define IMB_AES128_GCM_ENC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1934 ((_mgr)->gcm128_enc_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1935#define IMB_AES192_GCM_ENC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1936 ((_mgr)->gcm192_enc_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1937#define IMB_AES256_GCM_ENC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1938 ((_mgr)->gcm256_enc_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1939
1940#define IMB_AES128_GCM_DEC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1941 ((_mgr)->gcm128_dec_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1942#define IMB_AES192_GCM_DEC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1943 ((_mgr)->gcm192_dec_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1944#define IMB_AES256_GCM_DEC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1945 ((_mgr)->gcm256_dec_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1946
1947#define IMB_AES128_GMAC_INIT(_mgr, _exp_key, _ctx, _iv, _ivl) \
1948 ((_mgr)->gmac128_init((_exp_key), (_ctx), (_iv), (_ivl)))
1949#define IMB_AES192_GMAC_INIT(_mgr, _exp_key, _ctx, _iv, _ivl) \
1950 ((_mgr)->gmac192_init((_exp_key), (_ctx), (_iv), (_ivl)))
1951#define IMB_AES256_GMAC_INIT(_mgr, _exp_key, _ctx, _iv, _ivl) \
1952 ((_mgr)->gmac256_init((_exp_key), (_ctx), (_iv), (_ivl)))
1953
1954#define IMB_AES128_GMAC_UPDATE(_mgr, _exp_key, _ctx, _src, _len) \
1955 ((_mgr)->gmac128_update((_exp_key), (_ctx), (_src), (_len)))
1956#define IMB_AES192_GMAC_UPDATE(_mgr, _exp_key, _ctx, _src, _len) \
1957 ((_mgr)->gmac192_update((_exp_key), (_ctx), (_src), (_len)))
1958#define IMB_AES256_GMAC_UPDATE(_mgr, _exp_key, _ctx, _src, _len) \
1959 ((_mgr)->gmac256_update((_exp_key), (_ctx), (_src), (_len)))
1960
1961#define IMB_AES128_GMAC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1962 ((_mgr)->gmac128_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1963#define IMB_AES192_GMAC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1964 ((_mgr)->gmac192_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1965#define IMB_AES256_GMAC_FINALIZE(_mgr, _exp_key, _ctx, _tag, _tagl) \
1966 ((_mgr)->gmac256_finalize((_exp_key), (_ctx), (_tag), (_tagl)))
1967
1968#define IMB_AES128_GCM_PRECOMP(_mgr, _key) \
1969 ((_mgr)->gcm128_precomp((_key)))
1970#define IMB_AES192_GCM_PRECOMP(_mgr, _key) \
1971 ((_mgr)->gcm192_precomp((_key)))
1972#define IMB_AES256_GCM_PRECOMP(_mgr, _key) \
1973 ((_mgr)->gcm256_precomp((_key)))
1974
1975#define IMB_AES128_GCM_PRE(_mgr, _key, _exp_key) \
1976 ((_mgr)->gcm128_pre((_key), (_exp_key)))
1977#define IMB_AES192_GCM_PRE(_mgr, _key, _exp_key) \
1978 ((_mgr)->gcm192_pre((_key), (_exp_key)))
1979#define IMB_AES256_GCM_PRE(_mgr, _key, _exp_key) \
1980 ((_mgr)->gcm256_pre((_key), (_exp_key)))
1981
1982#define IMB_GHASH_PRE(_mgr, _key, _exp_key) \
1983 ((_mgr)->ghash_pre((_key), (_exp_key)))
1984#define IMB_GHASH(_mgr, _exp_key, _src, _len, _tag, _tagl) \
1985 ((_mgr)->ghash((_exp_key), (_src), (_len), (_tag), (_tagl)))
1986
1987/* Chacha20-Poly1305 direct API's */
1988#define IMB_CHACHA20_POLY1305_INIT(_mgr, _key, _ctx, _iv, _aad, _aadl) \
1989 ((_mgr)->chacha20_poly1305_init((_key), (_ctx), (_iv), (_aad), \
1990 (_aadl)))
1991
1992#define IMB_CHACHA20_POLY1305_ENC_UPDATE(_mgr, _key, _ctx, _dst, _src, _len) \
1993 ((_mgr)->chacha20_poly1305_enc_update((_key), (_ctx), (_dst), (_src), \
1994 (_len)))
1995#define IMB_CHACHA20_POLY1305_DEC_UPDATE(_mgr, _key, _ctx, _dst, _src, _len) \
1996 ((_mgr)->chacha20_poly1305_dec_update((_key), (_ctx), (_dst), (_src), \
1997 (_len)))
1998
1999#define IMB_CHACHA20_POLY1305_ENC_FINALIZE(_mgr, _ctx, _tag, _tagl) \
2000 ((_mgr)->chacha20_poly1305_finalize((_ctx), (_tag), (_tagl)))
2001
2002#define IMB_CHACHA20_POLY1305_DEC_FINALIZE(_mgr, _ctx, _tag, _tagl) \
2003 ((_mgr)->chacha20_poly1305_finalize((_ctx), (_tag), (_tagl)))
2004
2005/* ZUC EEA3/EIA3 functions */
2006
2017#define IMB_ZUC_EEA3_1_BUFFER(_mgr, _key, _iv, _src, _dst, _len) \
2018 ((_mgr)->eea3_1_buffer((_key), (_iv), (_src), (_dst), (_len)))
2019#define IMB_ZUC_EEA3_4_BUFFER(_mgr, _key, _iv, _src, _dst, _len) \
2020 ((_mgr)->eea3_4_buffer((_key), (_iv), (_src), (_dst), (_len)))
2021#define IMB_ZUC_EEA3_N_BUFFER(_mgr, _key, _iv, _src, _dst, _len, _count) \
2022 ((_mgr)->eea3_n_buffer((_key), (_iv), (_src), (_dst), (_len), (_count)))
2023
2024
2035#define IMB_ZUC_EIA3_1_BUFFER(_mgr, _key, _iv, _src, _len, _tag) \
2036 ((_mgr)->eia3_1_buffer((_key), (_iv), (_src), (_len), (_tag)))
2037#define IMB_ZUC_EIA3_N_BUFFER(_mgr, _key, _iv, _src, _len, _tag, _count) \
2038 ((_mgr)->eia3_n_buffer((_key), (_iv), (_src), (_len), (_tag), (_count)))
2039
2040
2041/* KASUMI F8/F9 functions */
2042
2058#define IMB_KASUMI_F8_1_BUFFER(_mgr, _exp_key, _iv, _src, _dst, _len) \
2059 ((_mgr)->f8_1_buffer((_exp_key), (_iv), (_src), (_dst), (_len)))
2060
2077#define IMB_KASUMI_F8_1_BUFFER_BIT(_mgr, _exp_key, _iv, _src, _dst, _len, \
2078 _offset) \
2079 ((_mgr)->f8_1_buffer_bit((_exp_key), (_iv), (_src), (_dst), (_len), \
2080 (_offset)))
2081
2101#define IMB_KASUMI_F8_2_BUFFER(_mgr, _exp_key, _iv1, _iv2, _src1, _dst1, \
2102 _len1, _src2, _dst2, _len2) \
2103 ((_mgr)->f8_2_buffer((_exp_key), (_iv1), (_iv2), (_src1), (_dst1), \
2104 (_len1), (_src2), (_dst2), (_len2)))
2126#define IMB_KASUMI_F8_3_BUFFER(_mgr, _exp_key, _iv1, _iv2, _iv3, _src1, _dst1, \
2127 _src2, _dst2, _src3, _dst3, _len) \
2128 ((_mgr)->f8_3_buffer((_exp_key), (_iv1), (_iv2), (_iv3), (_src1), \
2129 (_dst1), (_src2), (_dst2), (_src3), (_dst3), \
2130 (_len)))
2155#define IMB_KASUMI_F8_4_BUFFER(_mgr, _exp_key, _iv1, _iv2, _iv3, _iv4, \
2156 _src1, _dst1, _src2, _dst2, _src3, _dst3, \
2157 _src4, _dst4, _len) \
2158 ((_mgr)->f8_4_buffer((_exp_key), (_iv1), (_iv2), (_iv3), (_iv4), \
2159 (_src1), (_dst1), (_src2), (_dst2), \
2160 (_src3), (_dst3), (_src4), (_dst4), (_len)))
2176#define IMB_KASUMI_F8_N_BUFFER(_mgr, _exp_key, _iv, _src, _dst, _len, _count) \
2177 ((_mgr)->f8_n_buffer((_exp_key), (_iv), (_src), (_dst), (_len), \
2178 (_count)))
2194#define IMB_KASUMI_F9_1_BUFFER(_mgr, _exp_key, _src, _len, _tag) \
2195 ((_mgr)->f9_1_buffer((_exp_key), (_src), (_len), (_tag)))
2196
2211#define IMB_KASUMI_F9_1_BUFFER_USER(_mgr, _exp_key, _iv, _src, _len, _tag, \
2212 _dir) \
2213 ((_mgr)->f9_1_buffer_user((_exp_key), (_iv), (_src), (_len), \
2214 (_tag), (_dir)))
2215
2225#define IMB_KASUMI_INIT_F8_KEY_SCHED(_mgr, _key, _exp_key) \
2226 ((_mgr)->kasumi_init_f8_key_sched((_key), (_exp_key)))
2227
2237#define IMB_KASUMI_INIT_F9_KEY_SCHED(_mgr, _key, _exp_key) \
2238 ((_mgr)->kasumi_init_f9_key_sched((_key), (_exp_key)))
2239
2249#define IMB_KASUMI_KEY_SCHED_SIZE(_mgr)((_mgr)->kasumi_key_sched_size())
2250
2251
2252/* SNOW3G F8/F9 functions */
2253
2269#define IMB_SNOW3G_F8_1_BUFFER_BIT(_mgr, _exp_key, _iv, _src, _dst, \
2270 _len, _offset) \
2271 ((_mgr)->snow3g_f8_1_buffer_bit((_exp_key), (_iv), (_src), \
2272 (_dst), (_len), (_offset)))
2273
2288#define IMB_SNOW3G_F8_1_BUFFER(_mgr, _exp_key, _iv, _src, _dst, _len) \
2289 ((_mgr)->snow3g_f8_1_buffer((_exp_key), (_iv), (_src), (_dst), (_len)))
2290
2307#define IMB_SNOW3G_F8_2_BUFFER(_mgr, _exp_key, _iv1, _iv2, \
2308 _src1, _dst1, _len1, \
2309 _src2, _dst2, _len2) \
2310 ((_mgr)->snow3g_f8_2_buffer((_exp_key), (_iv1), (_iv2), \
2311 (_src1), (_dst1), (_len1), \
2312 (_src2), (_dst2), (_len2)))
2313
2339#define IMB_SNOW3G_F8_4_BUFFER(_mgr, _exp_key, _iv1, _iv2, _iv3, _iv4, \
2340 _src1, _dst1, _len1, \
2341 _src2, _dst2, _len2, \
2342 _src3, _dst3, _len3, \
2343 _src4, _dst4, _len4) \
2344 ((_mgr)->snow3g_f8_4_buffer((_exp_key), (_iv1), (_iv2), (_iv3), \
2345 (_iv4), (_src1), (_dst1), (_len1), \
2346 (_src2), (_dst2), (_len2), \
2347 (_src3), (_dst3), (_len3), \
2348 (_src4), (_dst4), (_len4)))
2349
2391#define IMB_SNOW3G_F8_8_BUFFER(_mgr, _exp_key, _iv1, _iv2, _iv3, _iv4, \
2392 _iv5, _iv6, _iv7, _iv8, \
2393 _src1, _dst1, _len1, \
2394 _src2, _dst2, _len2, \
2395 _src3, _dst3, _len3, \
2396 _src4, _dst4, _len4, \
2397 _src5, _dst5, _len5, \
2398 _src6, _dst6, _len6, \
2399 _src7, _dst7, _len7, \
2400 _src8, _dst8, _len8) \
2401 ((_mgr)->snow3g_f8_8_buffer((_exp_key), (_iv1), (_iv2), (_iv3), \
2402 (_iv4), (_iv5), (_iv6), (_iv7), \
2403 (_iv8), (_src1), (_dst1), (_len1), \
2404 (_src2), (_dst2), (_len2), \
2405 (_src3), (_dst3), (_len3), \
2406 (_src4), (_dst4), (_len4), \
2407 (_src5), (_dst5), (_len5), \
2408 (_src6), (_dst6), (_len6), \
2409 (_src7), (_dst7), (_len7), \
2410 (_src8), (_dst8), (_len8)))
2424#define IMB_SNOW3G_F8_8_BUFFER_MULTIKEY(_mgr, _exp_key, _iv, _src, _dst, _len) \
2425 ((_mgr)->snow3g_f8_8_buffer_multikey((_exp_key), (_iv), (_src), (_dst),\
2426 (_len)))
2427
2442#define IMB_SNOW3G_F8_N_BUFFER(_mgr, _exp_key, _iv, _src, _dst, _len, _count) \
2443 ((_mgr)->snow3g_f8_n_buffer((_exp_key), (_iv), (_src), \
2444 (_dst), (_len), (_count)))
2445
2460#define IMB_SNOW3G_F8_N_BUFFER_MULTIKEY(_mgr, _exp_key, _iv, _src, \
2461 _dst, _len, _count) \
2462 ((_mgr)->snow3g_f8_n_buffer_multikey((_exp_key), (_iv), (_src), \
2463 (_dst), (_len), (_count)))
2464
2480#define IMB_SNOW3G_F9_1_BUFFER(_mgr, _exp_key, _iv, _src, _len, _tag) \
2481 ((_mgr)->snow3g_f9_1_buffer((_exp_key), (_iv), (_src), (_len), (_tag)))
2482
2493#define IMB_SNOW3G_INIT_KEY_SCHED(_mgr, _key, _exp_key) \
2494 ((_mgr)->snow3g_init_key_sched((_key), (_exp_key)))
2495
2505#define IMB_SNOW3G_KEY_SCHED_SIZE(_mgr)((_mgr)->snow3g_key_sched_size())
2506
2510#define IMB_HEC_32(_mgr, _src)((_mgr)->hec_32(_src))
2511#define IMB_HEC_64(_mgr, _src)((_mgr)->hec_64(_src))
2512
2516#define IMB_CRC32_ETHERNET_FCS(_mgr, _src, _len) \
2517 (_mgr)->crc32_ethernet_fcs(_src, _len)
2518
2522#define IMB_CRC16_X25(_mgr, _src, _len) \
2523 (_mgr)->crc16_x25(_src, _len)
2524
2528#define IMB_CRC32_SCTP(_mgr, _src, _len) \
2529 (_mgr)->crc32_sctp(_src, _len)
2530
2534#define IMB_CRC24_LTE_A(_mgr, _src, _len) \
2535 (_mgr)->crc24_lte_a(_src, _len)
2536
2540#define IMB_CRC24_LTE_B(_mgr, _src, _len) \
2541 (_mgr)->crc24_lte_b(_src, _len)
2542
2546#define IMB_CRC16_FP_DATA(_mgr, _src, _len) \
2547 (_mgr)->crc16_fp_data(_src, _len)
2548
2552#define IMB_CRC11_FP_HEADER(_mgr, _src, _len) \
2553 (_mgr)->crc11_fp_header(_src, _len)
2554
2558#define IMB_CRC7_FP_HEADER(_mgr, _src, _len) \
2559 (_mgr)->crc7_fp_header(_src, _len)
2560
2564#define IMB_CRC10_IUUP_DATA(_mgr, _src, _len) \
2565 (_mgr)->crc10_iuup_data(_src, _len)
2566
2570#define IMB_CRC6_IUUP_HEADER(_mgr, _src, _len) \
2571 (_mgr)->crc6_iuup_header(_src, _len)
2572
2576#define IMB_CRC32_WIMAX_OFDMA_DATA(_mgr, _src, _len) \
2577 (_mgr)->crc32_wimax_ofdma_data(_src, _len)
2578
2582#define IMB_CRC8_WIMAX_OFDMA_HCS(_mgr, _src, _len) \
2583 (_mgr)->crc8_wimax_ofdma_hcs(_src, _len)
2584
2585/* Auxiliary functions */
2586
2599 IMB_DLL_EXPORT int
2600des_key_schedule(uint64_t *ks, const void *key);
2601
2609 IMB_DLL_EXPORT void sha1_sse(const void *data, const uint64_t length,
2610 void *digest);
2611
2615 IMB_DLL_EXPORT void sha1_avx(const void *data, const uint64_t length,
2616 void *digest);
2620 IMB_DLL_EXPORT void sha1_avx2(const void *data, const uint64_t length,
2621 void *digest);
2625 IMB_DLL_EXPORT void sha1_avx512(const void *data, const uint64_t length,
2626 void *digest);
2627
2634 IMB_DLL_EXPORT void sha1_one_block_sse(const void *data, void *digest);
2638 IMB_DLL_EXPORT void sha1_one_block_avx(const void *data, void *digest);
2642 IMB_DLL_EXPORT void sha1_one_block_avx2(const void *data, void *digest);
2646 IMB_DLL_EXPORT void sha1_one_block_avx512(const void *data, void *digest);
2647
2655 IMB_DLL_EXPORT void sha224_sse(const void *data, const uint64_t length,
2656 void *digest);
2660 IMB_DLL_EXPORT void sha224_avx(const void *data, const uint64_t length,
2661 void *digest);
2665 IMB_DLL_EXPORT void sha224_avx2(const void *data, const uint64_t length,
2666 void *digest);
2670 IMB_DLL_EXPORT void sha224_avx512(const void *data, const uint64_t length,
2671 void *digest);
2672
2679 IMB_DLL_EXPORT void sha224_one_block_sse(const void *data, void *digest);
2683 IMB_DLL_EXPORT void sha224_one_block_avx(const void *data, void *digest);
2687 IMB_DLL_EXPORT void sha224_one_block_avx2(const void *data, void *digest);
2691 IMB_DLL_EXPORT void sha224_one_block_avx512(const void *data, void *digest);
2692
2700 IMB_DLL_EXPORT void sha256_sse(const void *data, const uint64_t length,
2701 void *digest);
2705 IMB_DLL_EXPORT void sha256_avx(const void *data, const uint64_t length,
2706 void *digest);
2710 IMB_DLL_EXPORT void sha256_avx2(const void *data, const uint64_t length,
2711 void *digest);
2715 IMB_DLL_EXPORT void sha256_avx512(const void *data, const uint64_t length,
2716 void *digest);
2717
2724 IMB_DLL_EXPORT void sha256_one_block_sse(const void *data, void *digest);
2728 IMB_DLL_EXPORT void sha256_one_block_avx(const void *data, void *digest);
2732 IMB_DLL_EXPORT void sha256_one_block_avx2(const void *data, void *digest);
2736 IMB_DLL_EXPORT void sha256_one_block_avx512(const void *data, void *digest);
2737
2745 IMB_DLL_EXPORT void sha384_sse(const void *data, const uint64_t length,
2746 void *digest);
2750 IMB_DLL_EXPORT void sha384_avx(const void *data, const uint64_t length,
2751 void *digest);
2755 IMB_DLL_EXPORT void sha384_avx2(const void *data, const uint64_t length,
2756 void *digest);
2760 IMB_DLL_EXPORT void sha384_avx512(const void *data, const uint64_t length,
2761 void *digest);
2762
2769 IMB_DLL_EXPORT void sha384_one_block_sse(const void *data, void *digest);
2773 IMB_DLL_EXPORT void sha384_one_block_avx(const void *data, void *digest);
2777 IMB_DLL_EXPORT void sha384_one_block_avx2(const void *data, void *digest);
2781 IMB_DLL_EXPORT void sha384_one_block_avx512(const void *data, void *digest);
2782
2790 IMB_DLL_EXPORT void sha512_sse(const void *data, const uint64_t length,
2791 void *digest);
2795 IMB_DLL_EXPORT void sha512_avx(const void *data, const uint64_t length,
2796 void *digest);
2800 IMB_DLL_EXPORT void sha512_avx2(const void *data, const uint64_t length,
2801 void *digest);
2805 IMB_DLL_EXPORT void sha512_avx512(const void *data, const uint64_t length,
2806 void *digest);
2807
2814 IMB_DLL_EXPORT void sha512_one_block_sse(const void *data, void *digest);
2818 IMB_DLL_EXPORT void sha512_one_block_avx(const void *data, void *digest);
2822 IMB_DLL_EXPORT void sha512_one_block_avx2(const void *data, void *digest);
2826 IMB_DLL_EXPORT void sha512_one_block_avx512(const void *data, void *digest);
2827
2834 IMB_DLL_EXPORT void md5_one_block_sse(const void *data, void *digest);
2838 IMB_DLL_EXPORT void md5_one_block_avx(const void *data, void *digest);
2842 IMB_DLL_EXPORT void md5_one_block_avx2(const void *data, void *digest);
2846 IMB_DLL_EXPORT void md5_one_block_avx512(const void *data, void *digest);
2847
2848
2856 IMB_DLL_EXPORT void aes_keyexp_128_sse(const void *key, void *enc_exp_keys,
2857 void *dec_exp_keys);
2861 IMB_DLL_EXPORT void aes_keyexp_128_avx(const void *key, void *enc_exp_keys,
2862 void *dec_exp_keys);
2866 IMB_DLL_EXPORT void aes_keyexp_128_avx2(const void *key, void *enc_exp_keys,
2867 void *dec_exp_keys);
2871 IMB_DLL_EXPORT void aes_keyexp_128_avx512(const void *key, void *enc_exp_keys,
2872 void *dec_exp_keys);
2873
2881 IMB_DLL_EXPORT void aes_keyexp_192_sse(const void *key, void *enc_exp_keys,
2882 void *dec_exp_keys);
2886 IMB_DLL_EXPORT void aes_keyexp_192_avx(const void *key, void *enc_exp_keys,
2887 void *dec_exp_keys);
2891 IMB_DLL_EXPORT void aes_keyexp_192_avx2(const void *key, void *enc_exp_keys,
2892 void *dec_exp_keys);
2896 IMB_DLL_EXPORT void aes_keyexp_192_avx512(const void *key, void *enc_exp_keys,
2897 void *dec_exp_keys);
2898
2906 IMB_DLL_EXPORT void aes_keyexp_256_sse(const void *key, void *enc_exp_keys,
2907 void *dec_exp_keys);
2911 IMB_DLL_EXPORT void aes_keyexp_256_avx(const void *key, void *enc_exp_keys,
2912 void *dec_exp_keys);
2916 IMB_DLL_EXPORT void aes_keyexp_256_avx2(const void *key, void *enc_exp_keys,
2917 void *dec_exp_keys);
2921 IMB_DLL_EXPORT void aes_keyexp_256_avx512(const void *key, void *enc_exp_keys,
2922 void *dec_exp_keys);
2923
2930 IMB_DLL_EXPORT void aes_keyexp_128_enc_sse(const void *key,
2931 void *enc_exp_keys);
2935 IMB_DLL_EXPORT void aes_keyexp_128_enc_avx(const void *key,
2936 void *enc_exp_keys);
2940 IMB_DLL_EXPORT void aes_keyexp_128_enc_avx2(const void *key,
2941 void *enc_exp_keys);
2945 IMB_DLL_EXPORT void aes_keyexp_128_enc_avx512(const void *key,
2946 void *enc_exp_keys);
2947
2954 IMB_DLL_EXPORT void aes_keyexp_192_enc_sse(const void *key,
2955 void *enc_exp_keys);
2959 IMB_DLL_EXPORT void aes_keyexp_192_enc_avx(const void *key,
2960 void *enc_exp_keys);
2964 IMB_DLL_EXPORT void aes_keyexp_192_enc_avx2(const void *key,
2965 void *enc_exp_keys);
2969 IMB_DLL_EXPORT void aes_keyexp_192_enc_avx512(const void *key,
2970 void *enc_exp_keys);
2971
2978 IMB_DLL_EXPORT void aes_keyexp_256_enc_sse(const void *key,
2979 void *enc_exp_keys);
2983 IMB_DLL_EXPORT void aes_keyexp_256_enc_avx(const void *key,
2984 void *enc_exp_keys);
2988 IMB_DLL_EXPORT void aes_keyexp_256_enc_avx2(const void *key,
2989 void *enc_exp_keys);
2993 IMB_DLL_EXPORT void aes_keyexp_256_enc_avx512(const void *key,
2994 void *enc_exp_keys);
2995
3004 IMB_DLL_EXPORT void aes_xcbc_expand_key_sse(const void *key, void *k1_exp,
3005 void *k2, void *k3);
3009 IMB_DLL_EXPORT void aes_xcbc_expand_key_avx(const void *key, void *k1_exp,
3010 void *k2, void *k3);
3014 IMB_DLL_EXPORT void aes_xcbc_expand_key_avx2(const void *key, void *k1_exp,
3015 void *k2, void *k3);
3019 IMB_DLL_EXPORT void aes_xcbc_expand_key_avx512(const void *key, void *k1_exp,
3020 void *k2, void *k3);
3021
3029 IMB_DLL_EXPORT void aes_cmac_subkey_gen_sse(const void *key_exp, void *key1,
3030 void *key2);
3034 IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx(const void *key_exp, void *key1,
3035 void *key2);
3039 IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx2(const void *key_exp, void *key1,
3040 void *key2);
3044 IMB_DLL_EXPORT void aes_cmac_subkey_gen_avx512(const void *key_exp, void *key1,
3045 void *key2);
3058 IMB_DLL_EXPORT void aes_cfb_128_one_sse(void *out, const void *in,
3059 const void *iv, const void *keys,
3060 uint64_t len);
3064 IMB_DLL_EXPORT void aes_cfb_128_one_avx(void *out, const void *in,
3065 const void *iv, const void *keys,
3066 uint64_t len);
3070 IMB_DLL_EXPORT void aes_cfb_128_one_avx2(void *out, const void *in,
3071 const void *iv, const void *keys,
3072 uint64_t len);
3076 IMB_DLL_EXPORT void aes_cfb_128_one_avx512(void *out, const void *in,
3077 const void *iv, const void *keys,
3078 uint64_t len);
3079
3080/*
3081 * Direct GCM API.
3082 * Note that GCM is also available through job API.
3083 */
3084
3103 IMB_DLL_EXPORT void
3104aes_gcm_enc_128_sse(const struct gcm_key_data *key_data,
3105 struct gcm_context_data *context_data,
3106 uint8_t *out, uint8_t const *in, uint64_t len,
3107 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len,
3108 uint8_t *auth_tag, uint64_t auth_tag_len);
3112 IMB_DLL_EXPORT void
3113aes_gcm_enc_128_avx_gen2(const struct gcm_key_data *key_data,
3114 struct gcm_context_data *context_data,
3115 uint8_t *out, uint8_t const *in, uint64_t len,
3116 const uint8_t *iv,
3117 uint8_t const *aad, uint64_t aad_len,
3118 uint8_t *auth_tag, uint64_t auth_tag_len);
3122 IMB_DLL_EXPORT void
3123aes_gcm_enc_128_avx_gen4(const struct gcm_key_data *key_data,
3124 struct gcm_context_data *context_data,
3125 uint8_t *out, uint8_t const *in, uint64_t len,
3126 const uint8_t *iv,
3127 uint8_t const *aad, uint64_t aad_len,
3128 uint8_t *auth_tag, uint64_t auth_tag_len);
3147 IMB_DLL_EXPORT void
3148aes_gcm_enc_192_sse(const struct gcm_key_data *key_data,
3149 struct gcm_context_data *context_data,
3150 uint8_t *out, uint8_t const *in, uint64_t len,
3151 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len,
3152 uint8_t *auth_tag, uint64_t auth_tag_len);
3156 IMB_DLL_EXPORT void
3157aes_gcm_enc_192_avx_gen2(const struct gcm_key_data *key_data,
3158 struct gcm_context_data *context_data,
3159 uint8_t *out, uint8_t const *in, uint64_t len,
3160 const uint8_t *iv,
3161 uint8_t const *aad, uint64_t aad_len,
3162 uint8_t *auth_tag, uint64_t auth_tag_len);
3166 IMB_DLL_EXPORT void
3167aes_gcm_enc_192_avx_gen4(const struct gcm_key_data *key_data,
3168 struct gcm_context_data *context_data,
3169 uint8_t *out, uint8_t const *in, uint64_t len,
3170 const uint8_t *iv,
3171 uint8_t const *aad, uint64_t aad_len,
3172 uint8_t *auth_tag, uint64_t auth_tag_len);
3173
3192 IMB_DLL_EXPORT void
3193aes_gcm_enc_256_sse(const struct gcm_key_data *key_data,
3194 struct gcm_context_data *context_data,
3195 uint8_t *out, uint8_t const *in, uint64_t len,
3196 const uint8_t *iv,
3197 uint8_t const *aad, uint64_t aad_len,
3198 uint8_t *auth_tag, uint64_t auth_tag_len);
3202 IMB_DLL_EXPORT void
3203aes_gcm_enc_256_avx_gen2(const struct gcm_key_data *key_data,
3204 struct gcm_context_data *context_data,
3205 uint8_t *out, uint8_t const *in, uint64_t len,
3206 const uint8_t *iv,
3207 uint8_t const *aad, uint64_t aad_len,
3208 uint8_t *auth_tag, uint64_t auth_tag_len);
3212 IMB_DLL_EXPORT void
3213aes_gcm_enc_256_avx_gen4(const struct gcm_key_data *key_data,
3214 struct gcm_context_data *context_data,
3215 uint8_t *out, uint8_t const *in, uint64_t len,
3216 const uint8_t *iv,
3217 uint8_t const *aad, uint64_t aad_len,
3218 uint8_t *auth_tag, uint64_t auth_tag_len);
3219
3238 IMB_DLL_EXPORT void
3239aes_gcm_dec_128_sse(const struct gcm_key_data *key_data,
3240 struct gcm_context_data *context_data,
3241 uint8_t *out, uint8_t const *in, uint64_t len,
3242 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len,
3243 uint8_t *auth_tag, uint64_t auth_tag_len);
3247 IMB_DLL_EXPORT void
3248aes_gcm_dec_128_avx_gen2(const struct gcm_key_data *key_data,
3249 struct gcm_context_data *context_data,
3250 uint8_t *out, uint8_t const *in, uint64_t len,
3251 const uint8_t *iv,
3252 uint8_t const *aad, uint64_t aad_len,
3253 uint8_t *auth_tag, uint64_t auth_tag_len);
3257 IMB_DLL_EXPORT void
3258aes_gcm_dec_128_avx_gen4(const struct gcm_key_data *key_data,
3259 struct gcm_context_data *context_data,
3260 uint8_t *out, uint8_t const *in, uint64_t len,
3261 const uint8_t *iv,
3262 uint8_t const *aad, uint64_t aad_len,
3263 uint8_t *auth_tag, uint64_t auth_tag_len);
3264
3283 IMB_DLL_EXPORT void
3284aes_gcm_dec_192_sse(const struct gcm_key_data *key_data,
3285 struct gcm_context_data *context_data,
3286 uint8_t *out, uint8_t const *in, uint64_t len,
3287 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len,
3288 uint8_t *auth_tag, uint64_t auth_tag_len);
3292 IMB_DLL_EXPORT void
3293aes_gcm_dec_192_avx_gen2(const struct gcm_key_data *key_data,
3294 struct gcm_context_data *context_data,
3295 uint8_t *out, uint8_t const *in, uint64_t len,
3296 const uint8_t *iv,
3297 uint8_t const *aad, uint64_t aad_len,
3298 uint8_t *auth_tag, uint64_t auth_tag_len);
3302 IMB_DLL_EXPORT void
3303aes_gcm_dec_192_avx_gen4(const struct gcm_key_data *key_data,
3304 struct gcm_context_data *context_data,
3305 uint8_t *out, uint8_t const *in, uint64_t len,
3306 const uint8_t *iv,
3307 uint8_t const *aad, uint64_t aad_len,
3308 uint8_t *auth_tag, uint64_t auth_tag_len);
3309
3328 IMB_DLL_EXPORT void
3329aes_gcm_dec_256_sse(const struct gcm_key_data *key_data,
3330 struct gcm_context_data *context_data,
3331 uint8_t *out, uint8_t const *in, uint64_t len,
3332 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len,
3333 uint8_t *auth_tag, uint64_t auth_tag_len);
3337 IMB_DLL_EXPORT void
3338aes_gcm_dec_256_avx_gen2(const struct gcm_key_data *key_data,
3339 struct gcm_context_data *context_data,
3340 uint8_t *out, uint8_t const *in, uint64_t len,
3341 const uint8_t *iv,
3342 uint8_t const *aad, uint64_t aad_len,
3343 uint8_t *auth_tag, uint64_t auth_tag_len);
3347 IMB_DLL_EXPORT void
3348aes_gcm_dec_256_avx_gen4(const struct gcm_key_data *key_data,
3349 struct gcm_context_data *context_data,
3350 uint8_t *out, uint8_t const *in, uint64_t len,
3351 const uint8_t *iv,
3352 uint8_t const *aad, uint64_t aad_len,
3353 uint8_t *auth_tag, uint64_t auth_tag_len);
3354
3367 IMB_DLL_EXPORT void
3368aes_gcm_init_128_sse(const struct gcm_key_data *key_data,
3369 struct gcm_context_data *context_data,
3370 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len);
3374 IMB_DLL_EXPORT void
3375aes_gcm_init_128_avx_gen2(const struct gcm_key_data *key_data,
3376 struct gcm_context_data *context_data,
3377 const uint8_t *iv,
3378 uint8_t const *aad, uint64_t aad_len);
3382 IMB_DLL_EXPORT void
3383aes_gcm_init_128_avx_gen4(const struct gcm_key_data *key_data,
3384 struct gcm_context_data *context_data,
3385 const uint8_t *iv,
3386 uint8_t const *aad, uint64_t aad_len);
3399 IMB_DLL_EXPORT void
3400aes_gcm_init_192_sse(const struct gcm_key_data *key_data,
3401 struct gcm_context_data *context_data,
3402 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len);
3406 IMB_DLL_EXPORT void
3407aes_gcm_init_192_avx_gen2(const struct gcm_key_data *key_data,
3408 struct gcm_context_data *context_data,
3409 const uint8_t *iv,
3410 uint8_t const *aad, uint64_t aad_len);
3414 IMB_DLL_EXPORT void
3415aes_gcm_init_192_avx_gen4(const struct gcm_key_data *key_data,
3416 struct gcm_context_data *context_data,
3417 const uint8_t *iv,
3418 uint8_t const *aad, uint64_t aad_len);
3431 IMB_DLL_EXPORT void
3432aes_gcm_init_256_sse(const struct gcm_key_data *key_data,
3433 struct gcm_context_data *context_data,
3434 const uint8_t *iv, uint8_t const *aad, uint64_t aad_len);
3438 IMB_DLL_EXPORT void
3439aes_gcm_init_256_avx_gen2(const struct gcm_key_data *key_data,
3440 struct gcm_context_data *context_data,
3441 const uint8_t *iv,
3442 uint8_t const *aad, uint64_t aad_len);
3446 IMB_DLL_EXPORT void
3447aes_gcm_init_256_avx_gen4(const struct gcm_key_data *key_data,
3448 struct gcm_context_data *context_data,
3449 const uint8_t *iv,
3450 uint8_t const *aad, uint64_t aad_len);
3451
3461 IMB_DLL_EXPORT void
3462aes_gcm_enc_128_update_sse(const struct gcm_key_data *key_data,
3463 struct gcm_context_data *context_data,
3464 uint8_t *out, const uint8_t *in, uint64_t len);
3468 IMB_DLL_EXPORT void
3469aes_gcm_enc_128_update_avx_gen2(const struct gcm_key_data *key_data,
3470 struct gcm_context_data *context_data,
3471 uint8_t *out, const uint8_t *in, uint64_t len);
3475 IMB_DLL_EXPORT void
3476aes_gcm_enc_128_update_avx_gen4(const struct gcm_key_data *key_data,
3477 struct gcm_context_data *context_data,
3478 uint8_t *out, const uint8_t *in, uint64_t len);
3479
3489 IMB_DLL_EXPORT void
3490aes_gcm_enc_192_update_sse(const struct gcm_key_data *key_data,
3491 struct gcm_context_data *context_data,
3492 uint8_t *out, const uint8_t *in, uint64_t len);
3496 IMB_DLL_EXPORT void
3497aes_gcm_enc_192_update_avx_gen2(const struct gcm_key_data *key_data,
3498 struct gcm_context_data *context_data,
3499 uint8_t *out, const uint8_t *in, uint64_t len);
3503 IMB_DLL_EXPORT void
3504aes_gcm_enc_192_update_avx_gen4(const struct gcm_key_data *key_data,
3505 struct gcm_context_data *context_data,
3506 uint8_t *out, const uint8_t *in, uint64_t len);
3507
3517 IMB_DLL_EXPORT void
3518aes_gcm_enc_256_update_sse(const struct gcm_key_data *key_data,
3519 struct gcm_context_data *context_data,
3520 uint8_t *out, const uint8_t *in, uint64_t len);
3524 IMB_DLL_EXPORT void
3525aes_gcm_enc_256_update_avx_gen2(const struct gcm_key_data *key_data,
3526 struct gcm_context_data *context_data,
3527 uint8_t *out, const uint8_t *in, uint64_t len);
3531 IMB_DLL_EXPORT void
3532aes_gcm_enc_256_update_avx_gen4(const struct gcm_key_data *key_data,
3533 struct gcm_context_data *context_data,
3534 uint8_t *out, const uint8_t *in, uint64_t len);
3535
3545 IMB_DLL_EXPORT void
3546aes_gcm_dec_128_update_sse(const struct gcm_key_data *key_data,
3547 struct gcm_context_data *context_data,
3548 uint8_t *out, const uint8_t *in, uint64_t len);
3552 IMB_DLL_EXPORT void
3553aes_gcm_dec_128_update_avx_gen2(const struct gcm_key_data *key_data,
3554 struct gcm_context_data *context_data,
3555 uint8_t *out, const uint8_t *in, uint64_t len);
3559 IMB_DLL_EXPORT void
3560aes_gcm_dec_128_update_avx_gen4(const struct gcm_key_data *key_data,
3561 struct gcm_context_data *context_data,
3562 uint8_t *out, const uint8_t *in, uint64_t len);
3563
3573 IMB_DLL_EXPORT void
3574aes_gcm_dec_192_update_sse(const struct gcm_key_data *key_data,
3575 struct gcm_context_data *context_data,
3576 uint8_t *out, const uint8_t *in, uint64_t len);
3580 IMB_DLL_EXPORT void
3581aes_gcm_dec_192_update_avx_gen2(const struct gcm_key_data *key_data,
3582 struct gcm_context_data *context_data,
3583 uint8_t *out, const uint8_t *in, uint64_t len);
3587 IMB_DLL_EXPORT void
3588aes_gcm_dec_192_update_avx_gen4(const struct gcm_key_data *key_data,
3589 struct gcm_context_data *context_data,
3590 uint8_t *out, const uint8_t *in, uint64_t len);
3591
3601 IMB_DLL_EXPORT void
3602aes_gcm_dec_256_update_sse(const struct gcm_key_data *key_data,
3603 struct gcm_context_data *context_data,
3604 uint8_t *out, const uint8_t *in, uint64_t len);
3608 IMB_DLL_EXPORT void
3609aes_gcm_dec_256_update_avx_gen2(const struct gcm_key_data *key_data,
3610 struct gcm_context_data *context_data,
3611 uint8_t *out, const uint8_t *in, uint64_t len);
3615 IMB_DLL_EXPORT void
3616aes_gcm_dec_256_update_avx_gen4(const struct gcm_key_data *key_data,
3617 struct gcm_context_data *context_data,
3618 uint8_t *out, const uint8_t *in, uint64_t len);
3619
3630 IMB_DLL_EXPORT void
3631aes_gcm_enc_128_finalize_sse(const struct gcm_key_data *key_data,
3632 struct gcm_context_data *context_data,
3633 uint8_t *auth_tag, uint64_t auth_tag_len);
3637 IMB_DLL_EXPORT void
3638aes_gcm_enc_128_finalize_avx_gen2(const struct gcm_key_data *key_data,
3639 struct gcm_context_data *context_data,
3640 uint8_t *auth_tag, uint64_t auth_tag_len);
3644 IMB_DLL_EXPORT void
3645aes_gcm_enc_128_finalize_avx_gen4(const struct gcm_key_data *key_data,
3646 struct gcm_context_data *context_data,
3647 uint8_t *auth_tag, uint64_t auth_tag_len);
3648
3659 IMB_DLL_EXPORT void
3660aes_gcm_enc_192_finalize_sse(const struct gcm_key_data *key_data,
3661 struct gcm_context_data *context_data,
3662 uint8_t *auth_tag, uint64_t auth_tag_len);
3666 IMB_DLL_EXPORT void
3667aes_gcm_enc_192_finalize_avx_gen2(const struct gcm_key_data *key_data,
3668 struct gcm_context_data *context_data,
3669 uint8_t *auth_tag, uint64_t auth_tag_len);
3673 IMB_DLL_EXPORT void
3674aes_gcm_enc_192_finalize_avx_gen4(const struct gcm_key_data *key_data,
3675 struct gcm_context_data *context_data,
3676 uint8_t *auth_tag, uint64_t auth_tag_len);
3677
3688 IMB_DLL_EXPORT void
3689aes_gcm_enc_256_finalize_sse(const struct gcm_key_data *key_data,
3690 struct gcm_context_data *context_data,
3691 uint8_t *auth_tag, uint64_t auth_tag_len);
3695 IMB_DLL_EXPORT void
3696aes_gcm_enc_256_finalize_avx_gen2(const struct gcm_key_data *key_data,
3697 struct gcm_context_data *context_data,
3698 uint8_t *auth_tag, uint64_t auth_tag_len);
3702 IMB_DLL_EXPORT void
3703aes_gcm_enc_256_finalize_avx_gen4(const struct gcm_key_data *key_data,
3704 struct gcm_context_data *context_data,
3705 uint8_t *auth_tag, uint64_t auth_tag_len);
3706
3717 IMB_DLL_EXPORT void
3718aes_gcm_dec_128_finalize_sse(const struct gcm_key_data *key_data,
3719 struct gcm_context_data *context_data,
3720 uint8_t *auth_tag, uint64_t auth_tag_len);
3724 IMB_DLL_EXPORT void
3725aes_gcm_dec_128_finalize_avx_gen2(const struct gcm_key_data *key_data,
3726 struct gcm_context_data *context_data,
3727 uint8_t *auth_tag, uint64_t auth_tag_len);
3731 IMB_DLL_EXPORT void
3732aes_gcm_dec_128_finalize_avx_gen4(const struct gcm_key_data *key_data,
3733 struct gcm_context_data *context_data,
3734 uint8_t *auth_tag, uint64_t auth_tag_len);
3735
3746 IMB_DLL_EXPORT void
3747aes_gcm_dec_192_finalize_sse(const struct gcm_key_data *key_data,
3748 struct gcm_context_data *context_data,
3749 uint8_t *auth_tag, uint64_t auth_tag_len);
3753 IMB_DLL_EXPORT void
3754aes_gcm_dec_192_finalize_avx_gen2(const struct gcm_key_data *key_data,
3755 struct gcm_context_data *context_data,
3756 uint8_t *auth_tag, uint64_t auth_tag_len);
3760 IMB_DLL_EXPORT void
3761aes_gcm_dec_192_finalize_avx_gen4(const struct gcm_key_data *key_data,
3762 struct gcm_context_data *context_data,
3763 uint8_t *auth_tag, uint64_t auth_tag_len);
3764
3775 IMB_DLL_EXPORT void
3776aes_gcm_dec_256_finalize_sse(const struct gcm_key_data *key_data,
3777 struct gcm_context_data *context_data,
3778 uint8_t *auth_tag, uint64_t auth_tag_len);
3782 IMB_DLL_EXPORT void
3783aes_gcm_dec_256_finalize_avx_gen2(const struct gcm_key_data *key_data,
3784 struct gcm_context_data *context_data,
3785 uint8_t *auth_tag, uint64_t auth_tag_len);
3789 IMB_DLL_EXPORT void
3790aes_gcm_dec_256_finalize_avx_gen4(const struct gcm_key_data *key_data,
3791 struct gcm_context_data *context_data,
3792 uint8_t *auth_tag, uint64_t auth_tag_len);
3793
3802 IMB_DLL_EXPORT void aes_gcm_precomp_128_sse(struct gcm_key_data *key_data);
3803
3807 IMB_DLL_EXPORT void aes_gcm_precomp_128_avx_gen2(struct gcm_key_data *key_data);
3808
3812 IMB_DLL_EXPORT void aes_gcm_precomp_128_avx_gen4(struct gcm_key_data *key_data);
3813
3822 IMB_DLL_EXPORT void aes_gcm_precomp_192_sse(struct gcm_key_data *key_data);
3823
3827 IMB_DLL_EXPORT void aes_gcm_precomp_192_avx_gen2(struct gcm_key_data *key_data);
3828
3832 IMB_DLL_EXPORT void aes_gcm_precomp_192_avx_gen4(struct gcm_key_data *key_data);
3833
3842 IMB_DLL_EXPORT void aes_gcm_precomp_256_sse(struct gcm_key_data *key_data);
3843
3847 IMB_DLL_EXPORT void aes_gcm_precomp_256_avx_gen2(struct gcm_key_data *key_data);
3848
3852 IMB_DLL_EXPORT void aes_gcm_precomp_256_avx_gen4(struct gcm_key_data *key_data);
3853
3863 IMB_DLL_EXPORT void aes_gcm_pre_128_sse(const void *key,
3864 struct gcm_key_data *key_data);
3868 IMB_DLL_EXPORT void aes_gcm_pre_128_avx_gen2(const void *key,
3869 struct gcm_key_data *key_data);
3873 IMB_DLL_EXPORT void aes_gcm_pre_128_avx_gen4(const void *key,
3874 struct gcm_key_data *key_data);
3884 IMB_DLL_EXPORT void aes_gcm_pre_192_sse(const void *key,
3885 struct gcm_key_data *key_data);
3889 IMB_DLL_EXPORT void aes_gcm_pre_192_avx_gen2(const void *key,
3890 struct gcm_key_data *key_data);
3894 IMB_DLL_EXPORT void aes_gcm_pre_192_avx_gen4(const void *key,
3895 struct gcm_key_data *key_data);
3905 IMB_DLL_EXPORT void aes_gcm_pre_256_sse(const void *key,
3906 struct gcm_key_data *key_data);
3910 IMB_DLL_EXPORT void aes_gcm_pre_256_avx_gen2(const void *key,
3911 struct gcm_key_data *key_data);
3915 IMB_DLL_EXPORT void aes_gcm_pre_256_avx_gen4(const void *key,
3916 struct gcm_key_data *key_data);
3917
3930 IMB_DLL_EXPORT int zuc_eea3_iv_gen(const uint32_t count,
3931 const uint8_t bearer,
3932 const uint8_t dir,
3933 void *iv_ptr);
3946 IMB_DLL_EXPORT int zuc_eia3_iv_gen(const uint32_t count,
3947 const uint8_t bearer,
3948 const uint8_t dir,
3949 void *iv_ptr);
3950
3963 IMB_DLL_EXPORT int kasumi_f8_iv_gen(const uint32_t count,
3964 const uint8_t bearer,
3965 const uint8_t dir,
3966 void *iv_ptr);
3978 IMB_DLL_EXPORT int kasumi_f9_iv_gen(const uint32_t count,
3979 const uint32_t fresh,
3980 void *iv_ptr);
3981
3997 IMB_DLL_EXPORT int snow3g_f8_iv_gen(const uint32_t count,
3998 const uint8_t bearer,
3999 const uint8_t dir,
4000 void *iv_ptr);
4016 IMB_DLL_EXPORT int snow3g_f9_iv_gen(const uint32_t count,
4017 const uint32_t fresh,
4018 const uint8_t dir,
4019 void *iv_ptr);
4026 IMB_DLL_EXPORT void imb_clear_mem(void *mem, const size_t size);
4027
4028#ifdef __cplusplus
4029}
4030#endif
4031
4032#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:648
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:853
sha256_one_block_avx2
IMB_DLL_EXPORT void sha256_one_block_avx2(const void *data, void *digest)
aes_keyexp_192_enc_sse
IMB_DLL_EXPORT void aes_keyexp_192_enc_sse(const void *key, void *enc_exp_keys)
aes_gcm_dec_256_update_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_256_update_avx_gen2(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_GCM_ENC_KEY_LEN
#define IMB_GCM_ENC_KEY_LEN
Definition: intel-ipsec-mb.h:718
submit_burst_t
uint32_t(* submit_burst_t)(struct IMB_MGR *, struct IMB_JOB *, const uint32_t)
Definition: intel-ipsec-mb.h:785
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_enc_192_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_192_avx_gen2(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.
sha256_avx512
IMB_DLL_EXPORT void sha256_avx512(const void *data, const uint64_t length, void *digest)
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:962
aes_gcm_pre_t
void(* aes_gcm_pre_t)(const void *, struct gcm_key_data *)
Definition: intel-ipsec-mb.h:830
ghash_t
void(* ghash_t)(const struct gcm_key_data *, const void *, const uint64_t, void *, const uint64_t)
Definition: intel-ipsec-mb.h:850
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.
sha224_one_block_avx512
IMB_DLL_EXPORT void sha224_one_block_avx512(const void *data, void *digest)
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.
sha512_avx
IMB_DLL_EXPORT void sha512_avx(const void *data, const uint64_t length, void *digest)
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.
chacha_poly_finalize_t
void(* chacha_poly_finalize_t)(struct chacha20_poly1305_context_data *, void *, const uint64_t)
Definition: intel-ipsec-mb.h:848
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:442
IMB_KEY_192_BYTES
@ IMB_KEY_192_BYTES
Definition: intel-ipsec-mb.h:444
IMB_KEY_256_BYTES
@ IMB_KEY_256_BYTES
Definition: intel-ipsec-mb.h:445
IMB_KEY_128_BYTES
@ IMB_KEY_128_BYTES
Definition: intel-ipsec-mb.h:443
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:927
aes_gcm_precomp_256_avx_gen2
IMB_DLL_EXPORT void aes_gcm_precomp_256_avx_gen2(struct gcm_key_data *key_data)
Precomputation of AES-GCM-256 HashKey constants.
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.
sha256_one_block_avx
IMB_DLL_EXPORT void sha256_one_block_avx(const void *data, void *digest)
sha224_sse
IMB_DLL_EXPORT void sha224_sse(const void *data, const uint64_t length, void *digest)
aes_gcm_pre_128_avx_gen2
IMB_DLL_EXPORT void aes_gcm_pre_128_avx_gen2(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-128 key data.
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:860
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:832
aes_keyexp_128_sse
IMB_DLL_EXPORT void aes_keyexp_128_sse(const void *key, void *enc_exp_keys, void *dec_exp_keys)
get_next_job_avx
IMB_DLL_EXPORT IMB_JOB * get_next_job_avx(IMB_MGR *state)
Get next available job.
aes_gcm_enc_256_update_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_256_update_avx_gen2(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.
submit_job_nocheck_sse
IMB_DLL_EXPORT IMB_JOB * submit_job_nocheck_sse(IMB_MGR *state)
Submit job for processing without validating.
sha1_sse
IMB_DLL_EXPORT void sha1_sse(const void *data, const uint64_t length, void *digest)
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.
sha384_avx2
IMB_DLL_EXPORT void sha384_avx2(const void *data, const uint64_t length, void *digest)
sha512_sse
IMB_DLL_EXPORT void sha512_sse(const void *data, const uint64_t length, void *digest)
sha384_one_block_avx512
IMB_DLL_EXPORT void sha384_one_block_avx512(const void *data, void *digest)
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:355
IMB_CIPHER_DES
@ IMB_CIPHER_DES
Definition: intel-ipsec-mb.h:362
IMB_CIPHER_NULL
@ IMB_CIPHER_NULL
Definition: intel-ipsec-mb.h:358
IMB_CIPHER_CBC
@ IMB_CIPHER_CBC
Definition: intel-ipsec-mb.h:356
IMB_CIPHER_GCM
@ IMB_CIPHER_GCM
Definition: intel-ipsec-mb.h:360
IMB_CIPHER_ECB
@ IMB_CIPHER_ECB
Definition: intel-ipsec-mb.h:367
IMB_CIPHER_ZUC_EEA3
@ IMB_CIPHER_ZUC_EEA3
Definition: intel-ipsec-mb.h:369
IMB_CIPHER_CHACHA20
@ IMB_CIPHER_CHACHA20
Definition: intel-ipsec-mb.h:373
IMB_CIPHER_KASUMI_UEA1_BITLEN
@ IMB_CIPHER_KASUMI_UEA1_BITLEN
Definition: intel-ipsec-mb.h:371
IMB_CIPHER_CHACHA20_POLY1305_SGL
@ IMB_CIPHER_CHACHA20_POLY1305_SGL
Definition: intel-ipsec-mb.h:375
IMB_CIPHER_CUSTOM
@ IMB_CIPHER_CUSTOM
Definition: intel-ipsec-mb.h:361
IMB_CIPHER_GCM_SGL
@ IMB_CIPHER_GCM_SGL
Definition: intel-ipsec-mb.h:378
IMB_CIPHER_CNTR
@ IMB_CIPHER_CNTR
Definition: intel-ipsec-mb.h:357
IMB_CIPHER_DES3
@ IMB_CIPHER_DES3
Definition: intel-ipsec-mb.h:365
IMB_CIPHER_CNTR_BITLEN
@ IMB_CIPHER_CNTR_BITLEN
Definition: intel-ipsec-mb.h:368
IMB_CIPHER_CBCS_1_9
@ IMB_CIPHER_CBCS_1_9
Definition: intel-ipsec-mb.h:372
IMB_CIPHER_NUM
@ IMB_CIPHER_NUM
Definition: intel-ipsec-mb.h:379
IMB_CIPHER_CCM
@ IMB_CIPHER_CCM
Definition: intel-ipsec-mb.h:364
IMB_CIPHER_SNOW3G_UEA2_BITLEN
@ IMB_CIPHER_SNOW3G_UEA2_BITLEN
Definition: intel-ipsec-mb.h:370
IMB_CIPHER_PON_AES_CNTR
@ IMB_CIPHER_PON_AES_CNTR
Definition: intel-ipsec-mb.h:366
IMB_CIPHER_CHACHA20_POLY1305
@ IMB_CIPHER_CHACHA20_POLY1305
Definition: intel-ipsec-mb.h:374
IMB_CIPHER_SNOW_V_AEAD
@ IMB_CIPHER_SNOW_V_AEAD
Definition: intel-ipsec-mb.h:377
IMB_CIPHER_DOCSIS_SEC_BPI
@ IMB_CIPHER_DOCSIS_SEC_BPI
Definition: intel-ipsec-mb.h:359
IMB_CIPHER_DOCSIS_DES
@ IMB_CIPHER_DOCSIS_DES
Definition: intel-ipsec-mb.h:363
IMB_CIPHER_SNOW_V
@ IMB_CIPHER_SNOW_V
Definition: intel-ipsec-mb.h:376
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.
aes_gcm_init_256_avx_gen2
IMB_DLL_EXPORT void aes_gcm_init_256_avx_gen2(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.
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:973
aes_gcm_enc_128_finalize_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_128_finalize_avx_gen2(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_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:781
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:845
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_gcm_enc_256_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_256_avx_gen2(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_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.
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:437
IMB_ORDER_HASH_CIPHER
@ IMB_ORDER_HASH_CIPHER
Definition: intel-ipsec-mb.h:439
IMB_ORDER_CIPHER_HASH
@ IMB_ORDER_CIPHER_HASH
Definition: intel-ipsec-mb.h:438
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:842
sha256_sse
IMB_DLL_EXPORT void sha256_sse(const void *data, const uint64_t length, void *digest)
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:935
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:793
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)
aes_gcm_enc_192_finalize_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_192_finalize_avx_gen2(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.
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:901
queue_size_avx512
IMB_DLL_EXPORT uint32_t queue_size_avx512(IMB_MGR *state)
Get number of jobs queued to be processed.
sha224_avx512
IMB_DLL_EXPORT void sha224_avx512(const void *data, const uint64_t length, void *digest)
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.
sha1_one_block_avx
IMB_DLL_EXPORT void sha1_one_block_avx(const void *data, void *digest)
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:886
aes_gcm_enc_192_update_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_192_update_avx_gen2(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.
crc32_fn_t
uint32_t(* crc32_fn_t)(const void *, const uint64_t)
Definition: intel-ipsec-mb.h:991
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.
sha224_one_block_avx2
IMB_DLL_EXPORT void sha224_one_block_avx2(const void *data, void *digest)
IMB_GCM_BLOCK_LEN
#define IMB_GCM_BLOCK_LEN
Definition: intel-ipsec-mb.h:660
aes_cfb_128_one_avx
IMB_DLL_EXPORT void aes_cfb_128_one_avx(void *out, const void *in, const void *iv, const void *keys, uint64_t len)
AES-CFB-128 Encrypt/Decrypt up to one block.
get_next_job_t
IMB_JOB *(* get_next_job_t)(struct IMB_MGR *)
Definition: intel-ipsec-mb.h:780
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.
sha512_one_block_avx512
IMB_DLL_EXPORT void sha512_one_block_avx512(const void *data, void *digest)
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.
des_keysched_t
int(* des_keysched_t)(uint64_t *, const void *)
Definition: intel-ipsec-mb.h:802
keyexp_t
void(* keyexp_t)(const void *, void *, void *)
Definition: intel-ipsec-mb.h:797
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:948
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:819
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.
sha224_one_block_sse
IMB_DLL_EXPORT void sha224_one_block_sse(const void *data, void *digest)
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:966
IMB_SGL_STATE
IMB_SGL_STATE
Definition: intel-ipsec-mb.h:448
IMB_SGL_UPDATE
@ IMB_SGL_UPDATE
Definition: intel-ipsec-mb.h:450
IMB_SGL_ALL
@ IMB_SGL_ALL
Definition: intel-ipsec-mb.h:452
IMB_SGL_COMPLETE
@ IMB_SGL_COMPLETE
Definition: intel-ipsec-mb.h:451
IMB_SGL_INIT
@ IMB_SGL_INIT
Definition: intel-ipsec-mb.h:449
aes_gcm_pre_192_avx_gen2
IMB_DLL_EXPORT void aes_gcm_pre_192_avx_gen2(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-192 key data.
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.
aes_cfb_128_one_avx2
IMB_DLL_EXPORT void aes_cfb_128_one_avx2(void *out, const void *in, const void *iv, const void *keys, uint64_t len)
AES-CFB-128 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:805
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_gcm_dec_256_finalize_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_256_finalize_avx_gen2(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.
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:719
aes_keyexp_256_enc_avx2
IMB_DLL_EXPORT void aes_keyexp_256_enc_avx2(const void *key, void *enc_exp_keys)
sha1_one_block_avx512
IMB_DLL_EXPORT void sha1_one_block_avx512(const void *data, void *digest)
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)
sha224_one_block_avx
IMB_DLL_EXPORT void sha224_one_block_avx(const void *data, void *digest)
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.
aes_gcm_dec_128_update_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_128_update_avx_gen2(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.
sha256_avx
IMB_DLL_EXPORT void sha256_avx(const void *data, const uint64_t length, void *digest)
imb_get_errno
IMB_DLL_EXPORT int imb_get_errno(IMB_MGR *mb_mgr)
API to get error status.
aes_gcm_init_128_avx_gen2
IMB_DLL_EXPORT void aes_gcm_init_128_avx_gen2(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.
md5_one_block_avx
IMB_DLL_EXPORT void md5_one_block_avx(const void *data, void *digest)
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.
sha384_avx
IMB_DLL_EXPORT void sha384_avx(const void *data, const uint64_t length, void *digest)
aes_cfb_128_one_sse
IMB_DLL_EXPORT void aes_cfb_128_one_sse(void *out, const void *in, const void *iv, const void *keys, uint64_t len)
AES-CFB-128 Encrypt/Decrypt up to one block.
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:931
kasumi_init_f8_key_sched_t
int(* kasumi_init_f8_key_sched_t)(const void *, kasumi_key_sched_t *)
Definition: intel-ipsec-mb.h:912
sha512_one_block_avx
IMB_DLL_EXPORT void sha512_one_block_avx(const void *data, void *digest)
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:856
aes_gcm_enc_256_finalize_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_256_finalize_avx_gen2(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.
sha512_avx512
IMB_DLL_EXPORT void sha512_avx512(const void *data, const uint64_t length, void *digest)
queue_size_avx
IMB_DLL_EXPORT uint32_t queue_size_avx(IMB_MGR *state)
Get number of jobs queued to be processed.
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:876
kasumi_key_sched_t
struct kasumi_key_sched_s kasumi_key_sched_t
IMB_HASH_ALG
IMB_HASH_ALG
Definition: intel-ipsec-mb.h:387
IMB_AUTH_AES_CMAC_256
@ IMB_AUTH_AES_CMAC_256
Definition: intel-ipsec-mb.h:414
IMB_AUTH_AES_XCBC
@ IMB_AUTH_AES_XCBC
Definition: intel-ipsec-mb.h:393
IMB_AUTH_ZUC_EIA3_BITLEN
@ IMB_AUTH_ZUC_EIA3_BITLEN
Definition: intel-ipsec-mb.h:407
IMB_AUTH_AES_GMAC_128
@ IMB_AUTH_AES_GMAC_128
Definition: intel-ipsec-mb.h:411
IMB_AUTH_CRC16_X25
@ IMB_AUTH_CRC16_X25
Definition: intel-ipsec-mb.h:426
IMB_AUTH_NULL
@ IMB_AUTH_NULL
Definition: intel-ipsec-mb.h:395
IMB_AUTH_PON_CRC_BIP
@ IMB_AUTH_PON_CRC_BIP
Definition: intel-ipsec-mb.h:406
IMB_AUTH_SHA_224
@ IMB_AUTH_SHA_224
Definition: intel-ipsec-mb.h:401
IMB_AUTH_CRC24_LTE_A
@ IMB_AUTH_CRC24_LTE_A
Definition: intel-ipsec-mb.h:424
IMB_AUTH_CRC32_ETHERNET_FCS
@ IMB_AUTH_CRC32_ETHERNET_FCS
Definition: intel-ipsec-mb.h:421
IMB_AUTH_KASUMI_UIA1
@ IMB_AUTH_KASUMI_UIA1
Definition: intel-ipsec-mb.h:410
IMB_AUTH_HMAC_SHA_1
@ IMB_AUTH_HMAC_SHA_1
Definition: intel-ipsec-mb.h:388
IMB_AUTH_SHA_256
@ IMB_AUTH_SHA_256
Definition: intel-ipsec-mb.h:402
IMB_AUTH_SNOW3G_UIA2_BITLEN
@ IMB_AUTH_SNOW3G_UIA2_BITLEN
Definition: intel-ipsec-mb.h:409
IMB_AUTH_SNOW_V_AEAD
@ IMB_AUTH_SNOW_V_AEAD
Definition: intel-ipsec-mb.h:419
IMB_AUTH_CRC32_SCTP
@ IMB_AUTH_CRC32_SCTP
Definition: intel-ipsec-mb.h:422
IMB_AUTH_NUM
@ IMB_AUTH_NUM
Definition: intel-ipsec-mb.h:434
IMB_AUTH_HMAC_SHA_256
@ IMB_AUTH_HMAC_SHA_256
Definition: intel-ipsec-mb.h:390
IMB_AUTH_GHASH
@ IMB_AUTH_GHASH
Definition: intel-ipsec-mb.h:433
IMB_AUTH_CUSTOM
@ IMB_AUTH_CUSTOM
Definition: intel-ipsec-mb.h:397
IMB_AUTH_CHACHA20_POLY1305_SGL
@ IMB_AUTH_CHACHA20_POLY1305_SGL
Definition: intel-ipsec-mb.h:417
IMB_AUTH_CRC24_LTE_B
@ IMB_AUTH_CRC24_LTE_B
Definition: intel-ipsec-mb.h:425
IMB_AUTH_ZUC256_EIA3_BITLEN
@ IMB_AUTH_ZUC256_EIA3_BITLEN
Definition: intel-ipsec-mb.h:418
IMB_AUTH_AES_CCM
@ IMB_AUTH_AES_CCM
Definition: intel-ipsec-mb.h:398
IMB_AUTH_CRC6_IUUP_HEADER
@ IMB_AUTH_CRC6_IUUP_HEADER
Definition: intel-ipsec-mb.h:432
IMB_AUTH_POLY1305
@ IMB_AUTH_POLY1305
Definition: intel-ipsec-mb.h:415
IMB_AUTH_MD5
@ IMB_AUTH_MD5
Definition: intel-ipsec-mb.h:394
IMB_AUTH_SHA_512
@ IMB_AUTH_SHA_512
Definition: intel-ipsec-mb.h:404
IMB_AUTH_AES_GMAC
@ IMB_AUTH_AES_GMAC
Definition: intel-ipsec-mb.h:396
IMB_AUTH_CRC16_FP_DATA
@ IMB_AUTH_CRC16_FP_DATA
Definition: intel-ipsec-mb.h:427
IMB_AUTH_AES_CMAC_BITLEN
@ IMB_AUTH_AES_CMAC_BITLEN
Definition: intel-ipsec-mb.h:405
IMB_AUTH_CRC11_FP_HEADER
@ IMB_AUTH_CRC11_FP_HEADER
Definition: intel-ipsec-mb.h:428
IMB_AUTH_CHACHA20_POLY1305
@ IMB_AUTH_CHACHA20_POLY1305
Definition: intel-ipsec-mb.h:416
IMB_AUTH_CRC7_FP_HEADER
@ IMB_AUTH_CRC7_FP_HEADER
Definition: intel-ipsec-mb.h:431
IMB_AUTH_CRC10_IUUP_DATA
@ IMB_AUTH_CRC10_IUUP_DATA
Definition: intel-ipsec-mb.h:429
IMB_AUTH_HMAC_SHA_224
@ IMB_AUTH_HMAC_SHA_224
Definition: intel-ipsec-mb.h:389
IMB_AUTH_CRC32_WIMAX_OFDMA_DATA
@ IMB_AUTH_CRC32_WIMAX_OFDMA_DATA
Definition: intel-ipsec-mb.h:423
IMB_AUTH_HMAC_SHA_512
@ IMB_AUTH_HMAC_SHA_512
Definition: intel-ipsec-mb.h:392
IMB_AUTH_GCM_SGL
@ IMB_AUTH_GCM_SGL
Definition: intel-ipsec-mb.h:420
IMB_AUTH_SHA_1
@ IMB_AUTH_SHA_1
Definition: intel-ipsec-mb.h:400
IMB_AUTH_AES_GMAC_192
@ IMB_AUTH_AES_GMAC_192
Definition: intel-ipsec-mb.h:412
IMB_AUTH_DOCSIS_CRC32
@ IMB_AUTH_DOCSIS_CRC32
Definition: intel-ipsec-mb.h:408
IMB_AUTH_CRC8_WIMAX_OFDMA_HCS
@ IMB_AUTH_CRC8_WIMAX_OFDMA_HCS
Definition: intel-ipsec-mb.h:430
IMB_AUTH_AES_GMAC_256
@ IMB_AUTH_AES_GMAC_256
Definition: intel-ipsec-mb.h:413
IMB_AUTH_HMAC_SHA_384
@ IMB_AUTH_HMAC_SHA_384
Definition: intel-ipsec-mb.h:391
IMB_AUTH_AES_CMAC
@ IMB_AUTH_AES_CMAC
Definition: intel-ipsec-mb.h:399
IMB_AUTH_SHA_384
@ IMB_AUTH_SHA_384
Definition: intel-ipsec-mb.h:403
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.
submit_job_avx2
IMB_DLL_EXPORT IMB_JOB * submit_job_avx2(IMB_MGR *state)
Submit job for processing after validating.
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:873
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:909
kasumi_init_f9_key_sched_t
int(* kasumi_init_f9_key_sched_t)(const void *, kasumi_key_sched_t *)
Definition: intel-ipsec-mb.h:914
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:826
aes_gcm_dec_128_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_128_avx_gen2(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_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.
sha384_avx512
IMB_DLL_EXPORT void sha384_avx512(const void *data, const uint64_t length, void *digest)
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.
sha1_avx
IMB_DLL_EXPORT void sha1_avx(const void *data, const uint64_t length, void *digest)
submit_job_avx
IMB_DLL_EXPORT IMB_JOB * submit_job_avx(IMB_MGR *state)
Submit job for processing after validating.
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:864
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:86
queue_size_t
uint32_t(* queue_size_t)(struct IMB_MGR *)
Definition: intel-ipsec-mb.h:784
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.
sha1_one_block_sse
IMB_DLL_EXPORT void sha1_one_block_sse(const void *data, void *digest)
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_gcm_dec_256_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_256_avx_gen2(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_keyexp_128_avx512
IMB_DLL_EXPORT void aes_keyexp_128_avx512(const void *key, void *enc_exp_keys, void *dec_exp_keys)
get_completed_job_avx
IMB_DLL_EXPORT IMB_JOB * get_completed_job_avx(IMB_MGR *state)
Get next completed job.
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:178
IMB_ERR_NULL_JOB
@ IMB_ERR_NULL_JOB
Definition: intel-ipsec-mb.h:226
IMB_ERR_JOB_NULL_SGL_CTX
@ IMB_ERR_JOB_NULL_SGL_CTX
Definition: intel-ipsec-mb.h:198
IMB_ERR_AAD_LEN
@ IMB_ERR_AAD_LEN
Definition: intel-ipsec-mb.h:213
IMB_ERR_NULL_CTX
@ IMB_ERR_NULL_CTX
Definition: intel-ipsec-mb.h:216
IMB_ERR_JOB_NULL_IV
@ IMB_ERR_JOB_NULL_IV
Definition: intel-ipsec-mb.h:184
IMB_ERR_JOB_NULL_HMAC_IPAD
@ IMB_ERR_JOB_NULL_HMAC_IPAD
Definition: intel-ipsec-mb.h:219
IMB_ERR_NULL_DST
@ IMB_ERR_NULL_DST
Definition: intel-ipsec-mb.h:202
IMB_ERR_JOB_AUTH_TAG_LEN
@ IMB_ERR_JOB_AUTH_TAG_LEN
Definition: intel-ipsec-mb.h:191
IMB_ERR_NULL_AUTH
@ IMB_ERR_NULL_AUTH
Definition: intel-ipsec-mb.h:206
IMB_ERR_JOB_SRC_OFFSET
@ IMB_ERR_JOB_SRC_OFFSET
Definition: intel-ipsec-mb.h:193
IMB_ERR_SRC_OFFSET
@ IMB_ERR_SRC_OFFSET
Definition: intel-ipsec-mb.h:214
IMB_ERR_JOB_NULL_KEY
@ IMB_ERR_JOB_NULL_KEY
Definition: intel-ipsec-mb.h:183
IMB_ERR_NULL_SRC
@ IMB_ERR_NULL_SRC
Definition: intel-ipsec-mb.h:201
IMB_ERR_JOB_AAD_LEN
@ IMB_ERR_JOB_AAD_LEN
Definition: intel-ipsec-mb.h:192
IMB_ERR_JOB_IV_LEN
@ IMB_ERR_JOB_IV_LEN
Definition: intel-ipsec-mb.h:189
IMB_ERR_NULL_EXP_KEY
@ IMB_ERR_NULL_EXP_KEY
Definition: intel-ipsec-mb.h:204
IMB_ERR_JOB_NULL_AAD
@ IMB_ERR_JOB_NULL_AAD
Definition: intel-ipsec-mb.h:186
IMB_ERR_MIN
@ IMB_ERR_MIN
Definition: intel-ipsec-mb.h:179
IMB_ERR_NO_AESNI_EMU
@ IMB_ERR_NO_AESNI_EMU
Definition: intel-ipsec-mb.h:217
IMB_ERR_JOB_NULL_SRC
@ IMB_ERR_JOB_NULL_SRC
Definition: intel-ipsec-mb.h:181
IMB_ERR_JOB_NULL_AUTH
@ IMB_ERR_JOB_NULL_AUTH
Definition: intel-ipsec-mb.h:185
IMB_ERR_JOB_NULL_DST
@ IMB_ERR_JOB_NULL_DST
Definition: intel-ipsec-mb.h:182
IMB_ERR_CIPH_MODE
@ IMB_ERR_CIPH_MODE
Definition: intel-ipsec-mb.h:195
IMB_ERR_NULL_KEY
@ IMB_ERR_NULL_KEY
Definition: intel-ipsec-mb.h:203
IMB_ERR_JOB_NULL_XCBC_K1_EXP
@ IMB_ERR_JOB_NULL_XCBC_K1_EXP
Definition: intel-ipsec-mb.h:220
IMB_ERR_JOB_AUTH_LEN
@ IMB_ERR_JOB_AUTH_LEN
Definition: intel-ipsec-mb.h:188
IMB_ERR_AUTH_TAG_LEN
@ IMB_ERR_AUTH_TAG_LEN
Definition: intel-ipsec-mb.h:212
IMB_ERR_JOB_NULL_GHASH_INIT_TAG
@ IMB_ERR_JOB_NULL_GHASH_INIT_TAG
Definition: intel-ipsec-mb.h:224
IMB_ERR_HASH_ALGO
@ IMB_ERR_HASH_ALGO
Definition: intel-ipsec-mb.h:196
IMB_ERR_KEY_LEN
@ IMB_ERR_KEY_LEN
Definition: intel-ipsec-mb.h:211
IMB_ERR_JOB_NULL_AUTH_KEY
@ IMB_ERR_JOB_NULL_AUTH_KEY
Definition: intel-ipsec-mb.h:197
IMB_ERR_JOB_NULL_NEXT_IV
@ IMB_ERR_JOB_NULL_NEXT_IV
Definition: intel-ipsec-mb.h:199
IMB_ERR_NULL_MBMGR
@ IMB_ERR_NULL_MBMGR
Definition: intel-ipsec-mb.h:180
IMB_ERR_NULL_AUTH_KEY
@ IMB_ERR_NULL_AUTH_KEY
Definition: intel-ipsec-mb.h:215
IMB_ERR_IV_LEN
@ IMB_ERR_IV_LEN
Definition: intel-ipsec-mb.h:210
IMB_ERR_CIPH_LEN
@ IMB_ERR_CIPH_LEN
Definition: intel-ipsec-mb.h:208
IMB_ERR_MISSING_CPUFLAGS_INIT_MGR
@ IMB_ERR_MISSING_CPUFLAGS_INIT_MGR
Definition: intel-ipsec-mb.h:225
IMB_ERR_MAX
@ IMB_ERR_MAX
Definition: intel-ipsec-mb.h:228
IMB_ERR_JOB_CHAIN_ORDER
@ IMB_ERR_JOB_CHAIN_ORDER
Definition: intel-ipsec-mb.h:194
IMB_ERR_JOB_NULL_HMAC_OPAD
@ IMB_ERR_JOB_NULL_HMAC_OPAD
Definition: intel-ipsec-mb.h:218
IMB_ERR_JOB_CIPH_DIR
@ IMB_ERR_JOB_CIPH_DIR
Definition: intel-ipsec-mb.h:223
IMB_ERR_JOB_PON_PLI
@ IMB_ERR_JOB_PON_PLI
Definition: intel-ipsec-mb.h:200
IMB_ERR_JOB_NULL_XCBC_K2
@ IMB_ERR_JOB_NULL_XCBC_K2
Definition: intel-ipsec-mb.h:221
IMB_ERR_NULL_AAD
@ IMB_ERR_NULL_AAD
Definition: intel-ipsec-mb.h:207
IMB_ERR_JOB_KEY_LEN
@ IMB_ERR_JOB_KEY_LEN
Definition: intel-ipsec-mb.h:190
IMB_ERR_JOB_CIPH_LEN
@ IMB_ERR_JOB_CIPH_LEN
Definition: intel-ipsec-mb.h:187
IMB_ERR_JOB_NULL_XCBC_K3
@ IMB_ERR_JOB_NULL_XCBC_K3
Definition: intel-ipsec-mb.h:222
IMB_ERR_NULL_IV
@ IMB_ERR_NULL_IV
Definition: intel-ipsec-mb.h:205
IMB_ERR_AUTH_LEN
@ IMB_ERR_AUTH_LEN
Definition: intel-ipsec-mb.h:209
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:988
sha384_one_block_sse
IMB_DLL_EXPORT void sha384_one_block_sse(const void *data, void *digest)
sha512_one_block_sse
IMB_DLL_EXPORT void sha512_one_block_sse(const void *data, void *digest)
aes_gcm_dec_192_update_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_192_update_avx_gen2(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.
hec_64_t
uint64_t(* hec_64_t)(const uint8_t *)
Definition: intel-ipsec-mb.h:989
aes_gcm_pre_256_avx_gen2
IMB_DLL_EXPORT void aes_gcm_pre_256_avx_gen2(const void *key, struct gcm_key_data *key_data)
Pre-processes AES-GCM-256 key data.
cmac_subkey_gen_t
void(* cmac_subkey_gen_t)(const void *, void *, void *)
Definition: intel-ipsec-mb.h:798
aes_gcm_dec_192_finalize_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_192_finalize_avx_gen2(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_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:799
aes_gcm_precomp_192_avx_gen2
IMB_DLL_EXPORT void aes_gcm_precomp_192_avx_gen2(struct gcm_key_data *key_data)
Precomputation of AES-GCM-192 HashKey constants.
IMB_MAX_JOBS
#define IMB_MAX_JOBS
Definition: intel-ipsec-mb.h:1041
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:829
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:835
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:801
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.
aes_cfb_128_one_avx512
IMB_DLL_EXPORT void aes_cfb_128_one_avx512(void *out, const void *in, const void *iv, const void *keys, uint64_t len)
AES-CFB-128 Encrypt/Decrypt up to one block.
flush_job_avx
IMB_DLL_EXPORT IMB_JOB * flush_job_avx(IMB_MGR *state)
Force processing until next job in queue is completed.
IMB_CIPHER_DIRECTION
IMB_CIPHER_DIRECTION
Definition: intel-ipsec-mb.h:382
IMB_DIR_DECRYPT
@ IMB_DIR_DECRYPT
Definition: intel-ipsec-mb.h:384
IMB_DIR_ENCRYPT
@ IMB_DIR_ENCRYPT
Definition: intel-ipsec-mb.h:383
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.
sha1_avx2
IMB_DLL_EXPORT void sha1_avx2(const void *data, const uint64_t length, void *digest)
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:905
aes_gcm_dec_128_finalize_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_128_finalize_avx_gen2(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_192_avx_gen2
IMB_DLL_EXPORT void aes_gcm_init_192_avx_gen2(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.
sha256_one_block_avx512
IMB_DLL_EXPORT void sha256_one_block_avx512(const void *data, void *digest)
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:787
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:810
flush_job_avx512
IMB_DLL_EXPORT IMB_JOB * flush_job_avx512(IMB_MGR *state)
Force processing until next job in queue is completed.
submit_job_nocheck_avx
IMB_DLL_EXPORT IMB_JOB * submit_job_nocheck_avx(IMB_MGR *state)
Submit job for processing without validating.
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:782
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:893
IMB_ARCH
IMB_ARCH
Definition: intel-ipsec-mb.h:119
IMB_ARCH_AVX512
@ IMB_ARCH_AVX512
Definition: intel-ipsec-mb.h:125
IMB_ARCH_NONE
@ IMB_ARCH_NONE
Definition: intel-ipsec-mb.h:120
IMB_ARCH_SSE
@ IMB_ARCH_SSE
Definition: intel-ipsec-mb.h:122
IMB_ARCH_NOAESNI
@ IMB_ARCH_NOAESNI
Definition: intel-ipsec-mb.h:121
IMB_ARCH_AVX2
@ IMB_ARCH_AVX2
Definition: intel-ipsec-mb.h:124
IMB_ARCH_AVX
@ IMB_ARCH_AVX
Definition: intel-ipsec-mb.h:123
IMB_ARCH_NUM
@ IMB_ARCH_NUM
Definition: intel-ipsec-mb.h:126
aes_gcm_dec_192_avx_gen2
IMB_DLL_EXPORT void aes_gcm_dec_192_avx_gen2(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.
sha224_avx2
IMB_DLL_EXPORT void sha224_avx2(const void *data, const uint64_t length, void *digest)
sha384_sse
IMB_DLL_EXPORT void sha384_sse(const void *data, const uint64_t length, void *digest)
kasumi_key_sched_size_t
size_t(* kasumi_key_sched_size_t)(void)
Definition: intel-ipsec-mb.h:916
snow3g_key_sched_size_t
size_t(* snow3g_key_sched_size_t)(void)
Definition: intel-ipsec-mb.h:986
get_completed_job_avx2
IMB_DLL_EXPORT IMB_JOB * get_completed_job_avx2(IMB_MGR *state)
Get next completed job.
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.
sha1_avx512
IMB_DLL_EXPORT void sha1_avx512(const void *data, const uint64_t length, void *digest)
sha512_one_block_avx2
IMB_DLL_EXPORT void sha512_one_block_avx2(const void *data, void *digest)
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:867
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_precomp_128_avx_gen2
IMB_DLL_EXPORT void aes_gcm_precomp_128_avx_gen2(struct gcm_key_data *key_data)
Precomputation of AES-GCM-128 HashKey constants.
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:816
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:983
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:940
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.
aes_gcm_enc_128_update_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_128_update_avx_gen2(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.
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
sha256_one_block_sse
IMB_DLL_EXPORT void sha256_one_block_sse(const void *data, void *digest)
sha384_one_block_avx2
IMB_DLL_EXPORT void sha384_one_block_avx2(const void *data, void *digest)
flush_job_t
IMB_JOB *(* flush_job_t)(struct IMB_MGR *)
Definition: intel-ipsec-mb.h:783
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:979
aes_cfb_t
void(* aes_cfb_t)(void *, const void *, const void *, const void *, uint64_t)
Definition: intel-ipsec-mb.h:803
sha256_avx2
IMB_DLL_EXPORT void sha256_avx2(const void *data, const uint64_t length, void *digest)
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.
imb_get_version
IMB_DLL_EXPORT unsigned imb_get_version(void)
Get library version in numerical format.
init_mb_mgr_avx
IMB_DLL_EXPORT void init_mb_mgr_avx(IMB_MGR *state)
Initialize Multi-Buffer Manager structure.
sha384_one_block_avx
IMB_DLL_EXPORT void sha384_one_block_avx(const void *data, void *digest)
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:779
sha224_avx
IMB_DLL_EXPORT void sha224_avx(const void *data, const uint64_t length, void *digest)
sha1_one_block_avx2
IMB_DLL_EXPORT void sha1_one_block_avx2(const void *data, void *digest)
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:880
aes_keyexp_256_avx2
IMB_DLL_EXPORT void aes_keyexp_256_avx2(const void *key, void *enc_exp_keys, void *dec_exp_keys)
aes_gcm_enc_128_avx_gen2
IMB_DLL_EXPORT void aes_gcm_enc_128_avx_gen2(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.
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:838
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:823
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:800
sha512_avx2
IMB_DLL_EXPORT void sha512_avx2(const void *data, const uint64_t length, void *digest)
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:164
IMB_STATUS_ERROR
@ IMB_STATUS_ERROR
Definition: intel-ipsec-mb.h:172
IMB_STATUS_COMPLETED
@ IMB_STATUS_COMPLETED
Definition: intel-ipsec-mb.h:168
IMB_STATUS_INTERNAL_ERROR
@ IMB_STATUS_INTERNAL_ERROR
Definition: intel-ipsec-mb.h:171
IMB_STATUS_COMPLETED_CIPHER
@ IMB_STATUS_COMPLETED_CIPHER
Definition: intel-ipsec-mb.h:166
IMB_STATUS_COMPLETED_AUTH
@ IMB_STATUS_COMPLETED_AUTH
Definition: intel-ipsec-mb.h:167
IMB_STATUS_BEING_PROCESSED
@ IMB_STATUS_BEING_PROCESSED
Definition: intel-ipsec-mb.h:165
IMB_STATUS_INVALID_ARGS
@ IMB_STATUS_INVALID_ARGS
Definition: intel-ipsec-mb.h:170
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:483
IMB_JOB::cipher_fields
union IMB_JOB::@11 cipher_fields
IMB_JOB::ctx
struct gcm_context_data * ctx
Definition: intel-ipsec-mb.h:561
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:619
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:498
IMB_JOB::_init_tag
const void * _init_tag
Definition: intel-ipsec-mb.h:593
IMB_JOB::sgl_io_segs
const struct IMB_SGL_IOV * sgl_io_segs
Definition: intel-ipsec-mb.h:491
IMB_JOB::iv_len_in_bytes
uint64_t iv_len_in_bytes
Definition: intel-ipsec-mb.h:523
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:569
IMB_JOB::_hashed_auth_key_xor_ipad
const uint8_t * _hashed_auth_key_xor_ipad
Definition: intel-ipsec-mb.h:531
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:583
IMB_JOB::sgl_state
IMB_SGL_STATE sgl_state
Definition: intel-ipsec-mb.h:632
IMB_JOB::msg_len_to_hash_in_bytes
uint64_t msg_len_to_hash_in_bytes
Definition: intel-ipsec-mb.h:517
IMB_JOB::chain_order
IMB_CHAIN_ORDER chain_order
Definition: intel-ipsec-mb.h:621
IMB_JOB::msg_len_to_cipher_in_bits
uint64_t msg_len_to_cipher_in_bits
Definition: intel-ipsec-mb.h:512
IMB_JOB::_iv
const void * _iv
Definition: intel-ipsec-mb.h:575
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:604
IMB_JOB::aad
const void * aad
Definition: intel-ipsec-mb.h:547
IMB_JOB::user_data2
void * user_data2
Definition: intel-ipsec-mb.h:625
IMB_JOB::next_iv
void * next_iv
Definition: intel-ipsec-mb.h:638
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:506
IMB_JOB::hash_func
int(* hash_func)(struct IMB_JOB *)
Definition: intel-ipsec-mb.h:629
IMB_JOB::cipher_func
int(* cipher_func)(struct IMB_JOB *)
Definition: intel-ipsec-mb.h:627
IMB_JOB::_hashed_auth_key_xor_opad
const uint8_t * _hashed_auth_key_xor_opad
Definition: intel-ipsec-mb.h:534
IMB_JOB::auth_tag_output_len_in_bytes
uint64_t auth_tag_output_len_in_bytes
Definition: intel-ipsec-mb.h:525
IMB_JOB::_k1_expanded
const uint32_t * _k1_expanded
Definition: intel-ipsec-mb.h:539
IMB_JOB::cipher_mode
IMB_CIPHER_MODE cipher_mode
Definition: intel-ipsec-mb.h:618
IMB_JOB::_key
const void * _key
Definition: intel-ipsec-mb.h:573
IMB_JOB::_key
const uint8_t * _key
Definition: intel-ipsec-mb.h:565
IMB_JOB::CBCS
struct IMB_JOB::@11::_CBCS_specific_fields CBCS
IMB_JOB::_skey2
const void * _skey2
Definition: intel-ipsec-mb.h:555
IMB_JOB::_key_expanded
const void * _key_expanded
Definition: intel-ipsec-mb.h:552
IMB_JOB::iv
const uint8_t * iv
Definition: intel-ipsec-mb.h:522
IMB_JOB::msg_len_to_cipher_in_bytes
uint64_t msg_len_to_cipher_in_bytes
Definition: intel-ipsec-mb.h:510
IMB_JOB::reserved
void * reserved
Definition: intel-ipsec-mb.h:612
IMB_JOB::hash_alg
IMB_HASH_ALG hash_alg
Definition: intel-ipsec-mb.h:620
IMB_JOB::aad_len_in_bytes
uint64_t aad_len_in_bytes
Definition: intel-ipsec-mb.h:549
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::_skey1
const void * _skey1
Definition: intel-ipsec-mb.h:554
IMB_JOB::user_data
void * user_data
Definition: intel-ipsec-mb.h:624
IMB_JOB::key_len_in_bytes
uint64_t key_len_in_bytes
Definition: intel-ipsec-mb.h:486
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:495
IMB_JOB::auth_tag_output
uint8_t * auth_tag_output
Definition: intel-ipsec-mb.h:524
IMB_JOB::enc_keys
const void * enc_keys
Definition: intel-ipsec-mb.h:484
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:617
IMB_JOB::_k2
const uint8_t * _k2
Definition: intel-ipsec-mb.h:541
IMB_JOB::cipher_start_src_offset_in_bytes
uint64_t cipher_start_src_offset_in_bytes
Definition: intel-ipsec-mb.h:502
IMB_JOB::msg_len_to_hash_in_bits
uint64_t msg_len_to_hash_in_bits
Definition: intel-ipsec-mb.h:519
IMB_JOB::_iv
const uint8_t * _iv
Definition: intel-ipsec-mb.h:567
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:504
IMB_JOB::dec_keys
const void * dec_keys
Definition: intel-ipsec-mb.h:485
IMB_JOB::hash_start_src_offset_in_bytes
uint64_t hash_start_src_offset_in_bytes
Definition: intel-ipsec-mb.h:515
IMB_JOB::src
const uint8_t * src
Definition: intel-ipsec-mb.h:488
IMB_JOB::_k3
const uint8_t * _k3
Definition: intel-ipsec-mb.h:543
IMB_MGR
Definition: intel-ipsec-mb.h:1043
IMB_MGR::gmac192_finalize
aes_gmac_finalize_t gmac192_finalize
Definition: intel-ipsec-mb.h:1154
IMB_MGR::gcm192_init
aes_gcm_init_t gcm192_init
Definition: intel-ipsec-mb.h:1091
IMB_MGR::gmac128_finalize
aes_gmac_finalize_t gmac128_finalize
Definition: intel-ipsec-mb.h:1153
IMB_MGR::aes256_ccm_ooo
void * aes256_ccm_ooo
Definition: intel-ipsec-mb.h:1219
IMB_MGR::crc24_lte_a
crc32_fn_t crc24_lte_a
Definition: intel-ipsec-mb.h:1163
IMB_MGR::gmac256_update
aes_gmac_update_t gmac256_update
Definition: intel-ipsec-mb.h:1152
IMB_MGR::hec_32
hec_32_t hec_32
Definition: intel-ipsec-mb.h:1156
IMB_MGR::imb_errno
int imb_errno
Definition: intel-ipsec-mb.h:1051
IMB_MGR::aes_cmac_ooo
void * aes_cmac_ooo
Definition: intel-ipsec-mb.h:1213
IMB_MGR::next_job
int next_job
Definition: intel-ipsec-mb.h:1187
IMB_MGR::gmac128_init
aes_gmac_init_t gmac128_init
Definition: intel-ipsec-mb.h:1147
IMB_MGR::reserved
uint64_t reserved[5]
Definition: intel-ipsec-mb.h:1048
IMB_MGR::gcm192_pre
aes_gcm_pre_t gcm192_pre
Definition: intel-ipsec-mb.h:1109
IMB_MGR::snow3g_f8_4_buffer
snow3g_f8_4_buffer_t snow3g_f8_4_buffer
Definition: intel-ipsec-mb.h:1132
IMB_MGR::gcm256_precomp
aes_gcm_precomp_t gcm256_precomp
Definition: intel-ipsec-mb.h:1107
IMB_MGR::gcm128_pre
aes_gcm_pre_t gcm128_pre
Definition: intel-ipsec-mb.h:1108
IMB_MGR::submit_hash_burst
submit_hash_burst_t submit_hash_burst
Definition: intel-ipsec-mb.h:1182
IMB_MGR::flush_job
flush_job_t flush_job
Definition: intel-ipsec-mb.h:1063
IMB_MGR::snow3g_f8_2_buffer
snow3g_f8_2_buffer_t snow3g_f8_2_buffer
Definition: intel-ipsec-mb.h:1131
IMB_MGR::zuc_eea3_ooo
void * zuc_eea3_ooo
Definition: intel-ipsec-mb.h:1214
IMB_MGR::gcm128_dec_update
aes_gcm_enc_dec_update_t gcm128_dec_update
Definition: intel-ipsec-mb.h:1096
IMB_MGR::des3_dec_ooo
void * des3_dec_ooo
Definition: intel-ipsec-mb.h:1201
IMB_MGR::keyexp_192
keyexp_t keyexp_192
Definition: intel-ipsec-mb.h:1066
IMB_MGR::gcm128_dec
aes_gcm_enc_dec_t gcm128_dec
Definition: intel-ipsec-mb.h:1087
IMB_MGR::get_next_job
get_next_job_t get_next_job
Definition: intel-ipsec-mb.h:1059
IMB_MGR::sha_256_ooo
void * sha_256_ooo
Definition: intel-ipsec-mb.h:1225
IMB_MGR::snow3g_init_key_sched
snow3g_init_key_sched_t snow3g_init_key_sched
Definition: intel-ipsec-mb.h:1138
IMB_MGR::gcm192_enc_update
aes_gcm_enc_dec_update_t gcm192_enc_update
Definition: intel-ipsec-mb.h:1094
IMB_MGR::gmac256_finalize
aes_gmac_finalize_t gmac256_finalize
Definition: intel-ipsec-mb.h:1155
IMB_MGR::docsis_des_dec_ooo
void * docsis_des_dec_ooo
Definition: intel-ipsec-mb.h:1203
IMB_MGR::gmac192_init
aes_gmac_init_t gmac192_init
Definition: intel-ipsec-mb.h:1148
IMB_MGR::eia3_1_buffer
zuc_eia3_1_buffer_t eia3_1_buffer
Definition: intel-ipsec-mb.h:1115
IMB_MGR::aes_ccm_ooo
void * aes_ccm_ooo
Definition: intel-ipsec-mb.h:1212
IMB_MGR::hec_64
hec_64_t hec_64
Definition: intel-ipsec-mb.h:1157
IMB_MGR::keyexp_256
keyexp_t keyexp_256
Definition: intel-ipsec-mb.h:1067
IMB_MGR::gcm256_pre
aes_gcm_pre_t gcm256_pre
Definition: intel-ipsec-mb.h:1110
IMB_MGR::used_arch
uint32_t used_arch
Definition: intel-ipsec-mb.h:1049
IMB_MGR::hmac_sha_1_ooo
void * hmac_sha_1_ooo
Definition: intel-ipsec-mb.h:1205
IMB_MGR::crc32_sctp
crc32_fn_t crc32_sctp
Definition: intel-ipsec-mb.h:1162
IMB_MGR::crc11_fp_header
crc32_fn_t crc11_fp_header
Definition: intel-ipsec-mb.h:1166
IMB_MGR::gcm192_dec_finalize
aes_gcm_enc_dec_finalize_t gcm192_dec_finalize
Definition: intel-ipsec-mb.h:1103
IMB_MGR::f9_1_buffer_user
kasumi_f9_1_buffer_user_t f9_1_buffer_user
Definition: intel-ipsec-mb.h:1124
IMB_MGR::sha_384_ooo
void * sha_384_ooo
Definition: intel-ipsec-mb.h:1226
IMB_MGR::gmac192_update
aes_gmac_update_t gmac192_update
Definition: intel-ipsec-mb.h:1151
IMB_MGR::crc16_x25
crc32_fn_t crc16_x25
Definition: intel-ipsec-mb.h:1161
IMB_MGR::sha224
hash_fn_t sha224
Definition: intel-ipsec-mb.h:1078
IMB_MGR::md5_one_block
hash_one_block_t md5_one_block
Definition: intel-ipsec-mb.h:1076
IMB_MGR::des_enc_ooo
void * des_enc_ooo
Definition: intel-ipsec-mb.h:1198
IMB_MGR::kasumi_init_f9_key_sched
kasumi_init_f9_key_sched_t kasumi_init_f9_key_sched
Definition: intel-ipsec-mb.h:1126
IMB_MGR::queue_size
queue_size_t queue_size
Definition: intel-ipsec-mb.h:1064
IMB_MGR::gcm256_dec_finalize
aes_gcm_enc_dec_finalize_t gcm256_dec_finalize
Definition: intel-ipsec-mb.h:1104
IMB_MGR::snow3g_key_sched_size
snow3g_key_sched_size_t snow3g_key_sched_size
Definition: intel-ipsec-mb.h:1139
IMB_MGR::crc8_wimax_ofdma_hcs
crc32_fn_t crc8_wimax_ofdma_hcs
Definition: intel-ipsec-mb.h:1171
IMB_MGR::zuc256_eia3_ooo
void * zuc256_eia3_ooo
Definition: intel-ipsec-mb.h:1218
IMB_MGR::snow3g_f8_8_buffer
snow3g_f8_8_buffer_t snow3g_f8_8_buffer
Definition: intel-ipsec-mb.h:1133
IMB_MGR::sha512
hash_fn_t sha512
Definition: intel-ipsec-mb.h:1081
IMB_MGR::hmac_sha_256_ooo
void * hmac_sha_256_ooo
Definition: intel-ipsec-mb.h:1207
IMB_MGR::snow3g_f8_n_buffer_multikey
snow3g_f8_n_buffer_multikey_t snow3g_f8_n_buffer_multikey
Definition: intel-ipsec-mb.h:1136
IMB_MGR::gcm192_dec_update
aes_gcm_enc_dec_update_t gcm192_dec_update
Definition: intel-ipsec-mb.h:1097
IMB_MGR::chacha20_poly1305_init
chacha_poly_init_t chacha20_poly1305_init
Definition: intel-ipsec-mb.h:1173
IMB_MGR::eea3_n_buffer
zuc_eea3_n_buffer_t eea3_n_buffer
Definition: intel-ipsec-mb.h:1114
IMB_MGR::gcm128_precomp
aes_gcm_precomp_t gcm128_precomp
Definition: intel-ipsec-mb.h:1105
IMB_MGR::submit_burst
submit_burst_t submit_burst
Definition: intel-ipsec-mb.h:1178
IMB_MGR::aes256_ooo
void * aes256_ooo
Definition: intel-ipsec-mb.h:1193
IMB_MGR::zuc256_eea3_ooo
void * zuc256_eea3_ooo
Definition: intel-ipsec-mb.h:1217
IMB_MGR::end_ooo
void * end_ooo
Definition: intel-ipsec-mb.h:1228
IMB_MGR::sha_512_ooo
void * sha_512_ooo
Definition: intel-ipsec-mb.h:1227
IMB_MGR::chacha20_poly1305_dec_update
chacha_poly_enc_dec_update_t chacha20_poly1305_dec_update
Definition: intel-ipsec-mb.h:1175
IMB_MGR::gcm256_enc
aes_gcm_enc_dec_t gcm256_enc
Definition: intel-ipsec-mb.h:1086
IMB_MGR::gcm192_init_var_iv
aes_gcm_init_var_iv_t gcm192_init_var_iv
Definition: intel-ipsec-mb.h:1144
IMB_MGR::keyexp_128
keyexp_t keyexp_128
Definition: intel-ipsec-mb.h:1065
IMB_MGR::crc10_iuup_data
crc32_fn_t crc10_iuup_data
Definition: intel-ipsec-mb.h:1168
IMB_MGR::submit_hash_burst_nocheck
submit_hash_burst_t submit_hash_burst_nocheck
Definition: intel-ipsec-mb.h:1183
IMB_MGR::sha1_one_block
hash_one_block_t sha1_one_block
Definition: intel-ipsec-mb.h:1071
IMB_MGR::snow3g_f8_n_buffer
snow3g_f8_n_buffer_t snow3g_f8_n_buffer
Definition: intel-ipsec-mb.h:1134
IMB_MGR::sha1
hash_fn_t sha1
Definition: intel-ipsec-mb.h:1077
IMB_MGR::crc32_ethernet_fcs
crc32_fn_t crc32_ethernet_fcs
Definition: intel-ipsec-mb.h:1160
IMB_MGR::hmac_md5_ooo
void * hmac_md5_ooo
Definition: intel-ipsec-mb.h:1210
IMB_MGR::des3_enc_ooo
void * des3_enc_ooo
Definition: intel-ipsec-mb.h:1200
IMB_MGR::sha512_one_block
hash_one_block_t sha512_one_block
Definition: intel-ipsec-mb.h:1075
IMB_MGR::gcm256_init
aes_gcm_init_t gcm256_init
Definition: intel-ipsec-mb.h:1092
IMB_MGR::snow3g_f8_8_buffer_multikey
snow3g_f8_8_buffer_multikey_t snow3g_f8_8_buffer_multikey
Definition: intel-ipsec-mb.h:1135
IMB_MGR::submit_cipher_burst
submit_cipher_burst_t submit_cipher_burst
Definition: intel-ipsec-mb.h:1180
IMB_MGR::sha256
hash_fn_t sha256
Definition: intel-ipsec-mb.h:1079
IMB_MGR::gcm128_enc_finalize
aes_gcm_enc_dec_finalize_t gcm128_enc_finalize
Definition: intel-ipsec-mb.h:1099
IMB_MGR::gmac128_update
aes_gmac_update_t gmac128_update
Definition: intel-ipsec-mb.h:1150
IMB_MGR::zuc_eia3_ooo
void * zuc_eia3_ooo
Definition: intel-ipsec-mb.h:1215
IMB_MGR::gcm192_enc_finalize
aes_gcm_enc_dec_finalize_t gcm192_enc_finalize
Definition: intel-ipsec-mb.h:1100
IMB_MGR::f8_3_buffer
kasumi_f8_3_buffer_t f8_3_buffer
Definition: intel-ipsec-mb.h:1120
IMB_MGR::sha384_one_block
hash_one_block_t sha384_one_block
Definition: intel-ipsec-mb.h:1074
IMB_MGR::docsis_des_enc_ooo
void * docsis_des_enc_ooo
Definition: intel-ipsec-mb.h:1202
IMB_MGR::docsis128_sec_ooo
void * docsis128_sec_ooo
Definition: intel-ipsec-mb.h:1194
IMB_MGR::gcm256_enc_finalize
aes_gcm_enc_dec_finalize_t gcm256_enc_finalize
Definition: intel-ipsec-mb.h:1101
IMB_MGR::aes128_ooo
void * aes128_ooo
Definition: intel-ipsec-mb.h:1191
IMB_MGR::get_completed_job
get_completed_job_t get_completed_job
Definition: intel-ipsec-mb.h:1062
IMB_MGR::gcm256_dec_update
aes_gcm_enc_dec_update_t gcm256_dec_update
Definition: intel-ipsec-mb.h:1098
IMB_MGR::snow3g_f9_1_buffer
snow3g_f9_1_buffer_t snow3g_f9_1_buffer
Definition: intel-ipsec-mb.h:1137
IMB_MGR::aes128_cbcs_ooo
void * aes128_cbcs_ooo
Definition: intel-ipsec-mb.h:1216
IMB_MGR::gcm128_enc
aes_gcm_enc_dec_t gcm128_enc
Definition: intel-ipsec-mb.h:1084
IMB_MGR::sha384
hash_fn_t sha384
Definition: intel-ipsec-mb.h:1080
IMB_MGR::sha_224_ooo
void * sha_224_ooo
Definition: intel-ipsec-mb.h:1224
IMB_MGR::cmac_subkey_gen_128
cmac_subkey_gen_t cmac_subkey_gen_128
Definition: intel-ipsec-mb.h:1068
IMB_MGR::crc6_iuup_header
crc32_fn_t crc6_iuup_header
Definition: intel-ipsec-mb.h:1169
IMB_MGR::snow3g_uia2_ooo
void * snow3g_uia2_ooo
Definition: intel-ipsec-mb.h:1222
IMB_MGR::gcm192_enc
aes_gcm_enc_dec_t gcm192_enc
Definition: intel-ipsec-mb.h:1085
IMB_MGR::submit_job_nocheck
submit_job_t submit_job_nocheck
Definition: intel-ipsec-mb.h:1061
IMB_MGR::f8_1_buffer_bit
kasumi_f8_1_buffer_bit_t f8_1_buffer_bit
Definition: intel-ipsec-mb.h:1118
IMB_MGR::sha224_one_block
hash_one_block_t sha224_one_block
Definition: intel-ipsec-mb.h:1072
IMB_MGR::des_key_sched
des_keysched_t des_key_sched
Definition: intel-ipsec-mb.h:1070
IMB_MGR::snow3g_uea2_ooo
void * snow3g_uea2_ooo
Definition: intel-ipsec-mb.h:1221
IMB_MGR::submit_job
submit_job_t submit_job
Definition: intel-ipsec-mb.h:1060
IMB_MGR::chacha20_poly1305_finalize
chacha_poly_finalize_t chacha20_poly1305_finalize
Definition: intel-ipsec-mb.h:1176
IMB_MGR::chacha20_poly1305_enc_update
chacha_poly_enc_dec_update_t chacha20_poly1305_enc_update
Definition: intel-ipsec-mb.h:1174
IMB_MGR::kasumi_init_f8_key_sched
kasumi_init_f8_key_sched_t kasumi_init_f8_key_sched
Definition: intel-ipsec-mb.h:1125
IMB_MGR::jobs
IMB_JOB jobs[IMB_MAX_JOBS]
Definition: intel-ipsec-mb.h:1188
IMB_MGR::eia3_n_buffer
zuc_eia3_n_buffer_t eia3_n_buffer
Definition: intel-ipsec-mb.h:1142
IMB_MGR::snow3g_f8_1_buffer
snow3g_f8_1_buffer_t snow3g_f8_1_buffer
Definition: intel-ipsec-mb.h:1130
IMB_MGR::hmac_sha_224_ooo
void * hmac_sha_224_ooo
Definition: intel-ipsec-mb.h:1206
IMB_MGR::kasumi_key_sched_size
kasumi_key_sched_size_t kasumi_key_sched_size
Definition: intel-ipsec-mb.h:1127
IMB_MGR::aes128_cfb_one
aes_cfb_t aes128_cfb_one
Definition: intel-ipsec-mb.h:1082
IMB_MGR::cmac_subkey_gen_256
cmac_subkey_gen_t cmac_subkey_gen_256
Definition: intel-ipsec-mb.h:1158
IMB_MGR::crc24_lte_b
crc32_fn_t crc24_lte_b
Definition: intel-ipsec-mb.h:1164
IMB_MGR::gcm192_precomp
aes_gcm_precomp_t gcm192_precomp
Definition: intel-ipsec-mb.h:1106
IMB_MGR::gcm256_enc_update
aes_gcm_enc_dec_update_t gcm256_enc_update
Definition: intel-ipsec-mb.h:1095
IMB_MGR::eea3_4_buffer
zuc_eea3_4_buffer_t eea3_4_buffer
Definition: intel-ipsec-mb.h:1113
IMB_MGR::earliest_job
int earliest_job
Definition: intel-ipsec-mb.h:1186
IMB_MGR::f8_2_buffer
kasumi_f8_2_buffer_t f8_2_buffer
Definition: intel-ipsec-mb.h:1119
IMB_MGR::crc7_fp_header
crc32_fn_t crc7_fp_header
Definition: intel-ipsec-mb.h:1167
IMB_MGR::gmac256_init
aes_gmac_init_t gmac256_init
Definition: intel-ipsec-mb.h:1149
IMB_MGR::submit_cipher_burst_nocheck
submit_cipher_burst_t submit_cipher_burst_nocheck
Definition: intel-ipsec-mb.h:1181
IMB_MGR::docsis256_sec_ooo
void * docsis256_sec_ooo
Definition: intel-ipsec-mb.h:1196
IMB_MGR::aes256_cmac_ooo
void * aes256_cmac_ooo
Definition: intel-ipsec-mb.h:1220
IMB_MGR::sha_1_ooo
void * sha_1_ooo
Definition: intel-ipsec-mb.h:1223
IMB_MGR::docsis128_crc32_sec_ooo
void * docsis128_crc32_sec_ooo
Definition: intel-ipsec-mb.h:1195
IMB_MGR::gcm256_dec
aes_gcm_enc_dec_t gcm256_dec
Definition: intel-ipsec-mb.h:1089
IMB_MGR::crc32_wimax_ofdma_data
crc32_fn_t crc32_wimax_ofdma_data
Definition: intel-ipsec-mb.h:1170
IMB_MGR::submit_burst_nocheck
submit_burst_t submit_burst_nocheck
Definition: intel-ipsec-mb.h:1179
IMB_MGR::gcm128_enc_update
aes_gcm_enc_dec_update_t gcm128_enc_update
Definition: intel-ipsec-mb.h:1093
IMB_MGR::aes_xcbc_ooo
void * aes_xcbc_ooo
Definition: intel-ipsec-mb.h:1211
IMB_MGR::crc16_fp_data
crc32_fn_t crc16_fp_data
Definition: intel-ipsec-mb.h:1165
IMB_MGR::snow3g_f8_1_buffer_bit
snow3g_f8_1_buffer_bit_t snow3g_f8_1_buffer_bit
Definition: intel-ipsec-mb.h:1129
IMB_MGR::gcm128_init
aes_gcm_init_t gcm128_init
Definition: intel-ipsec-mb.h:1090
IMB_MGR::sha256_one_block
hash_one_block_t sha256_one_block
Definition: intel-ipsec-mb.h:1073
IMB_MGR::gcm192_dec
aes_gcm_enc_dec_t gcm192_dec
Definition: intel-ipsec-mb.h:1088
IMB_MGR::f8_n_buffer
kasumi_f8_n_buffer_t f8_n_buffer
Definition: intel-ipsec-mb.h:1122
IMB_MGR::flags
uint64_t flags
Definition: intel-ipsec-mb.h:1045
IMB_MGR::xcbc_keyexp
xcbc_keyexp_t xcbc_keyexp
Definition: intel-ipsec-mb.h:1069
IMB_MGR::gcm128_init_var_iv
aes_gcm_init_var_iv_t gcm128_init_var_iv
Definition: intel-ipsec-mb.h:1143
IMB_MGR::eea3_1_buffer
zuc_eea3_1_buffer_t eea3_1_buffer
Definition: intel-ipsec-mb.h:1112
IMB_MGR::des_dec_ooo
void * des_dec_ooo
Definition: intel-ipsec-mb.h:1199
IMB_MGR::f8_4_buffer
kasumi_f8_4_buffer_t f8_4_buffer
Definition: intel-ipsec-mb.h:1121
IMB_MGR::hmac_sha_512_ooo
void * hmac_sha_512_ooo
Definition: intel-ipsec-mb.h:1209
IMB_MGR::docsis256_crc32_sec_ooo
void * docsis256_crc32_sec_ooo
Definition: intel-ipsec-mb.h:1197
IMB_MGR::ghash_pre
aes_gcm_pre_t ghash_pre
Definition: intel-ipsec-mb.h:1159
IMB_MGR::f8_1_buffer
kasumi_f8_1_buffer_t f8_1_buffer
Definition: intel-ipsec-mb.h:1117
IMB_MGR::features
uint64_t features
Definition: intel-ipsec-mb.h:1046
IMB_MGR::gcm128_dec_finalize
aes_gcm_enc_dec_finalize_t gcm128_dec_finalize
Definition: intel-ipsec-mb.h:1102
IMB_MGR::gcm256_init_var_iv
aes_gcm_init_var_iv_t gcm256_init_var_iv
Definition: intel-ipsec-mb.h:1145
IMB_MGR::f9_1_buffer
kasumi_f9_1_buffer_t f9_1_buffer
Definition: intel-ipsec-mb.h:1123
IMB_MGR::ghash
ghash_t ghash
Definition: intel-ipsec-mb.h:1141
IMB_MGR::hmac_sha_384_ooo
void * hmac_sha_384_ooo
Definition: intel-ipsec-mb.h:1208
IMB_MGR::aes192_ooo
void * aes192_ooo
Definition: intel-ipsec-mb.h:1192
IMB_SGL_IOV
Definition: intel-ipsec-mb.h:458
IMB_SGL_IOV::len
uint64_t len
Definition: intel-ipsec-mb.h:461
IMB_SGL_IOV::out
void * out
Definition: intel-ipsec-mb.h:460
IMB_SGL_IOV::in
const void * in
Definition: intel-ipsec-mb.h:459
chacha20_poly1305_context_data
holds Chacha20-Poly1305 operation context
Definition: intel-ipsec-mb.h:681
chacha20_poly1305_context_data::remain_ct_bytes
uint64_t remain_ct_bytes
Definition: intel-ipsec-mb.h:691
chacha20_poly1305_context_data::aad_len
uint64_t aad_len
Definition: intel-ipsec-mb.h:683
chacha20_poly1305_context_data::remain_ks_bytes
uint64_t remain_ks_bytes
Definition: intel-ipsec-mb.h:689
chacha20_poly1305_context_data::poly_scratch
uint8_t poly_scratch[16]
Definition: intel-ipsec-mb.h:687
chacha20_poly1305_context_data::poly_key
uint8_t poly_key[32]
Definition: intel-ipsec-mb.h:686
chacha20_poly1305_context_data::IV
uint8_t IV[12]
Definition: intel-ipsec-mb.h:694
chacha20_poly1305_context_data::last_block_count
uint64_t last_block_count
Definition: intel-ipsec-mb.h:688
chacha20_poly1305_context_data::hash_len
uint64_t hash_len
Definition: intel-ipsec-mb.h:684
chacha20_poly1305_context_data::hash
uint64_t hash[3]
Definition: intel-ipsec-mb.h:682
chacha20_poly1305_context_data::last_ks
uint8_t last_ks[64]
Definition: intel-ipsec-mb.h:685
gcm_context_data
holds GCM operation context
Definition: intel-ipsec-mb.h:667
gcm_context_data::in_length
uint64_t in_length
Definition: intel-ipsec-mb.h:670
gcm_context_data::current_counter
uint8_t current_counter[IMB_GCM_BLOCK_LEN]
Definition: intel-ipsec-mb.h:673
gcm_context_data::partial_block_enc_key
uint8_t partial_block_enc_key[IMB_GCM_BLOCK_LEN]
Definition: intel-ipsec-mb.h:671
gcm_context_data::orig_IV
uint8_t orig_IV[IMB_GCM_BLOCK_LEN]
Definition: intel-ipsec-mb.h:672
gcm_context_data::partial_block_length
uint64_t partial_block_length
Definition: intel-ipsec-mb.h:674
gcm_context_data::aad_hash
uint8_t aad_hash[IMB_GCM_BLOCK_LEN]
Definition: intel-ipsec-mb.h:668
gcm_context_data::aad_length
uint64_t aad_length
Definition: intel-ipsec-mb.h:669
gcm_key_data
holds intermediate key data needed to improve performance
Definition: intel-ipsec-mb.h:729
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:748
gcm_key_data::shifted_hkey
uint8_t shifted_hkey[IMB_GCM_ENC_KEY_LEN *8]
Definition: intel-ipsec-mb.h:739
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::expanded_keys
uint8_t expanded_keys[IMB_GCM_ENC_KEY_LEN *IMB_GCM_KEY_SETS]
Definition: intel-ipsec-mb.h:730
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:653
kasumi_key_sched_s::msk16
uint16_t msk16[KASUMI_KEY_SCHEDULE_SIZE]
Definition: intel-ipsec-mb.h:656
kasumi_key_sched_s::sk16
uint16_t sk16[KASUMI_KEY_SCHEDULE_SIZE]
Definition: intel-ipsec-mb.h:655
snow3g_key_schedule_s
Definition: intel-ipsec-mb.h:922
snow3g_key_schedule_s::k
uint32_t k[4]
Definition: intel-ipsec-mb.h:924