-
Notifications
You must be signed in to change notification settings - Fork 573
Description
Hi there! 👋
I'm currently working on loading an X25519 private key from a PEM file in PKCS#8 format (e.g., generated by openssl genpkey -algorithm X25519), and I noticed that while ed25519-dalek provides convenient methods like:
SigningKey::from_pkcs8_pem(pem_str)?the x25519-dalek crate does not offer similar functionality. This makes interoperability with standard key formats (like those used in TLS, OpenSSL, or configuration files) more cumbersome.
It would be incredibly helpful if x25519-dalek could provide built-in support for parsing PKCS#8 PEM/DER, just like ed25519-dalek does, e.g.:
let secret = x25519_dalek::StaticSecret::from_pkcs8_pem(pem_str)?;
// or
let secret = x25519_dalek::StaticSecret::from_pkcs8_der(der_bytes)?;This would greatly improve usability and reduce boilerplate code for users integrating with standard tooling (OpenSSL, Let's Encrypt-style keys, etc.).
Would you be open to adding this feature? I’d be happy to help contribute if needed!