code wiki / (root) / nx_u256_mul_test.nx

nx_u256_mul_test.nx

buildroot/runtime/nx_u256_mul_test.nx

5854 B207 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic u256
docsdependenciesstructsconstsfunctions

about

nx_u256_mul_test.nx -- KAT for the 256x256 -> 512 wide-multiply. Verifies: - 0 * 0 = 0 - 1 * 1 = 1 - a * 1 = a (identity) - 1 * a = a (commutative-with-identity) - 2^32 * 2^32 = 2^64 (cross-limb single bit) - (2^256 - 1)^2 produces the well-known wide value - small * small produces known products (3 * 5 = 15, etc.) - large limb-spanning case (0xFFFFFFFF * 0xFFFFFFFF) - wide_cmp / wide_fits_in_256 / wide_copy_low helpers expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_u256.nx nx_u256_mul.nx nx_u256_mul_test.nx

imports: nx_syscalls.nxnx_u256.nxnx_u256_mul.nx

imported by: nobody (leaf or entry point)

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

main u256_alloc nx_scratch nx_scratch_init sys_mmap nx_scratch_oom sys_write sys_exit sys_mmap ↻ u256_wide_alloc nx_scratch ↻ u256_zero u256_mul_wide u256_one u256_zero ↻ sys_mmap ↻ u256_load_be u256_wide_fits_in_256 u256_wide_cmp u256_wide_copy_low u256_eq

structs

none

consts

none

functions

21func main() -> i64