Skip to content

Commit 17421c1

Browse files
bjayanaxYogaraj-Alamenda
authored andcommitted
Bug Fixes, README update and Version bump to v1.8.0
Signed-off-by: Jaya Naga Venkata Sudhakar <[email protected]>
1 parent 8255f80 commit 17421c1

22 files changed

+532
-182
lines changed

configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Process this file with autoconf to produce a configure script.
33

44
AC_PREREQ([2.68])
5-
AC_INIT([qatengine], [1.7.0], [])
5+
AC_INIT([qatengine], [1.8.0], [])
66
AC_CONFIG_SRCDIR([config.h.in])
77
AC_CONFIG_HEADERS([config.h])
88
AC_CONFIG_AUX_DIR([.])
@@ -292,7 +292,7 @@ AC_SUBST(enable_qat_ntls)
292292

293293
AC_ARG_ENABLE(qat_insecure_algorithms,
294294
AS_HELP_STRING([--enable-qat_insecure_algorithms],
295-
[Enable insecure algorithms (DSA, DH, SHA1, SHA3-224, EC <256 & RSA<2048]))
295+
[Enable insecure algorithms (DSA, DH, SHA1, SHA3-224, EC <256 & RSA<2048, AES-128-GCM, AES-128-CCM, AES-192-GCM & AES-128-CBC-HMAC-SHA256]))
296296
AC_SUBST(enable_qat_insecure_algorithms)
297297

298298
AC_ARG_ENABLE(qat_hw_kpt,

cryptography-primitives

docs/limitations.md

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181
not accelerated in OpenSSL 3.0 engine due to the issue [OpenSSL#21622](https://github.com/openssl/openssl/issues/21622)
8282
* Known issue in Co-existence mode with QAT provider on OpenSSL 3.2 and above during QAT_SW offload
8383
when QAT_HW modules are not present.
84+
* Known build issue with the latest commit of BoringSSL; hence, IPP Crypto 2021.10 should be used
85+
for the QAT engine with BoringSSL (use the BoringSSL commit mentioned in the Software requirements section).
8486
### Performance
8587
* There is known performance scaling issue (performance drop with threads >32)
8688
with ECDSA Ciphers in the QAT Software acceleration using multithread mode

docs/qat_common.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The FIPS 140-3 certification is under process.
4040
# Binary RPM Package
4141

4242
QAT_Engine supports Binary Package via RPM which can be found in the Release page (Assests section)
43-
The Current Binary RPM Package is created for the distros RHEL 9.1, Ubuntu 22.04 and SUSE SLES15 SP3 with
43+
The Current Binary RPM Package is created for the distros RHEL 9.2, Ubuntu 22.04 and SUSE SLES15 SP3 with
4444
with default Kernel and other dependent packages from the system default.
4545
The RPM is generated using QAT2.0 OOT driver with QAT_SW Co-existence which means
4646
it will accelerate via QAT_HW for asymmetic PKE and QAT_SW for AES-GCM and supported only on

docs/qat_sw.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This Intel&reg; QAT OpenSSL\* Engine supports Multi-buffer based software
44
acceleration for asymmetric PKE algorithms RSA, ECDH X25519, ECDH P-256/P-384
5-
and ECDSA(sign) P-256/P-384, SM2, SM3, SM4-CBC, SM4-GCM, SM4-CCM using the
5+
and ECDSA P-256/P-384, SM2, SM3, SM4-CBC, SM4-GCM, SM4-CCM using the
66
Intel&reg; Crypto Multi-buffer library based on Intel&reg; AVX-512 Integer
77
Fused Multiply Add (IFMA) operations.
88

@@ -18,7 +18,7 @@ utilize multibuffer operation.
1818
Software based acceleration for AES-GCM is supported via the Intel&reg;
1919
Multi-Buffer Crypto for IPsec Library. The implementation at engine for AES-GCM
2020
follows synchronous mechanism to submit requests to the IPSec_MB library which
21-
processes requests in multiple blocks using vectorized AES and AVX512
21+
processes requests in multiple blocks using vectorized AES,AVX2 and AVX512
2222
instructions from the processor.
2323

2424
Software acceleration features are only supported in the system that supports
@@ -29,4 +29,5 @@ AVX512F
2929
AVX512_IFMA
3030
VAES
3131
VPCLMULQDQ
32+
AVX2
3233
`

docs/software_requirements.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ and also from the latest versions from the links below.
1313
## QAT_HW Drivers:
1414
* [Intel® QuickAssist Technology Driver for Linux\* HW Version 2.0][4] - **QAT20.L.1.1.50-00003**
1515
* [Intel® QuickAssist Technology Driver for Linux\* HW Version 1.x][5] - **QAT.L.4.26.0-00008**
16-
* [Intel® QuickAssist Technology Driver for FreeBSD\* HW Version 1.x and 2.0] - **QAT.B.3.14.31-00003** (FreeBSD 13.2)
16+
* Intel® QuickAssist Technology Driver for FreeBSD\* HW Version 1.x and 2.0 - **QAT.B.3.14.31-00003** (FreeBSD 13.2)
1717
* [Intel® QATlib for Linux with intree driver][7] - **QATlib 24.09.0** & **QATlib 24.02.0** (for Dockerfile only)
1818
* [Intel® QATlib for FreeBSD with intree driver(FreeBSD 14)][8] - **FreeBSD QATlib 23.09.0** (FreeBSD 14)
1919

2020
## QAT_SW Libraries:
21-
* [Intel&reg; Crypto Multi-buffer library][2] - **IPP Crypto 2021.12.1** & **IPP Crypto 2021.10** (for BoringSSL only)
22-
* [Intel&reg; Multi-Buffer crypto for IPsec Library release version][3] **v1.5**
21+
* [Intel&reg; Crypto Multi-buffer library][2] - **IPP Crypto v1.0.0** & **IPP Crypto 2021.10** (for BoringSSL only)
22+
* [Intel&reg; Multi-Buffer crypto for IPsec Library release version][3] **v2.0**
2323

2424
## Crypto Libraries:
2525
* [OpenSSL\*][9] 1.1.1w (for FreeBSD only) & 3.0.15

driver_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#QAT_HW OOT driver Location
4-
QAT17_DRIVER=https://downloadmirror.intel.com/828487/QAT.L.4.26.0-00008.tar.gz
4+
QAT17_DRIVER=https://downloadmirror.intel.com/838409/QAT.L.4.27.0-00006.tar.gz
55
QAT20_DRIVER=https://downloadmirror.intel.com/822703/QAT20.L.1.1.50-00003.tar.gz
66

77
#Supported Devices

e_qat.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ int qat_fips_kat_test;
169169
const char *engine_qat_id = STR(QAT_ENGINE_ID);
170170
#if defined(QAT_HW) && defined(QAT_SW)
171171
const char *engine_qat_name =
172-
"Reference implementation of QAT crypto engine(qat_hw & qat_sw) v1.7.0";
172+
"Reference implementation of QAT crypto engine(qat_hw & qat_sw) v1.8.0";
173173
#elif QAT_HW
174174
const char *engine_qat_name =
175-
"Reference implementation of QAT crypto engine(qat_hw) v1.7.0";
175+
"Reference implementation of QAT crypto engine(qat_hw) v1.8.0";
176176
#else
177177
const char *engine_qat_name =
178-
"Reference implementation of QAT crypto engine(qat_sw) v1.7.0";
178+
"Reference implementation of QAT crypto engine(qat_sw) v1.8.0";
179179
#endif
180180
unsigned int engine_inited = 0;
181181
int fallback_to_openssl = 0;

intel-ipsec-mb

Submodule intel-ipsec-mb updated 931 files

qat_evp.c

+24-14
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,8 @@ static chained_info info[] = {
154154
{NID_sm4_ccm, NULL, SM4_KEY_SIZE},
155155
#endif
156156
#ifdef ENABLE_QAT_HW_CCM
157-
# ifdef QAT_INSECURE_ALGO
158157
{NID_aes_128_ccm, NULL, AES_KEY_SIZE_128},
159158
{NID_aes_192_ccm, NULL, AES_KEY_SIZE_192},
160-
# endif
161159
{NID_aes_256_ccm, NULL, AES_KEY_SIZE_256},
162160
#endif
163161
};
@@ -192,10 +190,8 @@ int qat_cipher_nids[] = {
192190
NID_sm4_ccm,
193191
#endif
194192
#ifdef ENABLE_QAT_HW_CCM
195-
# ifdef QAT_INSECURE_ALGO
196193
NID_aes_128_ccm,
197194
NID_aes_192_ccm,
198-
# endif
199195
NID_aes_256_ccm,
200196
#endif
201197
};
@@ -293,10 +289,8 @@ static PKT_THRESHOLD qat_pkt_threshold_table[] = {
293289
{NID_sm3, CRYPTO_SMALL_PACKET_OFFLOAD_THRESHOLD_HW_SM3},
294290
# endif
295291
# ifdef ENABLE_QAT_HW_CCM
296-
# ifdef QAT_INSECURE_ALGO
297292
{NID_aes_128_ccm, CRYPTO_SMALL_PACKET_OFFLOAD_THRESHOLD_DEFAULT},
298293
{NID_aes_192_ccm, CRYPTO_SMALL_PACKET_OFFLOAD_THRESHOLD_DEFAULT},
299-
# endif
300294
{NID_aes_256_ccm, CRYPTO_SMALL_PACKET_OFFLOAD_THRESHOLD_DEFAULT},
301295
# endif
302296
};
@@ -854,6 +848,13 @@ const EVP_CIPHER *qat_create_gcm_cipher_meth(int nid, int keylen)
854848

855849
#ifdef ENABLE_QAT_SW_GCM
856850
if (qat_sw_offload && (qat_sw_algo_enable_mask & ALGO_ENABLE_MASK_AES_GCM)) {
851+
#ifndef QAT_INSECURE_ALGO
852+
if (nid == NID_aes_128_gcm) {
853+
EVP_CIPHER_meth_free(c);
854+
DEBUG("OpenSSL SW AES_GCM_%d registration succeeded\n", keylen*8);
855+
return qat_gcm_cipher_sw_impl(nid);
856+
}
857+
#endif
857858
res &= EVP_CIPHER_meth_set_iv_length(c, IMB_GCM_IV_DATA_LEN);
858859
res &= EVP_CIPHER_meth_set_flags(c, VAESGCM_FLAG);
859860
#ifndef QAT_OPENSSL_PROVIDER
@@ -884,8 +885,12 @@ const EVP_CIPHER *qat_create_gcm_cipher_meth(int nid, int keylen)
884885
#ifdef ENABLE_QAT_HW_GCM
885886
if (!qat_sw_gcm_offload && qat_hw_offload &&
886887
(qat_hw_algo_enable_mask & ALGO_ENABLE_MASK_AES_GCM)) {
888+
# ifdef QAT_INSECURE_ALGO
887889
if (nid == NID_aes_192_gcm) {
888-
EVP_CIPHER_meth_free(c);
890+
# else
891+
if (nid == NID_aes_192_gcm || nid == NID_aes_128_gcm) {
892+
# endif
893+
EVP_CIPHER_meth_free(c);
889894
DEBUG("OpenSSL SW AES_GCM_%d registration succeeded\n", keylen*8);
890895
return qat_gcm_cipher_sw_impl(nid);
891896
}
@@ -953,10 +958,21 @@ const EVP_CIPHER *qat_create_ccm_cipher_meth(int nid, int keylen)
953958

954959
if (qat_hw_offload &&
955960
(qat_hw_algo_enable_mask & ALGO_ENABLE_MASK_AES_CCM)) {
961+
#ifndef QAT_INSECURE_ALGO
962+
if (nid == NID_aes_128_ccm || nid == NID_aes_192_ccm) {
963+
EVP_CIPHER_meth_free(c);
964+
DEBUG("OpenSSL SW AES_CCM_%d registration succeeded\n", keylen*8);
965+
return qat_ccm_cipher_sw_impl(nid);
966+
}
967+
#endif
956968
#if !defined(QAT20_OOT) && !defined(QAT_HW_INTREE) \
957969
&& !defined(QAT_HW_FBSD_OOT) && !defined(QAT_HW_FBSD_INTREE)
970+
# ifdef QAT_INSECURE_ALGO
958971
if (nid == NID_aes_192_ccm || nid == NID_aes_256_ccm) {
959-
EVP_CIPHER_meth_free(c);
972+
# else
973+
if (nid == NID_aes_256_ccm) {
974+
# endif
975+
EVP_CIPHER_meth_free(c);
960976
DEBUG("OpenSSL SW AES_CCM_%d registration succeeded\n", keylen*8);
961977
return qat_ccm_cipher_sw_impl(nid);
962978
}
@@ -1424,10 +1440,8 @@ void qat_create_ciphers(void)
14241440
break;
14251441
# endif
14261442
# ifdef ENABLE_QAT_HW_CCM
1427-
# ifdef QAT_INSECURE_ALGO
14281443
case NID_aes_128_ccm:
14291444
case NID_aes_192_ccm:
1430-
# endif
14311445
case NID_aes_256_ccm:
14321446
info[i].cipher = (EVP_CIPHER *)
14331447
qat_create_ccm_cipher_meth(info[i].nid, info[i].keylen);
@@ -1498,14 +1512,10 @@ void qat_free_ciphers(void)
14981512
break;
14991513
#endif
15001514
#ifdef ENABLE_QAT_HW_CCM
1501-
# ifdef QAT_INSECURE_ALGO
15021515
case NID_aes_128_ccm:
1503-
# endif
15041516
#if defined(QAT20_OOT) || defined(QAT_HW_INTREE) \
15051517
|| defined(QAT_HW_FBSD_OOT) || defined(QAT_HW_FBSD_INTREE)
1506-
# ifdef QAT_INSECURE_ALGO
15071518
case NID_aes_192_ccm:
1508-
# endif
15091519
case NID_aes_256_ccm:
15101520
#endif
15111521
if (qat_hw_aes_ccm_offload)

qat_hw_gcm.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ int qat_aes_gcm_init(EVP_CIPHER_CTX *ctx,
291291
qctx->iv = (Cpa8U *)qctx->iv;
292292
qctx->next_iv = (Cpa8U *)qctx->next_iv;
293293
qctx->enc = enc;
294-
nid = QAT_AES_GCM_CTX_get_nid((QAT_AES_GCM_CTX *)ctx);
294+
nid = qat_aes_gcm_ctx_get_nid((QAT_AES_GCM_CTX *)ctx);
295295
#else
296296
qctx = QAT_GCM_GET_CTX(ctx);
297297
#endif
@@ -1253,7 +1253,7 @@ int qat_aes_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
12531253
#ifdef QAT_OPENSSL_PROVIDER
12541254
qctx = (QAT_GCM_CTX *)ctx;
12551255
qctx->iv = (Cpa8U *)qctx->iv;
1256-
nid = QAT_AES_GCM_CTX_get_nid((QAT_AES_GCM_CTX *)ctx);
1256+
nid = qat_aes_gcm_ctx_get_nid((QAT_AES_GCM_CTX *)ctx);
12571257
#else
12581258
qctx = QAT_GCM_GET_CTX(ctx);
12591259
#endif
@@ -1635,7 +1635,7 @@ int qat_aes_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
16351635
#ifdef QAT_OPENSSL_PROVIDER
16361636
qctx = (QAT_GCM_CTX *)ctx;
16371637
qctx->iv = (Cpa8U *)qctx->iv;
1638-
nid = QAT_AES_GCM_CTX_get_nid((QAT_AES_GCM_CTX *)ctx);
1638+
nid = qat_aes_gcm_ctx_get_nid((QAT_AES_GCM_CTX *)ctx);
16391639
#else
16401640
qctx = QAT_GCM_GET_CTX(ctx);
16411641
#endif

0 commit comments

Comments
 (0)