Intel(R) Multi-Buffer Crypto for IPSec
The library provides software crypto acceleration primarily targeting packet processing applications. It can be used for application such as: IPsec, TLS, Wireless (RAN), Cable or MPEG DRM.
The library is hosted on GitHub and is used as software crypto provider in DPDK, Intel(R) QAT Engine and FD.io.
Using crypto interfaces from the above frameworks gives freedom to change providers without subsequent application modifications. The library can also be used directly through its native API.
Key differentiating features:
Intel Multi-Buffer Crypto for IPsec Library is highly-optimized software implementations of the core cryptographic processing for IPsec, which provides industry-leading performance on a range of Intel(R) Processors.
For information on how the library works, see the Intel White Paper: "Fast Multi-buffer IPsec Implementations on Intel Architecture Processors". Jim Guilford, Sean Gulley, et. al.
The library also provides post-quantum signature support for ML-DSA-44,
ML-DSA-65 and ML-DSA-87 (FIPS 204) through the opaque IMB_ML_DSA handle and
the imb_ml_dsa_* API, and post-quantum key-encapsulation support for
ML-KEM-512, ML-KEM-768 and ML-KEM-1024 (FIPS 203) through the opaque
IMB_ML_KEM handle and the imb_ml_kem_* API.
The ML-DSA and ML-KEM implementations are derived from OpenSSL and are
licensed under the Apache License 2.0 (see LICENSE.OpenSSL).
The library as a whole is BSD 3-Clause licensed except where individual files
state otherwise; see the Licenses section of CONTRIBUTING for
the licensing model (effective SPDX expression: BSD-3-Clause AND Apache-2.0).
Table 1. List of supported cipher algorithms and their implementations.
…IMB_ARCH arch; IMB_MGR *p_mgr = alloc_mb_mgr(0);
init_mb_mgr_auto(p_mgr, &arch); /* or init_mb_mgr_sse/avx/avx2/avx512 */
/*
} } else { printf("SELF-TEST: N/A (requires library >= v1.3)\n");
}
/* check for initialization self-test error / if (imb_get_errno(p_mgr) == IMB_ERR_SELFTEST) { / self-test error */ exit(EXIT_FAILURE); }
Example registration of self-test callback function:int self_test_corrupt = 0;
int callback(void *arg, const IMB_SELF_TEST_CALLBACK_DATA *data) { const char *phase = ""; const char *type = ""; const char *descr = "";
(void) arg;
if (data != NULL) {
if (data->phase != NULL)
phase = data->phase;
if (data->type != NULL)
type = data->type;
if (data->descr != NULL)
descr = data->descr;
}
if (strcmp(phase, IMB_SELF_TEST_PHASE_START) == 0)
printf("%s : %s : ", type, descr);
if ((strcmp(phase, IMB_SELF_TEST_PHASE_CORRUPT) == 0) && (self_test_corrupt == 1))
return 0; /* corrupt input message */
if (strcmp(phase, IMB_SELF_TEST_PHASE_PASS) == 0 ||
strcmp(phase, IMB_SELF_TEST_PHASE_FAIL) == 0)
printf("%s\n", phase);
return 1;
}
...
IMB_ARCH arch; IMB_MGR *p_mgr = alloc_mb_mgr(0);
/*
init_mb_mgr_auto(p_mgr, &arch); /* or init_mb_mgr_sse/avx/avx2/avx512 */
...
## 13.DLL Injection Attack
### Problem
The Windows OS has an insecure predefined search order and set of defaults when trying to locate a resource. If the resource location is not specified by the software, an attacker need only place a malicious version in one of the locations Windows will search, and it will be loaded instead. Although this weakness can occur with any resource, it is especially common with DLL files.
### Solutions
Applications using intel-ipsec-mb DLL library may need to apply one of the solutions to prevent from DLL injection attack.
Two solutions are available:
- Using a Fully Qualified Path is the most secure way to load a DLL
- Signature verification of the DLL
### Resources and Solution Details
- Security remarks section of LoadLibraryEx documentation by Microsoft:
- Microsoft Dynamic Link Library Security article:
- Hijack Execution Flow: DLL Search Order Hijacking:
- Hijack Execution Flow: DLL Side-Loading:No open issues yet, or sync has not completed.