code wiki / hub / nx_tls13_sig_algs_audit.nx

nx_tls13_sig_algs_audit.nx

buildroot/runtime/hub/nx_tls13_sig_algs_audit.nx

8033 B193 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind orphan librarytopic tls13
docsdependenciesstructsconstsfunctions

about

nx_tls13_sig_algs_audit.nx -- V-HOST-2+1-3 Path B: ClientHello signature_algorithms extension parser. Per RFC 8446 ยง4.2.3: client offers a list of signature_scheme values indicating which sig algs it can verify. This module parses that list defensively + tells the caller which of the substrate's supported sig algs (ecdsa_secp256r1_sha256, ed25519) the client supports. COMPOSES (per "avoid duplicate primitives"): nx_syscalls (no allocation; caller-supplied buffer reads) COMPOSED BY: future TLS server handshake validation (V-HOST-2+1-4 smoke uses this for handshake-failure prediction) future client-capability probes sovereign nx_pages_https_daemon vhost-pick logic V+1 V-HOST-2+1-3 SCOPE: - Parse extension type 0x000D (signature_algorithms) from ClientHello extension block - Walk the sig-alg list; flag whether ecdsa_secp256r1_sha256 (0x0403) OR ed25519 (0x0807) appear - Return verdict + boolean flags V-HOST-2+1-3 NON-SCOPE: - Block the handshake (substrate-friendly: substrate-caller decides) - Parse other sig schemes (rsa_pkcs1_*, ecdsa_secp384r1_*, etc.) - PSK / cert_authorities extensions Status: V-HOST-2+1-3 Path B. 2026-05-27.

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_tls13_sig_algs_audit.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

63struct NxSigAlgsAuditResult

consts

36const NX_SAA_OK: i64 = 0
37const NX_SAA_BAD_INPUT: i64 = 3700
38const NX_SAA_TRUNCATED: i64 = 3701
39const NX_SAA_NOT_TLS13: i64 = 3702
40const NX_SAA_NO_SIG_ALGS_EXT: i64 = 3703
41const NX_SAA_LOOP_BUDGET: i64 = 3704
45const NX_SAA_SCHEME_RSA_PKCS1_SHA256: i64 = 0x0401
46const NX_SAA_SCHEME_ECDSA_SECP256R1_SHA256: i64 = 0x0403
47const NX_SAA_SCHEME_ECDSA_SECP384R1_SHA384: i64 = 0x0503
48const NX_SAA_SCHEME_RSA_PSS_RSAE_SHA256: i64 = 0x0804
49const NX_SAA_SCHEME_RSA_PSS_RSAE_SHA384: i64 = 0x0805
50const NX_SAA_SCHEME_RSA_PSS_RSAE_SHA512: i64 = 0x0806
51const NX_SAA_SCHEME_ED25519: i64 = 0x0807
52const NX_SAA_SCHEME_ED448: i64 = 0x0808
53const NX_SAA_SCHEME_RSA_PSS_PSS_SHA256: i64 = 0x0809
55const NX_SAA_EXT_TYPE_SIGNATURE_ALGORITHMS: i64 = 0x000D
58const NX_SAA_MAX_EXT_DATA_LEN: i64 = 65535 // 16-bit length cap per spec
59const NX_SAA_LOOP_BUDGET_CAP: i64 = 100000

functions

71func nx_saa_result_init(r: *NxSigAlgsAuditResult) -> i64
95func nx_tls13_sig_algs_audit(ch_body: *u8, ch_body_n: i64,
172func nx_saa_pick_sig_alg(result: *NxSigAlgsAuditResult,