ALL the CTFS of Crypto2025 finally
This commit is contained in:
9
crypto-asimmetric/RSA-9/chall.py
Normal file
9
crypto-asimmetric/RSA-9/chall.py
Normal file
@ -0,0 +1,9 @@
|
||||
from Crypto.Util.number import bytes_to_long, getPrime
|
||||
from secret import flag
|
||||
|
||||
p, q = getPrime(512), getPrime(512)
|
||||
n = p*q
|
||||
print(n)
|
||||
e = 60016485563460433620911462871489753027091796150597697863772440338904706321535832359517415034149374289955681381097544059467926029963755494161141305994584249448583991034102694954139120453335603006006970009433124857766494518747385902016093339683987307620366742481560543776055295663835860818720290861634213881385
|
||||
m = bytes_to_long(flag.encode())
|
||||
print(pow(m, e, n))
|
||||
Reference in New Issue
Block a user