code wiki / _hdl_build / nx_poly1305_bench.nx
nx_poly1305_bench.nx
buildroot/runtime/_hdl_build/nx_poly1305_bench.nx
about
nx_poly1305_bench.nx -- throughput bench for the SCALAR Poly1305 (same verified 5x26-bit-limb code
as nx_poly1305_gate). MACs a 16384-byte buffer 65536 times = 1 GiB; wall-time -> MB/s. Tells us
whether the AEAD is Poly1305-bound (need SIMD) or ChaCha-bound (scalar suffices, ChaCha already
exceeds). Time it: compile->nxasm->elf, then `time ./elf`. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 6 | const K_MAGIC_16384: i64 = 16384 |
| 7 | const K_MAGIC_65536: i64 = 65536 |
functions
| 9 | func u8to32(p: *u8, o: i64) -> i64 |
| 13 | func poly_block(m: *u8, off: i64, hibit: i64, h: *i64, r: *i64, s: *i64) -> i64 |
| 39 | func poly1305(key: *u8, msg: *u8, mlen: i64, tag: *u8) -> i64 |
| 76 | func main() -> i64 |