code wiki / (root) / nx_quic_handshake_sm.nx

nx_quic_handshake_sm.nx

buildroot/runtime/nx_quic_handshake_sm.nx

2484 B54 linesdepth 8pulls 10 transitivereach 1 importersview sourcekind tooltopic quic
docsdependenciesstructsconstsfunctions

about

nx_quic_handshake_sm.nx -- RUNG 6d of the sovereign QUIC transport: the TLS 1.3 handshake STATE MACHINE (RFC 8446 App. A, client perspective) + the Finished-message MAC (RFC 8446 sec 4.4.4). This drives the CRYPTO-frame message stream (R6b) through SH -> EE -> Cert -> CertVerify -> Finished, deriving keys via R6c at each step; the Finished MAC binds the whole transcript so a tampered handshake is rejected. The ECDHE/cert/signature primitives reuse the live sovereign TLS stack. No float. license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_quic_keys.nx nx_hmac.nx nx_quic_handshake_sm.nx nx_quic_handshake_sm_test.nx

imports: nx_quic_keys.nxnx_hmac.nx

imported by: nx_quic_handshake_sm_test.nx

structs

none

consts

10const HS_START: i64 = 0
11const HS_WAIT_SH: i64 = 1
12const HS_WAIT_EE: i64 = 2
13const HS_WAIT_CERT: i64 = 3
14const HS_WAIT_CV: i64 = 4
15const HS_WAIT_FIN: i64 = 5
16const HS_CONNECTED: i64 = 6
17const HS_ERROR: i64 = 7

functions

22func quic_hs_sm_step(state: i64, msg_type: i64) -> i64
called by 1: main
32func quic_hs_finished_key(base_key: *u8, out: *u8) -> i64
38func quic_hs_finished_verify(base_key: *u8, transcript_hash: *u8, out: *u8) -> i64
46func quic_hs_verify_eq(a: *u8, b: *u8) -> i64
called by 1: main
54func main() -> i64 { return 0 }