Expand description
Pure-Rust X25519 Elliptic Curve Diffie-Hellman
Implements X25519 key exchange (RFC 7748). This is a faithful translation of curve25519-donna-c64 by Adam Langley. Avoids LLVM SIMD issues on x86_64-unknown-none bare-metal targets.
Properties:
- 128-bit security level
- Constant-time Montgomery ladder
- 32-byte keys
- ~100k operations/sec on modern CPUs
Algorithm:
- Montgomery curve: y² = x³ + 486662x² + x
- Prime: p = 2^255 - 19
- Base point: u = 9
- Scalar clamping: s[0] &= 248, s[31] &= 127, s[31] |= 64
Functions§
- diffie_
hellman - Compute shared secret from our secret key and their public key
- public_
key - Compute public key from secret key