code wiki / (root) / nx_nishios_germ_gate.nx

nx_nishios_germ_gate.nx

buildroot/runtime/nx_nishios_germ_gate.nx

6029 B78 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic nishios
docsdependenciesstructsconstsfunctions

about

nx_nishios_germ_gate.nx -- NishiOS SPORE GERMINATION gate (not clones, germinated pieces). The operator's law: we don't load binary CLONES -- every capability is a content-addressed PIECE, rebuilt from SOURCE by the sovereign compiler (nx_cc->nxasm, no gcc), KAT-proven, admitted only if its hash matches (tamper -> reject). This gate proves that property for the whole GUI-OS subtree: for each capability organ it reads the SOURCE, computes its CID (sha256), and confirms it is present + content- addressed = germinatable-from-source, not a copied binary. Then it proves content-addressing is deterministic (same source -> same CID) and tamper-rejecting (one flipped byte -> different CID -> the piece would be REFUSED at germination). This is the spore/seed concept applied to the desktop: each rung is a proven, hash-verified, rebuildable piece -- evolutionary computation, not image loading. Mirrors the genesis CAP-* lineage nodes (nx_genesis_trace GREEN 9/9). expect_exit: 0 tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_sha256.nx nx_nishios_germ_gate.nx

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 gg_puts sys_write germ_check sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close gg_puts ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ gg_num sys_mmap ↻ sys_write ↻ gg_hex sys_mmap ↻ sys_write ↻ sys_mmap ↻ sys_read_file ↻ sha256_digest ↻ gg_eq32 gg_num ↻ sys_exit

structs

none

consts

none

functions

14func gg_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: germ_checkmain calls 1: sys_write
15func gg_num(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 2: germ_checkmain calls 2: sys_mmapsys_write
16func gg_hex(cid: *u8, n: i64) -> i64 { var i: i64=0; while i<n { let v: i64=cid[i] as i64; let hi: i64=(v>>4)&15; let lo: i64=v&15; var c1: i64=48+hi; if hi>9 { c1=87+hi } var c2: i64=48+lo; if lo>9 { c2=87+lo } let o: *u8=sys_mmap(4); o[0]=c1 as u8; o[1]=c2 as u8; sys_write(1,o,2); i=i+1 } return 0 }
called by 1: germ_check calls 2: sys_mmapsys_write
17func gg_eq32(a: *u8, b: *u8) -> i64 { var i: i64=0; while i<32 { if a[i]!=b[i] { return 0 } i=i+1 } return 1 }
called by 1: main
20func germ_check(cap: *u8, path: *u8) -> i64
33func main() -> i64