4#ifndef PROTOCORE_TLS13_RPK_H
5#define PROTOCORE_TLS13_RPK_H
33#define PROTOCORE_TLS13_ED25519_SPKI_LEN 44
38 size_t (*
ed25519_spki)(
const uint8_t *, uint8_t *, size_t,
const uint8_t *);
39 embed_bool (*
ed25519_from_spki)(
const uint8_t *,
const uint8_t *, size_t,
const 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.
Dispatch table. Addressed by offset, so the layout is asserted below.
embed_bool(* ed25519_from_spki)(const uint8_t *, const uint8_t *, size_t, const uint8_t **)
size_t(* ed25519_spki)(const uint8_t *, uint8_t *, size_t, const uint8_t *)
size_t(* build_certificate)(const uint8_t *, uint8_t *, size_t, const uint8_t *)
size_t protocore_tls13_rpk_build_certificate(const uint8_t *work, uint8_t *out, size_t cap, const uint8_t *ed25519_pub)
Build a Certificate message (RFC 8446 sec 4.4.2) carrying an RFC .
embed_bool protocore_tls13_rpk_ed25519_from_spki(const uint8_t *work, const uint8_t *spki, size_t len, const uint8_t **pub)
The 32-byte Ed25519 key inside a DER SubjectPublicKeyInfo (RFC 8410 .
size_t protocore_tls13_rpk_ed25519_spki(const uint8_t *work, uint8_t *out, size_t cap, const uint8_t *pub)
Write the 44-byte DER SubjectPublicKeyInfo for the Ed25519 key pub .