Skip to main content
Challenges Truncated hash collision
Cryptography Hard Truncated collision Solves: 9

Truncated hash collision

Author: CyberSamSU
Points
85

A full SHA-256 collision cannot be found, but if we truncate the hash (take only the first few bits), a birthday attack works very quickly. For 40 bits, an average of only ~2^20 ≈ 1 million hashes is enough.

Inputs are generated in the following format:

xabar(n) = b'CYBERSAMSU_BDAY_' + str(n).encode()   # n = 0, 1, 2, ...

Task: find two n for which the first 40 bits (10 hex characters) of sha256(xabar(n)) are the same. Go sequentially starting from n = 0 and take the first collision encountered.

Flag: BAYROQ{H4SH_bday_<avval_uchragan_n>_<takror_topilgan_n>} (smaller n first, larger n second).

Write each calculated prefix to a dictionary (prefix -> n); when a prefix is encountered for the second time, a collision is found.

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

First solvers

1. Абдул 15.09.2026
2. W.o.X 17.09.2026
3. Лазиз 04.10.2026
4. testrejim 09.10.2026
5. Mirjaxon Qaxxarov 27.10.2026
6. Odam 04.11.2026
7. arcanum 11.11.2026
8. pentester_uz 12.11.2026
9. Jasmin Xuseinova 15.11.2026