code wiki / (root) / nx_u2048_mul.nx

nx_u2048_mul.nx

buildroot/runtime/nx_u2048_mul.nx

3906 B131 linesdepth 3pulls 3 transitivereach 547 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_u2048_mul.nx -- 2048x2048 -> 4096-bit schoolbook multiplication + wide-buffer helpers. Mirrors nx_u256_mul/nx_u384_mul on 128-limb wide buffers. Foundation for nx_rsa2048_mod. API: u2048_wide_alloc() -> *i64 128-limb buffer (zeroed) u2048_mul_wide(out_128, a, b) -- out = a * b (no reduction) u2048_wide_shl1(out_128) -- in-place left shift by 1 bit license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/ietf/rfc_8017 lineage_id: nishi_u2048_mul_q10

dependencies 2 imports · 4 importers

nx_syscalls.nx nx_u2048.nx nx_u2048_mul.nx nx_rsa2048_mod.nx nx_rsa2048_mod_exp.nx nx_rsa2048_mont.nx nx_rsa2048_mont_gate.nx

imports: nx_syscalls.nxnx_u2048.nx

imported by: nx_rsa2048_mod.nxnx_rsa2048_mod_exp.nxnx_rsa2048_mont.nxnx_rsa2048_mont_gate.nx

structs

none

consts

23const NX_U2048_WIDE_LIMBS: i64 = 128
24const NX_U2048_WIDE_BYTES: i64 = 512

functions

26func u2048_wide_alloc() -> *i64
39func u2048_mul_wide(out_128: *i64, a: *i64, b: *i64) -> i64
called by 1: rsa2048_mul_mod
66func u2048_wide_shl1(out_128: *i64) -> i64
80func u2048_wide_get_bit(a_128: *i64, bit: i64) -> i64
called by 1: rsa2048_mod
88func u2048_wide_sub_low(out_128: *i64, sub: *i64) -> i64
108func u2048_wide_low_cmp(a_128: *i64, n: *i64) -> i64
120func u2048_wide_copy_low(out_64: *i64, src_128: *i64) -> i64
129func main() -> i64