code wiki / (root) / nx_handshake_crypto_bench.nx

nx_handshake_crypto_bench.nx

buildroot/runtime/nx_handshake_crypto_bench.nx

3274 B83 linesdepth 9pulls 12 transitivereach 0 importersview sourcekind bench
docsdependenciesstructsconstsfunctions

about

nx_handshake_crypto_bench.nx -- 1:1 cost of the per-handshake public-key crypto (the suspected ~150ms TLS bottleneck). A TLS 1.3 server handshake does: 1 X25519 ephemeral keygen + 1 X25519 ECDH (shared secret) + 1 Ed25519 signature over the transcript. Measured here with sys_now_us (ms) + __rdtsc (cycles). If keygen+ecdh+sign ~= 150ms, the crypto IS the bottleneck (-> comb-tables). If it's a few ms, the daemon has a per-connection inefficiency elsewhere (-> profile the daemon path). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_x25519.nx nx_ed25519_signature.nx nx_handshake_crypto_bench.nx

imports: nx_syscalls.nxnx_x25519.nxnx_ed25519_signature.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ fill ed25519_sign_full sys_mmap ↻ ed25519_sha512 sys_mmap ↻ sha512_init sha512_update sha512_blk_set_byte blk_get_i64 blk_set_i64 sha512_compress sys_mmap ↻ blk_get_i64 ↻ sha512_gamma0 rotr64_v shr64_v sha512_gamma1 rotr64_v ↻ shr64_v ↻ sha512_sigma1 rotr64_v ↻ sha512_ch sha512_k sha512_sigma0

structs

none

consts

none

functions

15func bdec(n: i64) -> i64
called by 2: msfixreport calls 2: sys_writesys_mmap
27func msfix(us: i64) -> i64
called by 2: reportmain calls 2: bdecsys_write
34func fill(p: *u8, n: i64, v: i64) -> i64
called by 1: main
39func report(label: *u8, llen: i64, n: i64, us: i64, cyc: i64) -> i64
called by 1: main calls 3: sys_writemsfixbdec
46func main() -> i64