Skip to main content
Challenges Primitive roots (generators)
Cryptography Hard Primitive roots Solves: 7

Primitive roots (generators)

Author: CyberSamSU
Points
80

If the order of the element g is exactly equal to p-1, it is called a primitive root (generator): its powers g¹, g², ..., g^(p-1) cover the entire group, that is, all numbers from 1 to p-1, exactly once.

The verification method is simple: we factor p-1 into prime factors. g is a primitive root if and only if for every prime factor q, g^((p-1)/q) ≢ 1 (mod p). Otherwise, the order will be less than p-1.

Another fact: the number of primitive roots is exactly equal to φ(p-1) (if they exist at all).

Given:

p = 892514872957
p - 1 = 2^2 * 3 * 7^2 * 47 * 157 * 205703

Find the smallest primitive root g and the total number of primitive roots modulo mod p. Flag: BAYROQ{M4TH_primitiv_ildiz_<g>_<primitiv ildizlar soni>}

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

First solvers

1. Абдул 08.09.2026
2. W.o.X 11.09.2026
3. Лазиз 04.10.2026
4. testrejim 09.10.2026
5. Mirjaxon Qaxxarov 26.10.2026
6. Odam 04.11.2026
7. arcanum 11.11.2026