code wiki / (root) / nx_p384_point.nx

nx_p384_point.nx

buildroot/runtime/nx_p384_point.nx

8561 B290 linesdepth 7pulls 8 transitivereach 535 importersview sourcekind tooltopic p384
docsdependenciesstructsconstsfunctions

about

nx_p384_point.nx -- NIST P-384 elliptic curve point operations. Curve: y^2 = x^3 - 3x + b mod p (same form as P-256, just larger field). Stored in Jacobian (X, Y, Z) coordinates. Mirrors nx_p256_point.nx 1:1. Doubling formula is unchanged (a = -3 special form valid for both NIST P-256 and P-384). API: struct P384Point { x: *i64, y: *i64, z: *i64 } p384_point_alloc() -> *P384Point p384_point_zero(p) set p to canonical infinity (1,1,0) p384_point_is_infinity(p) -> 0|1 (Z == 0) p384_point_copy(dst, src) p384_point_set_affine(p, x, y) p384_point_load_b(out) curve constant b p384_point_load_g(out_g) base point G (Z=1) p384_point_on_curve(p) requires p in affine p384_point_to_affine(p) normalize in place p384_point_eq(a, b) affine-equality test p384_point_double(out, in_pt) Jacobian doubling license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/nist/fips_186_5 lineage_id: nishi_p384_point_q10

dependencies 5 imports · 8 importers

nx_syscalls.nx nx_u384.nx nx_p384_field.nx nx_p384_field_mul_fast.nx nx_p384_field_inv.nx nx_p384_point.nx nx_ecdsa_p384.nx nx_ecdsa_p384_bisect_test.nx nx_p384_ecdh.nx nx_p384_point_add.nx nx_p384_point_test.nx nx_p384_scalar_mul.nx nx_p384_scalar_mul_gate.nx nx_p384_scalar_mul_test.nx

imports: nx_syscalls.nxnx_u384.nxnx_p384_field.nxnx_p384_field_mul_fast.nxnx_p384_field_inv.nx

imported by: nx_ecdsa_p384.nxnx_ecdsa_p384_bisect_test.nxnx_p384_ecdh.nxnx_p384_point_add.nxnx_p384_point_test.nxnx_p384_scalar_mul.nxnx_p384_scalar_mul_gate.nxnx_p384_scalar_mul_test.nx

structs

39struct P384Point

consts

45const NX_P384_POINT_OK: i64 = 1
46const NX_P384_POINT_BAD: i64 = 2
47const NX_P384_POINT_VERDICT_N: i64 = 3

functions

49func nx_p384_point_verdict_is_valid(v: i64) -> i64
55func p384_point_alloc() -> *P384Point
67func p384_point_zero(p: *P384Point) -> i64
74func p384_point_is_infinity(p: *P384Point) -> i64
78func p384_point_copy(dst: *P384Point, src: *P384Point) -> i64
85func p384_point_set_affine(p: *P384Point, x: *i64, y: *i64) -> i64
96func p384_point_load_b(out: *i64) -> i64
called by 1: p384_point_on_curve
117func p384_point_load_g(out_g: *P384Point) -> i64
150func p384_point_on_curve(p: *P384Point) -> i64
178func p384_point_to_affine(p: *P384Point) -> i64
195func p384_point_eq(a: *P384Point, b: *P384Point) -> i64
224func p384_point_double(out: *P384Point, in_pt: *P384Point) -> i64
288func main() -> i64