21#ifndef PROTOCORE_CURVE25519_H
22#define PROTOCORE_CURVE25519_H
26#if PROTOCORE_ENABLE_CURVE25519
36typedef int64_t protocore_gf[16];
38void protocore_gf_copy(protocore_gf out,
const protocore_gf in);
39void protocore_gf_add(protocore_gf out,
const protocore_gf a,
const protocore_gf b);
40void protocore_gf_sub(protocore_gf out,
const protocore_gf a,
const protocore_gf b);
41void protocore_gf_mul(protocore_gf out,
const protocore_gf a,
const protocore_gf b);
42void protocore_gf_sq(protocore_gf out,
const protocore_gf a);
43void protocore_gf_inv(protocore_gf out,
const protocore_gf a);
44void protocore_gf_pack(uint8_t out[32],
const protocore_gf a);
45void protocore_gf_unpack(protocore_gf out,
const uint8_t in[32]);
46void protocore_gf_cswap(protocore_gf p, protocore_gf q,
int b);
57 const uint8_t *scalar;
60} Curve25519X25519Args;
65 const uint8_t *scalar;
67} Curve25519X25519BaseArgs;
104 Curve25519X25519Args x25519_args;
105 Curve25519X25519BaseArgs x25519_base_args;
110extern Curve25519Vars Curve25519V;
115 void (*
const x25519)(uint8_t *work);
116 void (*
const x25519_base)(uint8_t *work);
121void protocore_curve25519_x25519(uint8_t *work);
122void protocore_curve25519_x25519_base(uint8_t *work);
128static const Curve25519Ns Curve25519 __attribute__((unused)) = {
129 .x25519 = protocore_curve25519_x25519,
130 .x25519_base = protocore_curve25519_x25519_base,
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS