Skip to main content
Challenges Modular inverse
Cryptography Easy Modular inverse Solves: 8

Modular inverse

Author: CyberSamSU
Points
15

In modular arithmetic, there is no division operation. Instead, you multiply by the "inverse element". The inverse of a modulo mod p is such a number d that a · d ≡ 1 (mod p).

The inverse element exists only when EKUB(a, p) = 1. If p is a prime number, there is an inverse for every number except 0. There are two ways to find it: the extended Euclidean algorithm or Fermat's Little Theorem — d = a^(p-2) mod p.

Find the inverse of the following a modulo mod p.

p = 947291647
a = 690678758

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

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 26.10.2026
3. Odam 06.11.2026
4. Doston Allayarov 12.11.2026
5. Jasmin Xuseinova 15.11.2026
6. milanchka_26 19.11.2026
7. farang1z_06 20.11.2026
8. Zulxumor 23.11.2026