nx_chacha20_poly1305_test.nx
buildroot/runtime/nx_chacha20_poly1305_test.nx
about
nx_chacha20_poly1305_test.nx -- RFC 8439 ยง2.8.2 AEAD KAT.
Sunscreen vector (the canonical AEAD test vector):
Plaintext (114 bytes ASCII):
"Ladies and Gentlemen of the class of '99: If I could offer
you only one tip for the future, sunscreen would be it."
AAD (12 bytes): 50 51 52 53 c0 c1 c2 c3 c4 c5 c6 c7
Key (32 bytes): 80..9f sequential
Nonce (12 bytes): 07 00 00 00 40 41 42 43 44 45 46 47
Expected ciphertext first 32:
d3 1a 8d 34 64 8e 60 db 7b 86 af bc 53 ef 7e c2
a4 ad ed 51 29 6e 08 fe a9 e2 b5 a7 36 ee 62 d6
Expected tag: 1a e1 0b 59 4f 09 e2 6a 7e 90 2e cb d0 60 06 91
Also exercises tamper detection (single-bit flip in tag and in
ciphertext both reject) and round-trip (decrypt restores PT).
expect_exit: 0
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_chacha20_poly1305.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
| 25 | func main() -> i64 |