UUT CTF | Break the RSA

#UUTCTF

https://ctftime.org/task/8397

Flag is the decryption of the following:

PublicKey= (114869651319530967114595389434126892905129957446815070167640244711056341561089,113)

CipherText=102692755691755898230412269602025019920938225158332080093559205660414585058354

nが小さいので素因数分解できる

>>> p = 338924256021210389725168429375903627349
>>> q = 338924256021210389725168429375903627261
>>> n = p * q
>>> phi = (p-1)*(q-1)
>>> from Crypto.Util.number import *
>>> e = 113
>>> d = inverse(e, phi)
>>> c = 102692755691755898230412269602025019920938225158332080093559205660414585058354
>>> bytes.fromhex(hex(pow(c, d, n))[2:])
b'UUTCTF{easy sH0Rt RSA!!!}'