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>}
To submit a flag, log in.