nx_p384_point_add.nx
buildroot/runtime/nx_p384_point_add.nx
about
nx_p384_point_add.nx -- Jacobian point addition for P-384.
Mirror of nx_p256_point_add.nx. Same formula structure; only
the underlying field arithmetic differs (12-limb vs 8-limb).
add-2007-bl Jacobian point addition (P1 != P2 general case):
U1 = X1 * Z2^2
U2 = X2 * Z1^2
S1 = Y1 * Z2^3
S2 = Y2 * Z1^3
if U1 == U2:
if S1 == S2: return 2*P1 (same point -> doubling)
else: return O (P1 = -P2)
H = U2 - U1
R = S2 - S1
X3 = R^2 - H^3 - 2*U1*H^2
Y3 = R * (U1*H^2 - X3) - S1*H^3
Z3 = H * Z1 * Z2
license_tier: INDEPENDENT_REDERIVE
genealogy_id: international-research-sources/nist/sec1_v2_2.2.1.2
lineage_id: nishi_p384_point_add_q10
dependencies 5 imports · 6 importers
imports: nx_syscalls.nxnx_u384.nxnx_p384_field.nxnx_p384_field_mul_fast.nxnx_p384_point.nx
imported by: nx_ecdsa_p384.nxnx_ecdsa_p384_bisect_test.nxnx_p384_ecdh.nxnx_p384_point_test.nxnx_p384_scalar_mul.nxnx_p384_scalar_mul_test.nx
structs
| none |
consts
| none |
functions
| 37 | func p384_point_add(out: *P384Point, p1: *P384Point, p2: *P384Point) -> i64 |
| 127 | func main() -> i64 |