CircleConCTF 21'

Baby RSA

Challenge Points : 100 Points

Description

Bob and Alice wants to send messages to each other. However , they don't want othre people to see the messages that they are sending . Becasue of this, they choose to use textbook RSA. show Alice and Bob by this isn't secure

Attatchments baby_rsa

Writeup

Attack : Small e attack

Solution script

import gmpy
from Crypto.Util.number import *

e = 3

n = 21240130069302595435883573568292543584653982426668643904196630885984119007899960150162877143271928662185885422702123670222165981446412189843665571992895649937195036232374014356896167929469467494531756153911013832353810970941919101050971790197002016280790620714887304192321101311465703150098410331176735899796484284165771555960758054286754565310439163189954842301676099617954811528874343372426916478057819577132937062857039063351856289801979923260408285890418889829381378968646646737194160697920287161229178345666260994127087040393511692642122516019055570881253021165130706539874713965212158253699181636631222365809257 

ct = 80505397907128518326368510654343095894448384569115420624567650731853204381479599216226376345254941090872832963619259274943986478887206647256170253591735005504

m = long_to_bytes(gmpy.root(ct,3)[0])
print(m)

Flag

flag{short_and_to_the_point}