nx_p256_keyshare_test.nx
buildroot/runtime/nx_p256_keyshare_test.nx
about
nx_p256_keyshare_test.nx -- B4-P256-KEYSHARE gate row.
Proves the P-256 half of the TLS 1.3 key_share path:
A. RFC 5903 section 8.1 ECDH KAT, BOTH directions:
pub(i) == (g_ix, g_iy), pub(r) == (g_rx, g_ry)
shared(i, pub_r) == g_irx == shared(r, pub_i)
(vectors re-read from rfc-editor.org 2026-06-10, not memory)
B. Boundary rejects: off-curve point, bad format byte, bad length
C. p256_ecdh_derive_priv: deterministic, in-range, usable
D. tls13_ext_emit_key_share_dual: byte-exact wire format
(lengths, both group ids, both pubkeys in place)
Distinct exit code per assertion; exit 0 = row PASS.
expect_exit: 0
license_tier: ORIGINAL
dependencies 10 imports · 0 importers
imports: nx_syscalls.nxnx_u256.nxnx_p256_field.nxnx_p256_point.nxnx_p256_point_add.nxnx_p256_scalar_mul.nxnx_p256_modn.nxnx_p256_ecdh.nxnx_tls13.nxnx_tls13_ext.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 30 | func kat_w4(out: *u8, w0: i64, w1: i64, w2: i64, w3: i64) -> i64 |
| 45 | func kat_eq32(a: *u8, b: *u8) -> i64 called by 1: main |
| 54 | func main() -> i64 |