Challenges
Partially known p
Cryptography
Medium
Partial key (Coppersmith)
Solves: 6
Partially known p
Author: CyberSamSU
Points
45
Sometimes only a part of the private prime number p is exposed through a memory dump or a side-channel. In large cases, Coppersmith's theorem (LLL lattice reduction) solves this. In a small case, a simple brute-force is sufficient.
Here only the lower 20 bits of p are unknown (only 2^20 ≈ 1 million variants). The remaining upper bits are given:
p_high = (lower 20 bits are zeroed)
6916358793091023020395920305029726310310621730199180633042081039
4001919180800
n =
5097666067292758957764708840201101041297301346492669820164236630
7934855381509466906232023408781810453066463933856677861962632587
62823224208277355062308881
e = 65537,
c =
3488457999446587937542173840135688361668914235230537906223035570
1264176465980328602897895832762092271328441035157506670857882615
71797427307011590765758746
Try the values of p_high + i (i = 0..2^20): whichever one divides n — that is p. A few seconds on a regular laptop.
To submit a flag, log in.