dalek-cryptography / curve25519-dalek

A pure-Rust implementation of group operations on Ristretto and Curve25519
Other
853 stars 422 forks source link

Allow viewing secret as byte array #571

Closed dpogorzelski closed 10 months ago

dpogorzelski commented 10 months ago

This will make it possible to view the secret as byte array which can be handy when printing contents for "debug" purposes via crates such as https://crates.io/crates/pretty-hex

pinkforest commented 10 months ago

Current API for EphemeralSecret is very intentional to not provide anything that exposes the secret key material.

Users can opt-in to StaticSecretvia static_secrets feature that provides this footgun if they need it and opts in to it but it will not provide forward secrecy as is intent on Ephemeral DH which purpose is to provide it via protected API.

dpogorzelski commented 10 months ago

This makes sense, thanks for the clarification.