ALL the CTFS of Crypto2025 finally
This commit is contained in:
11
crypto-asimmetric/RSA-8/chall.py
Normal file
11
crypto-asimmetric/RSA-8/chall.py
Normal file
@ -0,0 +1,11 @@
|
||||
from Crypto.Util.number import bytes_to_long, getPrime
|
||||
from secret import flag
|
||||
|
||||
n1 = getPrime(512)*getPrime(512)
|
||||
n2 = getPrime(512)*getPrime(512)
|
||||
n3 = getPrime(512)*getPrime(512)
|
||||
n = [n1, n2, n3]
|
||||
print(n)
|
||||
e = 3
|
||||
m = bytes_to_long(flag.encode())
|
||||
print([pow(m, e, nn) for nn in n])
|
||||
Reference in New Issue
Block a user