CURVE25519_KEY_SIZE
static const uint8_t null_point[CURVE25519_KEY_SIZE];
static const uint8_t base_point[CURVE25519_KEY_SIZE] = { 9 };
curve25519_generate_public(uint8_t pub[CURVE25519_KEY_SIZE],
const uint8_t secret[CURVE25519_KEY_SIZE])
if (timingsafe_bcmp(secret, null_point, CURVE25519_KEY_SIZE) == 0)
curve25519(uint8_t out[CURVE25519_KEY_SIZE],
const uint8_t scalar[CURVE25519_KEY_SIZE],
const uint8_t point[CURVE25519_KEY_SIZE])
return timingsafe_bcmp(out, null_point, CURVE25519_KEY_SIZE);
int curve25519(uint8_t out[CURVE25519_KEY_SIZE],
const uint8_t scalar[CURVE25519_KEY_SIZE],
const uint8_t point[CURVE25519_KEY_SIZE]);
int curve25519_generate_public(uint8_t pub[CURVE25519_KEY_SIZE],
const uint8_t secret[CURVE25519_KEY_SIZE]);
curve25519_clamp_secret(uint8_t secret[CURVE25519_KEY_SIZE])
curve25519_generate_secret(uint8_t secret[CURVE25519_KEY_SIZE])
karc4random_buf(secret, CURVE25519_KEY_SIZE);
#define NOISE_PUBLIC_KEY_LEN CURVE25519_KEY_SIZE