You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've encountered a possible regression with v45 with loading encrypted PEM private keys.
I confirmed that this works on v44, on v45 I'm getting the following exception from load_pem_private_key:
ValueError: 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: invalid value
Here's a private key for replication (this is of course not used anywhere 😄): test_pkey.pem.txt, the password is "password".
The key is generated, encrypted and serialized with the following java code, using bouncycastle 1.70
PS: Loading a non-encrypted key, generated with serializePem(new JcaPKCS8Generator(privateKey, null)) (using the above java functions) works as expected. I don't really have the time to test with encrypted keys generated with openssl etc unfortunately, so not sure if this is specific to bouncycastle or the used encryption algorithm.
Thanks for the report. This key loads fine if I unwrap the encryption first, so we appear to have some incompatibility in the PBES1 pbeWithSHAAnd3-KeyTripleDES-CBC path.
Hi, I've encountered a possible regression with v45 with loading encrypted PEM private keys.
I confirmed that this works on v44, on v45 I'm getting the following exception from load_pem_private_key:
Here's a private key for replication (this is of course not used anywhere 😄): test_pkey.pem.txt, the password is "password".
The key is generated, encrypted and serialized with the following java code, using bouncycastle 1.70
The text was updated successfully, but these errors were encountered: