code wiki / (root) / nx_tls13_aead_record_tcp_test.nx

nx_tls13_aead_record_tcp_test.nx

buildroot/runtime/nx_tls13_aead_record_tcp_test.nx

5084 B150 linesdepth 7pulls 16 transitivereach 0 importersview sourcekind gate/prooftopic tls13
docsdependenciesstructsconstsfunctions

about

nx_tls13_aead_record_tcp_test.nx -- send + recv ONE AEAD-protected TLS 1.3 record over real TCP via fork loopback (RV64/qemu). Uses nx_tls13_record_encrypt/decrypt directly with hard-coded key and IV. Proves the AEAD record layer works over real kernel sockets on RV64 -- the missing piece needed to combine with the already-passing nx_tls13_handshake_tcp test for full encrypted HTTPS-class traffic. Keeps every function small per F6 friction-catalog discipline. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_connect.nx nx_tls13_record.nx nx_tls13_aead_record_tcp_test.

imports: nx_syscalls.nxnx_connect.nxnx_tls13_record.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 build_addr sys_socket sys_bind sys_listen sys_fork nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll run_client sys_mmap ↻ setup_key_iv send_record sys_mmap ↻ nx_tls13_record_encrypt nx_tls13_record_encrypt_v2 sys_mmap ↻ tls13_record_write_header tls13_record_build_nonce tls13_record_aead_seal nx_chacha20_poly1305_encry nx_aes128_gcm_seal nx_aes256_gcm_seal sys_write recv_record sys_mmap ↻ read_n sys_read nx_tls13_record_decrypt nx_tls13_record_decrypt_v2 sys_mmap ↻ tls13_record_build_nonce ↻ tls13_record_aead_open nx_chacha20_poly1305_decry nx_aes128_gcm_open nx_aes256_gcm_open sys_accept

structs

none

consts

19const TEST_PORT: i64 = 19445

functions

21func build_addr(out: *u8, port: i64) -> i64
called by 1: main
31func setup_key_iv(key_out: *u8, iv_out: *u8) -> i64
40func read_n(fd: i64, buf: *u8, n: i64) -> i64
called by 1: recv_record calls 1: sys_read
51func send_record(fd: i64, key: *u8, iv: *u8, seq: i64, payload: *u8, payload_len: i64) -> i64
64func recv_record(fd: i64, key: *u8, iv: *u8, seq: i64, out: *u8, out_cap: i64) -> i64
83func run_client(cfd: i64) -> i64
104func run_server(cfd: i64) -> i64
122func main() -> i64