Bug 2168324

Summary: In FIPS mode, openssl should not use the legacy ECDSA_do_sign(), RSA_public_encrypt(), RSA_private_decrypt() functions for pairwise consistency tests
Product: Red Hat Enterprise Linux 9 Reporter: Clemens Lang <cllang>
Component: opensslAssignee: Dmitry Belyavskiy <dbelyavs>
Status: CLOSED ERRATA QA Contact: Alicja Kario <hkario>
Severity: high Docs Contact:
Priority: high    
Version: 9.0CC: cllang, dbelyavs, hkario, ssorce
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2178034 2178035 2178036 (view as bug list) Environment:
Last Closed: 2023-11-07 08:52:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2178034, 2178035, 2178036    

Description Clemens Lang 2023-02-08 17:39:42 UTC
Description of problem:
OpenSSL uses functions that do not compute a digest (for signatures) or an approved padding method (for encryption) for pairwise consistency tests of new EC or RSA keys (or DSA keys, but we do not certify DSA).

See

- crypto/ec/ec_key.c, function ecdsa_keygen_pairwise_test, which calls ECDSA_do_sign.
- crypto/rsa/rsa_gen.c, function rsa_keygen_pairwise_test, which calls RSA_public_encrypt and RSA_private_decrypt

These should instead use EVP_DigestSign and EVP_DigestVerify.


Version-Release number of selected component (if applicable):
openssl-3.0.1-44.el9_0.1

How reproducible:
Inspect source code, find use of ECDSA_do_sign, RSA_public_encrypt, RSA_private_decrypt

Expected results:
Pairwise consistency tests use functions that compute a digest before signing it.

Additional info:
While we could possibly use RSA-OAEP as pairwise encryption/decryption test, that would require us to add another tests for RSA signatures. It's best to just use RSA signatures instead. AFAIR the FIPS 140-3 IG allow us to skip the PCT for encryption and decryption if we have a signature PCT.

Comment 12 errata-xmlrpc 2023-11-07 08:52:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (openssl bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6627