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.
Bug 1759982 (rhel9-modern-pkcs12) - Use modern algorithms in PKCS#12 files by default
Summary: Use modern algorithms in PKCS#12 files by default
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: rhel9-modern-pkcs12
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: distribution
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: pre-dev-freeze
: 9.0 Alpha
Assignee: RHEL Program Management
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On: 1759983 1764196 1764198 1764199 1764205
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-09 14:35 UTC by Hubert Kario
Modified: 2022-03-16 13:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-16 13:56:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Hubert Kario 2019-10-09 14:35:42 UTC
Description of problem:
The common encryption settings for PKCS#12 files is to use pbeWithSHA1And40BitRC2-CBC algorithm (a.k.a PBE-SHA1-RC2-40) for encrypting the certificate and pbeWithSHA1And3-KeyTripleDES-CBC algorithm (a.k.a PBE-SHA1-2DES)  for encrypting the key.
Both of those algorithms are very old and far from currently recommended cryptographic practice. If we want to remove them in the future, we need to first not create more files encrypted using those algorithms.

Version-Release number of selected component (if applicable):
RHEL-8

How reproducible:
always

Steps to Reproduce:
1. export or create PKCS#12 file with keys
2. openssl pkcs12 -passin pass: -passout pass: -in /tmp/cert.p12 -out /dev/null -info -noout
3.

Actual results:
File encrypted with pbeWithSHA1And40BitRC2-CBC and pbeWithSHA1And3-KeyTripleDES-CBC

Expected results:
The file should use AES-128-CBC with PBKDF2 and SHA-256:

MAC: sha256, Iteration 600000
MAC length: 32, salt length: 8
PKCS7 Encrypted data: PBES2, PBKDF2, AES-128-CBC, Iteration 600000, PRF hmacWithSHA256
Certificate bag
PKCS7 Data
Shrouded Keybag: PBES2, PBKDF2, AES-128-CBC, Iteration 600000, PRF hmacWithSHA256

Additional info:
This is a tracking bug, it applies to all applications and libraries that produce PKCS#12 files.

It is not about removing support for old algorithms, just about changing the defaults. Since this change is expected to bring interoperability issues, we do not want to perform it during RHEL-8 life, but introduce it with next major release.

Increasing the iteration count above 600K is not recommended, it's known to cause interoperability issues with Windows (that is their maximum), see https://bugzilla.mozilla.org/show_bug.cgi?id=1278071#c31

This change will also automatically make the PKCS#12 files compatible with FIPS.

Comment 1 Hubert Kario 2021-04-21 16:53:16 UTC
Note: OpenSSL 3.0 requires 128 bit long salt for PBKDF2 when running in FIPS mode.

Comment 2 Hubert Kario 2022-03-16 13:56:06 UTC
All the relevant bugs have been created, core crypto libraries have been updated, closing as done.


Note You need to log in before you can comment on or make changes to this bug.