Skip to main content
Challenges Pohlig-Hellman attack
Cryptography Expert Pohlig-Hellman Solves: 14

Pohlig-Hellman attack

Author: CyberSamSU
Points
160

The discrete logarithm problem is not always difficult. Pohlig and Hellman showed that if the group order p-1 consists only of small prime factors (such numbers are called smooth, or smooth in English), the problem is divided into several smaller problems and solved very quickly.

The logic of the algorithm: for each prime factor q of p-1, we move to a small subgroup — g_q = g^((p-1)/q) and h_q = h^((p-1)/q). In this subgroup, the order is only q, so we find x mod q instantly with BSGS. By collecting all the remainders x ≡ xᵢ (mod qᵢ), we reconstruct x using the Chinese Remainder Theorem.

Practical conclusion: when choosing a prime p for Diffie-Hellman, p-1 must have at least one large prime factor. Otherwise, the key will be cracked in a few seconds. In the following parameters, such a mistake was made on purpose.

Given:

p = 14535678376960620991810392603237704423
p - 1 = 2 * 1168477 * 1220239 * 1380721 * 1397101 * 1514659 * 1744583
g = 5
h = 8866673674646952960624718030003939734

Find x from the equation g^x ≡ h (mod p) and assemble the flag: BAYROQ{M4TH_pohlig_hellman_<x>}

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

First solvers

1. Stiv_084100 10.09.2026
2. W.o.X 11.09.2026
3. Абдул 15.09.2026
4. Лазиз 01.10.2026
5. perseidavr 02.10.2026
6. testrejim 09.10.2026
7. Raumdeuter 09.10.2026
8. 11111tttt 09.10.2026
9. Mirjaxon Qaxxarov 26.10.2026
10. Odam 04.11.2026