Re: [Cryptography-dev] Loading a Curve25519 X.509 key

2021-03-10 Thread Alex Gaynor
Great, I filed https://github.com/pyca/cryptography/issues/5911 so we don't lose track On Wed, Mar 10, 2021 at 2:17 PM Paul Kehrer wrote: > > Yes, load_{pem,der}_{public,private}_key can load > ed25519/ed448/x25519/x448 keys as well as long as they are in > PKCS8/subjectPublicKeyInfo formats. We

Re: [Cryptography-dev] Loading a Curve25519 X.509 key

2021-03-10 Thread Paul Kehrer
Yes, load_{pem,der}_{public,private}_key can load ed25519/ed448/x25519/x448 keys as well as long as they are in PKCS8/subjectPublicKeyInfo formats. We should fix those docs. -Paul On Wed, Mar 10, 2021 at 11:05 AM Alex Gaynor wrote: > > Hi Saruabh, > > I think > https://cryptography.io/en/latest

Re: [Cryptography-dev] Loading a Curve25519 X.509 key

2021-03-10 Thread Alex Gaynor
Hi Saruabh, I think https://cryptography.io/en/latest/hazmat/primitives/asymmetric/serialization.html#cryptography.hazmat.primitives.serialization.load_pem_public_key should work. Notwithstanding the docs, I believe it'll load an X25519PublicKey :-) If that works for you, let us know and I'll mak

[Cryptography-dev] Loading a Curve25519 X.509 key

2021-03-10 Thread Saurabh Kapoor
Hi, A service we communicate with sends us their Curve25519 public key as a PEM file. The key is DER encoded and the format is X.509's SubjectPublicKeyInfo. We would like to create a cryptography.hazmat.primitives.asymmetric.x25519.X25519PublicKey for this object but I am unable to find the routi