Crypto - uf
🙄 - Laika
Last updated
🙄 - Laika
Last updated
Solved after the CTF ended.
The for loop multiplies by the sum by 2 each time and maybe adds 1 to the product of m. The other condition only concerned with adding a constant, as it only changes the last bit, it may add 1 to the sum at the end of each loop
The output can be generalized as
Where pi and ri are unknown. Solving this can be generalized to solving the Approximate GCD problem
Finding q0 is actually enough to solve for m because
After finding r0 we get
We use the solution given