Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

davidffa/T-AES

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T-AES

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.

Documents

How to run

make
cat plaintext.txt | ./build/encrypt 128 123 321 > ciphertext.bin
cat ciphertext.bin | ./build/decrypt 128 123 321 > decrypted.txt

Executables

  • ./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)

Grade

18.3/20.0

To improve

  • Loop unrolling, for improving performance.
  • Only perform the mix columns operation once per round key

About

Tweaked AES (1st Applied Cryptography Project)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages