In this repository you will find the implementation of the AES (Advanced Encryption Standard) block cipher that was originally proposed by NIST. The formal document on which this implementation is based is FIPS.197.pdf. Please note that this code is for demonstration purposes only and not for other use.
This code is not recommended for use in document or text encryption of relevance, since, among many reasons, it does not offer a padding mechanism and the mode of operation is not as secure as AES GCM could be. Moreover, as its name indicates, it is the 128 bit version, which is the weakest of the three possible implementations (128, 192 and 256).
The content of the different files of the repository will be described below:
- aes128.h: Declaration of the two functions, both encryption and decryption.
- aes128.c: All the functions of each stage of the rounds.
- utils.c: Functions for the generation of the SBox table and its inverse.
- tests: A folder with a test based on the following example: AES.pdf
If you want to test the proposed test, execute the following commands:
cd tests/
make test