curve25519
freezero(group->curve25519, sizeof(struct curve25519_key));
struct curve25519_key *curve25519;
if ((curve25519 = calloc(1, sizeof(*curve25519))) == NULL)
group->curve25519 = curve25519;
arc4random_buf(curve25519->secret, CURVE25519_SIZE);
crypto_scalarmult_curve25519(curve25519->public,
curve25519->secret, basepoint);
struct curve25519_key *curve25519 = group->curve25519;
memcpy(buf, curve25519->public, ec25519_getlen(group));
struct curve25519_key *curve25519 = group->curve25519;
crypto_scalarmult_curve25519(shared, curve25519->secret, public);
struct curve25519_key *curve25519;
if (group->curve25519 == NULL)
curve25519 = group->curve25519;
memcpy(cp, curve25519->public, CURVE25519_SIZE);
struct curve25519_key *curve25519 = group->curve25519;
crypto_scalarmult_curve25519(shared, curve25519->secret, cp);
void *curve25519;
return curve25519(pub, secret, base_point);
int curve25519(uint8_t out[CURVE25519_KEY_SIZE],
else if (!curve25519(r->r_ss, l->l_private, r->r_public))
if (!curve25519(dh, private, public))