X25519_SIZE
ATTRIBUTE_WARN_UNUSED_RET int x25519(const u8 k[X25519_SIZE], const u8 u[X25519_SIZE], u8 res[X25519_SIZE]);
ATTRIBUTE_WARN_UNUSED_RET int x25519_gen_priv_key(u8 priv_key[X25519_SIZE]);
ATTRIBUTE_WARN_UNUSED_RET int x25519_init_pub_key(const u8 priv_key[X25519_SIZE], u8 pub_key[X25519_SIZE]);
ATTRIBUTE_WARN_UNUSED_RET int x25519_derive_secret(const u8 priv_key[X25519_SIZE], const u8 peer_pub_key[X25519_SIZE], u8 shared_secret[X25519_SIZE]);
u8 k_[X25519_SIZE], u_[X25519_SIZE];
MUST_HAVE(((len == X25519_SIZE) || (len == X448_SIZE)), ret, err);
if(len == X25519_SIZE){
MUST_HAVE(((len == X25519_SIZE) || (len == X448_SIZE)), ret, err);
MUST_HAVE(((len == X25519_SIZE) || (len == X448_SIZE)), ret, err);
if(len == X25519_SIZE){
u8 u[X25519_SIZE];
MUST_HAVE(((len == X25519_SIZE) || (len == X448_SIZE)), ret, err);
int x25519(const u8 k[X25519_SIZE], const u8 u[X25519_SIZE], u8 res[X25519_SIZE])
return x25519_448_core(k, u, res, X25519_SIZE);
int x25519_gen_priv_key(u8 priv_key[X25519_SIZE])
return x25519_448_gen_priv_key(priv_key, X25519_SIZE);
int x25519_init_pub_key(const u8 priv_key[X25519_SIZE], u8 pub_key[X25519_SIZE])
return x25519_448_init_pub_key(priv_key, pub_key, X25519_SIZE);
int x25519_derive_secret(const u8 priv_key[X25519_SIZE], const u8 peer_pub_key[X25519_SIZE], u8 shared_secret[X25519_SIZE])
return x25519_448_derive_secret(priv_key, peer_pub_key, shared_secret, X25519_SIZE);
if(len == X25519_SIZE){
u8 pub_key[X25519_SIZE];
u8 shared_secret[X25519_SIZE];
MUST_HAVE((c->our_priv_key_len == X25519_SIZE), ret, err);
MUST_HAVE((c->exp_our_pub_key_len == X25519_SIZE), ret, err);
ret = are_equal(pub_key, c->exp_our_pub_key, X25519_SIZE, &check); EG(ret, err);
MUST_HAVE((c->peer_pub_key_len == X25519_SIZE), ret, err);
MUST_HAVE((c->exp_shared_secret_len == X25519_SIZE), ret, err);
ret = are_equal(shared_secret, c->exp_shared_secret, X25519_SIZE, &check); EG(ret, err);
alglen = X25519_SIZE;