If you've exported a key with PrivateFormat.OpenSSH, you can load with
https://cryptography.io/en/latest/hazmat/primitives/asymmetric/serialization/#cryptography.hazmat.primitives.serialization.load_ssh_private_key

Alex

On Wed, Sep 20, 2023 at 1:24 PM John Walstra via Cryptography-dev
<cryptography-dev@python.org> wrote:
>
> For other keys I can use  
> cryptography.hazmat.primitives.serialization.load_pem_private_key, however 
> for a ED25519 private key I get ..
>
>
> ('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).', 
> [<OpenSSLError(code=503841036, lib=60, reason=524556, 
> reason_text=unsupported)>])
>
> Is there another way to load it?
>
> I’m generating the private key using Ed25519PrivateKey.generate(), but using 
> later after it’s been serialized. The format is 
> serialization.PrivateFormat.OpenSSH.
>
> Thanks,
> John
> _______________________________________________
> Cryptography-dev mailing list
> Cryptography-dev@python.org
> https://mail.python.org/mailman/listinfo/cryptography-dev



-- 
All that is necessary for evil to succeed is for good people to do nothing.
_______________________________________________
Cryptography-dev mailing list
Cryptography-dev@python.org
https://mail.python.org/mailman/listinfo/cryptography-dev

Reply via email to