code wiki / (root) / nx_p384_field_test.nx

nx_p384_field_test.nx

buildroot/runtime/nx_p384_field_test.nx

2128 B77 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic p384
docsdependenciesstructsconstsfunctions

about

nx_p384_field_test.nx -- KAT for P-384 field add/sub/neg. Verifies: - p loads correctly (12 limbs as documented) - 0 + 0 = 0 - 1 + (p - 1) = 0 (mod p) - (p - 1) + (p - 1) = p - 2 (mod p) - (p - 1) - 1 = p - 2 - 0 - 1 = p - 1 - -0 = 0 - -1 = p - 1 expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_u384.nx nx_p384_field.nx nx_p384_field_test.nx

imports: nx_syscalls.nxnx_u384.nxnx_p384_field.nx

imported by: nobody (leaf or entry point)

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

main u384_alloc nx_u384_scratch nx_u384_scratch_init sys_mmap sys_write sys_exit sys_mmap ↻ p384_field_load_p u384_one u384_zero u384_sub_with_borrow p384_field_add u384_alloc ↻ p384_field_load_p ↻ u384_add_with_carry u384_sub_with_borrow ↻ u384_copy u384_is_zero u384_eq p384_field_sub u384_alloc ↻ p384_field_load_p ↻ u384_sub_with_borrow ↻ u384_add_with_carry ↻ p384_field_neg u384_is_zero ↻ u384_zero ↻ u384_alloc ↻ p384_field_load_p ↻ u384_sub_with_borrow ↻

structs

none

consts

none

functions

20func main() -> i64