std::tls API Reference
Development snapshot. Generated from the current repository source. This inventory may include internal and test declarations; it is not a list of supported public APIs. Check the module guide and the compiler version you use before relying on an entry.
Application entry points
Read the TLS protocol-owner guide for record state, explicit certificate trust and the client-handshake sequence. This inventory does not provide a connected TlsStream; raw codecs and test fixtures do not establish network interoperability.
Overview
Structs: TlsAlert · TlsHandshakeFeedResult · TlsHandshakeAssembler · TlsCertificateEntryView · TlsCertificateMessageView · TlsCertificateVerifyView · TlsTrafficKeyLengths · TlsWireSlice · TlsHelloExtensions · TlsExtensionEntry · TlsKeyShareEntry · TlsClientHelloView · TlsServerHelloView · TlsDnsIdentityError · TlsDnsIdentity · TlsSecretSchedule · TlsX25519Negotiation · TlsEncryptedExtensionsCandidate · TlsRecordHeader · TlsPlaintext · TlsCipherState · TlsHandshakeHeader · TlsTranscript · TlsTransportEvent · TlsTransportError · TlsApplicationTraffic · TlsNextTrafficGeneration · X509Error · X509CertificateView · X509ExtensionView · X509ExtensionPolicy · X509TlsServerVerifier
Enums: TlsAlertLevel · TlsAlertDescription · TlsAlertError · TlsHandshakeAssemblerError · TlsHandshakeFeedKind · TlsCertificateError · TlsKeyScheduleError · TlsHashAlgorithm · TlsHelloError · TlsDnsIdentityErrorKind · TlsSecretStage · TlsKeyUpdateRequest · TlsKeyUpdateError · TlsHandshakeRole · TlsX25519NegotiationStage · TlsX25519NegotiationError · TlsRecordError · TlsTranscriptError · TlsTransportState · TlsTransportEventKind · TlsTransportErrorKind · X509ErrorKind
Functions: alertLevelCode · decodeAlertLevel · alertDescriptionCode · decodeAlertDescription · canonicalAlertLevel · encodeTlsAlert · decodeTlsAlert · emptyFeedResult · completeFeedResult · copyBytes · spansOverlap · headerFromArray · validateOutput · headerFromSpan · certificateU16 · certificateU24 · certificateSlice · scanCertificateEntryExtensions · certificateEntryAtChecked · decodeServerCertificate · decodeCertificateVerify · verifyServerCertificateSignature · verifyServerCertificateSignatureWithKey · spansOverlap · hkdfExpandLabel · deriveSecret · computeFinishedVerifyData · verifyFinished · deriveTrafficKeys · updateTrafficSecret · emptyWireSlice · emptyExtensions · readU16 · writeU16 · copyBytes · rangesOverlap · spanRangeOverlapsOutput · validateVector16 · validateSupportedVersions · validateServerName · validateAlpn · validateCookie · validatePadding · validateClientPsk · groupsContain · validateClientKeyShares · validateServerKeyShare · scanExtensions · decodeExactHeader · copyRandom · isHelloRetryRandom · decodeClientHello · decodeServerHello · encodeHeader · encodeTlsExtension · encodeCookie · encodeClientHello · encodeServerHello · encodeClientSupportedVersions · encodeServerSupportedVersion · encodeU16VectorExtension · encodeSupportedGroups · encodeSignatureAlgorithms · encodeClientKeyShare · encodeServerKeyShare · encodeHelloRetryKeyShare · identityError · identityByteAt · isAsciiAlpha · isAsciiDigit · foldedAscii · normalizedDnsLength · isIpv4Reference · equalDnsRange · sameHash · rangesOverlap · exactArraySpan · exactArraySpanMut · emptyTranscriptHash · transcriptDigest · extractSecret · validateDualOutput · computeFinishedFromTranscript · verifyFinishedFromTranscript · keyUpdateRequestCode · encodeTlsKeyUpdate · decodeTlsKeyUpdate · exactArraySpan · exactArraySpanMut · spansOverlap · equalBytes · mapHelloFailure · mapTranscriptFailure · mapScheduleFailure · cipherHash · offeredCipher · offeredSignature · hashU16 · retryInvariantDigest · extensionPresent · validateTrafficOutputs · negotiationU16 · encodeRecordHeaderRaw · decodeRecordHeaderRaw · encodeRecordHeader · decodeRecordHeader · isTlsInnerContentType · rangesOverlap · constructNonce · decodeHeaderRaw · encodeHeaderRaw · decodeHandshakeHeader · encodeHandshakeHeader · sameHash · transportError · transportRecordError · transportAlertError · transportScheduleError · transportKeyUpdateError · recordFailureEndsConnection · arraySpan · mutableArraySpan · stageNextGeneration · x509Error · bytesOf · rebaseSlice · rebaseElement · child · childCount · isEd25519Algorithm · explicitElement · x509Digit · x509TwoDigits · x509LeapYear · x509DaysInMonth · x509DaysFromCivil · parseCertificateTime · extensionSequence · extensionAt · oidMatches · boundedPathLength · sameOid · parseBasicConstraints · parseKeyUsage · parseExtendedKeyUsage · extensionPolicy · namesEqual · subjectNameIsEmpty · validateLeafPolicy · validateAuthorityPolicy · certificateIsSelfIssued · subjectAltNames · arraySpan · mutableArraySpan · test_tls_alert_canonical_roundtrip · test_tls_alert_rejects_noncanonical_emission · test_tls_alert_decode_is_exact_and_downgrade_safe · arraySpan · mutableArraySpan · spansEqual · test_tls_handshake_assembler_direct_and_coalesced_zero_copy · test_tls_handshake_assembler_every_two_fragment_split · test_tls_handshake_assembler_one_byte_fragments · test_tls_handshake_assembler_rejections_are_atomic · test_tls_handshake_assembler_output_identity_and_boundaries · test_tls_handshake_assembler_zero_body_and_invalid_inputs · arraySpan · u16ArraySpan · state · decrypt_record_seq_zero · benchRecordDecrypt · bench_tls_record_decrypt_chacha20_10kb · bench_tls_record_decrypt_chacha20_16kb · bench_tls_record_decrypt_aes128_gcm_16kb · bench_tls_derive_traffic_keys_sha256 · bench_tls_derive_traffic_keys_sha384 · appendSelectedTranscript · appendDualTranscript · bench_tls_transcript_selected_sha256_1kb · bench_tls_transcript_dual_hash_1kb · deriveHandshakeScheduleSha256 · bench_tls_handshake_schedule_sha256 · bench_tls_finished_sha256 · buildClientHelloBenchmark · decodeClientHelloBench · bench_tls_client_hello_decode · bench_tls_handshake_assembler_direct · bench_tls_handshake_assembler_fragmented_1kb · arraySpan · mutableArraySpan · test_tls_hkdf_expand_label_sha256_vector · test_tls_hkdf_expand_label_sha384_vector · test_tls_hkdf_expand_label_rejects_invalid_lengths_and_aliasing · test_tls_traffic_key_schedule_validates_suite_and_outputs · helloErrorName · arraySpan · mutableArraySpan · appendClientExtensions · appendServerExtensions · test_tls_client_hello_codec_roundtrip_and_views · test_tls_server_hello_codec_roundtrip · test_tls_client_hello_duplicate_and_order_rejections · test_tls_hello_lengths_and_aliasing_fail_before_mutation · test_tls_hello_retry_request_and_group_coherence · test_tls_hello_cookie_and_padding_are_exact · test_tls_client_hello_rejects_every_truncated_prefix · bytes · matches · test_tls_dns_identity_exact_ascii · test_tls_dns_identity_wildcard_is_one_complete_label · test_tls_dns_identity_rejects_malformed_and_ip_refs · arraySpan · mutableArraySpan · assertPrefix · test_tls_rfc8448_handshake_traffic_secrets · test_tls_secret_schedule_orders_transitions_and_finished · test_tls_sha384_schedule_and_finished_validation · test_tls_secret_schedule_retire_is_irreversible · arraySpan · mutableArraySpan · strBytes · traffic · cipher · test_tls_key_update_codec_and_independent_schedule_vector · test_tls_key_update_switches_generation_after_old_key_record · test_tls_requested_key_update_orders_response_before_data · test_tls_key_update_capacity_failure_is_atomic · test_tls_fragmented_key_update_commits_only_after_last_fragment · test_tls_new_generation_is_rejected_before_key_update_record · test_tls_crossed_requested_key_updates_advance_two_generations · arraySpan · mutableArraySpan · samePrefix · appendClientExtensions · appendClientExtensionsWithoutKeyShare · appendRetryClientExtensions · buildClientHello · buildClientHelloWithoutKeyShare · buildRetryClientHello · buildServerHello · newOwner · test_tls_x25519_negotiation_matches_both_roles_sha256 · test_tls_x25519_negotiation_sha384_and_single_use · test_tls_x25519_negotiation_rejects_low_order_before_commit · test_tls_x25519_negotiation_hrr_cookie_only_replay · test_tls_x25519_negotiation_hrr_cookie_limit_is_transactional · test_tls_x25519_negotiation_hrr_commits_fresh_client_hello · test_tls_x25519_negotiation_preconditions_fail_closed · bytes · words · bytesMut · buildClient · buildServer · appendClientCapabilities · buildRetryClient · buildHelloRetry · negotiateClient · negotiateRetryClient · bench_tls_x25519_full_client_negotiation_sha256 · bench_tls_x25519_hrr_client_negotiation_sha256 · arraySpan · mutableArraySpan · strBytes · aes128State · cipherState · encryptFailedWith · decryptFailedWith · test_tls_record_header_encoding_and_bounds · test_tls_record_encrypt_decrypt_roundtrip · test_tls_record_rejects_truncated_and_malformed_headers · test_tls_record_auth_failure_zeroes_plaintext_and_preserves_sequence · test_tls_record_rejects_invalid_key_buffer_and_oversize · test_tls_record_empty_plaintext_is_not_an_error · test_tls_record_rejects_overlapping_decrypt_output · test_tls_record_owns_key_material_and_supports_all_record_ciphers · test_tls_record_rejects_encrypt_alias_and_short_decrypt_output · arraySpan · mutableArraySpan · assertBytes · test_tls_handshake_header_codec_is_exact_and_bounded · test_tls_transcript_sha256_streaming_snapshot · test_tls_transcript_sha384_matches_independent_vector · test_tls_transcript_rejections_are_atomic · test_tls_transcript_hello_retry_rewrite_sha256 · test_tls_transcript_hello_retry_rewrite_sha384 · test_tls_transcript_constructor_and_output_fail_closed · test_tls_transcript_tracks_both_hashes_until_selection · arraySpan · mutableArraySpan · strBytes · traffic · peerCipher · test_tls_transport_application_roundtrip · test_tls_transport_close_notify_is_half_close_then_closed · test_tls_transport_capacity_failure_is_retryable · test_tls_transport_local_user_canceled_orders_shutdown · test_tls_transport_fatal_alert_retires_both_peers · test_tls_transport_wire_failure_poisoning_is_contextual · test_tls_transport_user_canceled_requires_close_notify · test_tls_transport_authenticated_control_messages_fail_closed · certSpan · stringBytes · x509ArrayBytes · x509MutableArrayBytes · x509WriteU16 · x509WriteU24 · buildAuthenticatedClientHelloWithAlpn · buildAuthenticatedClientHello · buildAuthenticatedServerHello · buildServerCertificateChainMessage · buildAuthenticatedCertificateVerify · buildAuthenticatedFinished · buildServerCertificateMessage · certificateInputs · test_x509_ed25519_view_signature_and_san · test_x509_rejects_tamper_and_unsupported_algorithm · test_x509_requires_exact_der · test_x509_direct_tls_server_policy · test_x509_direct_policy_time_signature_and_critical_extension · test_x509_bounded_intermediate_chain_and_path_length · test_tls_server_certificate_view_and_exact_framing · test_tls_ed25519_server_certificate_verify_context · test_tls_certificate_verify_exact_lengths · test_tls_authentication_wire_builders · test_tls_authenticated_owner_full_flight · runAuthenticatedClientFlight · bench_tls_authenticated_client_full_flight · bench_x509_ed25519_leaf_parse · bench_x509_ed25519_direct_tls_policy · bench_x509_ed25519_one_intermediate_policy · bench_tls_ed25519_server_certificate_verify
Constants: TLS_ALERT_WIRE_BYTES · TLS_SIGNATURE_ED25519 · TLS_MAX_CERTIFICATE_ENTRIES · TLS_MAX_CERTIFICATE_ENTRY_EXTENSIONS · HANDSHAKE_TYPE_CLIENT_HELLO · HANDSHAKE_TYPE_SERVER_HELLO · HANDSHAKE_TYPE_ENCRYPTED_EXTENSIONS · HANDSHAKE_TYPE_CERTIFICATE · HANDSHAKE_TYPE_CERTIFICATE_VERIFY · HANDSHAKE_TYPE_FINISHED · HANDSHAKE_TYPE_KEY_UPDATE · TLS_LEGACY_VERSION · TLS_EXTENSION_SERVER_NAME · TLS_EXTENSION_SUPPORTED_GROUPS · TLS_EXTENSION_SIGNATURE_ALGORITHMS · TLS_EXTENSION_ALPN · TLS_EXTENSION_PADDING · TLS_EXTENSION_PRE_SHARED_KEY · TLS_EXTENSION_EARLY_DATA · TLS_EXTENSION_SUPPORTED_VERSIONS · TLS_EXTENSION_COOKIE · TLS_EXTENSION_PSK_KEY_EXCHANGE_MODES · TLS_EXTENSION_KEY_SHARE · TLS_NAMED_GROUP_X25519 · TLS_MAX_HELLO_EXTENSIONS · TLS_MAX_HELLO_CIPHER_SUITES · TLS_MAX_HELLO_GROUPS · TLS_MAX_HELLO_SIGNATURE_SCHEMES · TLS_HELLO_RETRY_RANDOM · TLS_KEY_UPDATE_WIRE_BYTES · TLS_MAX_NEGOTIATION_ALPN_BYTES · TLS_MAX_SELECTED_ALPN_BYTES · TLS_MAX_RETRY_COOKIE_BYTES · CONTENT_TYPE_CHANGE_CIPHER_SPEC · CONTENT_TYPE_ALERT · CONTENT_TYPE_HANDSHAKE · CONTENT_TYPE_APPLICATION_DATA · TLS_VERSION_1_2 · TLS_VERSION_1_3 · CIPHER_AES_128_GCM_SHA256 · CIPHER_AES_256_GCM_SHA384 · CIPHER_CHACHA20_POLY1305_SHA256 · TLS_RECORD_HEADER_LEN · TLS_AEAD_TAG_LEN · TLS_MAX_PLAINTEXT_LEN · TLS_MAX_CIPHERTEXT_LEN · TLS_HANDSHAKE_HEADER_LEN · TLS_MAX_HANDSHAKE_BODY_LEN · TLS_DEFAULT_TRANSCRIPT_LIMIT · TLS_MAX_TRANSCRIPT_LIMIT · HANDSHAKE_TYPE_MESSAGE_HASH · TLS_MIN_PROTECTED_RECORD_BYTES · OID_ED25519 · OID_SUBJECT_ALT_NAME · OID_BASIC_CONSTRAINTS · OID_KEY_USAGE · OID_EXTENDED_KEY_USAGE · OID_SUBJECT_KEY_IDENTIFIER · OID_AUTHORITY_KEY_IDENTIFIER · OID_NAME_CONSTRAINTS · OID_POLICY_MAPPINGS · OID_POLICY_CONSTRAINTS · OID_INHIBIT_ANY_POLICY · OID_SERVER_AUTH · OID_ANY_EXTENDED_KEY_USAGE · X509_MAX_INTERMEDIATES · ED25519_LEAF_HEX · ED25519_CHAIN_ROOT_HEX · ED25519_CHAIN_INTERMEDIATE_HEX · ED25519_CHAIN_LEAF_HEX · ED25519_CERTIFICATE_VERIFY_HEX · CERTIFICATE_CLIENT_HELLO · ED25519_CHAIN_LEAF_PRIVATE · ED25519_CERT
Constants
TLS_ALERT_WIRE_BYTES 🔓 export
📄
alert.vxL5-5
export const TLS_ALERT_WIRE_BYTES: usize=2 as usize;TLS_SIGNATURE_ED25519 🔓 export
📄
certificate.vxL13-13
export const TLS_SIGNATURE_ED25519: u16=0x0807 as u16;TLS_MAX_CERTIFICATE_ENTRIES 🔓 export
📄
certificate.vxL14-14
export const TLS_MAX_CERTIFICATE_ENTRIES: usize=9 as usize;TLS_MAX_CERTIFICATE_ENTRY_EXTENSIONS 🔓 export
📄
certificate.vxL15-15
export const TLS_MAX_CERTIFICATE_ENTRY_EXTENSIONS: usize=32 as usize;HANDSHAKE_TYPE_CLIENT_HELLO 🔓 export
📄
handshake.vxL13-13
export const HANDSHAKE_TYPE_CLIENT_HELLO: u8=1;HANDSHAKE_TYPE_SERVER_HELLO 🔓 export
📄
handshake.vxL14-14
export const HANDSHAKE_TYPE_SERVER_HELLO: u8=2;HANDSHAKE_TYPE_ENCRYPTED_EXTENSIONS 🔓 export
📄
handshake.vxL15-15
export const HANDSHAKE_TYPE_ENCRYPTED_EXTENSIONS: u8=8;HANDSHAKE_TYPE_CERTIFICATE 🔓 export
📄
handshake.vxL16-16
export const HANDSHAKE_TYPE_CERTIFICATE: u8=11;HANDSHAKE_TYPE_CERTIFICATE_VERIFY 🔓 export
📄
handshake.vxL17-17
export const HANDSHAKE_TYPE_CERTIFICATE_VERIFY: u8=15;HANDSHAKE_TYPE_FINISHED 🔓 export
📄
handshake.vxL18-18
export const HANDSHAKE_TYPE_FINISHED: u8=20;HANDSHAKE_TYPE_KEY_UPDATE 🔓 export
📄
handshake.vxL19-19
export const HANDSHAKE_TYPE_KEY_UPDATE: u8=24;TLS_LEGACY_VERSION 🔓 export
📄
hello.vxL14-14
export const TLS_LEGACY_VERSION: u16=0x0303 as u16;TLS_EXTENSION_SERVER_NAME 🔓 export
📄
hello.vxL16-16
export const TLS_EXTENSION_SERVER_NAME: u16=0 as u16;TLS_EXTENSION_SUPPORTED_GROUPS 🔓 export
📄
hello.vxL17-17
export const TLS_EXTENSION_SUPPORTED_GROUPS: u16=10 as u16;TLS_EXTENSION_SIGNATURE_ALGORITHMS 🔓 export
📄
hello.vxL18-18
export const TLS_EXTENSION_SIGNATURE_ALGORITHMS: u16=13 as u16;TLS_EXTENSION_ALPN 🔓 export
📄
hello.vxL19-19
export const TLS_EXTENSION_ALPN: u16=16 as u16;TLS_EXTENSION_PADDING 🔓 export
📄
hello.vxL20-20
export const TLS_EXTENSION_PADDING: u16=21 as u16;TLS_EXTENSION_PRE_SHARED_KEY 🔓 export
📄
hello.vxL21-21
export const TLS_EXTENSION_PRE_SHARED_KEY: u16=41 as u16;TLS_EXTENSION_EARLY_DATA 🔓 export
📄
hello.vxL22-22
export const TLS_EXTENSION_EARLY_DATA: u16=42 as u16;TLS_EXTENSION_SUPPORTED_VERSIONS 🔓 export
📄
hello.vxL23-23
export const TLS_EXTENSION_SUPPORTED_VERSIONS: u16=43 as u16;TLS_EXTENSION_COOKIE 🔓 export
📄
hello.vxL24-24
export const TLS_EXTENSION_COOKIE: u16=44 as u16;TLS_EXTENSION_PSK_KEY_EXCHANGE_MODES 🔓 export
📄
hello.vxL25-25
export const TLS_EXTENSION_PSK_KEY_EXCHANGE_MODES: u16=45 as u16;TLS_EXTENSION_KEY_SHARE 🔓 export
📄
hello.vxL26-26
export const TLS_EXTENSION_KEY_SHARE: u16=51 as u16;TLS_NAMED_GROUP_X25519 🔓 export
📄
hello.vxL28-28
export const TLS_NAMED_GROUP_X25519: u16=29 as u16;TLS_MAX_HELLO_EXTENSIONS 🔓 export
📄
hello.vxL29-29
export const TLS_MAX_HELLO_EXTENSIONS: usize=64 as usize;TLS_MAX_HELLO_CIPHER_SUITES 🔓 export
📄
hello.vxL30-30
export const TLS_MAX_HELLO_CIPHER_SUITES: usize=256 as usize;TLS_MAX_HELLO_GROUPS 🔓 export
📄
hello.vxL31-31
export const TLS_MAX_HELLO_GROUPS: usize=64 as usize;TLS_MAX_HELLO_SIGNATURE_SCHEMES 🔓 export
📄
hello.vxL32-32
export const TLS_MAX_HELLO_SIGNATURE_SCHEMES: usize=64 as usize;TLS_HELLO_RETRY_RANDOM
📄
hello.vxL34-39
const TLS_HELLO_RETRY_RANDOM: [u8; 32]=[
0xcfu8, 0x21, 0xad, 0x74, 0xe5, 0x9a, 0x61, 0x11,
0xbe, 0x1d, 0x8c, 0x02, 0x1e, 0x65, 0xb8, 0x91,
0xc2, 0xa2, 0x11, 0x16, 0x7a, 0xbb, 0x8c, 0x5e,
0x07, 0x9e, 0x09, 0xe2, 0xc8, 0xa8, 0x33, 0x9c,
];TLS_KEY_UPDATE_WIRE_BYTES 🔓 export
📄
key_update.vxL7-7
export const TLS_KEY_UPDATE_WIRE_BYTES: usize=5 as usize;TLS_MAX_NEGOTIATION_ALPN_BYTES 🔓 export
📄
negotiation.vxL36-36
export const TLS_MAX_NEGOTIATION_ALPN_BYTES: usize=1024 as usize;TLS_MAX_SELECTED_ALPN_BYTES 🔓 export
📄
negotiation.vxL37-37
export const TLS_MAX_SELECTED_ALPN_BYTES: usize=255 as usize;TLS_MAX_RETRY_COOKIE_BYTES 🔓 export
📄
negotiation.vxL38-38
export const TLS_MAX_RETRY_COOKIE_BYTES: usize=4096 as usize;CONTENT_TYPE_CHANGE_CIPHER_SPEC 🔓 export
📄
record.vxL11-11
export const CONTENT_TYPE_CHANGE_CIPHER_SPEC: u8=20;CONTENT_TYPE_ALERT 🔓 export
📄
record.vxL12-12
export const CONTENT_TYPE_ALERT: u8=21;CONTENT_TYPE_HANDSHAKE 🔓 export
📄
record.vxL13-13
export const CONTENT_TYPE_HANDSHAKE: u8=22;CONTENT_TYPE_APPLICATION_DATA 🔓 export
📄
record.vxL14-14
export const CONTENT_TYPE_APPLICATION_DATA: u8=23;TLS_VERSION_1_2 🔓 export
📄
record.vxL16-16
export const TLS_VERSION_1_2: u16=0x0303;TLS_VERSION_1_3 🔓 export
📄
record.vxL17-17
export const TLS_VERSION_1_3: u16=0x0304;CIPHER_AES_128_GCM_SHA256 🔓 export
📄
record.vxL19-19
export const CIPHER_AES_128_GCM_SHA256: u16=0x1301;CIPHER_AES_256_GCM_SHA384 🔓 export
📄
record.vxL20-20
export const CIPHER_AES_256_GCM_SHA384: u16=0x1302;CIPHER_CHACHA20_POLY1305_SHA256 🔓 export
📄
record.vxL21-21
export const CIPHER_CHACHA20_POLY1305_SHA256: u16=0x1303;TLS_RECORD_HEADER_LEN
📄
record.vxL23-23
const TLS_RECORD_HEADER_LEN: u64=5;TLS_AEAD_TAG_LEN
📄
record.vxL24-24
const TLS_AEAD_TAG_LEN: u64=16;TLS_MAX_PLAINTEXT_LEN
📄
record.vxL25-25
const TLS_MAX_PLAINTEXT_LEN: u64=16384;TLS_MAX_CIPHERTEXT_LEN
📄
record.vxL26-26
const TLS_MAX_CIPHERTEXT_LEN: u64=16640;TLS_HANDSHAKE_HEADER_LEN 🔓 export
📄
transcript.vxL10-10
export const TLS_HANDSHAKE_HEADER_LEN: usize=4 as usize;TLS_MAX_HANDSHAKE_BODY_LEN 🔓 export
📄
transcript.vxL11-11
export const TLS_MAX_HANDSHAKE_BODY_LEN: usize=0x00ff_ffff as usize;TLS_DEFAULT_TRANSCRIPT_LIMIT 🔓 export
📄
transcript.vxL12-12
export const TLS_DEFAULT_TRANSCRIPT_LIMIT: usize=16 as usize * 1024 as usize * 1024 as usize;TLS_MAX_TRANSCRIPT_LIMIT 🔓 export
📄
transcript.vxL13-13
export const TLS_MAX_TRANSCRIPT_LIMIT: usize=64 as usize * 1024 as usize * 1024 as usize;HANDSHAKE_TYPE_MESSAGE_HASH 🔓 export
📄
transcript.vxL14-14
export const HANDSHAKE_TYPE_MESSAGE_HASH: u8=254 as u8;TLS_MIN_PROTECTED_RECORD_BYTES
📄
transport.vxL23-23
const TLS_MIN_PROTECTED_RECORD_BYTES: usize=22 as usize;OID_ED25519
📄
x509.vxL9-9
const OID_ED25519: [u8; 3]=[0x2bu8, 0x65, 0x70];OID_SUBJECT_ALT_NAME
📄
x509.vxL10-10
const OID_SUBJECT_ALT_NAME: [u8; 3]=[0x55u8, 0x1d, 0x11];OID_BASIC_CONSTRAINTS
📄
x509.vxL11-11
const OID_BASIC_CONSTRAINTS: [u8; 3]=[0x55u8, 0x1d, 0x13];OID_KEY_USAGE
📄
x509.vxL12-12
const OID_KEY_USAGE: [u8; 3]=[0x55u8, 0x1d, 0x0f];OID_EXTENDED_KEY_USAGE
📄
x509.vxL13-13
const OID_EXTENDED_KEY_USAGE: [u8; 3]=[0x55u8, 0x1d, 0x25];OID_SUBJECT_KEY_IDENTIFIER
📄
x509.vxL14-14
const OID_SUBJECT_KEY_IDENTIFIER: [u8; 3]=[0x55u8, 0x1d, 0x0e];OID_AUTHORITY_KEY_IDENTIFIER
📄
x509.vxL15-15
const OID_AUTHORITY_KEY_IDENTIFIER: [u8; 3]=[0x55u8, 0x1d, 0x23];OID_NAME_CONSTRAINTS
📄
x509.vxL16-16
const OID_NAME_CONSTRAINTS: [u8; 3]=[0x55u8, 0x1d, 0x1e];OID_POLICY_MAPPINGS
📄
x509.vxL17-17
const OID_POLICY_MAPPINGS: [u8; 3]=[0x55u8, 0x1d, 0x21];OID_POLICY_CONSTRAINTS
📄
x509.vxL18-18
const OID_POLICY_CONSTRAINTS: [u8; 3]=[0x55u8, 0x1d, 0x24];OID_INHIBIT_ANY_POLICY
📄
x509.vxL19-19
const OID_INHIBIT_ANY_POLICY: [u8; 3]=[0x55u8, 0x1d, 0x36];OID_SERVER_AUTH
📄
x509.vxL20-20
const OID_SERVER_AUTH: [u8; 8]=[0x2bu8, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01];OID_ANY_EXTENDED_KEY_USAGE
📄
x509.vxL21-21
const OID_ANY_EXTENDED_KEY_USAGE: [u8; 4]=[0x55u8, 0x1d, 0x25, 0x00];X509_MAX_INTERMEDIATES 🔓 export
📄
x509.vxL23-23
export const X509_MAX_INTERMEDIATES: usize=8 as usize;ED25519_LEAF_HEX
📄
x509.test.vxL17-17
const ED25519_LEAF_HEX: str="308201aa3082015ca00302010202141f0fea496120e0120c99cd65a49cccf87a1bb12d300506032b657030233121301f06035504030c186d7573742d6e6f742d62652d757365642e6578616d706c65301e170d3236303832303038303232335a170d3236303930393038303232335a301f311d301b06035504030c1469676e6f7265642d6c6561662e6578616d706c65302a300506032b65700321005e5117cb2ea6414a2928cb270d0cdee40d6ee46e9c9678a8e6c1b3348307f6c4a381a53081a2302d0603551d1104263024820f6170692e6578616d706c652e636f6d82112a2e736572766963652e6578616d706c65300c0603551d130101ff04023000300e0603551d0f0101ff04040302078030130603551d25040c300a06082b06010505070301301d0603551d0e041604140396d09772dd57912241485b237c839c6cd21123301f0603551d23041830168014ac8d629f5d979f1217e9cecf4c4e38554308cddb300506032b6570034100bdeacf260c5a0838922a192464d4ed989fe983ddc4fcf0be602f5545f4958030b0db437c3fa6db5ed80b8f535b734df4d35b9dde3e389488d9080e0917fea202";ED25519_CHAIN_ROOT_HEX
📄
x509.test.vxL19-19
const ED25519_CHAIN_ROOT_HEX: str="308201583082010aa003020102021467b7cb78aec3c2cd50dc98094933c80ba70a600c300506032b657030183116301406035504030c0d5665782d546573742d526f6f74301e170d3236303832303038323030335a170d3236313131383038323030335a30183116301406035504030c0d5665782d546573742d526f6f74302a300506032b6570032100d23032626c497f4d0b0efeb047bc68f60a23947b8ead48cd0faea9f67af00372a3663064301d0603551d0e04160414f16d89be0b56cd120e817ec1367aa0ea44001f85301f0603551d23041830168014f16d89be0b56cd120e817ec1367aa0ea44001f8530120603551d130101ff040830060101ff020101300e0603551d0f0101ff040403020106300506032b657003410088e79915d26d25724e845c4f476c4f3ef8b20ac5b1fb688e936501ac8778bf32f72a69905f881b98bf7c41308a6b16bf8d90f88b4c5238c59df9e4287d705102";ED25519_CHAIN_INTERMEDIATE_HEX
📄
x509.test.vxL20-20
const ED25519_CHAIN_INTERMEDIATE_HEX: str="3082016030820112a003020102021458c1104db4a3bb9b74b3c72395822b168e3be15e300506032b657030183116301406035504030c0d5665782d546573742d526f6f74301e170d3236303832303038323030335a170d3236313031393038323030335a3020311e301c06035504030c155665782d546573742d496e7465726d656469617465302a300506032b657003210040cc7d8b1b46c61a97759eba8b3a1b35e8283fe21b3b5503026e384ae222050da366306430120603551d130101ff040830060101ff020100300e0603551d0f0101ff040403020106301d0603551d0e04160414c2bb5801ea6c32ec544dabeebafbdd1fc4f80af1301f0603551d23041830168014f16d89be0b56cd120e817ec1367aa0ea44001f85300506032b65700341007475572b8e4f4f147670121117a849bf18f3d875e61ed04385dfabbba88b4af61a998d2aacaae26dfb57d0b7b1eba05905aaea0481145a103e9e43c15de73b0b";ED25519_CHAIN_LEAF_HEX
📄
x509.test.vxL21-21
const ED25519_CHAIN_LEAF_HEX: str="308201af30820161a003020102021410b40c7d64b161a308f84c9cce05e1b67d3e7b7e300506032b65703020311e301c06035504030c155665782d546573742d496e7465726d656469617465301e170d3236303832303038323031335a170d3236303931393038323031335a30253123302106035504030c1a69676e6f7265642d636861696e2d6c6561662e6578616d706c65302a300506032b65700321007373835b6b0165f5315694a7be5059efb4cfebea866892f7b44bb2df283f7b96a381a73081a4300c0603551d130101ff04023000300e0603551d0f0101ff04040302078030130603551d25040c300a06082b06010505070301302f0603551d11042830268211636861696e2e6578616d706c652e636f6d82112a2e7376632e6578616d706c652e636f6d301d0603551d0e04160414cc74fd43dfed83d981b0146ce2cd31bf719232cc301f0603551d23041830168014c2bb5801ea6c32ec544dabeebafbdd1fc4f80af1300506032b65700341008c46adb17d9dc1e9e1427cac424e5f12dc825eecd49a31e95d95c054dc58eb079a7b8b048ee868641f8c0225ce69d2a691dc575c4c2463512f9ee326667ad906";ED25519_CERTIFICATE_VERIFY_HEX
📄
x509.test.vxL22-22
const ED25519_CERTIFICATE_VERIFY_HEX: str="0f0000440807004003e209867d6e99e2c07676c00c0dc4c919b2662af2fc4036f98301dae25516a349d0c9c376d32bcd3e66f35a1aee56148e09454d5475d3708a7ae40b1949ef0e";CERTIFICATE_CLIENT_HELLO
📄
x509.test.vxL23-23
const CERTIFICATE_CLIENT_HELLO: [u8; 5]=[1u8, 0, 0, 1, 0];ED25519_CHAIN_LEAF_PRIVATE
📄
x509.test.vxL24-29
const ED25519_CHAIN_LEAF_PRIVATE: [u8; 32]=[
0xe5u8, 0xda, 0xf1, 0x8a, 0x4c, 0xc2, 0xb4, 0xd7,
0x6f, 0xf5, 0xe3, 0xcd, 0x79, 0x3b, 0x58, 0xcd,
0xea, 0xab, 0x5a, 0x15, 0x40, 0x66, 0x19, 0x76,
0x06, 0x9b, 0xde, 0x25, 0xc8, 0x43, 0x8e, 0x9f,
];ED25519_CERT
📄
x509.test.vxL31-67
const ED25519_CERT: [u8; 416]=[
0x30u8, 0x82, 0x01, 0x9c, 0x30, 0x82, 0x01, 0x4e, 0xa0, 0x03, 0x02, 0x01,
0x02, 0x02, 0x14, 0x04, 0x11, 0xc4, 0xd2, 0xce, 0xa0, 0x98, 0xd7, 0x77,
0xc7, 0xec, 0xb8, 0xc7, 0x45, 0x1c, 0xb8, 0xe2, 0xb8, 0xf9, 0xfd, 0x30,
0x05, 0x06, 0x03, 0x2b, 0x65, 0x70, 0x30, 0x23, 0x31, 0x21, 0x30, 0x1f,
0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x18, 0x6d, 0x75, 0x73, 0x74, 0x2d,
0x6e, 0x6f, 0x74, 0x2d, 0x62, 0x65, 0x2d, 0x75, 0x73, 0x65, 0x64, 0x2e,
0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x30, 0x1e, 0x17, 0x0d, 0x32,
0x36, 0x30, 0x38, 0x32, 0x30, 0x30, 0x37, 0x34, 0x36, 0x30, 0x35, 0x5a,
0x17, 0x0d, 0x32, 0x36, 0x30, 0x39, 0x31, 0x39, 0x30, 0x37, 0x34, 0x36,
0x30, 0x35, 0x5a, 0x30, 0x23, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55,
0x04, 0x03, 0x0c, 0x18, 0x6d, 0x75, 0x73, 0x74, 0x2d, 0x6e, 0x6f, 0x74,
0x2d, 0x62, 0x65, 0x2d, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65,
0x70, 0x03, 0x21, 0x00, 0xa0, 0x69, 0xcc, 0x1d, 0xf3, 0x98, 0x0d, 0xae,
0x8b, 0x37, 0xb7, 0x0e, 0x8d, 0x45, 0x8a, 0x64, 0x79, 0xf0, 0x43, 0x8c,
0x79, 0x2a, 0xe5, 0x67, 0xcc, 0x1d, 0x4f, 0x44, 0xe7, 0x86, 0xc3, 0xff,
0xa3, 0x81, 0x93, 0x30, 0x81, 0x90, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,
0x0e, 0x04, 0x16, 0x04, 0x14, 0xac, 0x8d, 0x62, 0x9f, 0x5d, 0x97, 0x9f,
0x12, 0x17, 0xe9, 0xce, 0xcf, 0x4c, 0x4e, 0x38, 0x55, 0x43, 0x08, 0xcd,
0xdb, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16,
0x80, 0x14, 0xac, 0x8d, 0x62, 0x9f, 0x5d, 0x97, 0x9f, 0x12, 0x17, 0xe9,
0xce, 0xcf, 0x4c, 0x4e, 0x38, 0x55, 0x43, 0x08, 0xcd, 0xdb, 0x30, 0x2d,
0x06, 0x03, 0x55, 0x1d, 0x11, 0x04, 0x26, 0x30, 0x24, 0x82, 0x0f, 0x61,
0x70, 0x69, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
0x6f, 0x6d, 0x82, 0x11, 0x2a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x30, 0x0f, 0x06,
0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01,
0x01, 0xff, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff,
0x04, 0x04, 0x03, 0x02, 0x02, 0x84, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65,
0x70, 0x03, 0x41, 0x00, 0x95, 0x3f, 0x99, 0xa3, 0xa5, 0x48, 0x76, 0xa8,
0x8b, 0xd7, 0xca, 0x02, 0xeb, 0x9c, 0x91, 0x36, 0x61, 0xdf, 0x54, 0xb5,
0x01, 0x1b, 0x95, 0x16, 0xb9, 0x33, 0x0e, 0xc1, 0x0e, 0x00, 0x89, 0x1f,
0xc1, 0x26, 0x30, 0x80, 0xec, 0x69, 0xb8, 0x6b, 0xa8, 0x8d, 0x98, 0x4b,
0x82, 0x2d, 0x8c, 0x5c, 0x98, 0xb4, 0x4d, 0x82, 0x59, 0x75, 0x15, 0xf4,
0x94, 0xf5, 0x17, 0xcc, 0xe4, 0xb4, 0x17, 0x09,
];Structs
TlsAlert 🔓 export
📄
alert.vxL42-46
export struct TlsAlertImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
level | TlsAlertLevel | 🔓 public |
description | TlsAlertDescription | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
TlsAlert.closeNotify↗ | export fn TlsAlert.closeNotify(): TlsAlert | |
TlsAlert.userCanceled↗ | export fn TlsAlert.userCanceled(): TlsAlert | |
TlsAlert.fatal↗ | export fn TlsAlert.fatal(description: TlsAlertDescription): Result<TlsAlert, TlsAlertError> | |
isCloseNotify↗ | export fn (self: &TlsAlert) isCloseNotify(): bool | |
isUserCanceled↗ | export fn (self: &TlsAlert) isUserCanceled(): bool | |
isFatal↗ | export fn (self: &TlsAlert) isFatal(): bool | Effective TLS 1.3 severity. A peer that incorrectly labels an error alert |
TlsHandshakeFeedResult 🔓 export
📄
assembler.vxL39-46
export struct TlsHandshakeFeedResultImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
kind | TlsHandshakeFeedKind | 🔓 public |
consumed | usize | 🔓 public |
messageType | u8 | 🔓 public |
bodyLen | usize | 🔓 public |
encodedLen | usize | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
isComplete↗ | export fn (self: &TlsHandshakeFeedResult) isComplete(): bool | |
isDirect↗ | export fn (self: &TlsHandshakeFeedResult) isDirect(): bool |
TlsHandshakeAssembler 🔓 export
📄
assembler.vxL117-127
export struct TlsHandshakeAssemblerAllocation-free, one-message-at-a-time TLS Handshake assembler.
The common aligned path is zero-copy. A fragmented message is written into a caller-owned span whose address must remain stable until completion. This makes lifetime, allocation policy, and maximum certificate size explicit at the connection layer instead of hiding them in TLS.
Fields:
| Name | Type | Access |
|---|---|---|
maxBodyLen | usize | 🔒 private |
headerBytes | [u8; 4] | 🔒 private |
headerLen | usize | 🔒 private |
messageType | u8 | 🔒 private |
bodyLen | usize | 🔒 private |
encodedLen | usize | 🔒 private |
written | usize | 🔒 private |
outputAddress | usize | 🔒 private |
outputBound | bool | 🔒 private |
Methods:
| Method | Signature | Description |
|---|---|---|
TlsHandshakeAssembler.new↗ | export fn TlsHandshakeAssembler.new(maxBodyLen: usize): Result<TlsHandshakeAssembler, TlsHandshakeAssemblerError> | |
TlsHandshakeAssembler.withProtocolLimit↗ | export fn TlsHandshakeAssembler.withProtocolLimit(): TlsHandshakeAssembler | |
isIdle↗ | export fn (self: &TlsHandshakeAssembler) isIdle(): bool | |
maxMessageBodyLen↗ | export fn (self: &TlsHandshakeAssembler) maxMessageBodyLen(): usize | |
pendingLen↗ | export fn (self: &TlsHandshakeAssembler) pendingLen(): usize | Returns bytes already retained for the fragmented message. A partial |
clearPending↗ | fn (self: &TlsHandshakeAssembler!) clearPending() | |
abort↗ | export fn (self: &TlsHandshakeAssembler!) abort() | Explicitly abandons a partial message after the connection has entered a |
requireNonHandshakeBoundary↗ | export fn (self: &TlsHandshakeAssembler) requireNonHandshakeBoundary(): Result<bool, TlsHandshakeAssemblerError> | RFC 8446 forbids interleaving another record content type through a |
requireKeyChangeBoundary↗ | export fn (self: &TlsHandshakeAssembler) requireKeyChangeBoundary(): Result<bool, TlsHandshakeAssemblerError> | Handshake messages may not cross a record-protection key change. |
validateHeader↗ | fn (self: &TlsHandshakeAssembler) validateHeader(header: TlsHandshakeHeader): Result<usize, TlsHandshakeAssemblerError> | |
feed↗ | export fn (self: &TlsHandshakeAssembler!) feed(fragment: Span<u8>, output: &Span<u8>!): Result<TlsHandshakeFeedResult, TlsHandshakeAssemblerError> | Consumes at most one complete Handshake message from fragment. |
TlsCertificateEntryView 🔓 export
📄
certificate.vxL86-91
export struct TlsCertificateEntryViewImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
certificate | TlsWireSlice | 🔓 public |
extensions | TlsWireSlice | 🔓 public |
extensionCount | usize | 🔓 public |
TlsCertificateMessageView 🔓 export
📄
certificate.vxL93-97
export struct TlsCertificateMessageViewImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
certificateList | TlsWireSlice | 🔓 public |
certificateCount | usize | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
entryAt↗ | export fn (self: &TlsCertificateMessageView) entryAt(encoded: Span<u8>, index: usize): Result<TlsCertificateEntryView, TlsCertificateError> |
TlsCertificateVerifyView 🔓 export
📄
certificate.vxL221-225
export struct TlsCertificateVerifyViewImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
algorithm | u16 | 🔓 public |
signature | TlsWireSlice | 🔓 public |
TlsTrafficKeyLengths 🔓 export
📄
handshake.vxL56-60
export struct TlsTrafficKeyLengthsImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
key | usize | 🔓 public |
iv | usize | 🔓 public |
TlsWireSlice 🔓 export
📄
hello.vxL63-68
export struct TlsWireSliceOffset/length pair into the complete encoded Handshake message. No pointer
escapes the input lifetime; callers resolve the view against the same encoded span when needed.
Implements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
present | bool | 🔓 public |
offset | usize | 🔓 public |
length | usize | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
resolve↗ | export fn (self: &TlsWireSlice) resolve(encoded: Span<u8>): Result<Span<u8>, TlsHelloError> |
TlsHelloExtensions 🔓 export
📄
hello.vxL90-103
export struct TlsHelloExtensionsImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
count | usize | 🔓 public |
encodedBlock | TlsWireSlice | 🔓 public |
supportedVersions | TlsWireSlice | 🔓 public |
supportedGroups | TlsWireSlice | 🔓 public |
signatureAlgorithms | TlsWireSlice | 🔓 public |
keyShare | TlsWireSlice | 🔓 public |
serverName | TlsWireSlice | 🔓 public |
alpn | TlsWireSlice | 🔓 public |
preSharedKey | TlsWireSlice | 🔓 public |
pskKeyExchangeModes | TlsWireSlice | 🔓 public |
cookie | TlsWireSlice | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
entryAt↗ | export fn (self: &TlsHelloExtensions) entryAt(encoded: Span<u8>, index: usize): Result<TlsExtensionEntry, TlsHelloError> | Resolves an extension by stable wire order. Unknown extension identities |
find↗ | export fn (self: &TlsHelloExtensions) find(encoded: Span<u8>, extensionType: u16): Result<Option<TlsWireSlice>, TlsHelloError> |
TlsExtensionEntry 🔓 export
📄
hello.vxL121-125
export struct TlsExtensionEntryImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
extensionType | u16 | 🔓 public |
data | TlsWireSlice | 🔓 public |
TlsKeyShareEntry 🔓 export
📄
hello.vxL127-131
export struct TlsKeyShareEntryImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
group | u16 | 🔓 public |
keyExchange | TlsWireSlice | 🔓 public |
TlsClientHelloView 🔓 export
📄
hello.vxL193-201
export struct TlsClientHelloViewImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
encodedLen | usize | 🔓 public |
random | [u8; 32] | 🔓 public |
sessionId | TlsWireSlice | 🔓 public |
cipherSuites | TlsWireSlice | 🔓 public |
cipherSuiteCount | usize | 🔓 public |
extensions | TlsHelloExtensions | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
cipherSuiteAt↗ | export fn (self: &TlsClientHelloView) cipherSuiteAt(encoded: Span<u8>, index: usize): Result<u16, TlsHelloError> | |
signatureSchemeCount↗ | export fn (self: &TlsClientHelloView) signatureSchemeCount(): usize | Returns the number of structurally validated signature schemes advertised |
signatureSchemeAt↗ | export fn (self: &TlsClientHelloView) signatureSchemeAt(encoded: Span<u8>, index: usize): Result<u16, TlsHelloError> | Resolves one advertised signature scheme by wire order. Bounds and backing |
supportsGroup↗ | export fn (self: &TlsClientHelloView) supportsGroup(encoded: Span<u8>, group: u16): Result<bool, TlsHelloError> | Reports whether the structurally validated supported_groups vector |
keyShareAt↗ | export fn (self: &TlsClientHelloView) keyShareAt(encoded: Span<u8>, index: usize): Result<TlsKeyShareEntry, TlsHelloError> | Resolves one validated ClientHello KeyShareEntry by wire order. |
findKeyShare↗ | export fn (self: &TlsClientHelloView) findKeyShare(encoded: Span<u8>, group: u16): Result<Option<TlsWireSlice>, TlsHelloError> |
TlsServerHelloView 🔓 export
📄
hello.vxL339-347
export struct TlsServerHelloViewImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
encodedLen | usize | 🔓 public |
random | [u8; 32] | 🔓 public |
sessionId | TlsWireSlice | 🔓 public |
cipherSuite | u16 | 🔓 public |
helloRetryRequest | bool | 🔓 public |
extensions | TlsHelloExtensions | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
selectedKeyShare↗ | export fn (self: &TlsServerHelloView) selectedKeyShare(encoded: Span<u8>): Result<TlsKeyShareEntry, TlsHelloError> | Resolves the sole normal ServerHello KeyShareEntry. HelloRetryRequest has |
TlsDnsIdentityError 🔓 export
📄
hostname.vxL10-14
export struct TlsDnsIdentityErrorImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
kind | TlsDnsIdentityErrorKind | 🔓 public |
offset | usize | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsDnsIdentityError) isKind(kind: TlsDnsIdentityErrorKind): bool |
TlsDnsIdentity 🔓 export
📄
hostname.vxL25-25
export struct TlsDnsIdentityStrict service-identity matcher. This API compares a DNS reference name
only with an X.509 subjectAltName dNSName. It deliberately has no common name fallback and does not reinterpret IP literals as DNS names.
Methods:
| Method | Signature | Description |
|---|---|---|
TlsDnsIdentity.matches↗ | export fn TlsDnsIdentity.matches(reference: str, presentedDnsId: Span<u8>): Result<bool, TlsDnsIdentityError> | Matches a caller reference hostname against the raw bytes of one dNSName |
TlsSecretSchedule 🔓 export
📄
key_schedule.vxL131-135
export struct TlsSecretScheduleMove-only owner of the current raw secret on the left side of RFC 8446's
key-schedule diagram. Only ordered Early -> Handshake -> Master transitions are exposed. Working secrets are erased on every transition and on Drop.
Implements: Drop
Fields:
| Name | Type | Access |
|---|---|---|
hash | TlsHashAlgorithm | 🔒 private |
stage | TlsSecretStage | 🔒 private |
secret | [u8; 48] | 🔒 private |
Methods:
| Method | Signature | Description |
|---|---|---|
TlsSecretSchedule.new↗ | export fn TlsSecretSchedule.new(hash: TlsHashAlgorithm, psk: Span<u8>): Result<TlsSecretSchedule, TlsKeyScheduleError> | Starts the schedule at Early Secret. An empty PSK means the RFC 8446 |
stage↗ | export fn (self: &TlsSecretSchedule) stage(): TlsSecretStage | |
hashAlgorithm↗ | export fn (self: &TlsSecretSchedule) hashAlgorithm(): TlsHashAlgorithm | |
drop↗ | export fn (self: &TlsSecretSchedule!) drop() | |
retire↗ | export fn (self: &TlsSecretSchedule!) retire() | Irreversibly erases a candidate schedule that negotiation did not select. |
deriveHandshakeTraffic↗ | export fn (self: &TlsSecretSchedule!) deriveHandshakeTraffic(sharedSecret: Span<u8>, transcript: &TlsTranscript, clientOut: &Span<u8>!, serverOut: &Span<u8>!): Result<usize, TlsKeyScheduleError> | Commits Early -> Handshake and writes client/server handshake traffic |
deriveApplicationTraffic↗ | export fn (self: &TlsSecretSchedule!) deriveApplicationTraffic(transcript: &TlsTranscript, clientOut: &Span<u8>!, serverOut: &Span<u8>!): Result<usize, TlsKeyScheduleError> | Commits Handshake -> Master and writes generation-0 application traffic |
TlsX25519Negotiation 🔓 export
📄
negotiation.vxL157-194
export struct TlsX25519NegotiationMove-only owner for the authenticated no-PSK TLS 1.3 client handshake.
Hello negotiation is also usable in server role, while the monotonic server authentication flight is client-only. Transcript, key schedule, offered capabilities and Finished traffic secrets have one lifetime and one state authority; borrowed wire views never escape a call.
Implements: Drop
Fields:
| Name | Type | Access |
|---|---|---|
roleValue | TlsHandshakeRole | 🔒 private |
stageValue | TlsX25519NegotiationStage | 🔒 private |
transcriptValue | TlsTranscript | 🔒 private |
schedule256 | TlsSecretSchedule | 🔒 private |
schedule384 | TlsSecretSchedule | 🔒 private |
localPrivate | [u8; 32] | 🔒 private |
localPublic | [u8; 32] | 🔒 private |
peerPublic | [u8; 32] | 🔒 private |
peerReady | bool | 🔒 private |
sessionId | [u8; 32] | 🔒 private |
sessionLen | usize | 🔒 private |
offeredAes128 | bool | 🔒 private |
offeredAes256 | bool | 🔒 private |
offeredChaCha | bool | 🔒 private |
offeredEd25519 | bool | 🔒 private |
offeredExtensions | [u16; 64] | 🔒 private |
offeredExtensionCount | usize | 🔒 private |
offeredAlpn | Vec<u8> | 🔒 private |
selectedAlpn | Vec<u8> | 🔒 private |
clientHandshakeTraffic | [u8; 48] | 🔒 private |
serverHandshakeTraffic | [u8; 48] | 🔒 private |
handshakeTrafficReady | bool | 🔒 private |
serverCertificatePublicKey | [u8; 32] | 🔒 private |
serverCertificateKeyReady | bool | 🔒 private |
selectedCipherValue | u16 | 🔒 private |
selectedHashValue | TlsHashAlgorithm | 🔒 private |
selected | bool | 🔒 private |
clientHelloInvariant | [u8; 32] | 🔒 private |
clientHelloInvariantReady | bool | 🔒 private |
initialKeyShareOffered | bool | 🔒 private |
initialKeyShareLen | usize | 🔒 private |
initialKeyShareDigest | [u8; 32] | 🔒 private |
retryKeyShareRequested | bool | 🔒 private |
retryCookiePresent | bool | 🔒 private |
retryCookieLen | usize | 🔒 private |
retryCookieDigest | [u8; 32] | 🔒 private |
Methods:
| Method | Signature | Description |
|---|---|---|
TlsX25519Negotiation.new↗ | export fn TlsX25519Negotiation.new(role: TlsHandshakeRole, privateKey: Span<u8>, transcriptLimit: usize): Result<TlsX25519Negotiation, TlsX25519NegotiationError> | Creates a role-bound no-PSK negotiation owner, copies the exact 32-byte |
TlsX25519Negotiation.withDefaultLimit↗ | export fn TlsX25519Negotiation.withDefaultLimit(role: TlsHandshakeRole, privateKey: Span<u8>): Result<TlsX25519Negotiation, TlsX25519NegotiationError> | Creates a negotiation owner with TLS_DEFAULT_TRANSCRIPT_LIMIT. |
role↗ | export fn (self: &TlsX25519Negotiation) role(): TlsHandshakeRole | Returns the immutable endpoint role. |
stage↗ | export fn (self: &TlsX25519Negotiation) stage(): TlsX25519NegotiationStage | Returns the monotonic negotiation stage. |
transcript↗ | export fn (self: &TlsX25519Negotiation) transcript(): &TlsTranscript | Borrows the transcript for read-only accounting or digest snapshots. |
selectedCipher↗ | export fn (self: &TlsX25519Negotiation) selectedCipher(): Option<u16> | Returns the selected suite after successful normal ServerHello processing. |
selectedHash↗ | export fn (self: &TlsX25519Negotiation) selectedHash(): Option<TlsHashAlgorithm> | Returns the suite-authoritative hash after successful negotiation. |
publicKeyTo↗ | export fn (self: &TlsX25519Negotiation) publicKeyTo(output: &Span<u8>!): Result<usize, TlsX25519NegotiationError> | Copies the non-secret local public key into an exact 32-byte destination. |
commitClientHello↗ | export fn (self: &TlsX25519Negotiation!) commitClientHello(encoded: Span<u8>): Result<usize, TlsX25519NegotiationError> | Validates and commits the exact ClientHello that entered the transcript. |
commitRetryClientHello↗ | export fn (self: &TlsX25519Negotiation!) commitRetryClientHello(encoded: Span<u8>, retryPrivateKey: Span<u8>): Result<usize, TlsX25519NegotiationError> | Validates and commits ClientHello2 after one authenticated |
cipherWasOffered↗ | fn (self: &TlsX25519Negotiation) cipherWasOffered(cipherSuite: u16): bool | |
acceptServerHello↗ | export fn (self: &TlsX25519Negotiation!) acceptServerHello(encoded: Span<u8>, clientTrafficOut: &Span<u8>!, serverTrafficOut: &Span<u8>!): Result<usize, TlsX25519NegotiationError> | Validates normal ServerHello, computes the contributory X25519 secret, and |
extensionWasOffered↗ | fn (self: &TlsX25519Negotiation) extensionWasOffered(identity: u16): bool | |
alpnWasOffered↗ | fn (self: &TlsX25519Negotiation) alpnWasOffered(selected: Span<u8>): bool | |
validateEncryptedExtensions↗ | fn (self: &TlsX25519Negotiation) validateEncryptedExtensions(encoded: Span<u8>): Result<TlsEncryptedExtensionsCandidate, TlsX25519NegotiationError> | |
acceptEncryptedExtensions↗ | export fn (self: &TlsX25519Negotiation!) acceptEncryptedExtensions(encoded: Span<u8>): Result<usize, TlsX25519NegotiationError> | Validates and commits the server EncryptedExtensions flight. The current |
selectedAlpnLen↗ | export fn (self: &TlsX25519Negotiation) selectedAlpnLen(): usize | Returns the authenticated server ALPN selection length after server |
selectedAlpnTo↗ | export fn (self: &TlsX25519Negotiation) selectedAlpnTo(output: &Span<u8>!): Result<usize, TlsX25519NegotiationError> | Copies the authenticated ALPN selection to caller storage. |
acceptServerCertificate↗ | export fn (self: &TlsX25519Negotiation!) acceptServerCertificate(encoded: Span<u8>, trustAnchor: Span<u8>, referenceDnsName: str, unixSeconds: i64): Result<usize, TlsX25519NegotiationError> | Validates the server Certificate list against an explicit trust anchor, |
acceptServerCertificateVerify↗ | export fn (self: &TlsX25519Negotiation!) acceptServerCertificateVerify(encoded: Span<u8>): Result<usize, TlsX25519NegotiationError> | Verifies and commits server CertificateVerify only when Ed25519 was offered |
failAuthenticatedFlight↗ | fn (self: &TlsX25519Negotiation!) failAuthenticatedFlight() | |
acceptServerFinished↗ | export fn (self: &TlsX25519Negotiation!) acceptServerFinished(encoded: Span<u8>, clientApplicationOut: &Span<u8>!, serverApplicationOut: &Span<u8>!): Result<usize, TlsX25519NegotiationError> | Constant-time verifies and commits the peer Finished, then derives |
writeClientFinished↗ | export fn (self: &TlsX25519Negotiation!) writeClientFinished(output: &Span<u8>!): Result<usize, TlsX25519NegotiationError> | Emits and commits the client's Finished message. Application traffic was |
drop↗ | export fn (self: &TlsX25519Negotiation!) drop() |
TlsEncryptedExtensionsCandidate
📄
negotiation.vxL1145-1148
struct TlsEncryptedExtensionsCandidateFields:
| Name | Type | Access |
|---|---|---|
selectedAlpnOffset | usize | 🔒 private |
selectedAlpnLen | usize | 🔒 private |
TlsRecordHeader 🔓 export
📄
record.vxL28-33
export struct TlsRecordHeaderFields:
| Name | Type | Access |
|---|---|---|
contentType | u8 | 🔓 public |
version | u16 | 🔓 public |
length | u16 | 🔓 public |
TlsPlaintext 🔓 export
📄
record.vxL54-58
export struct TlsPlaintextMetadata recovered from an authenticated TLSInnerPlaintext.
Implements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
length | u64 | 🔓 public |
contentType | u8 | 🔓 public |
TlsCipherState 🔓 export
📄
record.vxL86-92
export struct TlsCipherStateOwning, move-only per-direction TLS 1.3 record state.
Key material and the sequence number are deliberately private. Exposing a writable sequence would let application code reuse a nonce with the same traffic key, which is catastrophic for every supported AEAD.
Implements: Drop
Fields:
| Name | Type | Access |
|---|---|---|
cipherId | u16 | 🔒 private |
key | [u8; 32] | 🔒 private |
keyLen | usize | 🔒 private |
iv | [u8; 12] | 🔒 private |
seq | u64 | 🔒 private |
Methods:
| Method | Signature | Description |
|---|---|---|
TlsCipherState.new↗ | export fn TlsCipherState.new(cipherId: u16, key: Span<u8>, iv: Span<u8>): Result<TlsCipherState, TlsRecordError> | |
sequence↗ | export fn (self: &TlsCipherState) sequence(): u64 | |
validateRekeyMaterial↗ | fn (self: &TlsCipherState) validateRekeyMaterial(key: Span<u8>, iv: Span<u8>): Result<bool, TlsRecordError> | Atomically installs the next key generation for this direction. |
commitRekey↗ | fn (self: &TlsCipherState!) commitRekey(key: Span<u8>, iv: Span<u8>) | |
rekey↗ | export fn (self: &TlsCipherState!) rekey(key: Span<u8>, iv: Span<u8>): Result<bool, TlsRecordError> | |
retire↗ | export fn (self: &TlsCipherState!) retire() | Irreversibly erases this direction's traffic key and IV. Transport owners |
drop↗ | export fn (self: &TlsCipherState!) drop() | |
keyBuf↗ | fn (self: &TlsCipherState) keyBuf(): RawBuf | |
ivBuf↗ | fn (self: &TlsCipherState) ivBuf(): RawBuf | |
encryptRecord↗ | export fn (self: &TlsCipherState!) encryptRecord(contentType: u8, plaintext: Span<u8>, outRecord: &Span<u8>!): Result<usize, TlsRecordError> | |
encryptRecordThenRekey↗ | export fn (self: &TlsCipherState!) encryptRecordThenRekey(contentType: u8, plaintext: Span<u8>, outRecord: &Span<u8>!, nextKey: Span<u8>, nextIv: Span<u8>): Result<usize, TlsRecordError> | Encrypts one record under the current generation and atomically installs |
decryptRecord↗ | export fn (self: &TlsCipherState!) decryptRecord(record: Span<u8>, outPlain: &Span<u8>!): Result<TlsPlaintext, TlsRecordError> |
TlsHandshakeHeader 🔓 export
📄
transcript.vxL38-42
export struct TlsHandshakeHeaderThe exact four-byte TLS Handshake header: one-byte type and uint24 body
length. Record-layer headers are intentionally outside this type.
Implements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
messageType | u8 | 🔓 public |
bodyLen | usize | 🔓 public |
TlsTranscript 🔓 export
📄
transcript.vxL90-104
export struct TlsTranscriptStreaming, allocation-free TLS 1.3 transcript state.
acceptedBytes is a monotonic resource-accounting counter and is never reduced by HelloRetryRequest rewriting. hashedBytes reports the effective transcript size after the RFC 8446 synthetic message_hash replacement.
Implements: Drop
Fields:
| Name | Type | Access |
|---|---|---|
hash | TlsHashAlgorithm | 🔒 private |
hashSelected | bool | 🔒 private |
sha256Available | bool | 🔒 private |
sha384Available | bool | 🔒 private |
sha256 | Sha256 | 🔒 private |
sha384 | Sha384 | 🔒 private |
byteLimit | usize | 🔒 private |
acceptedBytes | usize | 🔒 private |
hashedBytes | usize | 🔒 private |
messageCount | usize | 🔒 private |
firstMessageType | u8 | 🔒 private |
lastMessageType | u8 | 🔒 private |
retryRewritten | bool | 🔒 private |
Methods:
| Method | Signature | Description |
|---|---|---|
TlsTranscript.new↗ | export fn TlsTranscript.new(byteLimit: usize): Result<TlsTranscript, TlsTranscriptError> | Constructs a dual SHA-256/SHA-384 transcript with an explicit resource |
TlsTranscript.newForHash↗ | export fn TlsTranscript.newForHash(hash: TlsHashAlgorithm, byteLimit: usize): Result<TlsTranscript, TlsTranscriptError> | Constructs a transcript whose cipher-suite hash is already known. |
TlsTranscript.withDefaultLimit↗ | export fn TlsTranscript.withDefaultLimit(): TlsTranscript | Constructs a dual transcript with the 16 MiB default input budget. |
TlsTranscript.withDefaultHash↗ | export fn TlsTranscript.withDefaultHash(hash: TlsHashAlgorithm): TlsTranscript | Constructs a selected-hash transcript with the 16 MiB default budget. |
selectedHash↗ | export fn (self: &TlsTranscript) selectedHash(): Option<TlsHashAlgorithm> | Returns the committed suite hash, or None while both candidates are live. |
limit↗ | export fn (self: &TlsTranscript) limit(): usize | Returns the immutable accepted-input byte budget. |
acceptedLen↗ | export fn (self: &TlsTranscript) acceptedLen(): usize | Returns bytes accepted from complete peer/local Handshake messages. |
hashedLen↗ | export fn (self: &TlsTranscript) hashedLen(): usize | Returns the effective bytes represented by the running hash state. |
messages↗ | export fn (self: &TlsTranscript) messages(): usize | Returns the number of effective messages in the running transcript. |
lastMessage↗ | export fn (self: &TlsTranscript) lastMessage(): Option<u8> | Returns the most recently committed Handshake type. An empty transcript |
didRewriteHelloRetry↗ | export fn (self: &TlsTranscript) didRewriteHelloRetry(): bool | Reports whether the ClientHello1 synthetic-hash rewrite was committed. |
drop↗ | export fn (self: &TlsTranscript!) drop() | |
absorbRaw↗ | fn (self: &TlsTranscript!) absorbRaw(input: RawBuf, length: usize) | |
selectHash↗ | export fn (self: &TlsTranscript!) selectHash(hash: TlsHashAlgorithm): Result<bool, TlsTranscriptError> | Commits the cipher-suite hash. Re-selecting the same hash is idempotent; |
validateAppend↗ | fn (self: &TlsTranscript) validateAppend(messageType: u8, encodedLen: usize): Result<bool, TlsTranscriptError> | |
commitMessage↗ | fn (self: &TlsTranscript!) commitMessage(messageType: u8, encoded: RawBuf, encodedLen: usize) | |
appendEncoded↗ | export fn (self: &TlsTranscript!) appendEncoded(encoded: Span<u8>): Result<usize, TlsTranscriptError> | Validates and appends one complete encoded TLS Handshake message. The |
appendMessage↗ | export fn (self: &TlsTranscript!) appendMessage(messageType: u8, body: Span<u8>): Result<usize, TlsTranscriptError> | Appends a body while generating the authenticated handshake header. This |
digestTo↗ | export fn (self: &TlsTranscript) digestTo(output: &Span<u8>!): Result<usize, TlsTranscriptError> | Writes the current transcript hash without finalizing the running state. |
digestFor↗ | export fn (self: &TlsTranscript) digestFor(hash: TlsHashAlgorithm, output: &Span<u8>!): Result<usize, TlsTranscriptError> | Snapshots either candidate hash before cipher-suite selection. After |
rewriteForHelloRetryRequest↗ | export fn (self: &TlsTranscript!) rewriteForHelloRetryRequest(): Result<usize, TlsTranscriptError> | Applies RFC 8446 section 4.4.1's HelloRetryRequest rewrite. |
TlsTransportEvent 🔓 export
📄
transport.vxL44-50
export struct TlsTransportEventFields:
| Name | Type | Access |
|---|---|---|
kind | TlsTransportEventKind | 🔓 public |
length | usize | 🔓 public |
alert | Option<TlsAlert> | 🔓 public |
keyUpdate | Option<TlsKeyUpdateRequest> | 🔓 public |
TlsTransportError 🔓 export
📄
transport.vxL65-72
export struct TlsTransportErrorTyped transport failure with the exact lower-layer cause retained when one
exists. Caller-capacity/overlap mistakes remain retryable; authenticated wire failures retire both traffic directions.
Fields:
| Name | Type | Access |
|---|---|---|
kind | TlsTransportErrorKind | 🔓 public |
recordCause | Option<TlsRecordError> | 🔓 public |
alertCause | Option<TlsAlertError> | 🔓 public |
scheduleCause | Option<TlsKeyScheduleError> | 🔓 public |
keyUpdateCause | Option<TlsKeyUpdateError> | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsTransportError) isKind(kind: TlsTransportErrorKind): bool |
TlsApplicationTraffic 🔓 export
📄
transport.vxL158-176
export struct TlsApplicationTrafficOwns exactly one protected send direction and one protected receive
direction after generation-0 application traffic secrets exist. The constructor derives keys directly into bounded stack candidates, transfers them into move-only cipher states, then erases every candidate. Callers pass directional secrets explicitly: sendSecret is always local output and receiveSecret is always peer output, independent of role.
Implements: Drop
Fields:
| Name | Type | Access |
|---|---|---|
send | TlsCipherState | 🔒 private |
receive | TlsCipherState | 🔒 private |
cipherId | u16 | 🔒 private |
hash | TlsHashAlgorithm | 🔒 private |
digestLen | usize | 🔒 private |
sendSecret | [u8; 48] | 🔒 private |
receiveSecret | [u8; 48] | 🔒 private |
sendGeneration | u64 | 🔒 private |
receiveGeneration | u64 | 🔒 private |
keyUpdateResponsePending | bool | 🔒 private |
postHandshake | [u8; 5] | 🔒 private |
postHandshakeLen | usize | 🔒 private |
localClosed | bool | 🔒 private |
peerClosed | bool | 🔒 private |
peerCanceled | bool | 🔒 private |
localCanceled | bool | 🔒 private |
failed | bool | 🔒 private |
Methods:
| Method | Signature | Description |
|---|---|---|
TlsApplicationTraffic.new↗ | export fn TlsApplicationTraffic.new(cipherId: u16, sendSecret: Span<u8>, receiveSecret: Span<u8>): Result<TlsApplicationTraffic, TlsTransportError> | |
state↗ | export fn (self: &TlsApplicationTraffic) state(): TlsTransportState | |
sendSequence↗ | export fn (self: &TlsApplicationTraffic) sendSequence(): u64 | |
receiveSequence↗ | export fn (self: &TlsApplicationTraffic) receiveSequence(): u64 | |
sendGeneration↗ | export fn (self: &TlsApplicationTraffic) sendGeneration(): u64 | |
receiveGeneration↗ | export fn (self: &TlsApplicationTraffic) receiveGeneration(): u64 | |
keyUpdateResponseRequired↗ | export fn (self: &TlsApplicationTraffic) keyUpdateResponseRequired(): bool | |
retireSendDirection↗ | fn (self: &TlsApplicationTraffic!) retireSendDirection() | |
retireReceiveDirection↗ | fn (self: &TlsApplicationTraffic!) retireReceiveDirection() | |
retireFailed↗ | fn (self: &TlsApplicationTraffic!) retireFailed() | |
encryptApplicationData↗ | export fn (self: &TlsApplicationTraffic!) encryptApplicationData(plaintext: Span<u8>, output: &Span<u8>!): Result<usize, TlsTransportError> | |
writeKeyUpdate↗ | export fn (self: &TlsApplicationTraffic!) writeKeyUpdate(request: TlsKeyUpdateRequest, output: &Span<u8>!): Result<usize, TlsTransportError> | Sends a complete KeyUpdate under the current send generation and commits |
writeAlertPayload↗ | fn (self: &TlsApplicationTraffic!) writeAlertPayload(alert: TlsAlert, output: &Span<u8>!): Result<usize, TlsTransportError> | |
writeUserCanceled↗ | export fn (self: &TlsApplicationTraffic!) writeUserCanceled(output: &Span<u8>!): Result<usize, TlsTransportError> | Sends the TLS 1.3 user_canceled warning once without retiring the send key. |
writeCloseNotify↗ | export fn (self: &TlsApplicationTraffic!) writeCloseNotify(output: &Span<u8>!): Result<usize, TlsTransportError> | Encrypts close_notify exactly once, then erases the send-direction key. |
writeFatalAlert↗ | export fn (self: &TlsApplicationTraffic!) writeFatalAlert(description: TlsAlertDescription, output: &Span<u8>!): Result<usize, TlsTransportError> | Emits one fatal alert and immediately retires both directions after the |
readKeyUpdateFragment↗ | fn (self: &TlsApplicationTraffic!) readKeyUpdateFragment(fragment: Span<u8>): Result<TlsTransportEvent, TlsTransportError> | |
readRecord↗ | export fn (self: &TlsApplicationTraffic!) readRecord(record: Span<u8>, plaintext: &Span<u8>!): Result<TlsTransportEvent, TlsTransportError> | Authenticates and classifies one protected application-phase record. |
drop↗ | export fn (self: &TlsApplicationTraffic!) drop() |
TlsNextTrafficGeneration
📄
transport.vxL313-318
struct TlsNextTrafficGenerationImplements: Drop
Fields:
| Name | Type | Access |
|---|---|---|
secret | [u8; 48] | 🔒 private |
key | [u8; 32] | 🔒 private |
iv | [u8; 12] | 🔒 private |
keyLen | usize | 🔒 private |
Methods:
| Method | Signature | Description |
|---|---|---|
drop↗ | fn (self: &TlsNextTrafficGeneration!) drop() |
X509Error 🔓 export
📄
x509.vxL46-50
export struct X509ErrorImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
kind | X509ErrorKind | 🔓 public |
offset | usize | 🔓 public |
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &X509Error) isKind(kind: X509ErrorKind): bool |
X509CertificateView 🔓 export
📄
x509.vxL131-141
export struct X509CertificateViewAllocation-free certificate view. The caller retains the DER bytes for the
complete lifetime of this value and passes the same span to every method.
Implements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
certificate | DerSlice | 🔒 private |
tbsCertificate | DerSlice | 🔒 private |
signature | DerSlice | 🔒 private |
publicKey | DerSlice | 🔒 private |
issuer | DerSlice | 🔒 private |
validity | DerSlice | 🔒 private |
subject | DerSlice | 🔒 private |
extensions | DerSlice | 🔒 private |
hasExtensions | bool | 🔒 private |
Methods:
| Method | Signature | Description |
|---|---|---|
X509CertificateView.parse↗ | export fn X509CertificateView.parse(input: Span<u8>): Result<X509CertificateView, X509Error> | Parses the structural certificate envelope and admits only RFC 8410 |
publicKeyBytes↗ | export fn (self: &X509CertificateView) publicKeyBytes(input: Span<u8>): Result<Span<u8>, X509Error> | |
verifySignatureWith↗ | export fn (self: &X509CertificateView) verifySignatureWith(input: Span<u8>, issuerInput: Span<u8>, issuer: &X509CertificateView): Result<bool, X509Error> | Verifies this certificate signature with the issuer's Ed25519 SPKI. Chain |
validityRange↗ | export fn (self: &X509CertificateView) validityRange(input: Span<u8>): Result<(i64, i64), X509Error> | |
validateAt↗ | export fn (self: &X509CertificateView) validateAt(input: Span<u8>, unixSeconds: i64): Result<bool, X509Error> | |
dnsNameCount↗ | export fn (self: &X509CertificateView) dnsNameCount(input: Span<u8>): Result<usize, X509Error> | |
dnsNameAt↗ | export fn (self: &X509CertificateView) dnsNameAt(input: Span<u8>, wanted: usize): Result<Span<u8>, X509Error> | |
matchesDnsName↗ | export fn (self: &X509CertificateView) matchesDnsName(input: Span<u8>, reference: str): Result<bool, X509Error> | Checks every SAN dNSName. Invalid presented identities fail closed instead |
X509ExtensionView
📄
x509.vxL528-532
struct X509ExtensionViewImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
oid | DerElement | 🔒 private |
value | DerElement | 🔒 private |
critical | bool | 🔒 private |
X509ExtensionPolicy
📄
x509.vxL600-613
struct X509ExtensionPolicyImplements: Copy
Fields:
| Name | Type | Access |
|---|---|---|
hasBasicConstraints | bool | 🔒 private |
basicConstraintsCritical | bool | 🔒 private |
certificateAuthority | bool | 🔒 private |
hasPathLength | bool | 🔒 private |
pathLength | usize | 🔒 private |
hasKeyUsage | bool | 🔒 private |
digitalSignature | bool | 🔒 private |
certificateSign | bool | 🔒 private |
hasExtendedKeyUsage | bool | 🔒 private |
serverAuth | bool | 🔒 private |
hasSubjectAltName | bool | 🔒 private |
subjectAltNameCritical | bool | 🔒 private |
X509TlsServerVerifier 🔓 export
📄
x509.vxL1000-1000
export struct X509TlsServerVerifierBounded TLS server-certificate verifier for the currently supported
Ed25519 profile. Intermediates are presented in leaf-to-anchor order and the explicit trust anchor is not included in intermediateInputs. Validation is allocation-free and never consults an OS/libc root store.
Methods:
| Method | Signature | Description |
|---|---|---|
X509TlsServerVerifier.verifyChain↗ | export fn X509TlsServerVerifier.verifyChain(leafInput: Span<u8>, intermediateInputs: Span<Span<u8>>, trustAnchorInput: Span<u8>, referenceDnsName: str, unixSeconds: i64): Result<bool, X509Error> | |
X509TlsServerVerifier.verifyDirect↗ | export fn X509TlsServerVerifier.verifyDirect(leafInput: Span<u8>, trustAnchorInput: Span<u8>, referenceDnsName: str, unixSeconds: i64): Result<bool, X509Error> | Convenience path for a leaf signed directly by the explicit trust anchor. |
Enums
TlsAlertLevel 🔓 export
📄
alert.vxL7-10
export enum TlsAlertLevelVariants:
WarningFatal
TlsAlertDescription 🔓 export
📄
alert.vxL12-40
export enum TlsAlertDescriptionVariants:
CloseNotifyUnexpectedMessageBadRecordMacRecordOverflowHandshakeFailureBadCertificateUnsupportedCertificateCertificateRevokedCertificateExpiredCertificateUnknownIllegalParameterUnknownCaAccessDeniedDecodeErrorDecryptErrorProtocolVersionInsufficientSecurityInternalErrorInappropriateFallbackUserCanceledMissingExtensionUnsupportedExtensionUnrecognizedNameBadCertificateStatusResponseUnknownPskIdentityCertificateRequiredNoApplicationProtocol
TlsAlertError 🔓 export
📄
alert.vxL48-54
export enum TlsAlertErrorVariants:
InvalidBufferInvalidLengthInvalidLevelUnknownDescriptionNonCanonicalLevel
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsAlertError) isKind(kind: TlsAlertError): bool |
TlsHandshakeAssemblerError 🔓 export
📄
assembler.vxL13-21
export enum TlsHandshakeAssemblerErrorFailures produced while turning arbitrarily fragmented record payloads
back into complete TLS Handshake messages. Rejected input never partially advances the assembler.
Variants:
InvalidLimitInvalidInputInvalidOutputMessageTooLargeOutputChangedInterleavedRecordKeyChangeWhileFragmented
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsHandshakeAssemblerError) isKind(kind: TlsHandshakeAssemblerError): bool |
TlsHandshakeFeedKind 🔓 export
📄
assembler.vxL33-37
export enum TlsHandshakeFeedKindCompleteDirect means the complete message is the first encodedLen
bytes of the supplied fragment. CompleteBuffered means it is in the caller-owned output span. NeedMore consumes the reported prefix and keeps bounded state for the next record.
Variants:
NeedMoreCompleteDirectCompleteBuffered
TlsCertificateError 🔓 export
📄
certificate.vxL17-30
export enum TlsCertificateErrorVariants:
InvalidInputInvalidMessageTypeInvalidMessageLengthNonEmptyServerContextEmptyCertificateListEmptyCertificateResourceLimitDuplicateExtensionInvalidStateUnsupportedSignatureAlgorithmInvalidCertificateInvalidSignature
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsCertificateError) isKind(kind: TlsCertificateError): bool |
TlsKeyScheduleError 🔓 export
📄
handshake.vxL21-32
export enum TlsKeyScheduleErrorVariants:
InvalidSecretInvalidLabelInvalidContextInvalidOutputBufferOverlapInvalidStateHashMismatchAuthenticationFailedUnsupportedCipherCryptoFailure
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsKeyScheduleError) isKind(kind: TlsKeyScheduleError): bool |
TlsHashAlgorithm 🔓 export
📄
handshake.vxL36-39
export enum TlsHashAlgorithmHash identity is explicit at the HKDF boundary. TLS must never infer a
cryptographic algorithm from an output buffer or silently substitute one.
Variants:
Sha256Sha384
Methods:
| Method | Signature | Description |
|---|---|---|
digestLen↗ | export fn (self: &TlsHashAlgorithm) digestLen(): usize | |
maxExpandLen↗ | fn (self: &TlsHashAlgorithm) maxExpandLen(): usize |
TlsHelloError 🔓 export
📄
hello.vxL41-54
export enum TlsHelloErrorVariants:
InvalidInputInvalidOutputInvalidMessageTypeInvalidMessageLengthDecodeErrorProtocolVersionIllegalParameterMissingExtensionDuplicateExtensionExtensionOrderResourceLimitBufferOverlap
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsHelloError) isKind(kind: TlsHelloError): bool |
TlsDnsIdentityErrorKind 🔓 export
📄
hostname.vxL3-8
export enum TlsDnsIdentityErrorKindVariants:
InvalidReferenceInvalidPresentedIdentityUnsupportedIdnaIpAddressRequiresIpId
TlsSecretStage 🔓 export
📄
key_schedule.vxL13-18
export enum TlsSecretStageThe only legal states of the TLS 1.3 main secret schedule.
Variants:
EarlyHandshakeMasterRetired
TlsKeyUpdateRequest 🔓 export
📄
key_update.vxL9-12
export enum TlsKeyUpdateRequestVariants:
UpdateNotRequestedUpdateRequested
TlsKeyUpdateError 🔓 export
📄
key_update.vxL14-19
export enum TlsKeyUpdateErrorVariants:
InvalidBufferInvalidLengthInvalidMessageTypeInvalidRequest
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsKeyUpdateError) isKind(kind: TlsKeyUpdateError): bool |
TlsHandshakeRole 🔓 export
📄
negotiation.vxL41-44
export enum TlsHandshakeRoleLocal endpoint role used to validate which Hello owns each X25519 share.
Variants:
ClientServer
TlsX25519NegotiationStage 🔓 export
📄
negotiation.vxL47-59
export enum TlsX25519NegotiationStageMonotonic state of normal no-PSK X25519 Hello negotiation.
Variants:
ReadyClientHelloCommittedHelloRetryRequestedRetryClientHelloCommittedHandshakeTrafficEncryptedExtensionsServerCertificateAuthenticatedServerCertificateVerifyAuthenticatedServerFinishedAuthenticatedCompleteFailed
TlsX25519NegotiationError 🔓 export
📄
negotiation.vxL63-87
export enum TlsX25519NegotiationErrorFail-closed negotiation errors. HelloRetryRequest is a typed transition
request, not a successful normal ServerHello.
Variants:
InvalidStateInvalidRoleInvalidPrivateKeyInvalidHelloInvalidEncryptedExtensionsExtensionNotOfferedResourceLimitUnsupportedModeUnsupportedCipherCipherNotOfferedSessionMismatchMissingKeyShareKeyShareMismatchHelloRetryRequestInvalidOutputBufferOverlapNonContributoryKeySignatureAlgorithmNotOfferedCertificateFailureCertificateVerifyFailureFinishedFailureTranscriptFailureScheduleFailure
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsX25519NegotiationError) isKind(kind: TlsX25519NegotiationError): bool |
TlsRecordError 🔓 export
📄
record.vxL36-47
export enum TlsRecordErrorAllocation-free failures from TLS 1.3 record protection.
Variants:
InvalidStateInvalidKeyMaterialInvalidBufferInvalidContentTypeRecordOverflowInvalidRecordAuthenticationFailedSequenceExhaustedBufferOverlapCipherFailure
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsRecordError) isKind(kind: TlsRecordError): bool |
TlsTranscriptError 🔓 export
📄
transcript.vxL19-30
export enum TlsTranscriptErrorAllocation-free failures produced by the handshake framing and transcript
layer. Every validation error is detected before the hash state or counters are changed.
Variants:
InvalidLimitInvalidInputInvalidOutputInvalidMessageLengthMessageTooLargeTranscriptLimitExceededSyntheticMessageForbiddenInvalidStateHashUnavailableHashFailure
Methods:
| Method | Signature | Description |
|---|---|---|
isKind↗ | export fn (self: &TlsTranscriptError) isKind(kind: TlsTranscriptError): bool |
TlsTransportState 🔓 export
📄
transport.vxL25-33
export enum TlsTransportStateVariants:
OpenPeerCanceledLocalCanceledLocalCloseSentPeerCloseReceivedClosedFailed
TlsTransportEventKind 🔓 export
📄
transport.vxL35-42
export enum TlsTransportEventKindVariants:
ApplicationDataPeerCloseNotifyPeerUserCanceledPeerFatalAlertPostHandshakeFragmentPeerKeyUpdate
TlsTransportErrorKind 🔓 export
📄
transport.vxL52-60
export enum TlsTransportErrorKindVariants:
InvalidStateKeyScheduleFailureRecordFailureAlertFailureKeyUpdateFailureGenerationExhaustedUnexpectedMessage
X509ErrorKind 🔓 export
📄
x509.vxL25-44
export enum X509ErrorKindVariants:
InvalidDerInvalidCertificateUnsupportedAlgorithmInvalidSignatureMissingSubjectAltNameInvalidSubjectAltNameInvalidValidityCertificateNotYetValidCertificateExpiredIssuerMismatchNotCertificateAuthorityInvalidKeyUsageInvalidExtendedKeyUsageUnsupportedCriticalExtensionUnsupportedConstraintChainTooLongHostnameMismatchIndexOutOfBounds
Functions
alertLevelCode
📄
alert.vxL60-65
fn alertLevelCode(level: TlsAlertLevel): u8Parameters:
| Name | Type |
|---|---|
level | TlsAlertLevel |
Returns: u8
decodeAlertLevel
📄
alert.vxL67-71
fn decodeAlertLevel(code: u8): Result<TlsAlertLevel, TlsAlertError>Parameters:
| Name | Type |
|---|---|
code | u8 |
Returns: Result<TlsAlertLevel, TlsAlertError>
alertDescriptionCode
📄
alert.vxL73-103
fn alertDescriptionCode(description: TlsAlertDescription): u8Parameters:
| Name | Type |
|---|---|
description | TlsAlertDescription |
Returns: u8
decodeAlertDescription
📄
alert.vxL105-138
fn decodeAlertDescription(code: u8): Result<TlsAlertDescription, TlsAlertError>Parameters:
| Name | Type |
|---|---|
code | u8 |
Returns: Result<TlsAlertDescription, TlsAlertError>
canonicalAlertLevel
📄
alert.vxL140-147
fn canonicalAlertLevel(description: TlsAlertDescription): TlsAlertLevelParameters:
| Name | Type |
|---|---|
description | TlsAlertDescription |
Returns: TlsAlertLevel
encodeTlsAlert 🔓 export
📄
alert.vxL193-206
export fn encodeTlsAlert(alert: TlsAlert, output: &Span<u8>!): Result<usize, TlsAlertError>Encodes one canonical two-byte TLS 1.3 Alert payload. Vex never emits a
warning-level error alert or a fatal close_notify/user_canceled alert.
Parameters:
| Name | Type |
|---|---|
alert | TlsAlert |
output | &Span<u8>! |
Returns: Result<usize, TlsAlertError>
decodeTlsAlert 🔓 export
📄
alert.vxL211-227
export fn decodeTlsAlert(input: Span<u8>): Result<TlsAlert, TlsAlertError>Decodes exactly one Alert payload. Warning-level protocol errors are
retained on the view but isFatal still applies TLS 1.3 effective severity, preventing a peer-controlled downgrade.
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
Returns: Result<TlsAlert, TlsAlertError>
emptyFeedResult
📄
assembler.vxL60-68
fn emptyFeedResult(consumed: usize): TlsHandshakeFeedResultParameters:
| Name | Type |
|---|---|
consumed | usize |
Returns: TlsHandshakeFeedResult
completeFeedResult
📄
assembler.vxL70-80
fn completeFeedResult(kind: TlsHandshakeFeedKind, consumed: usize, header: TlsHandshakeHeader): TlsHandshakeFeedResultParameters:
| Name | Type |
|---|---|
kind | TlsHandshakeFeedKind |
consumed | usize |
header | TlsHandshakeHeader |
Returns: TlsHandshakeFeedResult
copyBytes
📄
assembler.vxL82-89
fn copyBytes(destination: Ptr<u8>, source: Ptr<u8>, length: usize)Parameters:
| Name | Type |
|---|---|
destination | Ptr<u8> |
source | Ptr<u8> |
length | usize |
spansOverlap
📄
assembler.vxL91-99
fn spansOverlap(left: Span<u8>, right: Span<u8>): boolParameters:
| Name | Type |
|---|---|
left | Span<u8> |
right | Span<u8> |
Returns: bool
headerFromArray
📄
assembler.vxL101-109
fn headerFromArray(value: &[u8; 4]): TlsHandshakeHeaderParameters:
| Name | Type |
|---|---|
value | &[u8; 4] |
Returns: TlsHandshakeHeader
validateOutput
📄
assembler.vxL216-225
fn validateOutput(output: Span<u8>, encodedLen: usize): Result<bool, TlsHandshakeAssemblerError>Parameters:
| Name | Type |
|---|---|
output | Span<u8> |
encodedLen | usize |
Returns: Result<bool, TlsHandshakeAssemblerError>
headerFromSpan
📄
assembler.vxL227-239
fn headerFromSpan(input: Span<u8>): Result<TlsHandshakeHeader, TlsHandshakeAssemblerError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
Returns: Result<TlsHandshakeHeader, TlsHandshakeAssemblerError>
certificateU16
📄
certificate.vxL36-39
fn certificateU16(input: Span<u8>, offset: usize): usizeParameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
Returns: usize
certificateU24
📄
certificate.vxL41-45
fn certificateU24(input: Span<u8>, offset: usize): usizeParameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
Returns: usize
certificateSlice
📄
certificate.vxL47-49
fn certificateSlice(offset: usize, length: usize): TlsWireSliceParameters:
| Name | Type |
|---|---|
offset | usize |
length | usize |
Returns: TlsWireSlice
scanCertificateEntryExtensions
📄
certificate.vxL51-84
fn scanCertificateEntryExtensions(input: Span<u8>, offset: usize, length: usize): Result<usize, TlsCertificateError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
length | usize |
Returns: Result<usize, TlsCertificateError>
certificateEntryAtChecked
📄
certificate.vxL99-141
fn certificateEntryAtChecked(encoded: Span<u8>, list: &TlsWireSlice, wanted: usize): Result<TlsCertificateEntryView, TlsCertificateError>Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
list | &TlsWireSlice |
wanted | usize |
Returns: Result<TlsCertificateEntryView, TlsCertificateError>
decodeServerCertificate 🔓 export
📄
certificate.vxL155-219
export fn decodeServerCertificate(encoded: Span<u8>): Result<TlsCertificateMessageView, TlsCertificateError>Decodes one complete server Certificate Handshake message. The server
request context must be empty; the list is bounded to leaf plus eight intermediates and all entry extension vectors are structurally validated.
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<TlsCertificateMessageView, TlsCertificateError>
decodeCertificateVerify 🔓 export
📄
certificate.vxL227-252
export fn decodeCertificateVerify(encoded: Span<u8>): Result<TlsCertificateVerifyView, TlsCertificateError>Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<TlsCertificateVerifyView, TlsCertificateError>
verifyServerCertificateSignature 🔓 export
📄
certificate.vxL257-269
export fn verifyServerCertificateSignature(encoded: Span<u8>, transcript: &TlsTranscript, leafDer: Span<u8>): Result<bool, TlsCertificateError>Verifies a server CertificateVerify against the transcript ending at the
complete Certificate message. The CertificateVerify message is not appended here; the owning handshake state may commit it only after success.
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
transcript | &TlsTranscript |
leafDer | Span<u8> |
Returns: Result<bool, TlsCertificateError>
verifyServerCertificateSignatureWithKey 🔓 export
📄
certificate.vxL275-327
export fn verifyServerCertificateSignatureWithKey(encoded: Span<u8>, transcript: &TlsTranscript, publicKey: Span<u8>): Result<bool, TlsCertificateError>Verifies server CertificateVerify with an exact Ed25519 public key already
authenticated by an owning certificate-path state. This avoids retaining a borrowed DER span across handshake calls while keeping the RFC 8446 context construction and signature checks in one source of truth.
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
transcript | &TlsTranscript |
publicKey | Span<u8> |
Returns: Result<bool, TlsCertificateError>
spansOverlap
📄
handshake.vxL62-70
fn spansOverlap(left: Span<u8>, right: Span<u8>): boolParameters:
| Name | Type |
|---|---|
left | Span<u8> |
right | Span<u8> |
Returns: bool
hkdfExpandLabel 🔓 export
📄
handshake.vxL77-161
export fn hkdfExpandLabel(hash: TlsHashAlgorithm, secret: Span<u8>, label: str, context: Span<u8>, out: &Span<u8>!): Result<usize, TlsKeyScheduleError>RFC 8446 HKDF-Expand-Label for TLS 1.3 SHA-256 and SHA-384 schedules.
The traffic secret must be exactly one digest of the selected hash. The output length comes from the mutable span, preventing pointer/length disagreement. Inputs may not alias output; rejection precedes mutation.
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
secret | Span<u8> |
label | str |
context | Span<u8> |
out | &Span<u8>! |
Returns: Result<usize, TlsKeyScheduleError>
deriveSecret 🔓 export
📄
handshake.vxL168-181
export fn deriveSecret(hash: TlsHashAlgorithm, secret: Span<u8>, label: str, transcriptHash: Span<u8>, out: &Span<u8>!): Result<usize, TlsKeyScheduleError>RFC 8446 Derive-Secret over an already snapshotted transcript hash.
Requiring one exact digest for both secret and transcriptHash prevents accidental cross-suite derivation. The output prefix is committed only after every length and alias check succeeds.
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
secret | Span<u8> |
label | str |
transcriptHash | Span<u8> |
out | &Span<u8>! |
Returns: Result<usize, TlsKeyScheduleError>
computeFinishedVerifyData 🔓 export
📄
handshake.vxL185-232
export fn computeFinishedVerifyData(hash: TlsHashAlgorithm, baseKey: Span<u8>, transcriptHash: Span<u8>, out: &Span<u8>!): Result<usize, TlsKeyScheduleError>Computes TLS 1.3 Finished.verify_data from a traffic secret and an exact
transcript snapshot. The caller must snapshot before appending Finished.
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
baseKey | Span<u8> |
transcriptHash | Span<u8> |
out | &Span<u8>! |
Returns: Result<usize, TlsKeyScheduleError>
verifyFinished 🔓 export
📄
handshake.vxL236-264
export fn verifyFinished(hash: TlsHashAlgorithm, baseKey: Span<u8>, transcriptHash: Span<u8>, received: Span<u8>): Result<bool, TlsKeyScheduleError>Verifies TLS 1.3 Finished in constant time. A mismatch is an authentication
failure, not a boolean that a caller can accidentally ignore.
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
baseKey | Span<u8> |
transcriptHash | Span<u8> |
received | Span<u8> |
Returns: Result<bool, TlsKeyScheduleError>
deriveTrafficKeys 🔓 export
📄
handshake.vxL268-308
export fn deriveTrafficKeys(secret: Span<u8>, cipherId: u16, outKey: &Span<u8>!, outIv: &Span<u8>!): Result<TlsTrafficKeyLengths, TlsKeyScheduleError>Derive the per-direction TLS 1.3 record key and IV for all implemented
suites. Cipher-suite selection fixes both AEAD key length and HKDF hash.
Parameters:
| Name | Type |
|---|---|
secret | Span<u8> |
cipherId | u16 |
outKey | &Span<u8>! |
outIv | &Span<u8>! |
Returns: Result<TlsTrafficKeyLengths, TlsKeyScheduleError>
updateTrafficSecret 🔓 export
📄
handshake.vxL315-329
export fn updateTrafficSecret(hash: TlsHashAlgorithm, current: Span<u8>, next: &Span<u8>!): Result<usize, TlsKeyScheduleError>Derives RFC 8446 application_traffic_secret_N+1 from generation N.
The current secret remains caller-owned and unchanged. The next secret is committed only after exact hash-width, capacity and alias validation, so a transport can stage the complete next key generation before publishing it.
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
current | Span<u8> |
next | &Span<u8>! |
Returns: Result<usize, TlsKeyScheduleError>
emptyWireSlice
📄
hello.vxL70-76
fn emptyWireSlice(): TlsWireSliceReturns: TlsWireSlice
emptyExtensions
📄
hello.vxL105-119
fn emptyExtensions(): TlsHelloExtensionsReturns: TlsHelloExtensions
readU16
📄
hello.vxL384-387
fn readU16(input: Span<u8>, offset: usize): u16Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
Returns: u16
writeU16
📄
hello.vxL389-393
fn writeU16(output: &Span<u8>!, offset: usize, value: u16)Parameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
offset | usize |
value | u16 |
copyBytes
📄
hello.vxL395-398
fn copyBytes(destination: Ptr<u8>, source: Ptr<u8>, length: usize)Parameters:
| Name | Type |
|---|---|
destination | Ptr<u8> |
source | Ptr<u8> |
length | usize |
rangesOverlap
📄
hello.vxL400-408
fn rangesOverlap(leftAddress: usize, leftLen: usize, rightAddress: usize, rightLen: usize): boolParameters:
| Name | Type |
|---|---|
leftAddress | usize |
leftLen | usize |
rightAddress | usize |
rightLen | usize |
Returns: bool
spanRangeOverlapsOutput
📄
hello.vxL410-415
fn spanRangeOverlapsOutput(input: Span<u8>, output: Span<u8>, used: usize): boolParameters:
| Name | Type |
|---|---|
input | Span<u8> |
output | Span<u8> |
used | usize |
Returns: bool
validateVector16
📄
hello.vxL417-430
fn validateVector16(input: Span<u8>, offset: usize, length: usize, maxItems: usize): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
length | usize |
maxItems | usize |
Returns: Result<usize, TlsHelloError>
validateSupportedVersions
📄
hello.vxL432-459
fn validateSupportedVersions(input: Span<u8>, view: TlsWireSlice, client: bool): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
client | bool |
Returns: Result<bool, TlsHelloError>
validateServerName
📄
hello.vxL461-495
fn validateServerName(input: Span<u8>, view: TlsWireSlice): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
Returns: Result<bool, TlsHelloError>
validateAlpn
📄
hello.vxL497-519
fn validateAlpn(input: Span<u8>, view: TlsWireSlice): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
Returns: Result<bool, TlsHelloError>
validateCookie
📄
hello.vxL521-532
fn validateCookie(input: Span<u8>, view: TlsWireSlice): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
Returns: Result<bool, TlsHelloError>
validatePadding
📄
hello.vxL534-545
fn validatePadding(input: Span<u8>, view: TlsWireSlice): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
Returns: Result<bool, TlsHelloError>
validateClientPsk
📄
hello.vxL547-592
fn validateClientPsk(input: Span<u8>, view: TlsWireSlice): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
Returns: Result<bool, TlsHelloError>
groupsContain
📄
hello.vxL594-602
fn groupsContain(input: Span<u8>, view: TlsWireSlice, group: u16): boolParameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
group | u16 |
Returns: bool
validateClientKeyShares
📄
hello.vxL604-640
fn validateClientKeyShares(input: Span<u8>, view: TlsWireSlice, groups: TlsWireSlice): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
groups | TlsWireSlice |
Returns: Result<bool, TlsHelloError>
validateServerKeyShare
📄
hello.vxL642-655
fn validateServerKeyShare(input: Span<u8>, view: TlsWireSlice, helloRetryRequest: bool): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
view | TlsWireSlice |
helloRetryRequest | bool |
Returns: Result<bool, TlsHelloError>
scanExtensions
📄
hello.vxL657-854
fn scanExtensions(input: Span<u8>, start: usize, length: usize, client: bool, helloRetryRequest: bool): Result<TlsHelloExtensions, TlsHelloError>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
start | usize |
length | usize |
client | bool |
helloRetryRequest | bool |
Returns: Result<TlsHelloExtensions, TlsHelloError>
decodeExactHeader
📄
hello.vxL856-876
fn decodeExactHeader(encoded: Span<u8>, expectedType: u8): Result<TlsHandshakeHeader, TlsHelloError>Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
expectedType | u8 |
Returns: Result<TlsHandshakeHeader, TlsHelloError>
copyRandom
📄
hello.vxL878-886
fn copyRandom(input: Span<u8>, offset: usize): [u8; 32]Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
Returns: [u8; 32]
isHelloRetryRandom
📄
hello.vxL888-896
fn isHelloRetryRandom(random: &[u8; 32]): boolParameters:
| Name | Type |
|---|---|
random | &[u8; 32] |
Returns: bool
decodeClientHello 🔓 export
📄
hello.vxL899-960
export fn decodeClientHello(encoded: Span<u8>): Result<TlsClientHelloView, TlsHelloError>Decodes and validates one complete TLS 1.3 ClientHello Handshake message.
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<TlsClientHelloView, TlsHelloError>
decodeServerHello 🔓 export
📄
hello.vxL964-1013
export fn decodeServerHello(encoded: Span<u8>): Result<TlsServerHelloView, TlsHelloError>Decodes and validates one complete TLS 1.3 ServerHello or
HelloRetryRequest Handshake message.
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<TlsServerHelloView, TlsHelloError>
encodeHeader
📄
hello.vxL1015-1027
fn encodeHeader(messageType: u8, bodyLen: usize, output: &Span<u8>!): Result<bool, TlsHelloError>Parameters:
| Name | Type |
|---|---|
messageType | u8 |
bodyLen | usize |
output | &Span<u8>! |
Returns: Result<bool, TlsHelloError>
encodeTlsExtension 🔓 export
📄
hello.vxL1030-1047
export fn encodeTlsExtension(extensionType: u16, data: Span<u8>, output: &Span<u8>!): Result<usize, TlsHelloError>Emits a generic Extension TLV into caller-owned storage.
Parameters:
| Name | Type |
|---|---|
extensionType | u16 |
data | Span<u8> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeCookie 🔓 export
📄
hello.vxL1052-1074
export fn encodeCookie(cookie: Span<u8>, output: &Span<u8>!): Result<usize, TlsHelloError>Encodes the TLS 1.3 cookie extension into caller-owned storage. The
opaque payload is length-delimited exactly once inside the extension and is never allocated or truncated.
Parameters:
| Name | Type |
|---|---|
cookie | Span<u8> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeClientHello 🔓 export
📄
hello.vxL1079-1146
export fn encodeClientHello(random: &[u8; 32], sessionId: Span<u8>, cipherSuites: Span<u16>, extensionBlock: Span<u8>, output: &Span<u8>!): Result<usize, TlsHelloError>Emits the TLS 1.3 ClientHello body and Handshake header. Randomness and key
material are always supplied by the caller; this codec has no deterministic or hidden entropy fallback.
Parameters:
| Name | Type |
|---|---|
random | &[u8; 32] |
sessionId | Span<u8> |
cipherSuites | Span<u16> |
extensionBlock | Span<u8> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeServerHello 🔓 export
📄
hello.vxL1150-1205
export fn encodeServerHello(random: &[u8; 32], sessionId: Span<u8>, cipherSuite: u16, extensionBlock: Span<u8>, output: &Span<u8>!): Result<usize, TlsHelloError>Emits one TLS 1.3 ServerHello or HelloRetryRequest from an already
validated extension block.
Parameters:
| Name | Type |
|---|---|
random | &[u8; 32] |
sessionId | Span<u8> |
cipherSuite | u16 |
extensionBlock | Span<u8> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeClientSupportedVersions 🔓 export
📄
hello.vxL1208-1245
export fn encodeClientSupportedVersions(versions: Span<u16>, output: &Span<u8>!): Result<usize, TlsHelloError>Encodes supported_versions for a TLS 1.3 ClientHello.
Parameters:
| Name | Type |
|---|---|
versions | Span<u16> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeServerSupportedVersion 🔓 export
📄
hello.vxL1247-1257
export fn encodeServerSupportedVersion(output: &Span<u8>!): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeU16VectorExtension
📄
hello.vxL1259-1287
fn encodeU16VectorExtension(extensionType: u16, values: Span<u16>, maxItems: usize, output: &Span<u8>!): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
extensionType | u16 |
values | Span<u16> |
maxItems | usize |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeSupportedGroups 🔓 export
📄
hello.vxL1289-1295
export fn encodeSupportedGroups(groups: Span<u16>, output: &Span<u8>!): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
groups | Span<u16> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeSignatureAlgorithms 🔓 export
📄
hello.vxL1297-1304
export fn encodeSignatureAlgorithms(schemes: Span<u16>, output: &Span<u8>!): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
schemes | Span<u16> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeClientKeyShare 🔓 export
📄
hello.vxL1306-1330
export fn encodeClientKeyShare(group: u16, keyExchange: Span<u8>, output: &Span<u8>!): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
group | u16 |
keyExchange | Span<u8> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeServerKeyShare 🔓 export
📄
hello.vxL1332-1355
export fn encodeServerKeyShare(group: u16, keyExchange: Span<u8>, output: &Span<u8>!): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
group | u16 |
keyExchange | Span<u8> |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
encodeHelloRetryKeyShare 🔓 export
📄
hello.vxL1359-1369
export fn encodeHelloRetryKeyShare(group: u16, output: &Span<u8>!): Result<usize, TlsHelloError>Encodes the selected-group-only key_share form used exclusively by
HelloRetryRequest. A normal ServerHello must use encodeServerKeyShare.
Parameters:
| Name | Type |
|---|---|
group | u16 |
output | &Span<u8>! |
Returns: Result<usize, TlsHelloError>
identityError
📄
hostname.vxL27-29
fn identityError(kind: TlsDnsIdentityErrorKind, offset: usize): TlsDnsIdentityErrorParameters:
| Name | Type |
|---|---|
kind | TlsDnsIdentityErrorKind |
offset | usize |
Returns: TlsDnsIdentityError
identityByteAt
📄
hostname.vxL31-33
fn identityByteAt(value: Span<u8>, offset: usize): u8Parameters:
| Name | Type |
|---|---|
value | Span<u8> |
offset | usize |
Returns: u8
isAsciiAlpha
📄
hostname.vxL35-38
fn isAsciiAlpha(value: u8): boolParameters:
| Name | Type |
|---|---|
value | u8 |
Returns: bool
isAsciiDigit
📄
hostname.vxL40-42
fn isAsciiDigit(value: u8): boolParameters:
| Name | Type |
|---|---|
value | u8 |
Returns: bool
foldedAscii
📄
hostname.vxL44-47
fn foldedAscii(value: u8): u8Parameters:
| Name | Type |
|---|---|
value | u8 |
Returns: u8
normalizedDnsLength
📄
hostname.vxL49-97
fn normalizedDnsLength(value: Span<u8>, allowWildcard: bool, invalidKind: TlsDnsIdentityErrorKind): Result<usize, TlsDnsIdentityError>Parameters:
| Name | Type |
|---|---|
value | Span<u8> |
allowWildcard | bool |
invalidKind | TlsDnsIdentityErrorKind |
Returns: Result<usize, TlsDnsIdentityError>
isIpv4Reference
📄
hostname.vxL99-121
fn isIpv4Reference(value: Span<u8>, length: usize): boolParameters:
| Name | Type |
|---|---|
value | Span<u8> |
length | usize |
Returns: bool
equalDnsRange
📄
hostname.vxL123-137
fn equalDnsRange(reference: Span<u8>, referenceOffset: usize, presented: Span<u8>, presentedOffset: usize, length: usize): boolParameters:
| Name | Type |
|---|---|
reference | Span<u8> |
referenceOffset | usize |
presented | Span<u8> |
presentedOffset | usize |
length | usize |
Returns: bool
sameHash
📄
key_schedule.vxL20-31
fn sameHash(left: TlsHashAlgorithm, right: TlsHashAlgorithm): boolParameters:
| Name | Type |
|---|---|
left | TlsHashAlgorithm |
right | TlsHashAlgorithm |
Returns: bool
rangesOverlap
📄
key_schedule.vxL33-41
fn rangesOverlap(left: Span<u8>, right: Span<u8>): boolParameters:
| Name | Type |
|---|---|
left | Span<u8> |
right | Span<u8> |
Returns: bool
exactArraySpan
📄
key_schedule.vxL43-45
fn exactArraySpan(value: &[u8; 48], length: usize): Span<u8>Parameters:
| Name | Type |
|---|---|
value | &[u8; 48] |
length | usize |
Returns: Span<u8>
exactArraySpanMut
📄
key_schedule.vxL47-49
fn exactArraySpanMut(value: &[u8; 48]!, length: usize): Span<u8>Parameters:
| Name | Type |
|---|---|
value | &[u8; 48]! |
length | usize |
Returns: Span<u8>
emptyTranscriptHash
📄
key_schedule.vxL51-69
fn emptyTranscriptHash(hash: TlsHashAlgorithm): [u8; 48]Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
Returns: [u8; 48]
transcriptDigest
📄
key_schedule.vxL71-87
fn transcriptDigest(hash: TlsHashAlgorithm, transcript: &TlsTranscript, output: &[u8; 48]!): Result<usize, TlsKeyScheduleError>Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
transcript | &TlsTranscript |
output | &[u8; 48]! |
Returns: Result<usize, TlsKeyScheduleError>
extractSecret
📄
key_schedule.vxL89-108
fn extractSecret(hash: TlsHashAlgorithm, salt: Span<u8>, ikm: Span<u8>, output: Ptr<u8>): boolParameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
salt | Span<u8> |
ikm | Span<u8> |
output | Ptr<u8> |
Returns: bool
validateDualOutput
📄
key_schedule.vxL110-126
fn validateDualOutput(digestLen: usize, first: Span<u8>, second: Span<u8>, input: Span<u8>): Result<bool, TlsKeyScheduleError>Parameters:
| Name | Type |
|---|---|
digestLen | usize |
first | Span<u8> |
second | Span<u8> |
input | Span<u8> |
Returns: Result<bool, TlsKeyScheduleError>
computeFinishedFromTranscript 🔓 export
📄
key_schedule.vxL394-414
export fn computeFinishedFromTranscript(baseKey: Span<u8>, transcript: &TlsTranscript, out: &Span<u8>!): Result<usize, TlsKeyScheduleError>Transcript-coupled Finished generation. The selected transcript hash is
authoritative; caller-provided hash identity cannot drift from it.
Parameters:
| Name | Type |
|---|---|
baseKey | Span<u8> |
transcript | &TlsTranscript |
out | &Span<u8>! |
Returns: Result<usize, TlsKeyScheduleError>
verifyFinishedFromTranscript 🔓 export
📄
key_schedule.vxL418-438
export fn verifyFinishedFromTranscript(baseKey: Span<u8>, transcript: &TlsTranscript, received: Span<u8>): Result<bool, TlsKeyScheduleError>Transcript-coupled constant-time Finished verification. Verify before
appending the peer Finished message to the transcript.
Parameters:
| Name | Type |
|---|---|
baseKey | Span<u8> |
transcript | &TlsTranscript |
received | Span<u8> |
Returns: Result<bool, TlsKeyScheduleError>
keyUpdateRequestCode
📄
key_update.vxL25-30
fn keyUpdateRequestCode(request: TlsKeyUpdateRequest): u8Parameters:
| Name | Type |
|---|---|
request | TlsKeyUpdateRequest |
Returns: u8
encodeTlsKeyUpdate 🔓 export
📄
key_update.vxL33-46
export fn encodeTlsKeyUpdate(request: TlsKeyUpdateRequest, output: &Span<u8>!): Result<usize, TlsKeyUpdateError>Encodes one complete Handshake-framed TLS 1.3 KeyUpdate message.
Parameters:
| Name | Type |
|---|---|
request | TlsKeyUpdateRequest |
output | &Span<u8>! |
Returns: Result<usize, TlsKeyUpdateError>
decodeTlsKeyUpdate 🔓 export
📄
key_update.vxL51-78
export fn decodeTlsKeyUpdate(encoded: Span<u8>): Result<TlsKeyUpdateRequest, TlsKeyUpdateError>Decodes exactly one complete Handshake-framed TLS 1.3 KeyUpdate message.
Values other than 0 and 1 are retained as a typed InvalidRequest so the connection owner can select the required illegal_parameter alert.
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<TlsKeyUpdateRequest, TlsKeyUpdateError>
exactArraySpan
📄
negotiation.vxL95-97
fn exactArraySpan<const N: usize>(value: &[u8; N], length: usize): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
length | usize |
Returns: Span<u8>
exactArraySpanMut
📄
negotiation.vxL99-101
fn exactArraySpanMut<const N: usize>(value: &[u8; N]!, length: usize): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
length | usize |
Returns: Span<u8>
spansOverlap
📄
negotiation.vxL103-111
fn spansOverlap(left: Span<u8>, right: Span<u8>): boolParameters:
| Name | Type |
|---|---|
left | Span<u8> |
right | Span<u8> |
Returns: bool
equalBytes
📄
negotiation.vxL113-120
fn equalBytes(left: Span<u8>, right: Span<u8>): boolParameters:
| Name | Type |
|---|---|
left | Span<u8> |
right | Span<u8> |
Returns: bool
mapHelloFailure
📄
negotiation.vxL122-124
fn mapHelloFailure(_: TlsHelloError): TlsX25519NegotiationErrorParameters:
| Name | Type |
|---|---|
_ | TlsHelloError |
Returns: TlsX25519NegotiationError
mapTranscriptFailure
📄
negotiation.vxL126-128
fn mapTranscriptFailure(_: TlsTranscriptError): TlsX25519NegotiationErrorParameters:
| Name | Type |
|---|---|
_ | TlsTranscriptError |
Returns: TlsX25519NegotiationError
mapScheduleFailure
📄
negotiation.vxL130-138
fn mapScheduleFailure(failure: TlsKeyScheduleError): TlsX25519NegotiationErrorParameters:
| Name | Type |
|---|---|
failure | TlsKeyScheduleError |
Returns: TlsX25519NegotiationError
cipherHash
📄
negotiation.vxL140-150
fn cipherHash(cipherSuite: u16): Result<TlsHashAlgorithm, TlsX25519NegotiationError>Parameters:
| Name | Type |
|---|---|
cipherSuite | u16 |
Returns: Result<TlsHashAlgorithm, TlsX25519NegotiationError>
offeredCipher
📄
negotiation.vxL328-338
fn offeredCipher(view: &TlsClientHelloView, encoded: Span<u8>, cipher: u16): boolParameters:
| Name | Type |
|---|---|
view | &TlsClientHelloView |
encoded | Span<u8> |
cipher | u16 |
Returns: bool
offeredSignature
📄
negotiation.vxL340-353
fn offeredSignature(view: &TlsClientHelloView, encoded: Span<u8>, scheme: u16): Result<bool, TlsX25519NegotiationError>Parameters:
| Name | Type |
|---|---|
view | &TlsClientHelloView |
encoded | Span<u8> |
scheme | u16 |
Returns: Result<bool, TlsX25519NegotiationError>
hashU16
📄
negotiation.vxL355-363
fn hashU16(hasher: &Sha256!, value: usize)Parameters:
| Name | Type |
|---|---|
hasher | &Sha256! |
value | usize |
retryInvariantDigest
📄
negotiation.vxL370-433
fn retryInvariantDigest(view: &TlsClientHelloView, encoded: Span<u8>, output: &[u8; 32]!): Result<bool, TlsX25519NegotiationError>Hashes precisely the ClientHello fields RFC 8446 requires to remain
invariant across HelloRetryRequest. key_share, cookie, and zero padding are excluded because the protocol explicitly permits those fields to change. The digest is an internal comparison token, never a transcript substitute.
Parameters:
| Name | Type |
|---|---|
view | &TlsClientHelloView |
encoded | Span<u8> |
output | &[u8; 32]! |
Returns: Result<bool, TlsX25519NegotiationError>
extensionPresent
📄
negotiation.vxL435-443
fn extensionPresent(view: &TlsClientHelloView, encoded: Span<u8>, identity: u16): Result<bool, TlsX25519NegotiationError>Parameters:
| Name | Type |
|---|---|
view | &TlsClientHelloView |
encoded | Span<u8> |
identity | u16 |
Returns: Result<bool, TlsX25519NegotiationError>
validateTrafficOutputs
📄
negotiation.vxL809-821
fn validateTrafficOutputs(digestLen: usize, clientOut: Span<u8>, serverOut: Span<u8>): Result<bool, TlsX25519NegotiationError>Parameters:
| Name | Type |
|---|---|
digestLen | usize |
clientOut | Span<u8> |
serverOut | Span<u8> |
Returns: Result<bool, TlsX25519NegotiationError>
negotiationU16
📄
negotiation.vxL1105-1108
fn negotiationU16(input: Span<u8>, offset: usize): usizeParameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
Returns: usize
encodeRecordHeaderRaw
📄
record.vxL60-66
fn encodeRecordHeaderRaw(contentType: u8, version: u16, length: u16, out: RawBuf)Parameters:
| Name | Type |
|---|---|
contentType | u8 |
version | u16 |
length | u16 |
out | RawBuf |
decodeRecordHeaderRaw
📄
record.vxL68-79
fn decodeRecordHeaderRaw(inBuf: RawBuf): TlsRecordHeaderParameters:
| Name | Type |
|---|---|
inBuf | RawBuf |
Returns: TlsRecordHeader
encodeRecordHeader 🔓 export
📄
record.vxL207-217
export fn encodeRecordHeader(contentType: u8, version: u16, length: u16, out: &Span<u8>!): Result<usize, TlsRecordError>Parameters:
| Name | Type |
|---|---|
contentType | u8 |
version | u16 |
length | u16 |
out | &Span<u8>! |
Returns: Result<usize, TlsRecordError>
decodeRecordHeader 🔓 export
📄
record.vxL219-224
export fn decodeRecordHeader(inBuf: Span<u8>): Result<TlsRecordHeader, TlsRecordError>Parameters:
| Name | Type |
|---|---|
inBuf | Span<u8> |
Returns: Result<TlsRecordHeader, TlsRecordError>
isTlsInnerContentType
📄
record.vxL226-231
fn isTlsInnerContentType(contentType: u8): boolParameters:
| Name | Type |
|---|---|
contentType | u8 |
Returns: bool
rangesOverlap
📄
record.vxL233-241
fn rangesOverlap(a: RawBuf, aLen: u64, b: RawBuf, bLen: u64): boolParameters:
| Name | Type |
|---|---|
a | RawBuf |
aLen | u64 |
b | RawBuf |
bLen | u64 |
Returns: bool
constructNonce
📄
record.vxL243-259
fn constructNonce(iv: RawBuf, seq: u64, outNonce: RawBuf)Parameters:
| Name | Type |
|---|---|
iv | RawBuf |
seq | u64 |
outNonce | RawBuf |
decodeHeaderRaw
📄
transcript.vxL44-52
fn decodeHeaderRaw(input: RawBuf): TlsHandshakeHeaderParameters:
| Name | Type |
|---|---|
input | RawBuf |
Returns: TlsHandshakeHeader
encodeHeaderRaw
📄
transcript.vxL54-59
fn encodeHeaderRaw(header: TlsHandshakeHeader, output: RawBuf)Parameters:
| Name | Type |
|---|---|
header | TlsHandshakeHeader |
output | RawBuf |
decodeHandshakeHeader 🔓 export
📄
transcript.vxL62-69
export fn decodeHandshakeHeader(input: Span<u8>): Result<TlsHandshakeHeader, TlsTranscriptError>Decodes a TLS Handshake header from the first four bytes of input.
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
Returns: Result<TlsHandshakeHeader, TlsTranscriptError>
encodeHandshakeHeader 🔓 export
📄
transcript.vxL72-83
export fn encodeHandshakeHeader(header: TlsHandshakeHeader, output: &Span<u8>!): Result<usize, TlsTranscriptError>Encodes a TLS Handshake header without allocating.
Parameters:
| Name | Type |
|---|---|
header | TlsHandshakeHeader |
output | &Span<u8>! |
Returns: Result<usize, TlsTranscriptError>
sameHash
📄
transcript.vxL212-223
fn sameHash(left: TlsHashAlgorithm, right: TlsHashAlgorithm): boolParameters:
| Name | Type |
|---|---|
left | TlsHashAlgorithm |
right | TlsHashAlgorithm |
Returns: bool
transportError
📄
transport.vxL78-86
fn transportError(kind: TlsTransportErrorKind): TlsTransportErrorParameters:
| Name | Type |
|---|---|
kind | TlsTransportErrorKind |
Returns: TlsTransportError
transportRecordError
📄
transport.vxL88-96
fn transportRecordError(cause: TlsRecordError): TlsTransportErrorParameters:
| Name | Type |
|---|---|
cause | TlsRecordError |
Returns: TlsTransportError
transportAlertError
📄
transport.vxL98-106
fn transportAlertError(cause: TlsAlertError): TlsTransportErrorParameters:
| Name | Type |
|---|---|
cause | TlsAlertError |
Returns: TlsTransportError
transportScheduleError
📄
transport.vxL108-116
fn transportScheduleError(cause: TlsKeyScheduleError): TlsTransportErrorParameters:
| Name | Type |
|---|---|
cause | TlsKeyScheduleError |
Returns: TlsTransportError
transportKeyUpdateError
📄
transport.vxL118-126
fn transportKeyUpdateError(cause: TlsKeyUpdateError): TlsTransportErrorParameters:
| Name | Type |
|---|---|
cause | TlsKeyUpdateError |
Returns: TlsTransportError
recordFailureEndsConnection
📄
transport.vxL128-141
fn recordFailureEndsConnection(cause: TlsRecordError): boolParameters:
| Name | Type |
|---|---|
cause | TlsRecordError |
Returns: bool
arraySpan
📄
transport.vxL143-145
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
transport.vxL147-149
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
stageNextGeneration
📄
transport.vxL327-353
fn stageNextGeneration(hash: TlsHashAlgorithm, cipherId: u16, digestLen: usize, currentSecret: Span<u8>): Result<TlsNextTrafficGeneration, TlsTransportError>Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
cipherId | u16 |
digestLen | usize |
currentSecret | Span<u8> |
Returns: Result<TlsNextTrafficGeneration, TlsTransportError>
x509Error
📄
x509.vxL56-58
fn x509Error(kind: X509ErrorKind, offset: usize): X509ErrorParameters:
| Name | Type |
|---|---|
kind | X509ErrorKind |
offset | usize |
Returns: X509Error
bytesOf
📄
x509.vxL60-62
fn bytesOf<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
rebaseSlice
📄
x509.vxL64-66
fn rebaseSlice(value: DerSlice, base: usize): DerSliceParameters:
| Name | Type |
|---|---|
value | DerSlice |
base | usize |
Returns: DerSlice
rebaseElement
📄
x509.vxL68-77
fn rebaseElement(value: DerElement, base: usize): DerElementParameters:
| Name | Type |
|---|---|
value | DerElement |
base | usize |
Returns: DerElement
child
📄
x509.vxL79-84
fn child(input: Span<u8>, parent: &DerElement, index: usize): Result<DerElement, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
parent | &DerElement |
index | usize |
Returns: Result<DerElement, X509Error>
childCount
📄
x509.vxL86-91
fn childCount(input: Span<u8>, parent: &DerElement): Result<usize, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
parent | &DerElement |
Returns: Result<usize, X509Error>
isEd25519Algorithm
📄
x509.vxL93-111
fn isEd25519Algorithm(input: Span<u8>, algorithm: &DerElement): Result<bool, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
algorithm | &DerElement |
Returns: Result<bool, X509Error>
explicitElement
📄
x509.vxL113-127
fn explicitElement(input: Span<u8>, wrapper: &DerElement): Result<DerElement, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
wrapper | &DerElement |
Returns: Result<DerElement, X509Error>
x509Digit
📄
x509.vxL379-385
fn x509Digit(input: Span<u8>, offset: usize): Result<i32, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
Returns: Result<i32, X509Error>
x509TwoDigits
📄
x509.vxL387-395
fn x509TwoDigits(input: Span<u8>, offset: usize): Result<i32, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
offset | usize |
Returns: Result<i32, X509Error>
x509LeapYear
📄
x509.vxL397-399
fn x509LeapYear(year: i32): boolParameters:
| Name | Type |
|---|---|
year | i32 |
Returns: bool
x509DaysInMonth
📄
x509.vxL401-405
fn x509DaysInMonth(year: i32, month: i32): i32Parameters:
| Name | Type |
|---|---|
year | i32 |
month | i32 |
Returns: i32
x509DaysFromCivil
📄
x509.vxL407-417
fn x509DaysFromCivil(year: i32, month: i32, day: i32): i64Parameters:
| Name | Type |
|---|---|
year | i32 |
month | i32 |
day | i32 |
Returns: i64
parseCertificateTime
📄
x509.vxL419-480
fn parseCertificateTime(input: Span<u8>, element: &DerElement): Result<i64, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
element | &DerElement |
Returns: Result<i64, X509Error>
extensionSequence
📄
x509.vxL534-544
fn extensionSequence(input: Span<u8>, certificate: &X509CertificateView): Result<DerElement, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
certificate | &X509CertificateView |
Returns: Result<DerElement, X509Error>
extensionAt
📄
x509.vxL546-589
fn extensionAt(input: Span<u8>, sequence: &DerElement, index: usize): Result<X509ExtensionView, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
sequence | &DerElement |
index | usize |
Returns: Result<X509ExtensionView, X509Error>
oidMatches
📄
x509.vxL591-598
fn oidMatches<const N: usize>( input: Span<u8>, oid: &DerElement, expected: &[u8; N] ): Result<bool, X509Error>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
oid | &DerElement |
expected | &[u8; N] |
Returns: Result<bool, X509Error>
boundedPathLength
📄
x509.vxL615-633
fn boundedPathLength(input: Span<u8>, magnitude: &DerSlice): Result<usize, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
magnitude | &DerSlice |
Returns: Result<usize, X509Error>
sameOid
📄
x509.vxL635-645
fn sameOid(input: Span<u8>, left: &DerElement, right: &DerElement): Result<bool, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
left | &DerElement |
right | &DerElement |
Returns: Result<bool, X509Error>
parseBasicConstraints
📄
x509.vxL647-698
fn parseBasicConstraints(input: Span<u8>, extension: &X509ExtensionView): Result<(bool, bool, usize), X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
extension | &X509ExtensionView |
Returns: Result<(bool, bool, usize), X509Error>
parseKeyUsage
📄
x509.vxL700-731
fn parseKeyUsage(input: Span<u8>, extension: &X509ExtensionView): Result<(bool, bool), X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
extension | &X509ExtensionView |
Returns: Result<(bool, bool), X509Error>
parseExtendedKeyUsage
📄
x509.vxL733-776
fn parseExtendedKeyUsage(input: Span<u8>, extension: &X509ExtensionView): Result<bool, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
extension | &X509ExtensionView |
Returns: Result<bool, X509Error>
extensionPolicy
📄
x509.vxL778-892
fn extensionPolicy(input: Span<u8>, certificate: &X509CertificateView): Result<X509ExtensionPolicy, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
certificate | &X509CertificateView |
Returns: Result<X509ExtensionPolicy, X509Error>
namesEqual
📄
x509.vxL894-907
fn namesEqual(childInput: Span<u8>, childCertificate: &X509CertificateView, issuerInput: Span<u8>, issuerCertificate: &X509CertificateView): Result<bool, X509Error>Parameters:
| Name | Type |
|---|---|
childInput | Span<u8> |
childCertificate | &X509CertificateView |
issuerInput | Span<u8> |
issuerCertificate | &X509CertificateView |
Returns: Result<bool, X509Error>
subjectNameIsEmpty
📄
x509.vxL909-920
fn subjectNameIsEmpty(input: Span<u8>, certificate: &X509CertificateView): Result<bool, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
certificate | &X509CertificateView |
Returns: Result<bool, X509Error>
validateLeafPolicy
📄
x509.vxL922-950
fn validateLeafPolicy(input: Span<u8>, certificate: &X509CertificateView, facts: &X509ExtensionPolicy, referenceDnsName: str, unixSeconds: i64): Result<bool, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
certificate | &X509CertificateView |
facts | &X509ExtensionPolicy |
referenceDnsName | str |
unixSeconds | i64 |
Returns: Result<bool, X509Error>
validateAuthorityPolicy
📄
x509.vxL952-980
fn validateAuthorityPolicy(input: Span<u8>, certificate: &X509CertificateView, facts: &X509ExtensionPolicy, caCertificatesBelow: usize, unixSeconds: i64): Result<bool, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
certificate | &X509CertificateView |
facts | &X509ExtensionPolicy |
caCertificatesBelow | usize |
unixSeconds | i64 |
Returns: Result<bool, X509Error>
certificateIsSelfIssued
📄
x509.vxL982-994
fn certificateIsSelfIssued(input: Span<u8>, certificate: &X509CertificateView): Result<bool, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
certificate | &X509CertificateView |
Returns: Result<bool, X509Error>
subjectAltNames
📄
x509.vxL1078-1119
fn subjectAltNames(input: Span<u8>, certificate: &X509CertificateView): Result<DerElement, X509Error>Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
certificate | &X509CertificateView |
Returns: Result<DerElement, X509Error>
arraySpan
📄
alert.test.vxL7-9
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
alert.test.vxL11-13
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
test_tls_alert_canonical_roundtrip 🔓 export
📄
alert.test.vxL15-49
export fn test_tls_alert_canonical_roundtrip(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_alert_rejects_noncanonical_emission 🔓 export
📄
alert.test.vxL51-66
export fn test_tls_alert_rejects_noncanonical_emission(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_alert_decode_is_exact_and_downgrade_safe 🔓 export
📄
alert.test.vxL68-97
export fn test_tls_alert_decode_is_exact_and_downgrade_safe(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
arraySpan
📄
assembler.test.vxL6-8
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
assembler.test.vxL10-12
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
spansEqual
📄
assembler.test.vxL14-22
fn spansEqual(left: Span<u8>, right: Span<u8>): boolParameters:
| Name | Type |
|---|---|
left | Span<u8> |
right | Span<u8> |
Returns: bool
test_tls_handshake_assembler_direct_and_coalesced_zero_copy 🔓 export
📄
assembler.test.vxL24-54
export fn test_tls_handshake_assembler_direct_and_coalesced_zero_copy(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_handshake_assembler_every_two_fragment_split 🔓 export
📄
assembler.test.vxL56-83
export fn test_tls_handshake_assembler_every_two_fragment_split(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_handshake_assembler_one_byte_fragments 🔓 export
📄
assembler.test.vxL85-110
export fn test_tls_handshake_assembler_one_byte_fragments(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_handshake_assembler_rejections_are_atomic 🔓 export
📄
assembler.test.vxL112-141
export fn test_tls_handshake_assembler_rejections_are_atomic(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_handshake_assembler_output_identity_and_boundaries 🔓 export
📄
assembler.test.vxL143-187
export fn test_tls_handshake_assembler_output_identity_and_boundaries(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_handshake_assembler_zero_body_and_invalid_inputs 🔓 export
📄
assembler.test.vxL189-207
export fn test_tls_handshake_assembler_zero_body_and_invalid_inputs(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
arraySpan
📄
bench.test.vxL14-16
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
u16ArraySpan
📄
bench.test.vxL18-20
fn u16ArraySpan<const N: usize>(value: &[u16; N]): Span<u16>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u16; N] |
Returns: Span<u16>
state
📄
bench.test.vxL22-27
fn state(cipherId: u16, key: Span<u8>, iv: Span<u8>): TlsCipherStateParameters:
| Name | Type |
|---|---|
cipherId | u16 |
key | Span<u8> |
iv | Span<u8> |
Returns: TlsCipherState
decrypt_record_seq_zero
📄
bench.test.vxL29-41
fn decrypt_record_seq_zero(cipherId: u16, key: Span<u8>, iv: Span<u8>, record: Span<u8>, output: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
cipherId | u16 |
key | Span<u8> |
iv | Span<u8> |
record | Span<u8> |
output | &Span<u8>! |
Returns: usize
benchRecordDecrypt
📄
bench.test.vxL43-90
fn benchRecordDecrypt<const KEY_LEN: usize>( b: &BenchCtx!, cipherId: u16, keyBytes: &[u8; KEY_LEN], size: usize )Type Parameters:
const KEY_LEN: usize
Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
cipherId | u16 |
keyBytes | &[u8; KEY_LEN] |
size | usize |
bench_tls_record_decrypt_chacha20_10kb
📄
bench.test.vxL92-95
fn bench_tls_record_decrypt_chacha20_10kb(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_record_decrypt_chacha20_16kb
📄
bench.test.vxL97-100
fn bench_tls_record_decrypt_chacha20_16kb(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_record_decrypt_aes128_gcm_16kb
📄
bench.test.vxL102-105
fn bench_tls_record_decrypt_aes128_gcm_16kb(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_derive_traffic_keys_sha256
📄
bench.test.vxL107-122
fn bench_tls_derive_traffic_keys_sha256(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_derive_traffic_keys_sha384
📄
bench.test.vxL124-139
fn bench_tls_derive_traffic_keys_sha384(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
appendSelectedTranscript
📄
bench.test.vxL141-152
fn appendSelectedTranscript(body: Span<u8>): usizeParameters:
| Name | Type |
|---|---|
body | Span<u8> |
Returns: usize
appendDualTranscript
📄
bench.test.vxL154-163
fn appendDualTranscript(body: Span<u8>): usizeParameters:
| Name | Type |
|---|---|
body | Span<u8> |
Returns: usize
bench_tls_transcript_selected_sha256_1kb
📄
bench.test.vxL165-172
fn bench_tls_transcript_selected_sha256_1kb(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_transcript_dual_hash_1kb
📄
bench.test.vxL174-181
fn bench_tls_transcript_dual_hash_1kb(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
deriveHandshakeScheduleSha256
📄
bench.test.vxL183-199
fn deriveHandshakeScheduleSha256(transcript: &TlsTranscript, sharedSecret: Span<u8>, clientOut: &Span<u8>!, serverOut: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
transcript | &TlsTranscript |
sharedSecret | Span<u8> |
clientOut | &Span<u8>! |
serverOut | &Span<u8>! |
Returns: usize
bench_tls_handshake_schedule_sha256
📄
bench.test.vxL201-222
fn bench_tls_handshake_schedule_sha256(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_finished_sha256
📄
bench.test.vxL224-239
fn bench_tls_finished_sha256(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
buildClientHelloBenchmark
📄
bench.test.vxL241-279
fn buildClientHelloBenchmark(output: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
Returns: usize
decodeClientHelloBench
📄
bench.test.vxL281-286
fn decodeClientHelloBench(encoded: Span<u8>): usizeParameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: usize
bench_tls_client_hello_decode
📄
bench.test.vxL288-296
fn bench_tls_client_hello_decode(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_handshake_assembler_direct
📄
bench.test.vxL298-314
fn bench_tls_handshake_assembler_direct(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_handshake_assembler_fragmented_1kb
📄
bench.test.vxL316-339
fn bench_tls_handshake_assembler_fragmented_1kb(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
arraySpan
📄
handshake.test.vxL7-9
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
handshake.test.vxL11-13
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
test_tls_hkdf_expand_label_sha256_vector 🔓 export
📄
handshake.test.vxL15-37
export fn test_tls_hkdf_expand_label_sha256_vector(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_hkdf_expand_label_sha384_vector 🔓 export
📄
handshake.test.vxL39-63
export fn test_tls_hkdf_expand_label_sha384_vector(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_hkdf_expand_label_rejects_invalid_lengths_and_aliasing 🔓 export
📄
handshake.test.vxL65-96
export fn test_tls_hkdf_expand_label_rejects_invalid_lengths_and_aliasing(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_traffic_key_schedule_validates_suite_and_outputs 🔓 export
📄
handshake.test.vxL98-152
export fn test_tls_traffic_key_schedule_validates_suite_and_outputs(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
helloErrorName
📄
hello.test.vxL13-28
fn helloErrorName(failure: TlsHelloError): strParameters:
| Name | Type |
|---|---|
failure | TlsHelloError |
Returns: str
arraySpan
📄
hello.test.vxL30-32
fn arraySpan<T, const N: usize>(value: &[T; N]): Span<T>Type Parameters:
Tconst N: usize
Parameters:
| Name | Type |
|---|---|
value | &[T; N] |
Returns: Span<T>
mutableArraySpan
📄
hello.test.vxL34-36
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
appendClientExtensions
📄
hello.test.vxL38-69
fn appendClientExtensions(storage: &[u8; 128]!, key: Span<u8>): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
storage | &[u8; 128]! |
key | Span<u8> |
Returns: Result<usize, TlsHelloError>
appendServerExtensions
📄
hello.test.vxL71-88
fn appendServerExtensions(storage: &[u8; 96]!, key: Span<u8>): Result<usize, TlsHelloError>Parameters:
| Name | Type |
|---|---|
storage | &[u8; 96]! |
key | Span<u8> |
Returns: Result<usize, TlsHelloError>
test_tls_client_hello_codec_roundtrip_and_views 🔓 export
📄
hello.test.vxL90-150
export fn test_tls_client_hello_codec_roundtrip_and_views(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_server_hello_codec_roundtrip 🔓 export
📄
hello.test.vxL152-183
export fn test_tls_server_hello_codec_roundtrip(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_client_hello_duplicate_and_order_rejections 🔓 export
📄
hello.test.vxL185-227
export fn test_tls_client_hello_duplicate_and_order_rejections(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_hello_lengths_and_aliasing_fail_before_mutation 🔓 export
📄
hello.test.vxL229-246
export fn test_tls_hello_lengths_and_aliasing_fail_before_mutation(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_hello_retry_request_and_group_coherence 🔓 export
📄
hello.test.vxL248-305
export fn test_tls_hello_retry_request_and_group_coherence(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_hello_cookie_and_padding_are_exact 🔓 export
📄
hello.test.vxL307-387
export fn test_tls_hello_cookie_and_padding_are_exact(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_client_hello_rejects_every_truncated_prefix 🔓 export
📄
hello.test.vxL389-422
export fn test_tls_client_hello_rejects_every_truncated_prefix(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
bytes
📄
hostname.test.vxL6-8
fn bytes(value: str): Span<u8>Parameters:
| Name | Type |
|---|---|
value | str |
Returns: Span<u8>
matches
📄
hostname.test.vxL10-15
fn matches(reference: str, presented: str): boolParameters:
| Name | Type |
|---|---|
reference | str |
presented | str |
Returns: bool
test_tls_dns_identity_exact_ascii 🔓 export
📄
hostname.test.vxL17-23
export fn test_tls_dns_identity_exact_ascii(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_dns_identity_wildcard_is_one_complete_label 🔓 export
📄
hostname.test.vxL25-40
export fn test_tls_dns_identity_wildcard_is_one_complete_label(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_dns_identity_rejects_malformed_and_ip_refs 🔓 export
📄
hostname.test.vxL42-59
export fn test_tls_dns_identity_rejects_malformed_and_ip_refs(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
arraySpan
📄
key_schedule.test.vxL10-12
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
key_schedule.test.vxL14-16
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
assertPrefix
📄
key_schedule.test.vxL18-26
fn assertPrefix<const N: usize>( ctx: &TestCtx!, actual: &[u8; N], expected: &[u8; N] )Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
actual | &[u8; N] |
expected | &[u8; N] |
test_tls_rfc8448_handshake_traffic_secrets 🔓 export
📄
key_schedule.test.vxL31-76
export fn test_tls_rfc8448_handshake_traffic_secrets(ctx: &TestCtx!)RFC 8448 section 4 resumed-handshake trace: handshake secret and
ClientHello..ServerHello transcript hash derive the published traffic secrets. This locks the TLS label encoding and Derive-Secret boundary.
Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_secret_schedule_orders_transitions_and_finished 🔓 export
📄
key_schedule.test.vxL78-213
export fn test_tls_secret_schedule_orders_transitions_and_finished(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_sha384_schedule_and_finished_validation 🔓 export
📄
key_schedule.test.vxL215-304
export fn test_tls_sha384_schedule_and_finished_validation(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_secret_schedule_retire_is_irreversible 🔓 export
📄
key_schedule.test.vxL306-334
export fn test_tls_secret_schedule_retire_is_irreversible(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
arraySpan
📄
key_update.test.vxL10-12
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
key_update.test.vxL14-16
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
strBytes
📄
key_update.test.vxL18-20
fn strBytes(value: str): Span<u8>Parameters:
| Name | Type |
|---|---|
value | str |
Returns: Span<u8>
traffic
📄
key_update.test.vxL22-29
fn traffic(send: Span<u8>, receive: Span<u8>): TlsApplicationTrafficParameters:
| Name | Type |
|---|---|
send | Span<u8> |
receive | Span<u8> |
Returns: TlsApplicationTraffic
cipher
📄
key_update.test.vxL31-52
fn cipher(secret: Span<u8>): TlsCipherStateParameters:
| Name | Type |
|---|---|
secret | Span<u8> |
Returns: TlsCipherState
test_tls_key_update_codec_and_independent_schedule_vector 🔓 export
📄
key_update.test.vxL54-101
export fn test_tls_key_update_codec_and_independent_schedule_vector(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_key_update_switches_generation_after_old_key_record 🔓 export
📄
key_update.test.vxL103-143
export fn test_tls_key_update_switches_generation_after_old_key_record(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_requested_key_update_orders_response_before_data 🔓 export
📄
key_update.test.vxL145-192
export fn test_tls_requested_key_update_orders_response_before_data(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_key_update_capacity_failure_is_atomic 🔓 export
📄
key_update.test.vxL194-208
export fn test_tls_key_update_capacity_failure_is_atomic(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_fragmented_key_update_commits_only_after_last_fragment 🔓 export
📄
key_update.test.vxL210-271
export fn test_tls_fragmented_key_update_commits_only_after_last_fragment(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_new_generation_is_rejected_before_key_update_record 🔓 export
📄
key_update.test.vxL273-299
export fn test_tls_new_generation_is_rejected_before_key_update_record(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_crossed_requested_key_updates_advance_two_generations 🔓 export
📄
key_update.test.vxL301-367
export fn test_tls_crossed_requested_key_updates_advance_two_generations(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
arraySpan
📄
negotiation.test.vxL15-17
fn arraySpan<T, const N: usize>(value: &[T; N]): Span<T>Type Parameters:
Tconst N: usize
Parameters:
| Name | Type |
|---|---|
value | &[T; N] |
Returns: Span<T>
mutableArraySpan
📄
negotiation.test.vxL19-21
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
samePrefix
📄
negotiation.test.vxL23-28
fn samePrefix(left: Span<u8>, right: Span<u8>, length: usize): boolParameters:
| Name | Type |
|---|---|
left | Span<u8> |
right | Span<u8> |
length | usize |
Returns: bool
appendClientExtensions
📄
negotiation.test.vxL30-57
fn appendClientExtensions(storage: &[u8; 128]!, key: Span<u8>): usizeParameters:
| Name | Type |
|---|---|
storage | &[u8; 128]! |
key | Span<u8> |
Returns: usize
appendClientExtensionsWithoutKeyShare
📄
negotiation.test.vxL59-78
fn appendClientExtensionsWithoutKeyShare(storage: &[u8; 128]!): usizeParameters:
| Name | Type |
|---|---|
storage | &[u8; 128]! |
Returns: usize
appendRetryClientExtensions
📄
negotiation.test.vxL80-99
fn appendRetryClientExtensions(storage: &[u8; 128]!, key: Span<u8>, cookie: Span<u8>): usizeParameters:
| Name | Type |
|---|---|
storage | &[u8; 128]! |
key | Span<u8> |
cookie | Span<u8> |
Returns: usize
buildClientHello
📄
negotiation.test.vxL101-116
fn buildClientHello(key: Span<u8>, session: Span<u8>, ciphers: Span<u16>, storage: &[u8; 256]!): usizeParameters:
| Name | Type |
|---|---|
key | Span<u8> |
session | Span<u8> |
ciphers | Span<u16> |
storage | &[u8; 256]! |
Returns: usize
buildClientHelloWithoutKeyShare
📄
negotiation.test.vxL118-132
fn buildClientHelloWithoutKeyShare(session: Span<u8>, ciphers: Span<u16>, storage: &[u8; 256]!): usizeParameters:
| Name | Type |
|---|---|
session | Span<u8> |
ciphers | Span<u16> |
storage | &[u8; 256]! |
Returns: usize
buildRetryClientHello
📄
negotiation.test.vxL134-149
fn buildRetryClientHello(key: Span<u8>, cookie: Span<u8>, session: Span<u8>, ciphers: Span<u16>, storage: &[u8; 256]!): usizeParameters:
| Name | Type |
|---|---|
key | Span<u8> |
cookie | Span<u8> |
session | Span<u8> |
ciphers | Span<u16> |
storage | &[u8; 256]! |
Returns: usize
buildServerHello
📄
negotiation.test.vxL151-174
fn buildServerHello(random: &[u8; 32], key: Span<u8>, session: Span<u8>, cipher: u16, storage: &[u8; 192]!): usizeParameters:
| Name | Type |
|---|---|
random | &[u8; 32] |
key | Span<u8> |
session | Span<u8> |
cipher | u16 |
storage | &[u8; 192]! |
Returns: usize
newOwner
📄
negotiation.test.vxL176-180
fn newOwner(role: TlsHandshakeRole, privateKey: Span<u8>): Result<TlsX25519Negotiation, TlsX25519NegotiationError>Parameters:
| Name | Type |
|---|---|
role | TlsHandshakeRole |
privateKey | Span<u8> |
Returns: Result<TlsX25519Negotiation, TlsX25519NegotiationError>
test_tls_x25519_negotiation_matches_both_roles_sha256 🔓 export
📄
negotiation.test.vxL182-254
export fn test_tls_x25519_negotiation_matches_both_roles_sha256(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_x25519_negotiation_sha384_and_single_use 🔓 export
📄
negotiation.test.vxL256-298
export fn test_tls_x25519_negotiation_sha384_and_single_use(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_x25519_negotiation_rejects_low_order_before_commit 🔓 export
📄
negotiation.test.vxL300-334
export fn test_tls_x25519_negotiation_rejects_low_order_before_commit(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_x25519_negotiation_hrr_cookie_only_replay 🔓 export
📄
negotiation.test.vxL336-470
export fn test_tls_x25519_negotiation_hrr_cookie_only_replay(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_x25519_negotiation_hrr_cookie_limit_is_transactional 🔓 export
📄
negotiation.test.vxL472-546
export fn test_tls_x25519_negotiation_hrr_cookie_limit_is_transactional(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_x25519_negotiation_hrr_commits_fresh_client_hello 🔓 export
📄
negotiation.test.vxL548-736
export fn test_tls_x25519_negotiation_hrr_commits_fresh_client_hello(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_x25519_negotiation_preconditions_fail_closed 🔓 export
📄
negotiation.test.vxL738-822
export fn test_tls_x25519_negotiation_preconditions_fail_closed(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
bytes
📄
negotiation_bench.test.vxL12-14
fn bytes<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
words
📄
negotiation_bench.test.vxL16-18
fn words<const N: usize>(value: &[u16; N]): Span<u16>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u16; N] |
Returns: Span<u16>
bytesMut
📄
negotiation_bench.test.vxL20-22
fn bytesMut<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
buildClient
📄
negotiation_bench.test.vxL24-57
fn buildClient(key: Span<u8>, output: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
key | Span<u8> |
output | &Span<u8>! |
Returns: usize
buildServer
📄
negotiation_bench.test.vxL59-80
fn buildServer(key: Span<u8>, output: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
key | Span<u8> |
output | &Span<u8>! |
Returns: usize
appendClientCapabilities
📄
negotiation_bench.test.vxL82-122
fn appendClientCapabilities(extensions: Span<u8>, key: Option<Span<u8>>, cookie: Option<Span<u8>>): usizeParameters:
| Name | Type |
|---|---|
extensions | Span<u8> |
key | Option<Span<u8>> |
cookie | Option<Span<u8>> |
Returns: usize
buildRetryClient
📄
negotiation_bench.test.vxL124-140
fn buildRetryClient(key: Option<Span<u8>>, cookie: Option<Span<u8>>, output: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
key | Option<Span<u8>> |
cookie | Option<Span<u8>> |
output | &Span<u8>! |
Returns: usize
buildHelloRetry
📄
negotiation_bench.test.vxL142-172
fn buildHelloRetry(cookie: Span<u8>, output: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
cookie | Span<u8> |
output | &Span<u8>! |
Returns: usize
negotiateClient
📄
negotiation_bench.test.vxL174-191
fn negotiateClient(privateKey: Span<u8>, clientHello: Span<u8>, serverHello: Span<u8>, clientTraffic: &Span<u8>!, serverTraffic: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
privateKey | Span<u8> |
clientHello | Span<u8> |
serverHello | Span<u8> |
clientTraffic | &Span<u8>! |
serverTraffic | &Span<u8>! |
Returns: usize
negotiateRetryClient
📄
negotiation_bench.test.vxL193-219
fn negotiateRetryClient(initialPrivate: Span<u8>, retryPrivate: Span<u8>, clientHello1: Span<u8>, helloRetry: Span<u8>, clientHello2: Span<u8>, serverHello: Span<u8>, clientTraffic: &Span<u8>!, serverTraffic: &Span<u8>!): usizeParameters:
| Name | Type |
|---|---|
initialPrivate | Span<u8> |
retryPrivate | Span<u8> |
clientHello1 | Span<u8> |
helloRetry | Span<u8> |
clientHello2 | Span<u8> |
serverHello | Span<u8> |
clientTraffic | &Span<u8>! |
serverTraffic | &Span<u8>! |
Returns: usize
bench_tls_x25519_full_client_negotiation_sha256
📄
negotiation_bench.test.vxL221-254
fn bench_tls_x25519_full_client_negotiation_sha256(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_x25519_hrr_client_negotiation_sha256
📄
negotiation_bench.test.vxL256-311
fn bench_tls_x25519_hrr_client_negotiation_sha256(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
arraySpan
📄
record.test.vxL9-11
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
record.test.vxL13-15
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
strBytes
📄
record.test.vxL17-19
fn strBytes(value: str): Span<u8>Parameters:
| Name | Type |
|---|---|
value | str |
Returns: Span<u8>
aes128State
📄
record.test.vxL21-28
fn aes128State(key: &[u8; 16], iv: &[u8; 12]): TlsCipherStateParameters:
| Name | Type |
|---|---|
key | &[u8; 16] |
iv | &[u8; 12] |
Returns: TlsCipherState
cipherState
📄
record.test.vxL30-35
fn cipherState(cipherId: u16, key: Span<u8>, iv: Span<u8>): TlsCipherStateParameters:
| Name | Type |
|---|---|
cipherId | u16 |
key | Span<u8> |
iv | Span<u8> |
Returns: TlsCipherState
encryptFailedWith
📄
record.test.vxL37-42
fn encryptFailedWith(result: Result<usize, TlsRecordError>, kind: TlsRecordError): boolParameters:
| Name | Type |
|---|---|
result | Result<usize, TlsRecordError> |
kind | TlsRecordError |
Returns: bool
decryptFailedWith
📄
record.test.vxL44-49
fn decryptFailedWith(result: Result<TlsPlaintext, TlsRecordError>, kind: TlsRecordError): boolParameters:
| Name | Type |
|---|---|
result | Result<TlsPlaintext, TlsRecordError> |
kind | TlsRecordError |
Returns: bool
test_tls_record_header_encoding_and_bounds 🔓 export
📄
record.test.vxL51-75
export fn test_tls_record_header_encoding_and_bounds(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_record_encrypt_decrypt_roundtrip 🔓 export
📄
record.test.vxL77-102
export fn test_tls_record_encrypt_decrypt_roundtrip(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_record_rejects_truncated_and_malformed_headers 🔓 export
📄
record.test.vxL104-140
export fn test_tls_record_rejects_truncated_and_malformed_headers(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_record_auth_failure_zeroes_plaintext_and_preserves_sequence 🔓 export
📄
record.test.vxL142-173
export fn test_tls_record_auth_failure_zeroes_plaintext_and_preserves_sequence(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_record_rejects_invalid_key_buffer_and_oversize 🔓 export
📄
record.test.vxL175-207
export fn test_tls_record_rejects_invalid_key_buffer_and_oversize(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_record_empty_plaintext_is_not_an_error 🔓 export
📄
record.test.vxL209-231
export fn test_tls_record_empty_plaintext_is_not_an_error(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_record_rejects_overlapping_decrypt_output 🔓 export
📄
record.test.vxL233-253
export fn test_tls_record_rejects_overlapping_decrypt_output(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_record_owns_key_material_and_supports_all_record_ciphers 🔓 export
📄
record.test.vxL255-310
export fn test_tls_record_owns_key_material_and_supports_all_record_ciphers(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_record_rejects_encrypt_alias_and_short_decrypt_output 🔓 export
📄
record.test.vxL312-344
export fn test_tls_record_rejects_encrypt_alias_and_short_decrypt_output(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
arraySpan
📄
transcript.test.vxL10-12
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
transcript.test.vxL14-16
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
assertBytes
📄
transcript.test.vxL18-24
fn assertBytes<const N: usize>(ctx: &TestCtx!, actual: &[u8; N], expected: &[u8; N])Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
actual | &[u8; N] |
expected | &[u8; N] |
test_tls_handshake_header_codec_is_exact_and_bounded 🔓 export
📄
transcript.test.vxL26-63
export fn test_tls_handshake_header_codec_is_exact_and_bounded(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transcript_sha256_streaming_snapshot 🔓 export
📄
transcript.test.vxL65-111
export fn test_tls_transcript_sha256_streaming_snapshot(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transcript_sha384_matches_independent_vector 🔓 export
📄
transcript.test.vxL113-140
export fn test_tls_transcript_sha384_matches_independent_vector(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transcript_rejections_are_atomic 🔓 export
📄
transcript.test.vxL142-188
export fn test_tls_transcript_rejections_are_atomic(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transcript_hello_retry_rewrite_sha256 🔓 export
📄
transcript.test.vxL190-230
export fn test_tls_transcript_hello_retry_rewrite_sha256(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transcript_hello_retry_rewrite_sha384 🔓 export
📄
transcript.test.vxL232-266
export fn test_tls_transcript_hello_retry_rewrite_sha384(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transcript_constructor_and_output_fail_closed 🔓 export
📄
transcript.test.vxL268-292
export fn test_tls_transcript_constructor_and_output_fail_closed(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transcript_tracks_both_hashes_until_selection 🔓 export
📄
transcript.test.vxL294-360
export fn test_tls_transcript_tracks_both_hashes_until_selection(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
arraySpan
📄
transport.test.vxL10-12
fn arraySpan<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
mutableArraySpan
📄
transport.test.vxL14-16
fn mutableArraySpan<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
strBytes
📄
transport.test.vxL18-20
fn strBytes(value: str): Span<u8>Parameters:
| Name | Type |
|---|---|
value | str |
Returns: Span<u8>
traffic
📄
transport.test.vxL22-29
fn traffic(send: Span<u8>, receive: Span<u8>): TlsApplicationTrafficParameters:
| Name | Type |
|---|---|
send | Span<u8> |
receive | Span<u8> |
Returns: TlsApplicationTraffic
peerCipher
📄
transport.test.vxL31-53
fn peerCipher(secret: Span<u8>): TlsCipherStateParameters:
| Name | Type |
|---|---|
secret | Span<u8> |
Returns: TlsCipherState
test_tls_transport_application_roundtrip 🔓 export
📄
transport.test.vxL55-79
export fn test_tls_transport_application_roundtrip(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transport_close_notify_is_half_close_then_closed 🔓 export
📄
transport.test.vxL81-132
export fn test_tls_transport_close_notify_is_half_close_then_closed(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transport_capacity_failure_is_retryable 🔓 export
📄
transport.test.vxL134-153
export fn test_tls_transport_capacity_failure_is_retryable(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transport_local_user_canceled_orders_shutdown 🔓 export
📄
transport.test.vxL155-196
export fn test_tls_transport_local_user_canceled_orders_shutdown(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transport_fatal_alert_retires_both_peers 🔓 export
📄
transport.test.vxL198-221
export fn test_tls_transport_fatal_alert_retires_both_peers(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transport_wire_failure_poisoning_is_contextual 🔓 export
📄
transport.test.vxL223-272
export fn test_tls_transport_wire_failure_poisoning_is_contextual(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transport_user_canceled_requires_close_notify 🔓 export
📄
transport.test.vxL274-313
export fn test_tls_transport_user_canceled_requires_close_notify(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_transport_authenticated_control_messages_fail_closed 🔓 export
📄
transport.test.vxL315-361
export fn test_tls_transport_authenticated_control_messages_fail_closed(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
certSpan
📄
x509.test.vxL69-71
fn certSpan(value: &[u8; 416]): Span<u8>Parameters:
| Name | Type |
|---|---|
value | &[u8; 416] |
Returns: Span<u8>
stringBytes
📄
x509.test.vxL73-75
fn stringBytes(value: &string): Span<u8>Parameters:
| Name | Type |
|---|---|
value | &string |
Returns: Span<u8>
x509ArrayBytes
📄
x509.test.vxL77-79
fn x509ArrayBytes<const N: usize>(value: &[u8; N]): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N] |
Returns: Span<u8>
x509MutableArrayBytes
📄
x509.test.vxL81-83
fn x509MutableArrayBytes<const N: usize>(value: &[u8; N]!): Span<u8>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[u8; N]! |
Returns: Span<u8>
x509WriteU16
📄
x509.test.vxL85-88
fn x509WriteU16(raw: RawBuf, offset: usize, value: usize)Parameters:
| Name | Type |
|---|---|
raw | RawBuf |
offset | usize |
value | usize |
x509WriteU24
📄
x509.test.vxL90-94
fn x509WriteU24(raw: RawBuf, offset: usize, value: usize)Parameters:
| Name | Type |
|---|---|
raw | RawBuf |
offset | usize |
value | usize |
buildAuthenticatedClientHelloWithAlpn
📄
x509.test.vxL96-136
fn buildAuthenticatedClientHelloWithAlpn(key: Span<u8>, alpnData: Span<u8>, output: &[u8; 256]!): usizeParameters:
| Name | Type |
|---|---|
key | Span<u8> |
alpnData | Span<u8> |
output | &[u8; 256]! |
Returns: usize
buildAuthenticatedClientHello
📄
x509.test.vxL138-144
fn buildAuthenticatedClientHello(key: Span<u8>, output: &[u8; 256]!): usizeParameters:
| Name | Type |
|---|---|
key | Span<u8> |
output | &[u8; 256]! |
Returns: usize
buildAuthenticatedServerHello
📄
x509.test.vxL146-166
fn buildAuthenticatedServerHello(key: Span<u8>, output: &[u8; 192]!): usizeParameters:
| Name | Type |
|---|---|
key | Span<u8> |
output | &[u8; 192]! |
Returns: usize
buildServerCertificateChainMessage
📄
x509.test.vxL168-197
fn buildServerCertificateChainMessage(leaf: Span<u8>, intermediate: Span<u8>, output: &[u8; 1024]!): usizeParameters:
| Name | Type |
|---|---|
leaf | Span<u8> |
intermediate | Span<u8> |
output | &[u8; 1024]! |
Returns: usize
buildAuthenticatedCertificateVerify
📄
x509.test.vxL199-239
fn buildAuthenticatedCertificateVerify(transcript: &TlsTranscript, output: &[u8; 72]!): usizeParameters:
| Name | Type |
|---|---|
transcript | &TlsTranscript |
output | &[u8; 72]! |
Returns: usize
buildAuthenticatedFinished
📄
x509.test.vxL241-256
fn buildAuthenticatedFinished(transcript: &TlsTranscript, baseKey: Span<u8>, output: &[u8; 52]!): usizeParameters:
| Name | Type |
|---|---|
transcript | &TlsTranscript |
baseKey | Span<u8> |
output | &[u8; 52]! |
Returns: usize
buildServerCertificateMessage
📄
x509.test.vxL258-275
fn buildServerCertificateMessage(leaf: Span<u8>, output: &[u8; 448]!)Parameters:
| Name | Type |
|---|---|
leaf | Span<u8> |
output | &[u8; 448]! |
certificateInputs
📄
x509.test.vxL277-279
fn certificateInputs<const N: usize>(value: &[Span<u8>; N]): Span<Span<u8>>Type Parameters:
const N: usize
Parameters:
| Name | Type |
|---|---|
value | &[Span<u8>; N] |
Returns: Span<Span<u8>>
test_x509_ed25519_view_signature_and_san 🔓 export
📄
x509.test.vxL281-305
export fn test_x509_ed25519_view_signature_and_san(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_x509_rejects_tamper_and_unsupported_algorithm 🔓 export
📄
x509.test.vxL307-332
export fn test_x509_rejects_tamper_and_unsupported_algorithm(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_x509_requires_exact_der 🔓 export
📄
x509.test.vxL334-350
export fn test_x509_requires_exact_der(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_x509_direct_tls_server_policy 🔓 export
📄
x509.test.vxL352-373
export fn test_x509_direct_tls_server_policy(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_x509_direct_policy_time_signature_and_critical_extension 🔓 export
📄
x509.test.vxL375-439
export fn test_x509_direct_policy_time_signature_and_critical_extension(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_x509_bounded_intermediate_chain_and_path_length 🔓 export
📄
x509.test.vxL441-532
export fn test_x509_bounded_intermediate_chain_and_path_length(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_server_certificate_view_and_exact_framing 🔓 export
📄
x509.test.vxL534-572
export fn test_tls_server_certificate_view_and_exact_framing(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_ed25519_server_certificate_verify_context 🔓 export
📄
x509.test.vxL574-627
export fn test_tls_ed25519_server_certificate_verify_context(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_certificate_verify_exact_lengths 🔓 export
📄
x509.test.vxL629-645
export fn test_tls_certificate_verify_exact_lengths(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_authentication_wire_builders 🔓 export
📄
x509.test.vxL647-694
export fn test_tls_authentication_wire_builders(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
test_tls_authenticated_owner_full_flight 🔓 export
📄
x509.test.vxL696-865
export fn test_tls_authenticated_owner_full_flight(ctx: &TestCtx!)Parameters:
| Name | Type |
|---|---|
ctx | &TestCtx! |
runAuthenticatedClientFlight
📄
x509.test.vxL867-922
fn runAuthenticatedClientFlight(clientPrivate: Span<u8>, clientHello: Span<u8>, serverHello: Span<u8>, encryptedExtensions: Span<u8>, certificate: Span<u8>, trustAnchor: Span<u8>, certificateVerify: Span<u8>, serverFinished: Span<u8>): usizeParameters:
| Name | Type |
|---|---|
clientPrivate | Span<u8> |
clientHello | Span<u8> |
serverHello | Span<u8> |
encryptedExtensions | Span<u8> |
certificate | Span<u8> |
trustAnchor | Span<u8> |
certificateVerify | Span<u8> |
serverFinished | Span<u8> |
Returns: usize
bench_tls_authenticated_client_full_flight
📄
x509.test.vxL924-1028
fn bench_tls_authenticated_client_full_flight(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_x509_ed25519_leaf_parse
📄
x509.test.vxL1031-1042
fn bench_x509_ed25519_leaf_parse(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_x509_ed25519_direct_tls_policy
📄
x509.test.vxL1044-1058
fn bench_x509_ed25519_direct_tls_policy(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_x509_ed25519_one_intermediate_policy
📄
x509.test.vxL1060-1079
fn bench_x509_ed25519_one_intermediate_policy(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
bench_tls_ed25519_server_certificate_verify
📄
x509.test.vxL1081-1113
fn bench_tls_ed25519_server_certificate_verify(b: &BenchCtx!)Parameters:
| Name | Type |
|---|---|
b | &BenchCtx! |
Methods
isKind 🔓 export
📄
alert.vxL56-58
export fn (self: &TlsAlertError) isKind(kind: TlsAlertError): boolReceiver: self: &TlsAlertError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsAlertError |
Returns: bool
TlsAlert.closeNotify 🔓 export
📄
alert.vxL149-154
export fn TlsAlert.closeNotify(): TlsAlertReturns: TlsAlert
TlsAlert.userCanceled 🔓 export
📄
alert.vxL156-161
export fn TlsAlert.userCanceled(): TlsAlertReturns: TlsAlert
TlsAlert.fatal 🔓 export
📄
alert.vxL163-173
export fn TlsAlert.fatal(description: TlsAlertDescription): Result<TlsAlert, TlsAlertError>Parameters:
| Name | Type |
|---|---|
description | TlsAlertDescription |
Returns: Result<TlsAlert, TlsAlertError>
isCloseNotify 🔓 export
📄
alert.vxL175-177
export fn (self: &TlsAlert) isCloseNotify(): boolReceiver: self: &TlsAlert (immutable reference)
Returns: bool
isUserCanceled 🔓 export
📄
alert.vxL179-181
export fn (self: &TlsAlert) isUserCanceled(): boolReceiver: self: &TlsAlert (immutable reference)
Returns: bool
isFatal 🔓 export
📄
alert.vxL186-189
export fn (self: &TlsAlert) isFatal(): boolEffective TLS 1.3 severity. A peer that incorrectly labels an error alert
as warning cannot downgrade it; only close_notify and user_canceled remain non-fatal.
Receiver: self: &TlsAlert (immutable reference)
Returns: bool
isKind 🔓 export
📄
assembler.vxL23-27
export fn (self: &TlsHandshakeAssemblerError) isKind(kind: TlsHandshakeAssemblerError): boolReceiver: self: &TlsHandshakeAssemblerError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsHandshakeAssemblerError |
Returns: bool
isComplete 🔓 export
📄
assembler.vxL48-54
export fn (self: &TlsHandshakeFeedResult) isComplete(): boolReceiver: self: &TlsHandshakeFeedResult (immutable reference)
Returns: bool
isDirect 🔓 export
📄
assembler.vxL56-58
export fn (self: &TlsHandshakeFeedResult) isDirect(): boolReceiver: self: &TlsHandshakeFeedResult (immutable reference)
Returns: bool
TlsHandshakeAssembler.new 🔓 export
📄
assembler.vxL129-146
export fn TlsHandshakeAssembler.new(maxBodyLen: usize): Result<TlsHandshakeAssembler, TlsHandshakeAssemblerError>Parameters:
| Name | Type |
|---|---|
maxBodyLen | usize |
Returns: Result<TlsHandshakeAssembler, TlsHandshakeAssemblerError>
TlsHandshakeAssembler.withProtocolLimit 🔓 export
📄
assembler.vxL148-153
export fn TlsHandshakeAssembler.withProtocolLimit(): TlsHandshakeAssemblerReturns: TlsHandshakeAssembler
isIdle 🔓 export
📄
assembler.vxL155-157
export fn (self: &TlsHandshakeAssembler) isIdle(): boolReceiver: self: &TlsHandshakeAssembler (immutable reference)
Returns: bool
maxMessageBodyLen 🔓 export
📄
assembler.vxL159-161
export fn (self: &TlsHandshakeAssembler) maxMessageBodyLen(): usizeReceiver: self: &TlsHandshakeAssembler (immutable reference)
Returns: usize
pendingLen 🔓 export
📄
assembler.vxL166-169
export fn (self: &TlsHandshakeAssembler) pendingLen(): usizeReturns bytes already retained for the fragmented message. A partial
header reports its retained byte count; a known message reports the full encoded prefix written to the caller buffer.
Receiver: self: &TlsHandshakeAssembler (immutable reference)
Returns: usize
clearPending
📄
assembler.vxL171-180
fn (self: &TlsHandshakeAssembler!) clearPending()Receiver: self: &TlsHandshakeAssembler! (mutable reference)
abort 🔓 export
📄
assembler.vxL184-186
export fn (self: &TlsHandshakeAssembler!) abort()Explicitly abandons a partial message after the connection has entered a
fatal state. Normal parse errors do not call this automatically.
Receiver: self: &TlsHandshakeAssembler! (mutable reference)
requireNonHandshakeBoundary 🔓 export
📄
assembler.vxL190-196
export fn (self: &TlsHandshakeAssembler) requireNonHandshakeBoundary(): Result<bool, TlsHandshakeAssemblerError>RFC 8446 forbids interleaving another record content type through a
fragmented Handshake message.
Receiver: self: &TlsHandshakeAssembler (immutable reference)
Returns: Result<bool, TlsHandshakeAssemblerError>
requireKeyChangeBoundary 🔓 export
📄
assembler.vxL199-205
export fn (self: &TlsHandshakeAssembler) requireKeyChangeBoundary(): Result<bool, TlsHandshakeAssemblerError>Handshake messages may not cross a record-protection key change.
Receiver: self: &TlsHandshakeAssembler (immutable reference)
Returns: Result<bool, TlsHandshakeAssemblerError>
validateHeader
📄
assembler.vxL207-214
fn (self: &TlsHandshakeAssembler) validateHeader(header: TlsHandshakeHeader): Result<usize, TlsHandshakeAssemblerError>Receiver: self: &TlsHandshakeAssembler (immutable reference)
Parameters:
| Name | Type |
|---|---|
header | TlsHandshakeHeader |
Returns: Result<usize, TlsHandshakeAssemblerError>
feed 🔓 export
📄
assembler.vxL248-412
export fn (self: &TlsHandshakeAssembler!) feed(fragment: Span<u8>, output: &Span<u8>!): Result<TlsHandshakeFeedResult, TlsHandshakeAssemblerError>Consumes at most one complete Handshake message from fragment.
Callers loop over fragment.skip(result.consumed) to handle coalesced messages. For CompleteDirect, consume fragment.take(result.encodedLen). For CompleteBuffered, consume output.take(result.encodedLen) before the next feed. The same output base address is required across a fragmented message, but its reported capacity may grow.
Receiver: self: &TlsHandshakeAssembler! (mutable reference)
Parameters:
| Name | Type |
|---|---|
fragment | Span<u8> |
output | &Span<u8>! |
Returns: Result<TlsHandshakeFeedResult, TlsHandshakeAssemblerError>
isKind 🔓 export
📄
certificate.vxL32-34
export fn (self: &TlsCertificateError) isKind(kind: TlsCertificateError): boolReceiver: self: &TlsCertificateError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsCertificateError |
Returns: bool
entryAt 🔓 export
📄
certificate.vxL143-150
export fn (self: &TlsCertificateMessageView) entryAt(encoded: Span<u8>, index: usize): Result<TlsCertificateEntryView, TlsCertificateError>Receiver: self: &TlsCertificateMessageView (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
index | usize |
Returns: Result<TlsCertificateEntryView, TlsCertificateError>
digestLen 🔓 export
📄
handshake.vxL41-46
export fn (self: &TlsHashAlgorithm) digestLen(): usizeReceiver: self: &TlsHashAlgorithm (immutable reference)
Returns: usize
maxExpandLen
📄
handshake.vxL48-50
fn (self: &TlsHashAlgorithm) maxExpandLen(): usizeReceiver: self: &TlsHashAlgorithm (immutable reference)
Returns: usize
isKind 🔓 export
📄
handshake.vxL52-54
export fn (self: &TlsKeyScheduleError) isKind(kind: TlsKeyScheduleError): boolReceiver: self: &TlsKeyScheduleError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsKeyScheduleError |
Returns: bool
isKind 🔓 export
📄
hello.vxL56-58
export fn (self: &TlsHelloError) isKind(kind: TlsHelloError): boolReceiver: self: &TlsHelloError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsHelloError |
Returns: bool
resolve 🔓 export
📄
hello.vxL78-88
export fn (self: &TlsWireSlice) resolve(encoded: Span<u8>): Result<Span<u8>, TlsHelloError>Receiver: self: &TlsWireSlice (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<Span<u8>, TlsHelloError>
entryAt 🔓 export
📄
hello.vxL135-174
export fn (self: &TlsHelloExtensions) entryAt(encoded: Span<u8>, index: usize): Result<TlsExtensionEntry, TlsHelloError>Resolves an extension by stable wire order. Unknown extension identities
remain available without weakening the typed views for core TLS 1.3 fields.
Receiver: self: &TlsHelloExtensions (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
index | usize |
Returns: Result<TlsExtensionEntry, TlsHelloError>
find 🔓 export
📄
hello.vxL176-191
export fn (self: &TlsHelloExtensions) find(encoded: Span<u8>, extensionType: u16): Result<Option<TlsWireSlice>, TlsHelloError>Receiver: self: &TlsHelloExtensions (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
extensionType | u16 |
Returns: Result<Option<TlsWireSlice>, TlsHelloError>
cipherSuiteAt 🔓 export
📄
hello.vxL203-218
export fn (self: &TlsClientHelloView) cipherSuiteAt(encoded: Span<u8>, index: usize): Result<u16, TlsHelloError>Receiver: self: &TlsClientHelloView (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
index | usize |
Returns: Result<u16, TlsHelloError>
signatureSchemeCount 🔓 export
📄
hello.vxL223-230
export fn (self: &TlsClientHelloView) signatureSchemeCount(): usizeReturns the number of structurally validated signature schemes advertised
by this ClientHello. The no-PSK decoder requires this extension, so a successfully decoded view always reports at least one entry.
Receiver: self: &TlsClientHelloView (immutable reference)
Returns: usize
signatureSchemeAt 🔓 export
📄
hello.vxL234-249
export fn (self: &TlsClientHelloView) signatureSchemeAt(encoded: Span<u8>, index: usize): Result<u16, TlsHelloError>Resolves one advertised signature scheme by wire order. Bounds and backing
are revalidated so a view cannot be paired with unrelated storage.
Receiver: self: &TlsClientHelloView (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
index | usize |
Returns: Result<u16, TlsHelloError>
supportsGroup 🔓 export
📄
hello.vxL254-267
export fn (self: &TlsClientHelloView) supportsGroup(encoded: Span<u8>, group: u16): Result<bool, TlsHelloError>Reports whether the structurally validated supported_groups vector
contains group. The result is resolved against the exact encoded Hello, so a detached view cannot be paired with unrelated storage.
Receiver: self: &TlsClientHelloView (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
group | u16 |
Returns: Result<bool, TlsHelloError>
keyShareAt 🔓 export
📄
hello.vxL270-305
export fn (self: &TlsClientHelloView) keyShareAt(encoded: Span<u8>, index: usize): Result<TlsKeyShareEntry, TlsHelloError>Resolves one validated ClientHello KeyShareEntry by wire order.
Receiver: self: &TlsClientHelloView (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
index | usize |
Returns: Result<TlsKeyShareEntry, TlsHelloError>
findKeyShare 🔓 export
📄
hello.vxL307-337
export fn (self: &TlsClientHelloView) findKeyShare(encoded: Span<u8>, group: u16): Result<Option<TlsWireSlice>, TlsHelloError>Receiver: self: &TlsClientHelloView (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
group | u16 |
Returns: Result<Option<TlsWireSlice>, TlsHelloError>
selectedKeyShare 🔓 export
📄
hello.vxL351-382
export fn (self: &TlsServerHelloView) selectedKeyShare(encoded: Span<u8>): Result<TlsKeyShareEntry, TlsHelloError>Resolves the sole normal ServerHello KeyShareEntry. HelloRetryRequest has
only a selected group and therefore returns a non-present key payload.
Receiver: self: &TlsServerHelloView (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<TlsKeyShareEntry, TlsHelloError>
isKind 🔓 export
📄
hostname.vxL16-20
export fn (self: &TlsDnsIdentityError) isKind(kind: TlsDnsIdentityErrorKind): boolReceiver: self: &TlsDnsIdentityError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsDnsIdentityErrorKind |
Returns: bool
TlsDnsIdentity.matches 🔓 export
📄
hostname.vxL143-189
export fn TlsDnsIdentity.matches(reference: str, presentedDnsId: Span<u8>): Result<bool, TlsDnsIdentityError>Matches a caller reference hostname against the raw bytes of one dNSName
SAN entry. A wildcard is accepted only as the complete left-most label and consumes exactly one non-empty reference label. Both forms may contain one trailing root dot, which is ignored for comparison.
Parameters:
| Name | Type |
|---|---|
reference | str |
presentedDnsId | Span<u8> |
Returns: Result<bool, TlsDnsIdentityError>
TlsSecretSchedule.new 🔓 export
📄
key_schedule.vxL139-163
export fn TlsSecretSchedule.new(hash: TlsHashAlgorithm, psk: Span<u8>): Result<TlsSecretSchedule, TlsKeyScheduleError>Starts the schedule at Early Secret. An empty PSK means the RFC 8446
no-PSK value: one digest-length block of zero octets.
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
psk | Span<u8> |
Returns: Result<TlsSecretSchedule, TlsKeyScheduleError>
stage 🔓 export
📄
key_schedule.vxL165-165
export fn (self: &TlsSecretSchedule) stage(): TlsSecretStageReceiver: self: &TlsSecretSchedule (immutable reference)
Returns: TlsSecretStage
hashAlgorithm 🔓 export
📄
key_schedule.vxL167-169
export fn (self: &TlsSecretSchedule) hashAlgorithm(): TlsHashAlgorithmReceiver: self: &TlsSecretSchedule (immutable reference)
Returns: TlsHashAlgorithm
drop 🔓 export
📄
key_schedule.vxL171-174
export fn (self: &TlsSecretSchedule!) drop()Receiver: self: &TlsSecretSchedule! (mutable reference)
retire 🔓 export
📄
key_schedule.vxL178-181
export fn (self: &TlsSecretSchedule!) retire()Irreversibly erases a candidate schedule that negotiation did not select.
All subsequent transitions fail with InvalidState.
Receiver: self: &TlsSecretSchedule! (mutable reference)
deriveHandshakeTraffic 🔓 export
📄
key_schedule.vxL186-290
export fn (self: &TlsSecretSchedule!) deriveHandshakeTraffic(sharedSecret: Span<u8>, transcript: &TlsTranscript, clientOut: &Span<u8>!, serverOut: &Span<u8>!): Result<usize, TlsKeyScheduleError>Commits Early -> Handshake and writes client/server handshake traffic
secrets for the transcript through ServerHello. Empty sharedSecret selects the TLS PSK-only zero input.
Receiver: self: &TlsSecretSchedule! (mutable reference)
Parameters:
| Name | Type |
|---|---|
sharedSecret | Span<u8> |
transcript | &TlsTranscript |
clientOut | &Span<u8>! |
serverOut | &Span<u8>! |
Returns: Result<usize, TlsKeyScheduleError>
deriveApplicationTraffic 🔓 export
📄
key_schedule.vxL294-390
export fn (self: &TlsSecretSchedule!) deriveApplicationTraffic(transcript: &TlsTranscript, clientOut: &Span<u8>!, serverOut: &Span<u8>!): Result<usize, TlsKeyScheduleError>Commits Handshake -> Master and writes generation-0 application traffic
secrets for the transcript through the server Finished message.
Receiver: self: &TlsSecretSchedule! (mutable reference)
Parameters:
| Name | Type |
|---|---|
transcript | &TlsTranscript |
clientOut | &Span<u8>! |
serverOut | &Span<u8>! |
Returns: Result<usize, TlsKeyScheduleError>
isKind 🔓 export
📄
key_update.vxL21-23
export fn (self: &TlsKeyUpdateError) isKind(kind: TlsKeyUpdateError): boolReceiver: self: &TlsKeyUpdateError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsKeyUpdateError |
Returns: bool
isKind 🔓 export
📄
negotiation.vxL89-93
export fn (self: &TlsX25519NegotiationError) isKind(kind: TlsX25519NegotiationError): boolReceiver: self: &TlsX25519NegotiationError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsX25519NegotiationError |
Returns: bool
TlsX25519Negotiation.new 🔓 export
📄
negotiation.vxL199-276
export fn TlsX25519Negotiation.new(role: TlsHandshakeRole, privateKey: Span<u8>, transcriptLimit: usize): Result<TlsX25519Negotiation, TlsX25519NegotiationError>Creates a role-bound no-PSK negotiation owner, copies the exact 32-byte
scalar, derives its public key without allocation and starts a dual-hash transcript with the requested hard byte limit.
Parameters:
| Name | Type |
|---|---|
role | TlsHandshakeRole |
privateKey | Span<u8> |
transcriptLimit | usize |
Returns: Result<TlsX25519Negotiation, TlsX25519NegotiationError>
TlsX25519Negotiation.withDefaultLimit 🔓 export
📄
negotiation.vxL279-283
export fn TlsX25519Negotiation.withDefaultLimit(role: TlsHandshakeRole, privateKey: Span<u8>): Result<TlsX25519Negotiation, TlsX25519NegotiationError>Creates a negotiation owner with TLS_DEFAULT_TRANSCRIPT_LIMIT.
Parameters:
| Name | Type |
|---|---|
role | TlsHandshakeRole |
privateKey | Span<u8> |
Returns: Result<TlsX25519Negotiation, TlsX25519NegotiationError>
role 🔓 export
📄
negotiation.vxL286-288
export fn (self: &TlsX25519Negotiation) role(): TlsHandshakeRoleReturns the immutable endpoint role.
Receiver: self: &TlsX25519Negotiation (immutable reference)
Returns: TlsHandshakeRole
stage 🔓 export
📄
negotiation.vxL291-293
export fn (self: &TlsX25519Negotiation) stage(): TlsX25519NegotiationStageReturns the monotonic negotiation stage.
Receiver: self: &TlsX25519Negotiation (immutable reference)
Returns: TlsX25519NegotiationStage
transcript 🔓 export
📄
negotiation.vxL296-298
export fn (self: &TlsX25519Negotiation) transcript(): &TlsTranscriptBorrows the transcript for read-only accounting or digest snapshots.
Receiver: self: &TlsX25519Negotiation (immutable reference)
Returns: &TlsTranscript
selectedCipher 🔓 export
📄
negotiation.vxL301-304
export fn (self: &TlsX25519Negotiation) selectedCipher(): Option<u16>Returns the selected suite after successful normal ServerHello processing.
Receiver: self: &TlsX25519Negotiation (immutable reference)
Returns: Option<u16>
selectedHash 🔓 export
📄
negotiation.vxL307-310
export fn (self: &TlsX25519Negotiation) selectedHash(): Option<TlsHashAlgorithm>Returns the suite-authoritative hash after successful negotiation.
Receiver: self: &TlsX25519Negotiation (immutable reference)
Returns: Option<TlsHashAlgorithm>
publicKeyTo 🔓 export
📄
negotiation.vxL313-326
export fn (self: &TlsX25519Negotiation) publicKeyTo(output: &Span<u8>!): Result<usize, TlsX25519NegotiationError>Copies the non-secret local public key into an exact 32-byte destination.
Receiver: self: &TlsX25519Negotiation (immutable reference)
Parameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
Returns: Result<usize, TlsX25519NegotiationError>
commitClientHello 🔓 export
📄
negotiation.vxL448-618
export fn (self: &TlsX25519Negotiation!) commitClientHello(encoded: Span<u8>): Result<usize, TlsX25519NegotiationError>Validates and commits the exact ClientHello that entered the transcript.
Client role requires its encoded X25519 share to equal this owner's public key; server role captures the contributory peer candidate for ServerHello.
Receiver: self: &TlsX25519Negotiation! (mutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<usize, TlsX25519NegotiationError>
commitRetryClientHello 🔓 export
📄
negotiation.vxL628-800
export fn (self: &TlsX25519Negotiation!) commitRetryClientHello(encoded: Span<u8>, retryPrivateKey: Span<u8>): Result<usize, TlsX25519NegotiationError>Validates and commits ClientHello2 after one authenticated
HelloRetryRequest transition. The caller supplies a fresh 32-byte private scalar only when HRR selected X25519. Client role derives the corresponding public share and commits the new scalar only after every wire, cookie, invariant and transcript check succeeds. Server role passes an empty span and captures the validated peer share. Cookie-only retries reuse the original key share byte-for-byte.
Receiver: self: &TlsX25519Negotiation! (mutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
retryPrivateKey | Span<u8> |
Returns: Result<usize, TlsX25519NegotiationError>
cipherWasOffered
📄
negotiation.vxL802-807
fn (self: &TlsX25519Negotiation) cipherWasOffered(cipherSuite: u16): boolReceiver: self: &TlsX25519Negotiation (immutable reference)
Parameters:
| Name | Type |
|---|---|
cipherSuite | u16 |
Returns: bool
acceptServerHello 🔓 export
📄
negotiation.vxL829-1103
export fn (self: &TlsX25519Negotiation!) acceptServerHello(encoded: Span<u8>, clientTrafficOut: &Span<u8>!, serverTrafficOut: &Span<u8>!): Result<usize, TlsX25519NegotiationError>Validates normal ServerHello, computes the contributory X25519 secret, and
commits transcript/hash/schedule selection exactly once. A valid HelloRetryRequest commits the selected transcript rewrite and locks HelloRetryRequested; it is never mistaken for a traffic-secret-bearing ServerHello and never touches caller traffic outputs.
Receiver: self: &TlsX25519Negotiation! (mutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
clientTrafficOut | &Span<u8>! |
serverTrafficOut | &Span<u8>! |
Returns: Result<usize, TlsX25519NegotiationError>
extensionWasOffered
📄
negotiation.vxL1110-1117
fn (self: &TlsX25519Negotiation) extensionWasOffered(identity: u16): boolReceiver: self: &TlsX25519Negotiation (immutable reference)
Parameters:
| Name | Type |
|---|---|
identity | u16 |
Returns: bool
alpnWasOffered
📄
negotiation.vxL1119-1143
fn (self: &TlsX25519Negotiation) alpnWasOffered(selected: Span<u8>): boolReceiver: self: &TlsX25519Negotiation (immutable reference)
Parameters:
| Name | Type |
|---|---|
selected | Span<u8> |
Returns: bool
validateEncryptedExtensions
📄
negotiation.vxL1150-1247
fn (self: &TlsX25519Negotiation) validateEncryptedExtensions(encoded: Span<u8>): Result<TlsEncryptedExtensionsCandidate, TlsX25519NegotiationError>Receiver: self: &TlsX25519Negotiation (immutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<TlsEncryptedExtensionsCandidate, TlsX25519NegotiationError>
acceptEncryptedExtensions 🔓 export
📄
negotiation.vxL1253-1288
export fn (self: &TlsX25519Negotiation!) acceptEncryptedExtensions(encoded: Span<u8>): Result<usize, TlsX25519NegotiationError>Validates and commits the server EncryptedExtensions flight. The current
no-PSK profile supports empty extensions, SNI acknowledgement, supported_groups and one ALPN selection that exactly appeared in the committed ClientHello. All other semantics fail closed.
Receiver: self: &TlsX25519Negotiation! (mutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<usize, TlsX25519NegotiationError>
selectedAlpnLen 🔓 export
📄
negotiation.vxL1292-1299
export fn (self: &TlsX25519Negotiation) selectedAlpnLen(): usizeReturns the authenticated server ALPN selection length after server
Finished. Zero means the client did not negotiate ALPN.
Receiver: self: &TlsX25519Negotiation (immutable reference)
Returns: usize
selectedAlpnTo 🔓 export
📄
negotiation.vxL1302-1324
export fn (self: &TlsX25519Negotiation) selectedAlpnTo(output: &Span<u8>!): Result<usize, TlsX25519NegotiationError>Copies the authenticated ALPN selection to caller storage.
Receiver: self: &TlsX25519Negotiation (immutable reference)
Parameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
Returns: Result<usize, TlsX25519NegotiationError>
acceptServerCertificate 🔓 export
📄
negotiation.vxL1329-1410
export fn (self: &TlsX25519Negotiation!) acceptServerCertificate(encoded: Span<u8>, trustAnchor: Span<u8>, referenceDnsName: str, unixSeconds: i64): Result<usize, TlsX25519NegotiationError>Validates the server Certificate list against an explicit trust anchor,
DNS identity and time, then retains only the authenticated 32-byte Ed25519 key. Borrowed DER spans never survive the call.
Receiver: self: &TlsX25519Negotiation! (mutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
trustAnchor | Span<u8> |
referenceDnsName | str |
unixSeconds | i64 |
Returns: Result<usize, TlsX25519NegotiationError>
acceptServerCertificateVerify 🔓 export
📄
negotiation.vxL1415-1447
export fn (self: &TlsX25519Negotiation!) acceptServerCertificateVerify(encoded: Span<u8>): Result<usize, TlsX25519NegotiationError>Verifies and commits server CertificateVerify only when Ed25519 was offered
by the exact committed ClientHello and the certificate path supplied the authenticated key.
Receiver: self: &TlsX25519Negotiation! (mutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<usize, TlsX25519NegotiationError>
failAuthenticatedFlight
📄
negotiation.vxL1449-1458
fn (self: &TlsX25519Negotiation!) failAuthenticatedFlight()Receiver: self: &TlsX25519Negotiation! (mutable reference)
acceptServerFinished 🔓 export
📄
negotiation.vxL1464-1547
export fn (self: &TlsX25519Negotiation!) acceptServerFinished(encoded: Span<u8>, clientApplicationOut: &Span<u8>!, serverApplicationOut: &Span<u8>!): Result<usize, TlsX25519NegotiationError>Constant-time verifies and commits the peer Finished, then derives
generation-0 application traffic secrets from the transcript through that message. Caller outputs are written only after the schedule transition has fully succeeded.
Receiver: self: &TlsX25519Negotiation! (mutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
clientApplicationOut | &Span<u8>! |
serverApplicationOut | &Span<u8>! |
Returns: Result<usize, TlsX25519NegotiationError>
writeClientFinished 🔓 export
📄
negotiation.vxL1552-1619
export fn (self: &TlsX25519Negotiation!) writeClientFinished(output: &Span<u8>!): Result<usize, TlsX25519NegotiationError>Emits and commits the client's Finished message. Application traffic was
already derived at the RFC 8446 server-Finished boundary; this final gate retires both handshake traffic secrets and marks the owner complete.
Receiver: self: &TlsX25519Negotiation! (mutable reference)
Parameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
Returns: Result<usize, TlsX25519NegotiationError>
drop 🔓 export
📄
negotiation.vxL1621-1636
export fn (self: &TlsX25519Negotiation!) drop()Receiver: self: &TlsX25519Negotiation! (mutable reference)
isKind 🔓 export
📄
record.vxL49-51
export fn (self: &TlsRecordError) isKind(kind: TlsRecordError): boolReceiver: self: &TlsRecordError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsRecordError |
Returns: bool
TlsCipherState.new 🔓 export
📄
record.vxL94-127
export fn TlsCipherState.new(cipherId: u16, key: Span<u8>, iv: Span<u8>): Result<TlsCipherState, TlsRecordError>Usage contract: Copies key/IV into a move-only sequence-zero owner and erases them on drop. Do not reconstruct this owner with an old traffic key/IV to reset the nonce sequence. This constructor does not perform a handshake.
Parameters:
| Name | Type | Description |
|---|---|---|
cipherId | u16 | Supported TLS AES-128-GCM, AES-256-GCM or ChaCha20-Poly1305 suite ID |
key | Span<u8> | Exactly 16 bytes for AES-128 or 32 for the other supported suites |
iv | Span<u8> | Exactly 12 traffic-IV bytes derived by the handshake schedule |
Returns: Result<TlsCipherState, TlsRecordError>
sequence 🔓 export
📄
record.vxL129-129
export fn (self: &TlsCipherState) sequence(): u64Receiver: self: &TlsCipherState (immutable reference)
Returns: u64
validateRekeyMaterial
📄
record.vxL137-160
fn (self: &TlsCipherState) validateRekeyMaterial(key: Span<u8>, iv: Span<u8>): Result<bool, TlsRecordError>Atomically installs the next key generation for this direction.
All validation completes before the current key/IV are erased. Once the caller has derived and staged exact replacement material, the remaining commit consists only of infallible fixed-size copies and a sequence reset. Cipher identity and key width cannot change across a TLS 1.3 KeyUpdate.
Receiver: self: &TlsCipherState (immutable reference)
Parameters:
| Name | Type |
|---|---|
key | Span<u8> |
iv | Span<u8> |
Returns: Result<bool, TlsRecordError>
commitRekey
📄
record.vxL162-174
fn (self: &TlsCipherState!) commitRekey(key: Span<u8>, iv: Span<u8>)Receiver: self: &TlsCipherState! (mutable reference)
Parameters:
| Name | Type |
|---|---|
key | Span<u8> |
iv | Span<u8> |
rekey 🔓 export
📄
record.vxL176-185
export fn (self: &TlsCipherState!) rekey(key: Span<u8>, iv: Span<u8>): Result<bool, TlsRecordError>Receiver: self: &TlsCipherState! (mutable reference)
Parameters:
| Name | Type |
|---|---|
key | Span<u8> |
iv | Span<u8> |
Returns: Result<bool, TlsRecordError>
retire 🔓 export
📄
record.vxL190-195
export fn (self: &TlsCipherState!) retire()Irreversibly erases this direction's traffic key and IV. Transport owners
call this immediately when a half-close or fatal failure makes the direction unusable; Drop remains an idempotent final backstop.
Receiver: self: &TlsCipherState! (mutable reference)
drop 🔓 export
📄
record.vxL197-197
export fn (self: &TlsCipherState!) drop()Receiver: self: &TlsCipherState! (mutable reference)
keyBuf
📄
record.vxL199-201
fn (self: &TlsCipherState) keyBuf(): RawBufReceiver: self: &TlsCipherState (immutable reference)
Returns: RawBuf
ivBuf
📄
record.vxL203-205
fn (self: &TlsCipherState) ivBuf(): RawBufReceiver: self: &TlsCipherState (immutable reference)
Returns: RawBuf
encryptRecord 🔓 export
📄
record.vxL261-340
export fn (self: &TlsCipherState!) encryptRecord(contentType: u8, plaintext: Span<u8>, outRecord: &Span<u8>!): Result<usize, TlsRecordError>Usage contract: Returns the complete encoded record length. Capacity/overlap/sequence checks occur before encryption; sequence advances only after successful record emission into the buffer. The caller must still send that exact prefix in order.
Receiver: self: &TlsCipherState! (mutable reference)
Parameters:
| Name | Type | Description |
|---|---|---|
contentType | u8 | A supported TLS inner content type |
plaintext | Span<u8> | Borrowed application/handshake/alert bytes, at most 16384 bytes |
outRecord | &Span<u8>! | Writable span of at least plaintext length + 22 bytes; disjoint from input |
Returns: Result<usize, TlsRecordError>
encryptRecordThenRekey 🔓 export
📄
record.vxL349-363
export fn (self: &TlsCipherState!) encryptRecordThenRekey(contentType: u8, plaintext: Span<u8>, outRecord: &Span<u8>!, nextKey: Span<u8>, nextIv: Span<u8>): Result<usize, TlsRecordError>Encrypts one record under the current generation and atomically installs
the staged next-generation key/IV after ciphertext commit. Replacement material is fully validated before record encryption. If any capacity, overlap or cipher operation fails, neither sequence nor key generation changes. After successful encryption, the fixed-size rekey commit is infallible and resets the sequence to zero for the next record.
Receiver: self: &TlsCipherState! (mutable reference)
Parameters:
| Name | Type |
|---|---|
contentType | u8 |
plaintext | Span<u8> |
outRecord | &Span<u8>! |
nextKey | Span<u8> |
nextIv | Span<u8> |
Returns: Result<usize, TlsRecordError>
decryptRecord 🔓 export
📄
record.vxL365-451
export fn (self: &TlsCipherState!) decryptRecord(record: Span<u8>, outPlain: &Span<u8>!): Result<TlsPlaintext, TlsRecordError>Usage contract: Only Ok exposes authenticated contentType/length; consume that prefix, not the whole scratch span. Authentication or inner-content failure clears candidate plaintext and does not advance the receive sequence. This low-level owner does not drive connection teardown; TlsApplicationTraffic owns transport-failure policy.
Receiver: self: &TlsCipherState! (mutable reference)
Parameters:
| Name | Type | Description |
|---|---|---|
record | Span<u8> | One complete encoded TLS record, including its five-byte header and tag |
outPlain | &Span<u8>! | Writable plaintext scratch of at least record payload length minus 16 tag bytes; disjoint from ciphertext |
Returns: Result<TlsPlaintext, TlsRecordError>
isKind 🔓 export
📄
transcript.vxL32-34
export fn (self: &TlsTranscriptError) isKind(kind: TlsTranscriptError): boolReceiver: self: &TlsTranscriptError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsTranscriptError |
Returns: bool
TlsTranscript.new 🔓 export
📄
transcript.vxL112-133
export fn TlsTranscript.new(byteLimit: usize): Result<TlsTranscript, TlsTranscriptError>Constructs a dual SHA-256/SHA-384 transcript with an explicit resource
limit. Both states receive pre-negotiation messages; selectHash retires the unused state once the cipher suite is known. The hard ceiling prevents a caller-controlled configuration from disabling boundedness.
Parameters:
| Name | Type |
|---|---|
byteLimit | usize |
Returns: Result<TlsTranscript, TlsTranscriptError>
TlsTranscript.newForHash 🔓 export
📄
transcript.vxL136-147
export fn TlsTranscript.newForHash(hash: TlsHashAlgorithm, byteLimit: usize): Result<TlsTranscript, TlsTranscriptError>Constructs a transcript whose cipher-suite hash is already known.
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
byteLimit | usize |
Returns: Result<TlsTranscript, TlsTranscriptError>
TlsTranscript.withDefaultLimit 🔓 export
📄
transcript.vxL150-155
export fn TlsTranscript.withDefaultLimit(): TlsTranscriptConstructs a dual transcript with the 16 MiB default input budget.
Returns: TlsTranscript
TlsTranscript.withDefaultHash 🔓 export
📄
transcript.vxL158-163
export fn TlsTranscript.withDefaultHash(hash: TlsHashAlgorithm): TlsTranscriptConstructs a selected-hash transcript with the 16 MiB default budget.
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
Returns: TlsTranscript
selectedHash 🔓 export
📄
transcript.vxL166-169
export fn (self: &TlsTranscript) selectedHash(): Option<TlsHashAlgorithm>Returns the committed suite hash, or None while both candidates are live.
Receiver: self: &TlsTranscript (immutable reference)
Returns: Option<TlsHashAlgorithm>
limit 🔓 export
📄
transcript.vxL172-172
export fn (self: &TlsTranscript) limit(): usizeReturns the immutable accepted-input byte budget.
Receiver: self: &TlsTranscript (immutable reference)
Returns: usize
acceptedLen 🔓 export
📄
transcript.vxL175-175
export fn (self: &TlsTranscript) acceptedLen(): usizeReturns bytes accepted from complete peer/local Handshake messages.
Receiver: self: &TlsTranscript (immutable reference)
Returns: usize
hashedLen 🔓 export
📄
transcript.vxL178-178
export fn (self: &TlsTranscript) hashedLen(): usizeReturns the effective bytes represented by the running hash state.
Receiver: self: &TlsTranscript (immutable reference)
Returns: usize
messages 🔓 export
📄
transcript.vxL181-181
export fn (self: &TlsTranscript) messages(): usizeReturns the number of effective messages in the running transcript.
Receiver: self: &TlsTranscript (immutable reference)
Returns: usize
lastMessage 🔓 export
📄
transcript.vxL185-188
export fn (self: &TlsTranscript) lastMessage(): Option<u8>Returns the most recently committed Handshake type. An empty transcript
has no last message, so callers cannot confuse the numeric zero with state.
Receiver: self: &TlsTranscript (immutable reference)
Returns: Option<u8>
didRewriteHelloRetry 🔓 export
📄
transcript.vxL191-191
export fn (self: &TlsTranscript) didRewriteHelloRetry(): boolReports whether the ClientHello1 synthetic-hash rewrite was committed.
Receiver: self: &TlsTranscript (immutable reference)
Returns: bool
drop 🔓 export
📄
transcript.vxL193-198
export fn (self: &TlsTranscript!) drop()Receiver: self: &TlsTranscript! (mutable reference)
absorbRaw
📄
transcript.vxL200-210
fn (self: &TlsTranscript!) absorbRaw(input: RawBuf, length: usize)Receiver: self: &TlsTranscript! (mutable reference)
Parameters:
| Name | Type |
|---|---|
input | RawBuf |
length | usize |
selectHash 🔓 export
📄
transcript.vxL227-251
export fn (self: &TlsTranscript!) selectHash(hash: TlsHashAlgorithm): Result<bool, TlsTranscriptError>Commits the cipher-suite hash. Re-selecting the same hash is idempotent;
changing it after commitment is rejected. The unused state is erased.
Receiver: self: &TlsTranscript! (mutable reference)
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
Returns: Result<bool, TlsTranscriptError>
validateAppend
📄
transcript.vxL253-265
fn (self: &TlsTranscript) validateAppend(messageType: u8, encodedLen: usize): Result<bool, TlsTranscriptError>Receiver: self: &TlsTranscript (immutable reference)
Parameters:
| Name | Type |
|---|---|
messageType | u8 |
encodedLen | usize |
Returns: Result<bool, TlsTranscriptError>
commitMessage
📄
transcript.vxL267-278
fn (self: &TlsTranscript!) commitMessage(messageType: u8, encoded: RawBuf, encodedLen: usize)Receiver: self: &TlsTranscript! (mutable reference)
Parameters:
| Name | Type |
|---|---|
messageType | u8 |
encoded | RawBuf |
encodedLen | usize |
appendEncoded 🔓 export
📄
transcript.vxL283-300
export fn (self: &TlsTranscript!) appendEncoded(encoded: Span<u8>): Result<usize, TlsTranscriptError>Validates and appends one complete encoded TLS Handshake message. The
uint24 length must exactly match the supplied span; record headers must not be included.
Receiver: self: &TlsTranscript! (mutable reference)
Parameters:
| Name | Type |
|---|---|
encoded | Span<u8> |
Returns: Result<usize, TlsTranscriptError>
appendMessage 🔓 export
📄
transcript.vxL304-336
export fn (self: &TlsTranscript!) appendMessage(messageType: u8, body: Span<u8>): Result<usize, TlsTranscriptError>Appends a body while generating the authenticated handshake header. This
is the preferred construction path and performs no temporary allocation.
Receiver: self: &TlsTranscript! (mutable reference)
Parameters:
| Name | Type |
|---|---|
messageType | u8 |
body | Span<u8> |
Returns: Result<usize, TlsTranscriptError>
digestTo 🔓 export
📄
transcript.vxL340-345
export fn (self: &TlsTranscript) digestTo(output: &Span<u8>!): Result<usize, TlsTranscriptError>Writes the current transcript hash without finalizing the running state.
A later message can therefore be appended after any number of snapshots.
Receiver: self: &TlsTranscript (immutable reference)
Parameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
Returns: Result<usize, TlsTranscriptError>
digestFor 🔓 export
📄
transcript.vxL349-372
export fn (self: &TlsTranscript) digestFor(hash: TlsHashAlgorithm, output: &Span<u8>!): Result<usize, TlsTranscriptError>Snapshots either candidate hash before cipher-suite selection. After
selection, only the committed hash remains available.
Receiver: self: &TlsTranscript (immutable reference)
Parameters:
| Name | Type |
|---|---|
hash | TlsHashAlgorithm |
output | &Span<u8>! |
Returns: Result<usize, TlsTranscriptError>
rewriteForHelloRetryRequest 🔓 export
📄
transcript.vxL379-415
export fn (self: &TlsTranscript!) rewriteForHelloRetryRequest(): Result<usize, TlsTranscriptError>Applies RFC 8446 section 4.4.1's HelloRetryRequest rewrite.
This operation is legal exactly once and only while the transcript contains one complete ClientHello. The accepted-byte budget remains monotonic while the effective hash state becomes message_hash || Hash(ClientHello1).
Receiver: self: &TlsTranscript! (mutable reference)
Returns: Result<usize, TlsTranscriptError>
isKind 🔓 export
📄
transport.vxL74-76
export fn (self: &TlsTransportError) isKind(kind: TlsTransportErrorKind): boolReceiver: self: &TlsTransportError (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | TlsTransportErrorKind |
Returns: bool
TlsApplicationTraffic.new 🔓 export
📄
transport.vxL178-281
export fn TlsApplicationTraffic.new(cipherId: u16, sendSecret: Span<u8>, receiveSecret: Span<u8>): Result<TlsApplicationTraffic, TlsTransportError>Parameters:
| Name | Type |
|---|---|
cipherId | u16 |
sendSecret | Span<u8> |
receiveSecret | Span<u8> |
Returns: Result<TlsApplicationTraffic, TlsTransportError>
state 🔓 export
📄
transport.vxL283-291
export fn (self: &TlsApplicationTraffic) state(): TlsTransportStateReceiver: self: &TlsApplicationTraffic (immutable reference)
Returns: TlsTransportState
sendSequence 🔓 export
📄
transport.vxL293-295
export fn (self: &TlsApplicationTraffic) sendSequence(): u64Receiver: self: &TlsApplicationTraffic (immutable reference)
Returns: u64
receiveSequence 🔓 export
📄
transport.vxL297-299
export fn (self: &TlsApplicationTraffic) receiveSequence(): u64Receiver: self: &TlsApplicationTraffic (immutable reference)
Returns: u64
sendGeneration 🔓 export
📄
transport.vxL301-303
export fn (self: &TlsApplicationTraffic) sendGeneration(): u64Receiver: self: &TlsApplicationTraffic (immutable reference)
Returns: u64
receiveGeneration 🔓 export
📄
transport.vxL305-307
export fn (self: &TlsApplicationTraffic) receiveGeneration(): u64Receiver: self: &TlsApplicationTraffic (immutable reference)
Returns: u64
keyUpdateResponseRequired 🔓 export
📄
transport.vxL309-311
export fn (self: &TlsApplicationTraffic) keyUpdateResponseRequired(): boolReceiver: self: &TlsApplicationTraffic (immutable reference)
Returns: bool
drop
📄
transport.vxL320-325
fn (self: &TlsNextTrafficGeneration!) drop()Receiver: self: &TlsNextTrafficGeneration! (mutable reference)
retireSendDirection
📄
transport.vxL355-358
fn (self: &TlsApplicationTraffic!) retireSendDirection()Receiver: self: &TlsApplicationTraffic! (mutable reference)
retireReceiveDirection
📄
transport.vxL360-365
fn (self: &TlsApplicationTraffic!) retireReceiveDirection()Receiver: self: &TlsApplicationTraffic! (mutable reference)
retireFailed
📄
transport.vxL367-372
fn (self: &TlsApplicationTraffic!) retireFailed()Receiver: self: &TlsApplicationTraffic! (mutable reference)
encryptApplicationData 🔓 export
📄
transport.vxL374-391
export fn (self: &TlsApplicationTraffic!) encryptApplicationData(plaintext: Span<u8>, output: &Span<u8>!): Result<usize, TlsTransportError>Receiver: self: &TlsApplicationTraffic! (mutable reference)
Parameters:
| Name | Type |
|---|---|
plaintext | Span<u8> |
output | &Span<u8>! |
Returns: Result<usize, TlsTransportError>
writeKeyUpdate 🔓 export
📄
transport.vxL397-450
export fn (self: &TlsApplicationTraffic!) writeKeyUpdate(request: TlsKeyUpdateRequest, output: &Span<u8>!): Result<usize, TlsTransportError>Sends a complete KeyUpdate under the current send generation and commits
generation N+1 only after the old-key ciphertext is available to transmit. A requested peer update creates a response obligation; application data is blocked until an UpdateNotRequested response has crossed this boundary.
Receiver: self: &TlsApplicationTraffic! (mutable reference)
Parameters:
| Name | Type |
|---|---|
request | TlsKeyUpdateRequest |
output | &Span<u8>! |
Returns: Result<usize, TlsTransportError>
writeAlertPayload
📄
transport.vxL452-476
fn (self: &TlsApplicationTraffic!) writeAlertPayload(alert: TlsAlert, output: &Span<u8>!): Result<usize, TlsTransportError>Receiver: self: &TlsApplicationTraffic! (mutable reference)
Parameters:
| Name | Type |
|---|---|
alert | TlsAlert |
output | &Span<u8>! |
Returns: Result<usize, TlsTransportError>
writeUserCanceled 🔓 export
📄
transport.vxL481-493
export fn (self: &TlsApplicationTraffic!) writeUserCanceled(output: &Span<u8>!): Result<usize, TlsTransportError>Sends the TLS 1.3 user_canceled warning once without retiring the send key.
Application data is forbidden afterward; the only orderly continuation is close_notify, while a newly discovered fatal error may still be reported.
Receiver: self: &TlsApplicationTraffic! (mutable reference)
Parameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
Returns: Result<usize, TlsTransportError>
writeCloseNotify 🔓 export
📄
transport.vxL498-511
export fn (self: &TlsApplicationTraffic!) writeCloseNotify(output: &Span<u8>!): Result<usize, TlsTransportError>Encrypts close_notify exactly once, then erases the send-direction key.
A failed capacity/overlap check leaves the direction open so the caller can retry with valid storage; a cryptographic failure retires both directions.
Receiver: self: &TlsApplicationTraffic! (mutable reference)
Parameters:
| Name | Type |
|---|---|
output | &Span<u8>! |
Returns: Result<usize, TlsTransportError>
writeFatalAlert 🔓 export
📄
transport.vxL516-532
export fn (self: &TlsApplicationTraffic!) writeFatalAlert(description: TlsAlertDescription, output: &Span<u8>!): Result<usize, TlsTransportError>Emits one fatal alert and immediately retires both directions after the
ciphertext is committed. close_notify/user_canceled cannot be mislabeled as fatal through this API.
Receiver: self: &TlsApplicationTraffic! (mutable reference)
Parameters:
| Name | Type |
|---|---|
description | TlsAlertDescription |
output | &Span<u8>! |
Returns: Result<usize, TlsTransportError>
readKeyUpdateFragment
📄
transport.vxL534-627
fn (self: &TlsApplicationTraffic!) readKeyUpdateFragment(fragment: Span<u8>): Result<TlsTransportEvent, TlsTransportError>Receiver: self: &TlsApplicationTraffic! (mutable reference)
Parameters:
| Name | Type |
|---|---|
fragment | Span<u8> |
Returns: Result<TlsTransportEvent, TlsTransportError>
readRecord 🔓 export
📄
transport.vxL632-719
export fn (self: &TlsApplicationTraffic!) readRecord(record: Span<u8>, plaintext: &Span<u8>!): Result<TlsTransportEvent, TlsTransportError>Authenticates and classifies one protected application-phase record.
Unknown/malformed alerts, malformed KeyUpdate flights, and application data after peer close/cancel retire the connection.
Receiver: self: &TlsApplicationTraffic! (mutable reference)
Parameters:
| Name | Type |
|---|---|
record | Span<u8> |
plaintext | &Span<u8>! |
Returns: Result<TlsTransportEvent, TlsTransportError>
drop 🔓 export
📄
transport.vxL721-726
export fn (self: &TlsApplicationTraffic!) drop()Receiver: self: &TlsApplicationTraffic! (mutable reference)
isKind 🔓 export
📄
x509.vxL52-54
export fn (self: &X509Error) isKind(kind: X509ErrorKind): boolReceiver: self: &X509Error (immutable reference)
Parameters:
| Name | Type |
|---|---|
kind | X509ErrorKind |
Returns: bool
X509CertificateView.parse 🔓 export
📄
x509.vxL145-346
export fn X509CertificateView.parse(input: Span<u8>): Result<X509CertificateView, X509Error>Parses the structural certificate envelope and admits only RFC 8410
Ed25519 signature/SPKI identities. Other algorithms fail explicitly.
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
Returns: Result<X509CertificateView, X509Error>
publicKeyBytes 🔓 export
📄
x509.vxL348-355
export fn (self: &X509CertificateView) publicKeyBytes(input: Span<u8>): Result<Span<u8>, X509Error>Receiver: self: &X509CertificateView (immutable reference)
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
Returns: Result<Span<u8>, X509Error>
verifySignatureWith 🔓 export
📄
x509.vxL359-377
export fn (self: &X509CertificateView) verifySignatureWith(input: Span<u8>, issuerInput: Span<u8>, issuer: &X509CertificateView): Result<bool, X509Error>Verifies this certificate signature with the issuer's Ed25519 SPKI. Chain
policy (name chaining, CA constraints, time and trust anchor) is separate.
Receiver: self: &X509CertificateView (immutable reference)
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
issuerInput | Span<u8> |
issuer | &X509CertificateView |
Returns: Result<bool, X509Error>
validityRange 🔓 export
📄
x509.vxL482-511
export fn (self: &X509CertificateView) validityRange(input: Span<u8>): Result<(i64, i64), X509Error>Receiver: self: &X509CertificateView (immutable reference)
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
Returns: Result<(i64, i64), X509Error>
validateAt 🔓 export
📄
x509.vxL513-526
export fn (self: &X509CertificateView) validateAt(input: Span<u8>, unixSeconds: i64): Result<bool, X509Error>Receiver: self: &X509CertificateView (immutable reference)
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
unixSeconds | i64 |
Returns: Result<bool, X509Error>
X509TlsServerVerifier.verifyChain 🔓 export
📄
x509.vxL1002-1065
export fn X509TlsServerVerifier.verifyChain(leafInput: Span<u8>, intermediateInputs: Span<Span<u8>>, trustAnchorInput: Span<u8>, referenceDnsName: str, unixSeconds: i64): Result<bool, X509Error>Usage contract: Returns Ok(true) only when the bounded Ed25519 path and DNS policy succeed; errors reject the chain. It does not provide general PKIX, revocation, RSA or P-256 validation. See certificate substrate.
Parameters:
| Name | Type | Description |
|---|---|---|
leafInput | Span<u8> | Borrowed DER leaf certificate bytes |
intermediateInputs | Span<Span<u8>> | Up to eight borrowed DER spans in leaf-to-anchor order |
trustAnchorInput | Span<u8> | Explicit caller-trusted DER anchor; no implicit OS root lookup |
referenceDnsName | str | DNS reference identity to compare against leaf subjectAltName |
unixSeconds | i64 | Current validation time as signed Unix seconds |
Returns: Result<bool, X509Error>
X509TlsServerVerifier.verifyDirect 🔓 export
📄
x509.vxL1068-1076
export fn X509TlsServerVerifier.verifyDirect(leafInput: Span<u8>, trustAnchorInput: Span<u8>, referenceDnsName: str, unixSeconds: i64): Result<bool, X509Error>Convenience path for a leaf signed directly by the explicit trust anchor.
Parameters:
| Name | Type |
|---|---|
leafInput | Span<u8> |
trustAnchorInput | Span<u8> |
referenceDnsName | str |
unixSeconds | i64 |
Returns: Result<bool, X509Error>
dnsNameCount 🔓 export
📄
x509.vxL1121-1145
export fn (self: &X509CertificateView) dnsNameCount(input: Span<u8>): Result<usize, X509Error>Receiver: self: &X509CertificateView (immutable reference)
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
Returns: Result<usize, X509Error>
dnsNameAt 🔓 export
📄
x509.vxL1147-1177
export fn (self: &X509CertificateView) dnsNameAt(input: Span<u8>, wanted: usize): Result<Span<u8>, X509Error>Receiver: self: &X509CertificateView (immutable reference)
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
wanted | usize |
Returns: Result<Span<u8>, X509Error>
matchesDnsName 🔓 export
📄
x509.vxL1181-1204
export fn (self: &X509CertificateView) matchesDnsName(input: Span<u8>, reference: str): Result<bool, X509Error>Checks every SAN dNSName. Invalid presented identities fail closed instead
of being silently skipped. Absence never falls back to subject CN.
Receiver: self: &X509CertificateView (immutable reference)
Parameters:
| Name | Type |
|---|---|
input | Span<u8> |
reference | str |
Returns: Result<bool, X509Error>
Generated by vex-doc v2.0 • 2026-10-28