Skip to main content
Challenges Element order and Lagrange's theorem
Cryptography Hard Group order Solves: 10

Element order and Lagrange's theorem

Author: CyberSamSU
Points
70

Z*p is a group under multiplication modulo mod p; it has p-1 elements. The order of the element h is the smallest positive number k such that h^k ≡ 1 (mod p).

Lagrange's theorem provides a very strong constraint: the order of any element divides the group order, that is, p-1. Therefore, it is not necessary to check all numbers — it is sufficient to check only the divisors of p-1.

In Diffie-Hellman, this is a security issue: if the generator has a small order, very few options remain for the shared key, and the attacker will brute-force it.

Below, p, its factorization p-1 and the element h are given. Find the order of h.

p = 4085559242614864307
p - 1 = 2 * 1030739 * 1082189 * 1831343
h = 1797234111894391568

Answer: only the number — in decimal format, without spaces and extra characters (for example 1234).

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

First solvers

1. Абдул 08.09.2026
2. W.o.X 17.09.2026
3. Лазиз 04.10.2026
4. testrejim 09.10.2026
5. Mirjaxon Qaxxarov 26.10.2026
6. Odam 05.11.2026
7. arcanum 11.11.2026
8. Jasmin Xuseinova 15.11.2026
9. farang1z_06 20.11.2026
10. AGENT X 28.11.2026