Skip to main content
Challenges RSA key parameters
Cryptography Easy RSA keys Solves: 12

RSA key parameters

Author: CyberSamSU
Points
15

An RSA key is assembled from four numbers. First, two large prime numbers p and q are chosen, then:

  • n = p · q — the modulus (public),
  • φ(n) = (p−1)(q−1) — Euler's totient function (private),
  • e — the public exponent, usually 65537; condition: gcd(e, φ(n)) = 1,
  • d = e−1 mod φ(n) — the private exponent.

d — this is a number such that when d · e is divided by φ(n), the remainder is 1. The extended Euclidean algorithm is used to find it; in Python, you can simply write pow(e, -1, phi).

The entire security of RSA lies in this: n can be given to everyone, but without factoring it into p and q, it is impossible to find φ(n), and therefore d. In this challenge, however, p and q are given to you as a gift:

p = 16415620253769342499
q = 15402413988895798253
e = 65537

Calculate the private exponent. Flag: BAYROQ{RS4_maxfiy_kalit_<d>}

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. ya_d0na 11.11.2026
5. Doston Allayarov 12.11.2026
6. Jasmin Xuseinova 15.11.2026
7. Kamron_99 16.11.2026
8. Sevara 16.11.2026
9. Abdinazarova 19.11.2026
10. milanchka_26 21.11.2026