Skip to main content
Challenges Weak seed: time-based search
Cryptography Easy Weak seed Solves: 7

Weak seed: time-based search

Author: CyberSamSU
Points
15

A computer cannot generate true randomness by itself. It uses a pseudorandom number generator (PRNG): a single starting number — the seed — is provided, then the generator produces an entire sequence from it according to a strict formula. If the seed is the same, the sequence will always be exactly the same.

The most common mistake is taking the current time as the seed: random.seed(int(time.time())). Time is not a secret! If an attacker knows approximately when a request was sent, they can test every second in that interval and fully replicate the generator.

On a website, a password reset token was created as follows (server code):

import random

t = int(time.time())        # so'rov kelgan sekund (Unix vaqt)
random.seed(t)

token  = random.getrandbits(32)                 # foydalanuvchiga koʻrsatiladi
kalit  = bytes(random.getrandbits(8) for _ in range(38))
ct     = bytes(a ^ b for a, b in zip(bayroq, kalit))

From the server log, it is known that the request came within the first one hour starting from January 1, 2025, 00:00:00 UTC, i.e. 1735689600 <= t < 1735693200 (3600 variants in total).

Token shown to the user (in base 16):

ebcc3923

Encrypted flag (hex):

8b7ff5723190825f2d165db011940eec33b6eb6daff6421d82293a1a66f77c0f
cafad28f11de

Test the 3600 seeds: whichever one matches the token, the key can also be regenerated from that seed.

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

First solvers

1. Лазиз 04.10.2026
2. Mirjaxon Qaxxarov 27.10.2026
3. Odam 06.11.2026
4. Doston Allayarov 12.11.2026
5. jasmina_05 16.11.2026
6. Jumanazarov Asilbek 26.11.2026
7. AGENT X 28.11.2026