OpenSSL 3.0.2 on Jammy failure on RSA speed test with async_jobs

Bug #2012976 reported by Shih-Yi Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-bluefield (Ubuntu)
New
Undecided
Unassigned

Bug Description

Issue opened with OpenSSL.

https://github.com/openssl/openssl/pull/20616

RSA verification failed when all loopargs[] share the same EVP_PKEY rsa_key.

Tested and reproduced on openssl-3.0 branch

$ apps/openssl speed -engine pka -async_jobs 8 rsa2048
Engine "pka" set.
Doing 2048 bits private rsa's for 10s: 46554 2048 bits private RSA's in 3.70s
RSA verify setup failure. No RSA verify will be done.
20B0B281FFFF0000:error:0200008A:rsa routines:RSA_padding_check_PKCS1_type_1:invalid padding:crypto/rsa/rsa_pk1.c:75:
20B0B281FFFF0000:error:02000072:rsa routines:rsa_ossl_public_decrypt:padding check failed:crypto/rsa/rsa_ossl.c:606:
20B0B281FFFF0000:error:1C880004:Provider routines:rsa_verify:RSA lib:providers/implementations/signature/rsa_sig.c:833:
version: 3.0.9-dev
built on: Mon Mar 27 13:48:54 2023 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
CPUINFO: OPENSSL_armcap=0xbd

Tested w/ changes

$ apps/openssl speed -engine pka -async_jobs 8 rsa2048

Engine "pka" set.
Doing 2048 bits private rsa's for 10s: 49465 2048 bits private RSA's in 3.96s
Doing 2048 bits public rsa's for 10s: 333008 2048 bits public RSA's in 7.61s
version: 3.0.9-dev
built on: Mon Mar 27 13:48:54 2023 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
CPUINFO: OPENSSL_armcap=0xbd
sign verify sign/s verify/s
rsa 2048 bits 0.000080s 0.000023s 12491.2 43759.3
version: 3.0.9-dev
built on: Mon Mar 27 13:48:54 2023 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
CPUINFO: OPENSSL_armcap=0xbd

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.