-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathrsa_2.py
More file actions
12 lines (11 loc) · 1.48 KB
/
Copy pathrsa_2.py
File metadata and controls
12 lines (11 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
from Crypto.Util.number import *
from labmath import polyrootsmod
p = 151504136086085116766143566124150275674073392929821608731193313303579549567486780984882103878189021716475112187664571076380701312144707968796469474077396203079356104319166539457117762979236714826426908047910529451429037552027255450267166159899155876867790669696867818896423172168830285791913854195932438702321
q = 103830664295009091893886752305087173101905116416231118984740125697489572383920741106883033358012404414250903398273361420080940861355058896027909558044477593238426139173175903469841531670082355641543985372882381822644581374082868518234109972478903771291945965032201075848195104712153515556622192413687460682033
e = 112
c = 7376083179301871727319662441290512768979499624954698397165424050024666168943377478129926304132046879741349597229411809080978573590530226067752606719487158834511752336008287600324551704896881690547279678544392014784520001523240813365339789395536491039305623640655624806350548548554437985830405020169663539939018239643445566882380359742208558132490655657280619850656880232036155057833081215187526442724687828214045430674207843841122060416377750502505640447395732809699800028565067081780511133517020113861405502897034245617267331520262877918693182867532420288135211820606290453667200638642871988519470430475958049806666
for i in polyrootsmod([-c, *[0 for i in range(e - 1)], 1],
{p: 1, q: 1}):
while (long_to_bytes(i).endswith(b'}')):
print(long_to_bytes(i))
break