Skip to content

Release 45.0 can't decode RSA private key with DES-EDE3-CBC,0FC613071E6D505D encryption #13045

Open
@Timost

Description

@Timost

Hi,
Thank you for cryptography.

I'm using cryptography with paramiko with python 3.10.

I have an RSA private key encrypted with a passphrase using DES-EDE3-CBC,0FC613071E6D505D encryption.

It loads correctly with cryptography 44.0.3 but with the 45.x.x releases I get a ValueError:

paramiko.ssh_exception.SSHException: Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters). Details: ASN.1 parsing error: unexpected tag (got Tag { value: 2, constructed: false, class: Universal })

I noticed the openssl default_backend version changed between these versions so that might be the reason:

# with cryptography 44.0.3 
<OpenSSLBackend(version: OpenSSL 3.4.1 11 Feb 2025, FIPS: False, Legacy: True)>
# with cryptography 45.0.3 
<OpenSSLBackend(version: OpenSSL 3.5.0 8 Apr 2025, FIPS: False, Legacy: True)>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalewaiting-on-reporterIssue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions