Skip to main content
Challenges Keyed substitution
Cryptography Easy AES basics Solves: 9

Keyed substitution

Author: CyberSamSU
Points
12

AES can be explained in a single sentence: it is a keyed permutation (keyed permutation). That is, for each key it maps the set of 16-byte blocks onto itself in a one-to-one (bijective) manner. Being one-to-one is very important: if two different plaintexts produced the same ciphertext, decryption would be fundamentally impossible.

Now we will see this idea in its simplest form. Below is given a random permutation (table) of the numbers 0..255: jadval[i] — indicates what the byte i is replaced with. The table is in the attached jadval.txt file, the number in the left column is the row's starting index.

The flag was substituted byte-by-byte using this table. Recover it:

9af0b974d97f43f096cd75a8ab512650512675ab5111ab0fa25026a3260fa275
2f26f496a80f355cc5e2

Creating the reverse table takes a few lines of code: inv = [0]*256, then for each i, inv[perm[i]] = i.

Attached files
jadval.txt Log in to download
SHA-256 checksums
jadval.txt: 22f9f959a140e883e0e8ef779ee6e72a11eae213a7ce9f38daad942b832a2ff5
Hints 2
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −1 pts Log in
Hint 2 −2 pts Log in
To submit a flag, log in.

First solvers

1. Лазиз 04.10.2026
2. Mirjaxon Qaxxarov 26.10.2026
3. Odam 06.11.2026
4. ya_d0na 11.11.2026
5. Doston Allayarov 12.11.2026
6. jasmina_05 16.11.2026
7. rushana24 19.11.2026
8. AGENT X 26.11.2026
9. Jumanazarov Asilbek 26.11.2026