code wiki / (root) / nx_tls13_server_session_recv_ch_test.nx

nx_tls13_server_session_recv_ch_test.nx

buildroot/runtime/nx_tls13_server_session_recv_ch_test.nx

3322 B96 linesdepth 12pulls 25 transitivereach 0 importersview sourcekind gate/prooftopic tls13
docsdependenciesstructsconstsfunctions

about

nx_tls13_server_session_recv_ch_test.nx -- verify the server-side ClientHello receive step. Strategy: build a ClientHello using the shipped CLIENT emitter (tls13_client_hello_emit), then feed those bytes into recv_ch on a fresh server session. Round-trip proves the server correctly parses + extracts the X25519 client public key emitted by the client. Closed-form invariants: (a) Null session/buf -> BAD_STATE (b) Wrong-state session (e.g., already CH_RECEIVED) -> BAD_STATE (c) Truncated bytes -> PROTOCOL_ERR (d) Real ClientHello -> OK + state advances to CH_RECEIVED (e) After recv_ch, session.client_x25519_pub == client's pubkey (round-trip bit-exact) expect_exit: 0 license_tier: ORIGINAL

dependencies 7 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_recv_c

imports: nx_syscalls.nxnx_x25519.nxnx_x25519_ephemeral.nxnx_tls13.nxnx_tls13_hello.nxnx_tls13_server_session.nxnx_tls13_server_session_recv_ch.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