rusty_time_nts/lib.rs
1//! rusty_time-nts — the NTS (RFC 8915) building blocks that need no TLS stack:
2//! the NTS-KE record codec and the AES-SIV-CMAC-256 extension-field AEAD.
3//!
4//! The NTS-KE TLS handshake itself (rustls) lands in M3; everything here is
5//! transport-independent and fuzz-hardened.
6
7pub mod aead;
8pub mod cookie;
9pub mod ef;
10pub mod records;
11
12/// NTS-KE over TLS 1.3. Behind the `ke` feature: it needs sockets and a TLS
13/// stack, so wasm and codec-only consumers never pull one.
14#[cfg(feature = "ke")]
15pub mod ke;
16
17/// The TLS seam — the single place the crypto provider is chosen.
18#[cfg(feature = "ke")]
19pub mod tls;
20
21/// Certificate validity windows, for `tls::client_config_ignoring_cert_dates`.
22#[cfg(feature = "ke")]
23mod dates;
24
25/// ALPN identifier for NTS-KE (RFC 8915 §4).
26pub const ALPN: &[u8] = b"ntske/1";
27/// NTS-KE TCP port (RFC 8915 §4).
28pub const KE_PORT: u16 = 4460;
29/// AEAD algorithm identifier for AES-SIV-CMAC-256 (RFC 5297 via IANA registry).
30pub const AEAD_AES_SIV_CMAC_256: u16 = 15;
31/// Next Protocol identifier for NTPv4.
32pub const NEXT_PROTO_NTPV4: u16 = 0;