Skip to main content
Version: Next

TLS API overview

This section documents how applications and firmware interact with NoxTLS Rust for TLS 1.2 / 1.3 and DTLS. It provides the canonical API narrative with device-relevant grouping: what types matter, when to call them, and where to read deeper.

Entry points

ConcernPrimary types / modulesDoc depth
Modeled connectionnoxtls::Connection, HandshakeState, TlsVersionRustdoc + examples in repo
Record layer helpersProtectedRecord, TlsRecordDeframer, seal/open helpers exported from noxtlsTopic: TLS topic
DTLSDtlsOperationalPolicy, replay trackers, flight helpersTopic: TLS topic
CertificatesParsed chains, hostname checksX.509 topic

Handshake lifecycle (conceptual)

  1. Build client/server context — versions, cipher suites, trust anchors, and optional session tickets.
  2. Drive handshake — feed records from your transport; advance HandshakeState until Finished (or terminal error).
  3. Application data — seal/open application records with negotiated keys; respect MTU and fragmentation rules on DTLS.
  4. Renegotiation / resumption — follow product policy; many embedded products disable renegotiation entirely.

DTLS vs TLS on devices

  • DTLS — expect loss, reordering, and duplication; size reassembly buffers to your network worst case.
  • TLS — assume reliable byte stream below the record layer (TCP or an equivalent pipe).

Operational knobs are summarized in repository markdown docs/DTLS13_OPERATIONAL_POLICY.md (source tree), linked from the TLS topic page where relevant.

Deep dive

Continue to the TLS topic page for algorithm coverage, record layout notes, and cross-links to cryptography topics.

Per-version and DTLS pages

For crate-level metadata (package description, features), use Crate reference (generated) under Crypto API in the sidebar—those pages are generated from Cargo.toml and are supplemental, not a substitute for this TLS API narrative.