-
Notifications
You must be signed in to change notification settings - Fork 0
/
RSA_decryptor.py
12 lines (11 loc) · 989 Bytes
/
RSA_decryptor.py
1
2
3
4
5
6
7
8
9
10
11
12
from Crypto.PublicKey import RSA
from Crypto.Util.number import *
p = 7435971420936319301428289018215632497392821591678153011429652187122948431488636341388797100383256083152488863665911790460265251144098590733635315839293717
n = 95181997084539095711284715458245918814072404585462989632359937449236198375478548700596023818530426177008394344615216149144458841309214045930129502121622964667199253344043542134199352583222799075977949642893740668737392938808139103174052542968072135426048954159448125674657337858500342435216100595747473323483
e = 65537
c = 71514275324303132464601265840335323523876489159915419522992481888281335934020846134324997117463300788597500132141835636674951479450669542508359593113210551999162166682070889425518156447546626956823976206303497991002123665894481806063688404687258597154664386331887756446328544065006279817198306687511269337516
q = divmod(n,p)[0]
t = (p-1)*(q-1)
d = inverse(e,t)
# print(size(n),size(c),d)
print(long_to_bytes(pow(int(c),int(d),int(n))))