X25519

X25519 writes a shared key to |out_shared_key| that is calculated from the given private key and the peer's public value. It returns one on success and zero on error.

Don't use the shared key directly, rather use a KDF and also include the two public values as inputs.

extern (C) nothrow @nogc
int
X25519
(
core.stdc.stdint.uint8_t* out_shared_key
,
const(core.stdc.stdint.uint8_t)* private_key
,
const(core.stdc.stdint.uint8_t)* peers_public_value
)

Meta