Expand description
§x25519-dalek
A pure-Rust implementation of x25519 elliptic curve Diffie-Hellman key exchange, with curve operations provided by curve25519-dalek.
Structs§
- Ephemeral
Secret - A short-lived Diffie-Hellman secret key that can only be used to compute a single
SharedSecret
. - Public
Key - A Diffie-Hellman public key, corresponding to an
EphemeralSecret
orStaticSecret
key. - Reusable
Secret - A Diffie-Hellman secret key which may be used more than once, but is purposefully not serialiseable in order to discourage key-reuse. This is implemented to facilitate protocols such as Noise (e.g. Noise IK key usage, etc.) and X3DH which require an “ephemeral” key to conduct the Diffie-Hellman operation multiple times throughout the protocol, while the protocol run at a higher level is only conducted once per key.
- Shared
Secret - The result of a Diffie-Hellman key exchange.
- Static
Secret - A Diffie-Hellman secret key that can be used to compute multiple
SharedSecret
s.
Constants§
- X25519_
BASEPOINT_ BYTES - The X25519 basepoint, for use with the bare, byte-oriented x25519 function. This is provided for people who cannot use the typed DH API for some reason.
Functions§
- x25519
- The bare, byte-oriented x25519 function, exactly as specified in RFC7748.