code wiki / _hdl_build / nx_tls12_ske_verify_gate.nx

nx_tls12_ske_verify_gate.nx

buildroot/runtime/_hdl_build/nx_tls12_ske_verify_gate.nx

6786 B115 linesdepth 12pulls 29 transitivereach 0 importersview sourcekind gate/prooftopic tls12
docsdependenciesstructsconstsfunctions

about

nx_tls12_ske_verify_gate.nx -- SOVEREIGN gate for TLS 1.2 ECDHE-RSA ServerKeyExchange signature verification (nx_tls12_ske_verify.nx). FIXTURE (self-built, NOT a published vector -- there is no published KAT for a TLS ServerKeyExchange): generated by openssl (scratchpad gen_ske_fixture.sh) - RSA-2048 leaf key (e=65537), modulus MOD below - client_random = 00..1f, server_random = 20..3f (deterministic) - ECDHE_params = 03 0017 41 || real secp256r1 uncompressed point (69 B) - SIG = openssl `dgst -sha256 -sign` over client_random||server_random||params (RSASSA-PKCS1-v1_5, 256 bytes); openssl `-verify` reports "Verified OK". openssl SIGNS; this sovereign NishiLang gate VERIFIES -- a cross-implementation check of our RSA PKCS1-v1.5+SHA-256 path against OpenSSL's signer. Checks: 1. verify PASSES against the genuine openssl signature. 2. neg-control: flip one signature byte -> verify FAILS. 3. neg-control: flip one server_random byte (signed data) -> verify FAILS. 4. neg-control: flip one ECDHE point byte (signed params) -> verify FAILS. 5. wire path: parse a full SKE body (params||sigalg||siglen||sig) + verify -> PASSES. 6. wire neg-control: corrupt a point byte in the body -> verify FAILS. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_emit_lib.nx nx_tls12_ske_verify.nx nx_tls12_ske_verify_gate.nx

imports: nx_syscalls.nxnx_gate_emit_lib.nxnx_tls12_ske_verify.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write sys_mmap ghx_s g_strlen ghx_nyb g_check g_puts ↻ nx_tls12_ske_verify_n u2048_alloc sys_mmap ↻ u2048_load_be nx_tls12_ske_verify sys_mmap ↻ tls12_skx_signed_data rsa_pkcs1_v1_5_sha256_veri u2048_alloc ↻ u2048_load_be ↻ rsa2048_mod_exp_mont u2048_cmp u2048_one u2048_zero rsa2048_mont_n0inv u2048_alloc ↻ rsa2048_mont_r2 u2048_wide_alloc u2048_alloc ↻ rsa2048_mod rsa2048_mul_mod rsa2048_mont_mul sys_mmap ↻ u2048_cmp ↻ u2048_sub_with_borrow u2048_copy rsa2048_mont_highbit u2048_copy ↻ sys_mmap ↻ u2048_store_be sha256_digest

structs

none

consts

none

functions

28func g_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: ghx_s
29func ghx_nyb(c: i64) -> i64
called by 1: ghx_s
36func ghx_s(hex: *u8, out: *u8) -> i64
called by 1: main calls 2: g_strlenghx_nyb
48func main() -> i64