Contents of File
The Substitution Box program is responsible for returning the Substitution Box or S-Box value of a input number between 0 - 256. This is accomplished by first utilizing the Multiplicative Inverse of the input value using the Extended Euclidean Algorithm. The result will then be passed to the affine transformation which will produce the substitution box value. Locating the S-Box value is the 1 of the 4 steps in encrypting data using the Advanced Encryption Standard (AES) cryptographic algorithm. The actual Substitution Box Tables can be located in the Resources section of this file.
This project was developed using the Linux operating system and includes three source files. A makefile was created to generate the executable from the program's source files. To determine if make is installed on the host machine enter the following in the terminal:
make --version
The above command should output something similar to below:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
If not, install make using the commands below:
sudo apt-get update
sudo apt-get install make
After the Substitution Box repository has been cloned or downloaded, navigate into it.
To display the S-Box values between 0 - 256 enter the following below:
make
./bin/sBox_demo
To locate the multiplicative inverse of a desired value from 0 -> 255 enter the following below:
make
./bin/sBox_demo [INPUT_VALUE]
If a value is entered out of bounds the following error will be displayed.
ERROR: Input value is out of range.
Please enter a value (0 - 255).