code wiki / (root) / nx_quic_aead.nx

nx_quic_aead.nx

buildroot/runtime/nx_quic_aead.nx

2633 B55 linesdepth 5pulls 7 transitivereach 1 importersview sourcekind tooltopic quic
docsdependenciesstructsconstsfunctions

about

nx_quic_aead.nx -- RUNG 5b of the sovereign QUIC transport: AEAD packet protection (RFC 9001 sec 5.3) + header protection (sec 5.4). The QUIC nonce is iv XOR the left-padded packet number; the packet payload is sealed with AES-128-GCM (aad = the header); the header's low first-byte bits + the packet number bytes are masked with AES-ECB(hp_key, ciphertext-sample). With R5a's keys this makes a handshake packet indistinguishable on the wire. Reuses the GCM module's own AES (no second cipher). No float. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_aes128_gcm.nx nx_quic_aead.nx nx_quic_aead_test.nx

imports: nx_aes128_gcm.nx

imported by: nx_quic_aead_test.nx

structs

none

consts

none

functions

10func quic_nonce(iv12: *u8, pn: i64, nonce_out: *u8) -> i64
24func quic_hp_mask(hp_key: *u8, sample: *u8, mask_out: *u8) -> i64
32func quic_seal(key: *u8, iv: *u8, pn: i64, aad: *u8, aad_len: i64, pt: *u8, pt_len: i64, ct_out: *u8, tag_out: *u8) -> i64
called by 1: main calls 2: quic_noncenx_aes128_gcm_seal
38func quic_open(key: *u8, iv: *u8, pn: i64, aad: *u8, aad_len: i64, ct: *u8, ct_len: i64, tag: *u8, pt_out: *u8) -> i64
called by 1: main calls 2: quic_noncenx_aes128_gcm_open
46func quic_hp_apply(hdr: *u8, pn_off: i64, pn_len: i64, mask: *u8, long_hdr: i64) -> i64
called by 1: main
55func main() -> i64 { return 0 }