code wiki / (root) / nx_chacha20_poly1305_pure.nx

nx_chacha20_poly1305_pure.nx

buildroot/runtime/nx_chacha20_poly1305_pure.nx

4261 B129 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind orphan librarytopic chacha20
docsdependenciesstructsconstsfunctions

about

nx_chacha20_poly1305_pure.nx -- arena-based AEAD per RFC 8439 ยง2.8. Parallel of nx_chacha20_poly1305.nx that takes a caller-provided arena instead of calling sys_mmap. Lets x86_64 smokes use AEAD without pulling in nx_syscalls.nx (which would duplicate-define sys_* against nx_syscalls_x86_64.nx). Builds on nx_chacha20_pure + nx_poly1305_pure (both arena-based, already shipped). KAT-verified by composition: chacha20_pure and poly1305_pure both byte-exact against RFC 8439, so the AEAD is byte-exact by construction. expect_exit: 0 (when smoked with the round-trip + tampered-tag tests) license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/ietf/rfc_8439

dependencies 3 imports · 0 importers

nx_arena_types.nx nx_chacha20_pure.nx nx_poly1305_pure.nx nx_chacha20_poly1305_pure.nx

imports: nx_arena_types.nxnx_chacha20_pure.nxnx_poly1305_pure.nx

imported by: nobody (leaf or entry point)

structs

none

consts

21const NX_AEADP_TAG_BYTES: i64 = 16
22const NX_AEADP_NONCE_BYTES: i64 = 12
23const NX_AEADP_KEY_BYTES: i64 = 32
25const NX_AEADP_VERDICT_OK: i64 = 1
26const NX_AEADP_VERDICT_TAG_MISMATCH: i64 = 2

functions

28func aeadp_derive_otk(arena: *NxArena, key: *u8, nonce: *u8, otk_out: *u8) -> i64
37func aeadp_put_u64_le(buf: *u8, off: i64, v: i64) -> i64
49func aeadp_build_mac_data(
79func nx_chacha20_poly1305_pure_encrypt(
103func nx_chacha20_poly1305_pure_decrypt(