Expand description
User-facing TLS and DTLS protocol surface for the NoxTLS Rust port.
This crate wires together a modeled protocol handshake and record layer, deterministic key-share
helpers for interop, optional PSK ticket persistence, and re-exports noxtls_io::transport adapters
for blocking, async, and embedded I/O profiles.
Re-exports§
pub use noxtls_platform as platform;
Modules§
- transport
- Transport abstractions for blocking and async byte I/O.
Structs§
- Certificate
- Captures parsed certificate fields needed for PKI and TLS flows.
- Client
Hello Extensions - Captures parsed extension data from a minimally-modeled ClientHello.
- Client
Hello Info - Summarizes parsed suite and extension data from ClientHello.
- Connection
- Holds connection version, handshake state, and transcript bytes.
- Dtls13
AckRange - Represents one inclusive DTLS 1.3 ACK range.
- Dtls13
Flight - Represents one outbound DTLS 1.3 flight tracked by packet keys.
- Dtls13
Record Header - Represents one RFC 9147 DTLS 1.3 unified record header.
- Dtls
Epoch Replay Tracker - Tracks DTLS anti-replay state across epoch transitions.
- Dtls
Flight Record - Stores one outbound DTLS packet entry for potential retransmission.
- Dtls
Flight Retransmit Tracker - Tracks outbound DTLS flight packets for retransmission and ack processing.
- Dtls
Operational Policy - Captures transport-facing DTLS retry and timeout knobs.
- Dtls
Record Header - Represents a DTLS record-layer header for datagram framing.
- Dtls
Replay Window - Tracks a DTLS anti-replay bitmap for one epoch.
- External
KeyHandle - Opaque external key handle used by providers to locate key material.
- KeyDecrypt
Request - Carries one provider decrypt operation request.
- KeyDerive
Request - Carries one provider key-derivation operation request.
- KeySign
Request - Carries one provider sign operation request.
- Pkcs8
Private KeyInfo DerParts - Holds PKCS#8
PrivateKeyInfofields for noxtls_algorithm dispatch and key extraction. - Protected
Record - Represents one protected TLS record carrying ciphertext and authentication tag.
- Resumption
Ticket - Captures minimal TLS 1.3 resumption ticket material for PSK flows.
- Software
KeyProvider - In-tree software provider implementing the same external key-provider trait boundary.
- Ticket
Store - In-memory server ticket cache with simple lifecycle operations.
- Tls13
Early Data Operational Policy - Captures tunable policy controls for TLS 1.3 modeled early-data handling.
- Tls13
Early Data Replay State - Serializable replay-window state for carrying TLS 1.3 early-data anti-replay continuity.
- Tls13
Early Data Telemetry - Tracks counters for modeled TLS 1.3 early-data accept/reject outcomes.
- Tls13
Ocsp Staple Info - Parsed freshness and revocation summary for a stapled OCSP response.
- Tls13
Quic Initial Secrets - Captures QUIC Initial secrets derived from destination connection ID.
- Tls13
Quic Next Traffic Secrets - Captures next-generation QUIC 1-RTT traffic secrets derived via
quic ku. - Tls13
Quic Packet Protection Keys - Captures one QUIC packet-protection keyset derived from one traffic secret.
- Tls13
Quic Traffic Secret Snapshot - Captures current QUIC handshake and 1-RTT traffic secret snapshots.
- Tls13
Server Identity - Bundles a TLS 1.3 server certificate chain with the signing key used for
CertificateVerify. - TlsRecord
Deframer - Buffers incoming TLS octets and yields complete record packets (
header + payload).
Enums§
- Alert
Description - TLS alert description codepoints used by this port.
- Alert
Level - TLS alert level codes.
- Cipher
Suite - Identifies modeled cipher suites and their transcript hash algorithms.
- Dtls13
Transport Event - Transport-facing events emitted by the DTLS 1.3 datagram driver.
- Dtls
Operational Profile - Names pre-tuned DTLS operational profiles for common deployment environments.
- Handshake
State - Represents coarse handshake phases used by the prototype state machine.
- Hash
Algorithm - Identifies the hash noxtls_algorithm selected by a cipher suite or version profile for HKDF and transcript work.
- KeyDecrypt
Algorithm - Names supported decryption operations for external/provider-backed keys.
- KeyDerive
Algorithm - Names supported key-derivation operations for external/provider-backed keys.
- KeySign
Algorithm - Names supported signing operations for external/provider-backed keys.
- Record
Content Type - TLS record content types used by outer and inner TLS 1.3 framing.
- Ticket
Usage Policy - Controls whether accepted PSK resumption tickets remain reusable.
- Tls13
Early Data Operational Profile - Names pre-tuned operational profiles for TLS 1.3 modeled early-data policy.
- Tls13
Ocsp Staple Verification - Describes validation outcome for one stapled OCSP response.
- Tls13
Server Identity Key - Holds configured TLS 1.3 server identity signing material for CertificateVerify.
- TlsRole
- Identifies whether a connection endpoint acts as TLS client or server.
- TlsVersion
- Enumerates currently modeled TLS and DTLS protocol versions.
- Validation
Error - Describes why certificate path validation failed.
Constants§
- TLS13_
QUIC_ EXPORTER_ LABEL_ CLIENT_ 1RTT - QUIC exporter label for client 1-RTT secret derivations.
- TLS13_
QUIC_ EXPORTER_ LABEL_ SERVER_ 1RTT - QUIC exporter label for server 1-RTT secret derivations.
- TLS_
MAX_ RECORD_ PAYLOAD_ LEN - Maximum TLS record payload length permitted by RFC 5246 / RFC 8446 outer length field.
- TLS_
RECORD_ HEADER_ LEN - Length of a TLS 1.x
TLSPlaintextouter header (type || version || length).
Traits§
- External
KeyProvider - Trait boundary for external key operations backed by software, HSM, or remote KMS providers.
Functions§
- noxtls_
apply_ dtls13_ ack_ ranges - Marks retransmit records acknowledged by DTLS 1.3 ACK ranges.
- noxtls_
cert_ validation_ time_ now - Returns PKIX GeneralizedTime
nowfor certificate chain validation. - noxtls_
certificate_ chain_ pem_ to_ der_ blocks - Parses all PEM
CERTIFICATEblocks into DER bytes. - noxtls_
certificate_ matches_ hostname - Matches
hostnameagainst certificate DNS identities. - noxtls_
certificate_ pem_ to_ der - Parses one PEM
CERTIFICATEblock into DER bytes. - noxtls_
derive_ deterministic_ p256_ private - Derives a deterministic P-256 private scalar from a seed and domain label for modeled TLS 1.3.
- noxtls_
derive_ deterministic_ x25519_ private - Derives deterministic X25519 private scalar bytes from a seed and domain label using SHA-256.
- noxtls_
derive_ tls13_ p256_ shared_ secret - Derives a TLS 1.3 ECDHE shared secret for
secp256r1from the local private key and peer uncompressed point. - noxtls_
derive_ tls13_ x25519_ shared_ secret - Derives a TLS 1.3 X25519 ECDHE shared secret from the local private key and peer
key_sharebytes. - noxtls_
dtls13_ aes128gcm_ record_ size - Computes serialized DTLS1.3 AES-128-GCM record packet size for a plaintext length.
- noxtls_
ec_ private_ key_ pem_ to_ der_ sec1 - Parses one PEM SEC1 EC private-key block into DER bytes.
- noxtls_
encode_ dtls13_ ack - Encodes DTLS 1.3 ACK ranges as an ACK handshake message body.
- noxtls_
encode_ dtls13_ record_ header - Encodes an RFC 9147 DTLS 1.3 unified record header without Connection ID.
- noxtls_
encode_ dtls13_ record_ packet - Encodes one DTLS 1.3 unified-header packet without Connection ID.
- noxtls_
encode_ dtls_ record_ header - Encodes DTLS record header fields into the 13-byte wire format.
- noxtls_
encode_ dtls_ record_ packet - Encodes a full DTLS record packet (
header || payload). - noxtls_
fill_ random - Fills
outwith unpredictable bytes fromentropy. - noxtls_
hkdf_ extract_ for_ hash - Extracts HKDF PRK using the selected hash noxtls_algorithm and an all-zero salt of digest length.
- noxtls_
hkdf_ extract_ with_ salt_ for_ hash - Extracts HKDF PRK using caller-provided salt for TLS 1.3 stage chaining.
- noxtls_
hmac_ drbg_ from_ entropy - Instantiates an HMAC-DRBG from platform entropy (minimum 32 bytes entropy + 16 byte nonce).
- noxtls_
open_ dtls13_ aes128gcm_ record - Opens one DTLS1.3-style protected record packet using AES-GCM and replay checks.
- noxtls_
open_ dtls13_ unified_ aes128gcm_ record - Opens one RFC 9147-style DTLS 1.3 protected record using a unified header.
- noxtls_
p256_ generate_ private_ key_ with_ entropy - Generates a P-256 private key using
noxtls_platform::EntropySource. - noxtls_
p256_ private_ key_ from_ pem_ pkcs8 - Builds
P256PrivateKeyfrom PEM PKCS#8PRIVATE KEYtext. - noxtls_
p256_ private_ key_ from_ pem_ sec1 - Builds
P256PrivateKeyfrom PEM SEC1EC PRIVATE KEYtext. - noxtls_
p256_ private_ key_ from_ pkcs8_ der - Builds
P256PrivateKeyfrom PKCS#8 DER bytes forid-ecPublicKey+prime256v1. - noxtls_
p384_ private_ key_ from_ pem_ pkcs8 - Builds
P384PrivateKeyfrom PEM PKCS#8PRIVATE KEYtext. - noxtls_
p384_ private_ key_ from_ pem_ sec1 - Builds
P384PrivateKeyfrom PEM SEC1EC PRIVATE KEYtext. - noxtls_
p384_ private_ key_ from_ pkcs8_ der - Builds
P384PrivateKeyfrom PKCS#8 DER bytes forid-ecPublicKey+secp384r1. - noxtls_
p521_ private_ key_ from_ pem_ pkcs8 - Builds
NamedEcPrivateKeyfrom PEM PKCS#8PRIVATE KEYtext forsecp521r1. - noxtls_
p521_ private_ key_ from_ pem_ sec1 - Builds
NamedEcPrivateKeyfrom PEM SEC1EC PRIVATE KEYtext forsecp521r1. - noxtls_
p521_ private_ key_ from_ pkcs8_ der - Builds
NamedEcPrivateKeyfrom PKCS#8 DER bytes forid-ecPublicKey+secp521r1. - noxtls_
parse_ certificate - Parses a top-level DER certificate sequence and extracts core fields.
- noxtls_
parse_ dtls12_ handshake_ fragment - Parses one encoded DTLS1.2 handshake fragment.
- noxtls_
parse_ dtls13_ ack - Parses DTLS 1.3 ACK ranges from an ACK handshake message body.
- noxtls_
parse_ dtls13_ record_ header - Parses one RFC 9147 DTLS 1.3 unified record header without Connection ID.
- noxtls_
parse_ dtls13_ record_ packet - Parses one DTLS 1.3 unified-header packet and validates the explicit length.
- noxtls_
parse_ dtls_ record_ header - Parses a DTLS record header and returns header + remaining bytes.
- noxtls_
parse_ dtls_ record_ packet - Parses a full DTLS record packet and validates payload length match.
- noxtls_
parse_ pkcs8_ private_ key_ info_ der - Parses PKCS#8 PrivateKeyInfo DER and extracts noxtls_algorithm OID and key octets.
- noxtls_
parse_ tls13_ ocsp_ staple_ info - Parses and validates a stapled OCSP response against a validation time.
- noxtls_
pem_ file_ to_ der_ blocks - Reads all matching PEM blocks from file and decodes DER payloads for
label. - noxtls_
pem_ to_ der - Parses PEM armor into DER bytes and verifies expected label markers.
- noxtls_
pem_ to_ der_ blocks - Parses all PEM blocks matching
labelinto DER payload bytes. - noxtls_
private_ key_ pem_ to_ der_ pkcs8 - Parses one PEM PKCS#8 private-key block into DER bytes.
- noxtls_
reassemble_ dtls12_ handshake_ fragments - Reassembles DTLS1.2 handshake fragments into one complete message body.
- noxtls_
rsa_ private_ key_ from_ pem_ pkcs1 - Builds
RsaPrivateKeyfrom PEM PKCS#1RSA PRIVATE KEYtext. - noxtls_
rsa_ private_ key_ from_ pem_ pkcs8 - Builds
RsaPrivateKeyfrom PEM PKCS#8PRIVATE KEYtext. - noxtls_
rsa_ private_ key_ from_ pkcs1_ der - Builds
RsaPrivateKeyfrom PKCS#1 DER bytes. - noxtls_
rsa_ private_ key_ from_ pkcs8_ der - Builds
RsaPrivateKeyfrom PKCS#8 DER bytes for RSA keys. - noxtls_
rsa_ pss_ private_ key_ from_ pem_ pkcs8 - Builds
RsaPrivateKeyfrom PEM PKCS#8PRIVATE KEYtext for RSASSA-PSS keys. - noxtls_
rsa_ pss_ private_ key_ from_ pkcs8_ der - Builds
RsaPrivateKeyfrom PKCS#8 DER bytes for RSASSA-PSS keys. - noxtls_
seal_ dtls13_ aes128gcm_ record - Seals one DTLS1.3-style protected record packet using AES-GCM.
- noxtls_
seal_ dtls13_ unified_ aes128gcm_ record - Seals one RFC 9147-style DTLS 1.3 protected record using a unified header.
- noxtls_
tls13_ client_ hello_ offers_ supported_ key_ exchange - Evaluates whether ClientHello extension offers satisfy modeled TLS 1.3 key-exchange policy.
- noxtls_
tls13_ expand_ label_ for_ hash - Expands TLS 1.3 HKDF-Label structure bytes using the selected hash backend.
- noxtls_
tls13_ key_ share_ group_ supported - Returns
truewhen the given TLS 1.3key_sharenamed group is supported by this build. - noxtls_
tls13_ signature_ algorithm_ supported - Returns
truewhen the given TLS 1.3 signature noxtls_algorithm is supported by this build. - noxtls_
validate_ certificate_ chain - Validates certificate chain with signature enforcement at each hop.
- noxtls_
verify_ tls13_ ocsp_ staple - Validates a stapled OCSP response and returns its revocation/freshness status.
- noxtls_
x25519_ generate_ private_ key_ with_ entropy - Generates an X25519 private key using
noxtls_platform::EntropySource. - split_
tls13_ handshake_ payload - Splits one TLS
Handshakeinner payload into individual handshake messages.
Type Aliases§
- Tls13
Ocsp Staple Verifier - Function-pointer hook used to validate one stapled OCSP response payload.