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 \
52 proto_bool (*enc)(uint8_t *,
const uint8_t *, uint8_t *, uint8_t *);
53 proto_bool (*dec)(uint8_t *,
const uint8_t *,
const uint8_t *, uint8_t *);
#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.
proto_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.
PROTOCORE_NS Sntrup761Ns Sntrup761 PROTOCORE_UNUSED
Module namespace.
proto_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.
proto_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.
Dispatch table. Addressed by offset, so the layout is asserted below.
proto_bool(* keypair)(uint8_t *, uint8_t *, uint8_t *)
#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