code wiki / (root) / nx_tls13_server_session_emit_sh_test.nx

nx_tls13_server_session_emit_sh_test.nx

buildroot/runtime/nx_tls13_server_session_emit_sh_test.nx

5029 B130 linesdepth 12pulls 26 transitivereach 0 importersview sourcekind gate/prooftopic tls13
docsdependenciesstructsconstsfunctions

about

nx_tls13_server_session_emit_sh_test.nx -- verify server emits a ServerHello bytes that the existing CLIENT parser consumes (round- trip), and that the session advances CH_RECEIVED -> SH_SENT. Closed-form invariants: (a) Wrong-state session (INIT) -> BAD_STATE (b) After recv_ch + emit_sh: state == SH_SENT + n > 0 (c) Client's tls13_server_hello_parse consumes our SH bytes cleanly (positive verdict) (d) Parsed legacy_version == 0x0303 (e) Parsed cipher_suite == TLS_CHACHA20_POLY1305_SHA256 (0x1303) (f) Server's emitted random appears at the byte offset the parser reports (g) Extensions blob contains supported_versions(43) + key_share(51) (h) Calling emit_sh again -> BAD_STATE (state moved past CH_RECEIVED) expect_exit: 0 license_tier: ORIGINAL

dependencies 8 imports · 0 importers

nx_syscalls.nx nx_x25519.nx nx_x25519_ephemeral.nx nx_tls13.nx nx_tls13_hello.nx nx_tls13_server_session.nx nx_tls13_server_session_recv_ch.nx nx_tls13_server_session_emit_sh.nx nx_tls13_server_session_emit_s

imports: nx_syscalls.nxnx_x25519.nxnx_x25519_ephemeral.nxnx_tls13.nxnx_tls13_hello.nxnx_tls13_server_session.nxnx_tls13_server_session_recv_ch.nxnx_tls13_server_session_emit_sh.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap x25519_keypair_public sys_mmap ↻ x25519_base_point x25519 nx_scratch_save nx_scratch_init sys_mmap ↻ nx_scratch nx_scratch_init ↻ nx_scratch_oom sys_write sys_exit sys_mmap ↻ fe_alloc nx_scratch ↻ fe_from_bytes fe_one fe_zero fe_zero ↻ fe_copy x25519_ladder_step fe_cswap nx_scratch_save ↻ fe_alloc ↻ fe_add fe_sq fe_mul fe_sub fe_mul ↻ fe_mul_a24 nx_scratch_save ↻ fe_alloc ↻ fe_mul ↻ nx_scratch_restore nx_scratch_restore ↻ fe_cswap ↻ fe_invert nx_scratch_save ↻

structs

none

consts

none

functions

29func main() -> i64