X25519.x25519

ubyte[] x25519(const(ubyte)[] k, const(ubyte)[] u) static

Calculates X25519(k, u) with the RFC 7748 Montgomery ladder over fixed-width constant-time field arithmetic.

Parameters

k32-byte scalar (clamped internally).
u32-byte u-coordinate (bit 255 masked internally).

Returns

The 32-byte result in canonical little-endian encoding.