Skip to content

Instantly share code, notes, and snippets.

@Lense Lense/README.md
Last active Dec 6, 2015

Embed
What would you like to do?
SECCON 2015--Find the prime numbers--Crypto200
#!/usr/bin/python3
c = 3089536481493958504
o = 430963121498067364
h = 2520077868883606433
n = 1
while True:
if (c*o)%pow(n,2) == o:
print(n)
break
n += 1
# n = 251051
def L(u):
return (u-1)//n
p,q = factor(n)
phi = (p-1)*(q-1)
print((L(pow(c, phi, n**2))*modinv(phi, n))%n)
# 1510490612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.