code wiki / (root) / nx_p256_point_add_test.nx

nx_p256_point_add_test.nx

buildroot/runtime/nx_p256_point_add_test.nx

4502 B121 linesdepth 8pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic p256
docsdependenciesstructsconstsfunctions

about

nx_p256_point_add_test.nx -- KAT for P-256 Jacobian point addition. Verifies: - G + O = G (infinity identity) - O + G = G (commutative identity) - O + O = O (infinity-only) - G + G = 2G (matches point_double(G)) - G + (-G) = O (additive inverse) - G + 2G is on curve, != G, != 2G, != O - (G + 2G) + G = 4G (cross-check: 4G also = double(2G)) - 2G + G = G + 2G (commutativity) - (G + 2G) + G = G + (2G + G) (associativity spot-check) - aliasing: out aliases p1, out aliases p2, all aliases expect_exit: 0 license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_u256.nx nx_p256_field.nx nx_p256_field_mul.nx nx_p256_point.nx nx_p256_point_add.nx nx_p256_point_add_test.nx

imports: nx_syscalls.nxnx_u256.nxnx_p256_field.nxnx_p256_field_mul.nxnx_p256_point.nxnx_p256_point_add.nx

imported by: nobody (leaf or entry point)

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

main p256_point_alloc nx_scratch nx_scratch_init sys_mmap nx_scratch_oom sys_write sys_exit sys_mmap ↻ u256_alloc nx_scratch ↻ p256_field_one u256_one u256_zero p256_field_zero u256_zero ↻ p256_point_load_g p256_field_one ↻ p256_point_zero p256_field_one ↻ p256_field_zero ↻ p256_point_add p256_point_is_infinity u256_is_zero p256_point_copy u256_copy nx_scratch_save nx_scratch_init ↻ u256_alloc ↻ u256_copy ↻ p256_field_sq p256_field_mul nx_scratch_save ↻ u256_wide_alloc nx_scratch ↻ u256_mul_wide _p256_solinas_reduce u256_alloc ↻ p256_field_load_p nx_scratch ↻

structs

none

consts

none

functions

25func main() -> i64