Cryptography

PicoCTF 2021

Mind your Ps and Qs

Description : In RSA, a small e value can be problematic, but what about N? Can you decrypt this?valuesarrow-up-right

Points : 20

Solution :

The title of the challenge entails to mind the values of the prime factors P and Q used in RSA cryptographic algorithm.

circle-info

Hint 1 : Bits are expensive, I used only a little bit over 100 to save money

Let's open the file.

Decrypt my super sick RSA:
c: 240986837130071017759137533082982207147971245672412893755780400885108149004760496
n: 831416828080417866340504968188990032810316193533653516022175784399720141076262857
e: 65537

From the file,we are given the cipher message c ,public key value n and the public key e.To solve this challenge, let's behave as a script kiddie,utilizing the RsaCtfTool developed by Ganapati.arrow-up-right

Now, let's run a tool:

python3 RsaCtfTool.py -n 831416828080417866340504968188990032810316193533653516022175784399720141076262857 -e 65537 --uncipher 240986837130071017759137533082982207147971245672412893755780400885108149004760496

Luckily,the above python command returns a flag.

Flag : picoCTF{sma11_N_n0_g0od_23540368}.

Last updated