githubEdit

Sum-O-Primes

Challenge

We have so much faith in RSA we give you not just the product of the primes, but their sum as well!

Solution

Run the solution script.pyarrow-up-right, which uses the equations for p and p-q from this paperarrow-up-right (Archivearrow-up-right).

The two equations can be combined to form: p=(x+sqrt(x^2-4*n))/2.

gmpy2 is used to store large numbers and it's precision is set to 2048 ate the beginning of the script to ensure that no digits are lost.

Flag

picoCTF{3921def5}

Last updated