Really Secure Algorithm — DawgCTF 2021
Writeup on RSA based Challenge Really Secure Algorithm
First and foremost; What is RSA?
RSA (Rivest–Shamir–Adleman) is an asymmetric cryptographic algorithm. Asymmetric means that there are two different keys. This is also called public-key cryptography because one of the keys can be given to anyone. The other key must be kept private.
To know more about how to generate these keys and the maths behind them click on me.
Moving on to the Challenge:

We have been given a text file that contains n
, e
, & c
where n = p*q
(we will be finding p & q later).
and e
is the Public Key exponent & c
is the Ciphertext.
You can find the file in this Pastebin: Pastebin link.
Moving on to the n
value, we know that it is a multiple of two prime numbers. we can find it on https://factordb.com

We see that n
is a perfect square and that both p & q are equal!
now using the values that we have we can try to solve the RSA on https://dcode.fr/rsa-cipher

Upon decrypting as text we get:

DawgCTF{sm@ll_d_b1g_dr3am5}
And we got the flag =)
with that, this challenge comes to an end!