std1.0.0-beta-7 SafeC docs

std :: crypto::x25519

Function std::x25519

#include <std/crypto/x25519.h> source · definition

int x25519([]unsigned char out, []const unsigned char scalar, []const unsigned char point)

out = scalar * point (both 32 bytes; the scalar is clamped as RFC 7748 §5 specifies). 0 when the result is all zeros — the peer sent a low-order point and the shared secret must be rejected (RFC 8446 §7.4.2) — 1 otherwise.