[보호]HACKCTF - RSA3
2020. 12. 31. 08:57ㆍCTF's Write-up
문제화면이 입니다.
e가 보통 65537 이거나 그런데, 너무 작은 3이여서 구글링하다보니 코드 이어서 풀었습니당.
from Crypto.Util.number import *
from gmpy2 import *
n = 10283681839193276126097189449431804469761940095295471888398234447479454966284763902940257262270896218602885591849219329295416054197234326881779747263501982465102957508563705432633950651360492963151374387619070656704554971992649022858286686244477458518219811343940208016922937570643216329114427596008380607613093481777894261584227765149699743645734317383348201997748556656749211035951710759363655486663011079526697122026161182876988679088458171192764980121987583057238040415225285169219391637708267493561674900564748140379192079752942242600521017002960185256025253900075152690586476143729320416895984549165574371936823
c = 0x5c93ba85692a8b3981a5d47be0e80d129b8a2f6cf4dc134547aa7e1620f6691513b1dc1d69e085c39e261c2b49026436bb243dba70a86f7fcd1a3a7e6b0f0ecfac015becad0a76e9cf208d5d31e2b4865
e = 3
with local_context() as ctx:
ctx.precision = 3000
dec = long_to_bytes(cbrt(c))
print dec
'CTF's Write-up' 카테고리의 다른 글
DreamHack - rev-basic-7 (0) | 2021.01.03 |
---|---|
DreamHack - rev-basic-6 (0) | 2021.01.01 |
DreamHack - csrf-1 (0) | 2020.12.30 |
DreamHack - rtld (0) | 2020.12.28 |
DreamHack - oneshot (0) | 2020.12.23 |