Feat: Added vaptvupt codec, fix jasmin tests

This commit is contained in:
Cristian Cezar Moisés 2026-03-30 06:56:52 -03:00
commit 6651842748
63 changed files with 6577 additions and 342 deletions

24
jasmin/zupt_aes_ctr4.jazz Normal file
View file

@ -0,0 +1,24 @@
/* Zupt — AES-256-CTR 4-Block Pipeline via AES-NI (Jasmin)
* Copyright (c) 2026 Cristian Cezar Moisés — MIT License
*
* CT-REQUIRED: AES-NI has no data-dependent timing.
*
* Interleaves 4 independent counter blocks through the AES round
* pipeline. AES-NI has 4-cycle latency, 1-cycle throughput — so
* 4 independent blocks saturate the pipeline for ~4× throughput.
*
* Expected: ~3.5 GB/s AES-256-CTR on modern x86-64 (Zen3/Alder Lake).
*
* Interface:
* zupt_aes256_ctr4(out, in, key, ctr, nblocks)
* Encrypts nblocks×16 bytes. Counter is incremented in the last 8 bytes
* (big-endian) after each block. Processes 4 blocks per iteration;
* remaining 1-3 blocks fall back to zupt_aes256_blk.
*
* NOTE: This is the Jasmin source for documentation. The actual linked
* assembly is in zupt_aes_ctr4.s (hand-written to match this logic).
*/
/* See zupt_aes_ctr4.s for the production assembly.
* This .jazz file documents the algorithm but is not compiled
* (jasminc is not required at build time). */