|
ProtoCore v0.0.2
Deterministic, zero-heap network stack for embedded targets
|
Network Time Security (NTS, RFC 8915) wire codec (PC_ENABLE_NTS). More...
Go to the source code of this file.
Network Time Security (NTS, RFC 8915) wire codec (PC_ENABLE_NTS).
NTS secures NTP against spoofing. It has two wire formats, both codified here:
[critical|type : u16][body-length : u16][body]. The client offers a next protocol (NTPv4) + an AEAD algorithm (AES-SIV-CMAC-256); the server returns cookies + the negotiated AEAD (+ optional server/port). pc_nts_ke_record / _request build the request and pc_nts_ke_parse walks a response, surfacing each record via a callback.pc_nts_ef builds a padded extension field; pc_nts_ef_unique_id / _cookie are the common ones.Pure framing, zero heap, no stdlib, host-testable. The AES-SIV-CMAC-256 AEAD (RFC 5297) that protects the authenticator, and the TLS-exporter key derivation (sec 5.1), are the crypto integration on top - the label constants for that derivation are exposed here.
Definition in file nts.h.