nx_chacha20_test.nx
buildroot/runtime/nx_chacha20_test.nx
about
nx_chacha20_test.nx -- RFC 8439 §2.3.2 KAT + round-trip for ChaCha20.
Vector (RFC 8439 §2.3.2 worked example):
Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
Nonce: 00 00 00 09 00 00 00 4a 00 00 00 00
Counter: 1
Output (64-byte keystream block):
10 f1 e7 e4 d1 3b 59 15 50 0f dd 1f a3 20 71 c4
c7 d1 f4 c7 33 c0 68 03 04 22 aa 9a c3 d4 6c 4e
d2 82 64 46 07 9f aa 09 14 c2 d7 05 d9 8b 02 a2
b5 12 9c d1 de 16 4e b9 cb d0 83 e8 a2 50 3c 4e
Plus a round-trip: encrypt(decrypt(P)) == P since ChaCha20 is XOR
with the keystream (self-inverse with same key/counter/nonce).
expect_exit: 0
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_chacha20.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
| 24 | func main() -> i64 |