Skip to main content

Crate noxtls

Crate noxtls 

Source
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§

ClientHelloExtensions
Captures parsed extension data from a minimally-modeled ClientHello.
ClientHelloInfo
Summarizes parsed suite and extension data from ClientHello.
Connection
Holds connection version, handshake state, and transcript bytes.
DtlsEpochReplayTracker
Tracks DTLS anti-replay state across epoch transitions.
DtlsFlightRecord
Stores one outbound DTLS packet entry for potential retransmission.
DtlsFlightRetransmitTracker
Tracks outbound DTLS flight packets for retransmission and ack processing.
DtlsOperationalPolicy
Captures transport-facing DTLS retry and timeout knobs.
DtlsRecordHeader
Represents a DTLS record-layer header for datagram framing.
DtlsReplayWindow
Tracks a DTLS anti-replay bitmap for one epoch.
ExternalKeyHandle
Opaque external key handle used by providers to locate key material.
KeyDecryptRequest
Carries one provider decrypt operation request.
KeyDeriveRequest
Carries one provider key-derivation operation request.
KeySignRequest
Carries one provider sign operation request.
ProtectedRecord
Represents one protected TLS record carrying ciphertext and authentication tag.
ResumptionTicket
Captures minimal TLS 1.3 resumption ticket material for PSK flows.
SoftwareKeyProvider
In-tree software provider implementing the same external key-provider trait boundary.
TicketStore
In-memory server ticket cache with simple lifecycle operations.
Tls13EarlyDataOperationalPolicy
Captures tunable policy controls for TLS 1.3 modeled early-data handling.
Tls13EarlyDataReplayState
Serializable replay-window state for carrying TLS 1.3 early-data anti-replay continuity.
Tls13EarlyDataTelemetry
Tracks counters for modeled TLS 1.3 early-data accept/reject outcomes.
Tls13QuicInitialSecrets
Captures QUIC Initial secrets derived from destination connection ID.
Tls13QuicNextTrafficSecrets
Captures next-generation QUIC 1-RTT traffic secrets derived via quic ku.
Tls13QuicPacketProtectionKeys
Captures one QUIC packet-protection keyset derived from one traffic secret.
Tls13QuicTrafficSecretSnapshot
Captures current QUIC handshake and 1-RTT traffic secret snapshots.

Enums§

AlertDescription
TLS alert description codepoints used by this port.
AlertLevel
TLS alert level codes.
CipherSuite
Identifies modeled cipher suites and their transcript hash algorithms.
DtlsOperationalProfile
Names pre-tuned DTLS operational profiles for common deployment environments.
HandshakeState
Represents coarse handshake phases used by the prototype state machine.
HashAlgorithm
Identifies the hash algorithm selected by a cipher suite or version profile for HKDF and transcript work.
KeyDecryptAlgorithm
Names supported decryption operations for external/provider-backed keys.
KeyDeriveAlgorithm
Names supported key-derivation operations for external/provider-backed keys.
KeySignAlgorithm
Names supported signing operations for external/provider-backed keys.
RecordContentType
TLS record content types used by outer and inner TLS 1.3 framing.
TicketUsagePolicy
Controls whether accepted PSK resumption tickets remain reusable.
Tls13EarlyDataOperationalProfile
Names pre-tuned operational profiles for TLS 1.3 modeled early-data policy.
Tls13OcspStapleVerification
Describes validation outcome for one stapled OCSP response.
TlsVersion
Enumerates currently modeled TLS and DTLS protocol versions.

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.

Traits§

ExternalKeyProvider
Trait boundary for external key operations backed by software, HSM, or remote KMS providers.

Functions§

derive_deterministic_p256_private
Derives a deterministic P-256 private scalar from a seed and domain label for modeled TLS 1.3.
derive_deterministic_x25519_private
Derives deterministic X25519 private scalar bytes from a seed and domain label using SHA-256.
derive_tls13_p256_shared_secret
Derives a TLS 1.3 ECDHE shared secret for secp256r1 from the local private key and peer uncompressed point.
derive_tls13_x25519_shared_secret
Derives a TLS 1.3 X25519 ECDHE shared secret from the local private key and peer key_share bytes.
dtls13_aes128gcm_record_size
Computes serialized DTLS1.3 AES-128-GCM record packet size for a plaintext length.
encode_dtls_record_header
Encodes DTLS record header fields into the 13-byte wire format.
encode_dtls_record_packet
Encodes a full DTLS record packet (header || payload).
hkdf_extract_for_hash
Extracts HKDF PRK using the selected hash algorithm and an all-zero salt of digest length.
hkdf_extract_with_salt_for_hash
Extracts HKDF PRK using caller-provided salt for TLS 1.3 stage chaining.
open_dtls13_aes128gcm_record
Opens one DTLS1.3-style protected record packet using AES-GCM and replay checks.
parse_dtls12_handshake_fragment
Parses one encoded DTLS1.2 handshake fragment.
parse_dtls_record_header
Parses a DTLS record header and returns header + remaining bytes.
parse_dtls_record_packet
Parses a full DTLS record packet and validates payload length match.
reassemble_dtls12_handshake_fragments
Reassembles DTLS1.2 handshake fragments into one complete message body.
seal_dtls13_aes128gcm_record
Seals one DTLS1.3-style protected record packet using AES-GCM.
tls13_client_hello_offers_supported_key_exchange
Evaluates whether ClientHello extension offers satisfy modeled TLS 1.3 key-exchange policy.
tls13_expand_label_for_hash
Expands TLS 1.3 HKDF-Label structure bytes using the selected hash backend.
tls13_key_share_group_supported
Returns true when the given TLS 1.3 key_share named group is supported by this build.
tls13_signature_algorithm_supported
Returns true when the given TLS 1.3 signature algorithm is supported by this build.

Type Aliases§

Tls13OcspStapleVerifier
Function-pointer hook used to validate one stapled OCSP response payload.