intel / QAT_Engine

Intel QuickAssist Technology( QAT) OpenSSL Engine (an OpenSSL Plug-In Engine) which provides cryptographic acceleration for both hardware and optimized software using Intel QuickAssist Technology enabled Intel platforms. https://developer.intel.com/quickassist
BSD 3-Clause "New" or "Revised" License
400 stars 127 forks source link

C0A1FEF7FF7F0000:error::digital envelope routines:evp_generic_fetch:fetch failed:crypto/evp/evp_fetch.c:319 #163

Open geobon opened 4 years ago

geobon commented 4 years ago

I got it all built and was running through the speed tests. The RSA tests worked great but when I got to the ecdh tests, they blew up with:

C0A1FEF7FF7F0000:error::digital envelope routines:evp_generic_fetch:fetch failed:crypto/evp/evp_fetch.c:319:Global default library context, Algorithm (prime192v1), Properties ()

And this is with or without the QAT engine so my guess is that it is something I did wrong building openssl

Did I miss a compile option?

It also spews a bunch of these:

C0A1FEF7FF7F0000:error::digital envelope routines:EVP_PKEY_derive:operation not supported for this keytype:crypto/evp/exchange.c:423:

geobon commented 4 years ago

Ok, nevermind the above, that looks like an openssl bug. The git link given in the Intel docs pulls the latest alpha code for openssl-3.0.0 but the latest 1.1.1g works fine. One thing I did find interesting is that some things seem to run faster in software than on the QAT. For example:


openssl speed  -elapsed  rsa2048
You have chosen to measure elapsed time instead of user CPU time.
Doing 2048 bits private rsa's for 10s: 3515 2048 bits private RSA's in 10.00s
Doing 2048 bits public rsa's for 10s: 121388 2048 bits public RSA's in 10.00s

So 121388 public keys in software.

root@HAPROXY1:/usr/local/ssl/bin# openssl speed -engine qat -elapsed  rsa2048
engine "qat" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing 2048 bits private rsa's for 10s: 17497 2048 bits private RSA's in 10.00s
Doing 2048 bits public rsa's for 10s: 75265 2048 bits public RSA's in 10.00s

but only a little more than half that in the qat though the private key number is much, much better.

I notice that with some other of the speed tests, too. This is with qat-1.7.l.4.10.0-00014 and openssl-1.1.1g on a 12 core Atom with the QAT chipset on an Ubuntu 5.4.0-47-generic build 51 kernel.

Yogaraj-Alamenda commented 4 years ago

Hi @geobon you seem to be not using '-async jobs in the speed test command line . Please use-async_jobs` for asynchronous mode of operation using the example commands mentioned in https://github.com/intel/QAT_Engine#run-speed-with-the-intel-quickassist-technology-openssl-engine which uses async infrastructure from OpenSSL for doing operations in asynchronous mode and sees performance gain against software.