S-AES: Gets your hands dirty with actual computation

This work is presented as an assignment task at ACM Winter School on Cyber Security 2020 (21–31 Dec) organized by VIT Vellore.

Special Thanks to: Prof. Aswani Kumar Cherukuri, School of Information Technology, VIT Vellore.

Introduction

S-AES is a Simplified version of AES, having all modules of AES but with reduced key size of 16 bits, the block size of 16 bits and the number of rounds to 2 rounds.

Let’s take an example:

Consider following are the 16 bits inputs for the encryption:

Plain Text (PT) = 0110 1111 0110 1011

Key (K) = 1010011100111011

Part 1: Key Generation:

This step is also known as Key Expansion. In this step, we generate 3 round keys (k0, k1 and k2), used in each round. First of all, the given 16 bits are divided into two parts of 8 bits named each as w0 and w1. So w0 = 10100111 and w1 = 00111011

Here, the first key k0 = w0 w1 = 1010011100111011

Following figures is used for key expansion:

Key Generation for S-AES

Following figure shows detailed calculations when we apply above computations with our input.

Key Generation Process

So we got all the key as follows:

k0 = w0 w1 = 1010011100111011 (A73B)

k1 = w2 w3 = 0001110000100111 (1C27)

k2 = w4 w5 = 0111011001010001 (7651)

So we are done with Part 1 of Key Generation for S-AES. Now move to Part 2.

Part 2: Actual Encryption and Decryption Process:

Following are the details of operations performed during encryption and decryption process.

Following table is used for mix column operation:

Mix Column Operations

Following are the computation details performed step-by-step during encryption process:

Encryption Process

So we have Cipher Text (CT) = 0000 0111 0011 1000. Now its time to decrypt it. It is simply the reverse process of above flow diagram (encryption process). Only SubNibble is the inverse operation (going from output to input) and MixColumn is inverse (matrix is given in below diagram).

Following are the computation details performed during decryption process:

Decryption Process

Example 2: Now take one more example:

Plain Text (PT) = 0001 1010 0010 0011

Key (K) = 0010 0100 0111 0101

Following are the details of key generation step:

Key Generation Process

Following are the encryption details:

Encryption Process

Now its time to get your hands dirty for decryption process.

In case of any doubts or issues with respect to computation done above, please drop a message and I would be happy to get things cleared for you!

Having 7+ teaching experience. Area of interest are Cryptography, Cyber Security, Web Application Security and Python Programming..