code wiki / (root) / nx_p256_point_test.nx

nx_p256_point_test.nx

buildroot/runtime/nx_p256_point_test.nx

5306 B133 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic p256
docsdependenciesstructsconstsfunctions

about

nx_p256_point_test.nx -- KAT for P-256 point operations. Verifies: - p256_point_load_b matches FIPS 186-5 §D.2.4 constant b - p256_point_load_g produces a G that satisfies y^2 = x^3 - 3x + b - infinity is on-curve by convention - set_affine + to_affine round-trips coordinates - point_double(infinity) = infinity - point_double(G) is on curve, != G, != infinity - point_double then point_double produces 4G also on curve - point_eq self-equality + infinity vs finite - aliasing (out == in_pt) in point_double - perturbed point (G with x flipped) fails on_curve 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_field_inv.nx nx_p256_point.nx nx_p256_point_test.nx

imports: nx_syscalls.nxnx_u256.nxnx_p256_field.nxnx_p256_field_mul.nxnx_p256_field_inv.nxnx_p256_point.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 ↻ p256_point_load_b sys_mmap ↻ u256_store_be p256_point_alloc nx_scratch ↻ u256_alloc ↻ p256_field_one u256_one u256_zero p256_field_zero u256_zero ↻ p256_point_load_g p256_field_one ↻ p256_point_on_curve p256_point_is_infinity u256_is_zero 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 ↻ _r_reduce9

structs

none

consts

none

functions

25func main() -> i64