Challenges
Direct factorization
Cryptography
Easy
Factorization
Solves: 5
Direct factorization
Author: CyberSamSU
Points
25
Now the modulus is larger — around 60 bits. With simple brute force (√n ≈ 109) it takes a few minutes, so a faster method is needed.
In practice, there are two ways: a ready-made library (from sympy import factorint) or the Pollard rho algorithm. Pollard's rho searches for a repetition in a random sequence and finds the smallest divisor in approximately √p steps (i.e. around n1/4). For a 30-bit prime number, this is ~30 thousand steps — an instant.
Public key and ciphertext:
n = 710399956389611959
e = 65537
c = 131306067742578206
The decrypted number gives a 5-byte text. Put these 5 characters into the flag.
Flag: BAYROQ{RS4_faktorlash_<5_belgi>}
Theory: learn the topic
To submit a flag, log in.