Skip to content

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

hidden-tiny-aes

An AES-256 experiment based on tiny-AES-c. It preserves ECB, CBC, and CTR behavior while replacing common static AES signatures.

Current techniques

  • Fixed bitsliced Boyar-Peralta S-box circuit; inverse substitution reuses the same circuit through affine rewiring.
  • Runtime mixed Boolean-arithmetic construction of the Rijndael reduction term and on-demand Rcon generation.
  • ShiftRows absorbed into bit-lane wiring, MixColumns fused with AddRoundKey, and AES-256 round schedules unrolled.
  • No literal forward/inverse S-box or Rcon tables.

Detection results

The matrix covered seven stripped Windows x64 profiles: GCC 16.2 at -O0, -O2, -Os, and LTO; Clang 17 at -O0, -O2, and -Os. Values are profiles with an AES-specific match.

Implementation Yara-Rules findcrypt-yara crypto-detection capa/Vivisect
Stock tiny-AES 7/7 7/7 7/7 7/7
Part 1 0/7 0/7 0/7 2/7
Current Part 2 0/7 0/7 0/7 0/7

capa/Ghidra also returned no AES match for the representative Part 2 GCC -O2 build. Because that backend missed the stock table controls, its result is recorded separately rather than treated as independent confirmation.

Correctness checks passed exhaustive byte substitution/doubling tests, NIST AES-256 ECB/CBC vectors, ASan/UBSan, and 90,000 randomized OpenSSL differential cases across stock, Part 1, and Part 2.

Full methodology and pinned rule revisions: Part 1 · Part 2

Build and test

Open tiny-aes.slnx in Visual Studio, or use a C compiler:

cc -std=c11 -Wall -Wextra -Wpedantic main.c aes.c -o hidden-tiny-aes
./hidden-tiny-aes

cc -std=c11 -Wall -Wextra -Wpedantic tests/test_aes.c -o test-aes
./test-aes

The demo PKCS#7-pads a fixed message, encrypts and decrypts it with AES-256-CBC, validates the padding, and prints only the ciphertext and recovered text.

Attribution

Derived from public-domain tiny-AES-c. The Boolean S-box is adapted from BearSSL's MIT-licensed Boyar-Peralta implementation; its notice is retained in aes.c. See unlicense.txt for the base implementation.

Releases

Packages

Contributors

Languages