code wiki / (root) / nx_tls13_transcript_snapkat_tamper_test.nx

nx_tls13_transcript_snapkat_tamper_test.nx

buildroot/runtime/nx_tls13_transcript_snapkat_tamper_test.nx

2613 B85 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic tls13
docsdependenciesstructsconstsfunctions

about

nx_tls13_transcript_snapkat_tamper_test.nx -- NEGATIVE CONTROL for the X-TLS-SNAPKAT-001 anti-regression KAT. Proves the KAT DISCRIMINATES: under the OLD shallow-copy snapshot (the pre-BL-015 bug), continue-after- snapshot DIVERGES from the one-shot at the lethal idx in {57..63}. This file deliberately reintroduces the bug LOCALLY (shallow_snapshot: flat 256-byte ctx copy that duplicates bufptr's pointer VALUE -> the clone shares the live partial block; sha256_final clobbers it). It does NOT touch the production organ. It asserts the bug is REPRODUCED (both lethal cases diverge), so the real KAT's "must equal one-shot" assertion would have gone RED. Pair it with nx_tls13_transcript_snapkat_test (GREEN on the fixed organ) for pos+NEG discrimination. expect_exit: 0 // 0 == both lethal cases diverged == gate discriminates license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_sha256.nx nx_tls13_transcript_snapkat_ta

imports: nx_syscalls.nxnx_sha256.nx

imported by: nobody (leaf or entry point)

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

main diverges sys_mmap tfill tnew sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k tupdate sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte shallow_snapshot sys_mmap ↻ sha256_final blk_set_byte ↻ sha256_compress ↻ sha256_digest sys_mmap ↻ sha256_init ↻ sha256_update ↻ sha256_final ↻

structs

none

consts

none

functions

20func tnew() -> *u8
called by 1: diverges calls 2: sys_mmapsha256_init
26func tupdate(st: *u8, msg: *u8, n: i64) -> i64
called by 1: diverges calls 1: sha256_update
32func shallow_snapshot(st: *u8, out: *u8) -> i64
called by 1: diverges calls 2: sys_mmapsha256_final
43func tfill(buf: *u8, n: i64) -> i64
called by 1: diverges
54func diverges(s: i64, extra: i64) -> i64
80func main() -> i64
calls 1: diverges