Skip to content

lauraFortune/aes-library

 
 

Repository files navigation

AES Library

Implementation of the 128-bit variant of AES (Advanced Encryption Standard) as a C Library.

Submodule - AES Python

Python implementation of AES - used as a reference for C library and testing:

References

Key references:

  1. Creel, “AES Encryption Series”, YouTube, 2015-2016. Available Online
    • Easy to follow YouTube series on AES encryption in C
  2. S. Trenholme, “The AES Encryption Algorithm”, Sam Trenholme’s Webpage, 2005. Available Online
    • Series of articles which describe various aspects of the Rijndael (AES) encryption algorithm.
  3. Rijndael Mixcolumns, Wikipedia, Feb. 06. 2024. Available Online
    • Galois Multiplication lookup tables used in this project are available here
  4. Forma Estudio, “Rijndael (AES) Animation”, Forma Estudio, 2004. Available Online


Main Encryption Stages:

The following is a high level description of the three main Rijndael AES encryption functions as implemented in this project:

Sub-Bytes Encryption:

  • Each byte value in a block is substituted with a corresponding S-box lookup value.
  • The current byte value acts as the index for S-Box to get the new byte value.


    sub-bytes


Shift-Rows Encryption:

  • Each byte of each row is shifted to the left (except for the first row).
  • First row: no shift
  • Second row: Shift left 1 position
  • Third row: Shift left 2 positions
  • Fourth row: Shift left 3 positions


    sub-bytes


Mix-Columns Encryption:

  • Transforms the matrix, column by column
  • Each byte of each column is transformed through Matrix multiplication in Rijndael's Galois field
  • This project simplifies calculations through the use of Galois multiplication lookup tables and XOR operations


    sub-bytes

About

Secure Systems Development - Assignment 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 67.1%
  • Python 31.8%
  • Makefile 1.1%