code wiki / (root) / nx_e2e.nx

nx_e2e.nx

buildroot/runtime/nx_e2e.nx

2157 B31 linesdepth 6pulls 10 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_e2e.nx -- sovereign END-TO-END ENCRYPTION session for private calls/messages (the "pure E2E, never on a server" requirement). X25519 ECDH key agreement -> a session key both endpoints derive INDEPENDENTLY -> all relayed media (video frames, audio, chat) sealed with ChaCha20-Poly1305 AEAD. The relay daemon carries ONLY ciphertext + tag; it has no private key, so it can never read the call. Contacts (a peer's name + public key) live in the browser's local store ONLY, never POSTed. Composes nx_x25519 + nx_chacha20_poly1305. license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_x25519.nx nx_chacha20_poly1305.nx nx_e2e.nx nx_e2e_gate.nx

imports: nx_x25519.nxnx_chacha20_poly1305.nx

imported by: nx_e2e_gate.nx

structs

none

consts

none

functions

10func e2e_base(out: *u8) -> i64 { out[0] = 9 as u8; var i: i64 = 1; while i < 32 { out[i] = 0 as u8; i = i + 1 } return 0 }
called by 1: e2e_pub
12func e2e_pub(priv: *u8, pub_out: *u8) -> i64
called by 1: main calls 2: e2e_basex25519
20func e2e_session_key(my_priv: *u8, peer_pub: *u8, key_out: *u8) -> i64 { return x25519(my_priv, peer_pub, key_out) }
called by 1: main calls 1: x25519
22func e2e_seal(key: *u8, nonce: *u8, pt: *u8, n: i64, ct_out: *u8, tag_out: *u8) -> i64
called by 1: main calls 1: nx_chacha20_poly1305_encrypt
27func e2e_open(key: *u8, nonce: *u8, ct: *u8, n: i64, tag: *u8, pt_out: *u8) -> i64
called by 1: main calls 1: nx_chacha20_poly1305_decrypt