code wiki / (root) / nx_ecdsa_p384.nx

nx_ecdsa_p384.nx

buildroot/runtime/nx_ecdsa_p384.nx

4297 B121 linesdepth 10pulls 12 transitivereach 527 importersview sourcekind tooltopic ecdsa
docsdependenciesstructsconstsfunctions

about

nx_ecdsa_p384.nx -- ECDSA-P384 signature verification orchestrator. Mirror of nx_ecdsa_p256.nx adapted to the 12-limb / 384-bit path. Same verify algorithm (SEC 1 v2.0 §4.1.4): Inputs: Q = (pub_x, pub_y), e (hash), (r, s) 1. Range-check r, s ∈ [1, n-1] 2. Verify Q on curve + not infinity 3. e_n = e mod n 4. s_inv = s^(-1) mod n 5. u1 = (e_n * s_inv) mod n 6. u2 = (r * s_inv) mod n 7. R = u1*G + u2*Q 8. Reject if R == infinity 9. v = x_R mod n 10. Accept iff v == r Per Cardinal 22 (composition of shipped primitives). license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/nist/sec1_v2_4.1.4 + fips_186_5 lineage_id: nishi_ecdsa_p384_q10

dependencies 6 imports · 4 importers

nx_syscalls.nx nx_u384.nx nx_p384_modn.nx nx_p384_point.nx nx_p384_point_add.nx nx_p384_scalar_mul.nx nx_ecdsa_p384.nx nx_ecdsa_p384_bisect_test.nx nx_ecdsa_p384_real_bisect_test.nx nx_ecdsa_p384_test.nx nx_x509_verify_ecdsa_p384.nx

imports: nx_syscalls.nxnx_u384.nxnx_p384_modn.nxnx_p384_point.nxnx_p384_point_add.nxnx_p384_scalar_mul.nx

imported by: nx_ecdsa_p384_bisect_test.nxnx_ecdsa_p384_real_bisect_test.nxnx_ecdsa_p384_test.nxnx_x509_verify_ecdsa_p384.nx

structs

none

consts

36const NX_ECDSA_P384_OK: i64 = 1
37const NX_ECDSA_P384_BAD_R_RANGE: i64 = 2
38const NX_ECDSA_P384_BAD_S_RANGE: i64 = 3
39const NX_ECDSA_P384_PUBKEY_NOT_ON_CURVE: i64 = 4
40const NX_ECDSA_P384_PUBKEY_INFINITY: i64 = 5
41const NX_ECDSA_P384_INFINITY_RESULT: i64 = 6
42const NX_ECDSA_P384_BAD_SIG: i64 = 7
43const NX_ECDSA_P384_VERDICT_N: i64 = 8

functions

45func nx_ecdsa_p384_verdict_is_valid(v: i64) -> i64
55func nx_ecdsa_p384_verify(pub_x: *i64, pub_y: *i64,
63func _nx_ecdsa_p384_verify_inner(pub_x: *i64, pub_y: *i64,
119func main() -> i64