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.
Description of problem:
The version of python3-cryptography shipped in RHEL 8.2 lacks support for twisted Edwards curves.
This creates a problem in OSP16 Nova:
- https://bugzilla.redhat.com/show_bug.cgi?id=1669539
Version-Release number of selected component (if applicable):
RHEL 8.2
python3-cryptography-2.3-3.el8.x86_64
openssl-1.1.1c-15.el8.x86_64
How reproducible:
always
Steps to Reproduce:
1. Create an ssh keypair of key type ed25519
(undercloud) [stack@undercloud-osp16 ~]$ ssh-keygen -t ed25519
...
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAHHlefD0G8ir1v/oirs3DDC9mR/ZkZ8+CMVUa9YBuLK stack.local
2. Try to load ssh pubkey using cryptography library:
(undercloud) [stack@undercloud-osp16 ~]$ LC_ALL=en_US.UTF-8 python3
Python 3.6.8 (default, Oct 11 2019, 15:04:54)
[GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from cryptography.hazmat import backends
>>> from cryptography.hazmat.primitives import serialization>>> serialization.load_ssh_public_key(data='ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAHHlefD0G8ir1v/oirs3DDC9mR/ZkZ8+CMVUa9YBuLK stack.local'.encode('utf-8'), backend=backends.default_backend())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.6/site-packages/cryptography/hazmat/primitives/serialization.py", line 61, in load_ssh_public_key
raise UnsupportedAlgorithm('Key type is not supported.')
cryptography.exceptions.UnsupportedAlgorithm: Key type is not supported.
>>>
Actual results:
raise UnsupportedAlgorithm('Key type is not supported.')
Expected results:
ed25519 key type should be supported.
Additional info:
Version 2.7 or higher should be required.
RHEL 8 ships PyCA cryptography 2.3, which does not support ed25519. In order to support ed25519 python-cryptography has to be rebased to 2.6 or newer. Version 2.6 contains some backwards incompatible changes [1], which I would have to revert. I can do a rebase for RHEL 8.4 earliest.
[1] https://cryptography.io/en/latest/changelog/#v2-6
You are welcome!
Do you need a rebase for 8.4? It would be a good idea to start the rebase process early by filing a rebase request RHBZ with a business case.
I recommend to rebase to either 2.6 (ed25519 support), 2.9 (Poly1305 and fixed rfc4514_string function), or 3.0 (OpenSSH serialization format for private keys)
python-cryptography depends on python-cryptography-vectors for testing. The vector package must be updated in sync. It is an internal development package and not shipped with RHEL.
python-cryptography 2.6 has removed three deprecated features. The features can be easily re-added:
* cryptography.hazmat.primitives.asymmetric.utils.encode_rfc6979_signature() and decode_rfc6979_signature() functions. The functions were removed in 2.6. Both are simple aliases for encode_dss_signature() and decode_dss_signature() in the same name space
* cryptography.hazmat.backends.openssl.x509._Certificate.serial. The property was removed in 2.6. It's a simple alias for Certificate.serial_number
2.7 removed cryptography.hazmat.primitives.mac.MACContext
The backwards incompatible changed to rfc4514_string() in 2.9 is not an issue for RHEL. The function is not available in RHEL 8 because it was added in 2.5.
3.0 removed support for passing an Extension instance to from_issuer_subject_key_identifier(). This feature can be patched back easily, too.
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 (Moderate: python-cryptography security, 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/RHSA-2021:1608
Comment 28Christian Heimes
2021-10-07 08:12:06 UTC
*** Bug 2011720 has been marked as a duplicate of this bug. ***
Comment 29Florence Blanc-Renaud
2021-10-19 16:03:15 UTC
*** Bug 2003742 has been marked as a duplicate of this bug. ***