Skip to main content
Challenges Affine cipher — encryption
Cryptography Medium Affine cipher Solves: 6

Affine cipher — encryption

Author: CyberSamSU
Points
30

The Affine cipher is a generalization of the Caesar cipher. Each letter is first converted to a number (A = 0, B = 1, ..., Z = 25), then the following formula is applied:

E(x) = (a * x + b) mod 26

Here a and b are the key. An important condition: the number a must be coprime with 26 (GCD(a, 26) = 1), otherwise decryption will be impossible. Therefore, there are only 12 variants for a: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25.

This time you need to encrypt. Key: a = 7, b = 12. Plaintext: KRIPTOGRAFIYA.

Place the result (in uppercase, without spaces) into the flag: BAYROQ{KL4SS1K_<shifrmatn>}

To check: the index of the letter K is 10, (7 * 10 + 12) mod 26 = 82 mod 26 = 4 → E.

Hints 2
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −3 pts Log in
Hint 2 −6 pts Log in
To submit a flag, log in.

First solvers

1. BlackCipher 03.10.2026
2. Лазиз 04.10.2026
3. Mirjaxon Qaxxarov 26.10.2026
4. Odam 05.11.2026
5. arcanum 11.11.2026
6. Doston Allayarov 28.11.2026