X25519
Source: std/x25519.mw.
X25519 (RFC 7748) over GF(2^255-19), after TweetNaCl: field elements are 16 limbs of 16 bits held in i64, which needs no 128-bit arithmetic.
Functions
Section titled “Functions”x25519
Section titled “x25519”fn x25519(out: *u8, scalar: *u8, point: *u8)out = scalar * point (all 32 bytes, little endian).
x25519_base
Section titled “x25519_base”fn x25519_base(out: *u8, scalar: *u8)Public key for a 32-byte secret (scalar * basepoint 9).