real-baby-rsa TokyoWesterns CTF 5th 2019

Hi everyone, this is the next post in the series of writeup of the TokyoWesterns CTF 5th 2019 contest, and it is  a cryptographic challenge : real-baby-rsa

Link: real-baby-rsa

Initially, because this was the first time our team participated in this competition, we thought it would be difficult to complete a challenge, but surprisingly, the organizers gave the challenge from easy to hard. and that makes us appreciate, let's start!

Look at the problem.py:


We can easily understand the flow of coding here: People create each part of the ciphertext(output.txt) by encoding each character of the flag with RSA with N, e already known.

Therefore, the solution to this problem is simply brute force, for each part of the cirpher text, we will try to encode with RSA each character in ascii charset, repeat this step for all parts of the cirpher text.

Here is my script python for the solution: my solution





Flag: TWCTF{padding_is_important}

Thanks for watching :)
Share:

0 nhận xét:

Đăng nhận xét