Caution
This is an educational project, and should not be used in production systems, as it may be (or is..) vulnerable to timing attacks, or side-channel vulnerabilities.
A tweakable version of AES (T-AES), which is be similar to AES but with an extra 128-bit tweak value.
T-AES can work with any of the 3 possible key lengths, 128, 192 or 256, since it works on the data path (substitution-permutation pipeline).
T-AES operates as AES, but with one round key modied by a tweak. The round key is RK5, RK6 or RK7 for AES with 128, 192 or 256 bit keys, respectively. The modication is an arithmetic addition of the tweak with the original round key.
make
cat plaintext.txt | ./build/encrypt 128 123 321 > ciphertext.bin
cat ciphertext.bin | ./build/decrypt 128 123 321 > decrypted.txt-
./build/encrypt- Encrypt binary, using AES software implementation -
./build/decrypt- Decrypt binary, using AES software implementation -
./build/encrypt_ni- Encrypt binary, using AES with Intel NI instructions -
./build/decrypt_ni- Decrypt binary, using AES with Intel NI instructions -
./build/encrypt_neon- Encrypt binary, using AES with ARM NEON instructions -
./build/decrypt_neon- Decrypt binary, using AES with ARM NEON instructions -
./build/stat- Stat program, linked with taes_internal.o (software implementation) -
./build/speed- Speed program, linked with taes_internal.o (software implementation) -
./build/speed_ni- Speed program, linked with taes_ni/neon_internal.o (native instructions implementation)
18.3/20.0
- Loop unrolling, for improving performance.
- Only perform the mix columns operation once per round key