4#ifndef PROTOCORE_SNTRUP761_H
5#define PROTOCORE_SNTRUP761_H
41#define PROTOCORE_SNTRUP761_PK_BYTES 1158
42#define PROTOCORE_SNTRUP761_SK_BYTES 1763
43#define PROTOCORE_SNTRUP761_CT_BYTES 1039
44#define PROTOCORE_SNTRUP761_SS_BYTES 32
45#define PROTOCORE_SNTRUP761_SK_PK_OFFSET \
51 embed_bool (*
keypair)(uint8_t *, uint8_t *, uint8_t *);
52 embed_bool (*
enc)(uint8_t *,
const uint8_t *, uint8_t *, uint8_t *);
53 embed_bool (*
dec)(uint8_t *,
const uint8_t *,
const uint8_t *, uint8_t *);
#define PROTOCORE_UNUSED
Suppress the unused warning. Every module ends in a namespace most callers only partly use.
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
embed_bool protocore_sntrup761_keypair(uint8_t *work, uint8_t *pk, uint8_t *sk)
Generate a keypair: send pk, hold sk until the peer's ciphertext arrives.
embed_bool protocore_sntrup761_dec(uint8_t *work, const uint8_t *sk, const uint8_t *ct, uint8_t *ss)
Recover the session key from the peer's ciphertext under sk.
embed_bool protocore_sntrup761_enc(uint8_t *work, const uint8_t *pk, uint8_t *ct, uint8_t *ss)
Draw a short polynomial, encrypt it under pk, derive the session key.
Dispatch table. Addressed by offset, so the layout is asserted below.
embed_bool(* dec)(uint8_t *, const uint8_t *, const uint8_t *, uint8_t *)
embed_bool(* keypair)(uint8_t *, uint8_t *, uint8_t *)
embed_bool(* enc)(uint8_t *, const uint8_t *, uint8_t *, uint8_t *)