code wiki / (root) / nx_u2048_mul.nx

nx_u2048_mul.nx

buildroot/runtime/nx_u2048_mul.nx

3906 B131 linesdepth 3pulls 3 transitivereach 616 importersview sourcekind tooltopic u2048
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 · 11 importers

nx_syscalls.nx nx_u2048.nx nx_u2048_mul.nx nx_authenticode_sign.nx nx_efivars_enrol.nx nx_rsa2048_mod.nx nx_rsa2048_mod_exp.nx nx_rsa2048_mod_exp_big.nx nx_rsa2048_mont.nx nx_rsa2048_mont_gate.nx nx_rsa_keygen.nx nx_rsa_pkcs1_sign.nx nx_u2048_millerrabin.nx

diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.

imports: nx_syscalls.nxnx_u2048.nx

imported by: nx_authenticode_sign.nxnx_efivars_enrol.nxnx_rsa2048_mod.nxnx_rsa2048_mod_exp.nxnx_rsa2048_mod_exp_big.nxnx_rsa2048_mont.nxnx_rsa2048_mont_gate.nxnx_rsa_keygen.nxnx_rsa_pkcs1_sign.nxnx_u2048_millerrabin.nxnx_x509_emit.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
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
called by 1: kg_keygen
129func main() -> i64