Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
The goal of this enhancement is to support PKCS#12 keystores in FIPS mode. In order to accomplish that, we need to extend the SunPKCS11 security provider to implement Password-Based encryption algorithms (PBE). These algorithms enable key derivation (from a human-readable password) for data encryption and authentication.
We aim to leverage on defined PKCS#11 PBE mechanisms as much as possible, instead of calling low-level crypto primitives (such as hash functions) directly. We might use low-level crypto primitives if there is no other way around. In any case, it's required that the NSS Software Token (SunPKCS11 back-end for FIPS) implements the mechanisms chosen. Depending on the case and needs, we might consider NSS Software Token custom mechanisms that are not part of the PKCS#11 standard -this type of mechanisms is used already in OpenJDK-.
The version of the PKCS#11 standard in which we will based this work is v3.0. However, we will analyze potential backward-compatibility issues and see if older NSS libraries (available in RHEL versions supported) could be affected.
To prioritize which PBE mechanisms to implement, we will focus on those required for PKCS#12 keystores that are current. As an example, we will prioritize OpenJDK-defined 'PBEWithHmacSHA256AndAES_256' and 'HmacPBESHA256' which are Keytool defaults for encryption and authentication respectively when dealing with PKCS#12 keystores. Legacy mechanisms might be implemented on a best-effort basis. The rationale for that is that legacy algorithms are discouraged, they might not be FIPS-compliant and keystore migration should be feasible at a reasonable cost.
It is worth noticing that the code to handle the PKCS#12 format is already implemented in the SunJCE security provider. This code gets cryptographic services by means of the Java Cryptographic Architecture (JCA), to which SunPKCS12 will now provide implementations. Using SunJCE for PKCS#12 handling should be fine under FIPS mode because no crypto transformations are applied there: it's ASN.1 binary-format parsing. However, this implies that we need to install the SunJCE security provider in FIPS mode with enough granularity to disable all other non-PKCS#12 services.
Even when the FIPS configuration is Red Hat downstream only, the extension of the SunPKCS11 security provider will be proposed to OpenJDK upstream.
Useful pointers:
* PKCS #12: Personal Information Exchange Syntax v1.1 (RFC 7292)
* https://datatracker.ietf.org/doc/html/rfc7292
* PKCS #5: Password-Based Cryptography Specification v2.1 (RFC 8018)
* https://datatracker.ietf.org/doc/html/rfc8018
* PKCS #11 standard (v3.0)
* https://docs.oasis-open.org/pkcs11/pkcs11-curr/v3.0/
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 (java-17-openjdk 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-2022:6691