BaaaaaaaarkingDog
코딩, 해킹
[System32.kr] RSA103

Fermat method를 쓰는 문제이긴한데 그냥 온라인 서비스로 해결함 https://www.alpertron.com.ar/ECM.HTM

 

 

from Crypto.Util.number import *
p=723305983597840387090073124295695063058926103842858618139332402030402176745237557965345230728740505468522590100663617877936830954821254102084213431441982251604821311082681331648040651828570490510112186434619298867817000367372585141
q=723305983597840387090073124295695063058926103842858618139332402030402176745237557965345230728740505468522590100663617877936830954821254102084213431441982251604821311082681331648040651828570490510112186434619298867817000367372594347


n = p*q
phi = (p-1)*(q-1)
e = 75890823319493894649778238119866660628924668661939725653243821591293734119876987514543360050173914547032827753044199325926436760242819383884783456287774063959012970808345743726395349179476088924414519992417795625843440292670765531
c = 48724864779313923840771368863315403978774157546525429106022441664935683078731021092597773499396876686078062855830596180404569211641060040265424503580011984253306252131461826391739149934613684983289826611746524999894630859459114240689860752847497252922935755063842138052718553154569645504114125024099577779165840521064654503400340349866956420272930288416620386084299030911419380258260740993752837219665010025735212424683776284178649990068611783883405716180340421
d = inverse(e, phi)
m = pow(c, d, n)
print(long_to_bytes(m))

'워게임 > System32.kr' 카테고리의 다른 글

[System32.kr] RSA103  (0) 2019.08.24
[System32.kr] RSA102  (0) 2019.08.24
[System32.kr] RSA101  (0) 2019.08.24
  Comments
댓글 쓰기