code wiki / (root) / nx_rsa_pkcs1_v1_5_sha256_4096_real_test.nx

nx_rsa_pkcs1_v1_5_sha256_4096_real_test.nx

buildroot/runtime/nx_rsa_pkcs1_v1_5_sha256_4096_real_test.nx

3986 B116 linesdepth 8pulls 17 transitivereach 0 importersview sourcekind gate/prooftopic rsa
docsdependenciesstructsconstsfunctions

about

nx_rsa_pkcs1_v1_5_sha256_4096_real_test.nx -- REAL RSA-4096 verify against an openssl-generated keypair + signature. Proves the full PKCS1v1.5-SHA256 + RSA-4096 mod-exp + u4096_load_be pipeline shipped this session works end-to-end against bytes produced by a real production toolchain (openssl). No TLS, no X.509, no PEM parsing -- just the load-bearing math + padding. Test fixtures (must exist before running): /tmp/rsa4096_test_n.hex -- 1024-char hex of the 4096-bit modulus + trailing newline /tmp/rsa4096_test_msg.txt -- 23-byte message "hello-rsa4096-substrate" /tmp/rsa4096_test.sig -- 512-byte raw RSA-PKCS1v1.5-SHA256 signature Generated by (host-side): openssl genrsa -out rsa4096_test.key 4096 openssl rsa -in rsa4096_test.key -modulus -noout | sed 's/Modulus=//' \ > rsa4096_test_n.hex echo -n 'hello-rsa4096-substrate' > rsa4096_test_msg.txt openssl dgst -sha256 -sign rsa4096_test.key -out rsa4096_test.sig \ rsa4096_test_msg.txt expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_u4096.nx nx_rsa_pkcs1_v1_5_sha256_4096.nx nx_rsa_pkcs1_v1_5_sha256_4096_

imports: nx_syscalls.nxnx_u4096.nxnx_rsa_pkcs1_v1_5_sha256_4096.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap _read_file sys_openat_rd sys_read sys_close _hex_nibble u4096_alloc sys_mmap ↻ u4096_load_be rsa_pkcs1_v1_5_sha256_4096 u4096_alloc ↻ u4096_load_be ↻ rsa4096_mod_exp_mont u4096_cmp u4096_one u4096_zero rsa4096_mont_n0inv u4096_alloc ↻ rsa4096_mont_r2 sys_mmap ↻ u4096_alloc ↻ rsa4096_mod u4096_alloc ↻ u4096_zero ↻ u4096_shl1 u4096_wide_get_bit u4096_sub_with_borrow u4096_cmp ↻ u4096_copy rsa4096_mul_mod u4096_wide_alloc sys_mmap ↻ u4096_mul_wide rsa4096_mod ↻ sys_munmap u4096_free sys_munmap ↻ rsa4096_mont_mul sys_mmap ↻

structs

none

consts

none

functions

30func _hex_nibble(c: u8) -> i64
called by 1: main
46func _read_file(path: *u8, out: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
63func main() -> i64