nx_tls13_loopback_test.nx
buildroot/runtime/nx_tls13_loopback_test.nx
about
nx_tls13_loopback_test.nx -- SOVEREIGN end-to-end handshake proof.
One main() runs BOTH halves of a TLS 1.3 1-RTT handshake against
each other. No sockets, no external server, no Cloudflare, no
anything outside our own bytes. This is the substrate's
self-test that the entire client+server stack works END-TO-END
with bit-identical keys derived from real ECDHE.
Per user 2026-05-16: "i dont want anything but sovereign". The
previous suggestion to test against cloudflare.com was sloppy and
has been pulled back; THIS is the canonical proof.
Inputs (RFC 8448 ยง3 for cross-validation against the spec):
client_priv = 49af42ba7f9994852d713ef2784bcbcaa7911de26adc5642cb634540e7ea5005
server_priv = b1580eeadf6dd589b8ef4f2d5652578cc810e9980191ec8d058308cea216a21e
Expected:
ECDHE shared (both sides) = 8bd4054fb55b9d63fdfbacf9f04b9f0d35e6d63f537563efd46272900f89492d
handshake_secret (both) = 1dc826e93606aa6fdc0aadc12f741b01046aa6b99f691ed221a9f0ca043fbeac
client_hs_traffic_secret = b3eddb126e067f35a780b3abf45e2d8f3b1a950738f52e9600746a0e27a55a21
server_hs_traffic_secret = b67b7d690cc16c4e75e54213cb2d37b4e9c912bcded9105d42befd59d391ad38
(Note: chts/shts above match the RFC ONLY for the post-SH transcript
hash 860c06ed...cad8. Our test uses a different SNI ("example.com")
and a different client_random + server_random + cipher_suites order,
so OUR transcript hash differs, so OUR chts/shts differ from the RFC
values. What we CAN verify is that both sides derive the SAME
chts/shts/keys, and that both reach CONNECTED with each other's MACs.)
expect_exit: 0
license_tier: ORIGINAL
dependencies 11 imports · 0 importers
diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_x25519.nxnx_tls13.nxnx_tls13_ext.nxnx_tls13_hello.nxnx_tls13_finished.nxnx_tls13_transcript.nxnx_tls13_handshake.nxnx_tls13_schedule.nxnx_tls13_client.nxnx_tls13_server.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
| 45 | func main() -> i64 |