CRYPTOGRAPHY PROJECT

Simplified AES S-AES Simulator

Interactive visualization of Simplified Advanced Encryption Standard with complete encryption and decryption process. Including:
Key Expansion, SubNibbles, ShiftRows, MixColumns, GF(2⁴), State Matrix, and Step-by-Step Calculation.

Algorithm Parameters

Block Size 16 bit
Key Size 16 bit
Rounds 2 Round
Subkeys K0 K1 K2
Field GF(2⁴)
Polynomial x⁴+x+1 (0x13)

Input Data

Enter plaintext/ciphertext and 16-bit secret key in binary format.

Only 0 and 1 characters. Exactly 16 bits.
Key size must be exactly 16 bits.

Result Output

Encryption / Decryption result displayed in binary and hexadecimal.

Binary Output

-

Hexadecimal Output

-

State Matrix Visualization

Representation of S-AES state as 2 × 2 nibble matrix.

0000
0000
0000
0000

Step-by-Step Calculation

Detailed visualization of every S-AES transformation stage.

🔑 Key Expansion (K0, K1, K2)
➕ Initial AddRoundKey (K0)
🔄 Round 1 (SubNibbles → ShiftRows → MixColumns → AddRoundKey)

SubNibbles

ShiftRows

MixColumns

AddRoundKey (K1)

✅ Final Round 2

SubNibbles

ShiftRows

AddRoundKey (K2)

Final Ciphertext

🔓 Decryption (InvCipher)

Initial AddRoundKey (K2)

Inverse Round 1

Inverse MixColumns

Inverse Round 2

Recovered Plaintext

🧮 GF(2⁴) Multiplication Detail

Reference Tables

S-AES lookup table and GF(2⁴) transformation constants.

S-Box (SubNibble)

Input 0 1 2 3 4 5 6 7 8 9 A B C D E F
Output 9 4 A B D 1 8 5 6 2 0 3 C E F 7

Inverse S-Box (InvSubNibble)

Input 0 1 2 3 4 5 6 7 8 9 A B C D E F
Output A 5 9 B 1 7 8 F 6 0 2 3 C 4 D E

MixColumns Matrix

1 4
4 1

GF(2⁴) Polynomial: x⁴+x+1

Inverse MixColumns

9 2
2 9

Used for Decryption process.

RCON

RCON1 10000000
(0x80)
RCON2 00110000
(0x30)