Skip to main content
Challenges Key used twice
Cryptography Hard Two-time pad Solves: 10

Key used twice

Author: CyberSamSU
Points
100

In stream ciphers, the text is XORed with a random keystream: c = m ^ K. If K is truly random and is used only once, this is the unbreakable Vernam cipher (one-time pad).

But if that K is used a second time, the whole protection collapses. Because c1 ^ c2 = (m1 ^ K) ^ (m2 ^ K) = m1 ^ m2 — the key cancels out and we are left with the XOR of the two plaintexts.

Our server sends a message according to a template and pads each message with spaces to 95 bytes. An employee mistakenly encrypted two different messages with a single keystream. Both ciphertexts are in the attached file: xabarlar.txt.

The first message is one of the following six templates (you will determine exactly which one it is yourself):

1. [CyberSamSU] Tizimga kirish muvaffaqiyatli amalga oshirildi.
2. [CyberSamSU] Parolingiz muddati tugadi, iltimos uni yangilang.
3. [CyberSamSU] Yangi qurilmadan kirish aniqlandi, tekshirib ko'ring.
4. [CyberSamSU] Musobaqa reytingi yangilandi, natijangizni ko'ring.
5. [CyberSamSU] Xavfsizlik bo'limi: kalitni ikki marta ishlatmang!
6. [CyberSamSU] Server texnik xizmat uchun vaqtincha to'xtatiladi.

The second message is secret — there is a flag inside it. Decrypt it.

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

First solvers

1. Stiv_084100 11.09.2026
2. Абдул 15.09.2026
3. W.o.X 17.09.2026
4. Лазиз 04.10.2026
5. testrejim 09.10.2026
6. 11111tttt 09.10.2026
7. Mirjaxon Qaxxarov 26.10.2026
8. Odam 04.11.2026
9. Furqat Turayev 09.11.2026
10. arcanum 11.11.2026