Implement X25519 Diffie-Hellman key exchange (RFC 7748)
Field arithmetic in GF(2^255 - 19) using 5x51-bit limb representation.
Montgomery ladder scalar multiplication on Curve25519. Constant-time
implementation with no secret-dependent branches or memory accesses.
Passes RFC 7748 §6.1 DH test vectors and §5.2 iterated test vector
(1,000 iterations).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
authored by
pierrelf.com
tangled.org
b455eb13
4be3d255