Challenges
SubBytes and S-box
Cryptography
Easy
AES internal structure
Solves: 5
SubBytes and S-box
Author: CyberSamSU
Points
20
Each round of AES consists of 4 steps: SubBytes, ShiftRows, MixColumns, AddRoundKey. Of these, only SubBytes is non-linear (non-linear) — the rest consist of XORs and shifts. It is precisely this non-linearity that makes it impossible to solve AES as a simple system of equations.
SubBytes is very simple: each byte is substituted via a 256-element table called the S-box — b -> S[b]. The S-box is in the attached sbox.txt file (the number on the left is the row's starting index).
Each byte of the flag was passed through the S-box. Restore it:
2c83cb0084d12183c3edcfedcfaa04bccffb45c7dac7a350c7cf4d3c188fcfa3
ef43183cff
In AES, the inverse S-box (InvSubBytes) is used for decryption — you can build it yourself from the table.
Attached files
sbox.txt
Log in to download
SHA-256 checksums
sbox.txt: 5d3fdc93d793c4911867d938d52c6036b00e9e821904dec5afdb7a47023ce703
To submit a flag, log in.