59QSC_CPLUSPLUS_ENABLED_START
97#define ED25519_SEED_SIZE 32U
103#define ED25519_SIGNATURE_SIZE 64U
109#define ED25519_PUBLICKEY_SIZE 32U
115#define ED25519_PRIVATEKEY_SIZE 64U
121#define ED25519_CURVE_SIZE 32U
127typedef int32_t qsc_fe25519[10U];
182} qsc_ge25519_precomp;
205void qsc_fe25519_0(qsc_fe25519 h);
214void qsc_fe25519_1(qsc_fe25519 h);
224void qsc_fe25519_copy(qsc_fe25519 h,
const qsc_fe25519 f);
235void qsc_fe25519_add(qsc_fe25519 h,
const qsc_fe25519 f,
const qsc_fe25519 g);
247void qsc_fe25519_cswap(qsc_fe25519 f, qsc_fe25519 g, uint32_t b);
262void qsc_fe25519_sub(qsc_fe25519 h,
const qsc_fe25519 f,
const qsc_fe25519 g);
272void qsc_fe25519_neg(qsc_fe25519 h,
const qsc_fe25519 f);
284void qsc_fe25519_cmov(qsc_fe25519 f,
const qsc_fe25519 g, uint32_t b);
295int32_t qsc_fe25519_is_negative(
const qsc_fe25519 f);
306int32_t qsc_fe25519_is_zero(
const qsc_fe25519 f);
317void qsc_fe25519_mul(qsc_fe25519 h,
const qsc_fe25519 f,
const qsc_fe25519 g);
328void qsc_fe25519_mul32(qsc_fe25519 h,
const qsc_fe25519 f, uint32_t n);
338void qsc_fe25519_sq(qsc_fe25519 h,
const qsc_fe25519 f);
348void qsc_fe25519_sq2(qsc_fe25519 h,
const qsc_fe25519 f);
358void qsc_fe25519_from_bytes(qsc_fe25519 h,
const uint8_t* s);
369void qsc_fe25519_reduce(qsc_fe25519 h,
const qsc_fe25519 f);
379void qsc_fe25519_to_bytes(uint8_t* s,
const qsc_fe25519 h);
390void qsc_fe25519_invert(qsc_fe25519 out,
const qsc_fe25519 z);
400void qsc_ge25519_p1p1_to_p3(qsc_ge25519_p3* r,
const qsc_ge25519_p1p1* p);
410void qsc_ge25519_p1p1_to_p2(qsc_ge25519_p2* r,
const qsc_ge25519_p1p1* p);
420void qsc_ge25519_scalarmult_base(qsc_ge25519_p3* h,
const uint8_t* a);
430void qsc_ge25519_p3_to_bytes(uint8_t* s,
const qsc_ge25519_p3* h);
440int32_t qsc_ge25519_is_canonical(
const uint8_t* s);
450int32_t qsc_ge25519_has_small_order(
const uint8_t s[32U]);
462int32_t qsc_ge25519_from_bytes_negate_vartime(qsc_ge25519_p3* h,
const uint8_t* s);
472void qsc_ge25519_p3_to_cached(qsc_ge25519_cached* r,
const qsc_ge25519_p3* p);
483void qsc_ge25519_add_cached(qsc_ge25519_p1p1* r,
const qsc_ge25519_p3* p,
const qsc_ge25519_cached* q);
495void qsc_ge25519_sub_precomp(qsc_ge25519_p1p1* r,
const qsc_ge25519_p3* p,
const qsc_ge25519_precomp* q);
508void qsc_ge25519_double_scalarmult_vartime(qsc_ge25519_p2* r,
const uint8_t* a,
const qsc_ge25519_p3* A,
const uint8_t* b);
520void qsc_ge25519_sub_cached(qsc_ge25519_p1p1* r,
const qsc_ge25519_p3* p,
const qsc_ge25519_cached* q);
530void qsc_ge25519_to_bytes(uint8_t* s,
const qsc_ge25519_p2* h);
539void qsc_sc25519_clamp(uint8_t* k);
550int32_t qsc_ed25519_small_order(
const uint8_t s[32U]);
560int32_t qsc_sc25519_is_canonical(
const uint8_t s[32U]);
573void qsc_sc25519_muladd(uint8_t s[32U],
const uint8_t a[32U],
const uint8_t b[32U],
const uint8_t c[32U]);
590void qsc_sc25519_reduce(uint8_t s[64U]);
605int32_t qsc_sc25519_verify(
const uint8_t* x,
const uint8_t* y,
const size_t n);
607QSC_CPLUSPLUS_ENABLED_END
Contains common definitions for the Quantum Secure Cryptographic (QSC) library.