Challenge Description
This challenge is similar to the previous challenge, basic-mod1, but instead of calculating the modulus of each number, we need to calculate the modular inverse. There is also a slight difference in the character set instructions that we need to consider.
Getting the Flag
Running cat message.txt
after downloading the file with wget
displays a string of numbers:
268 413 438 313 426 337 272 188 392 338 77 332 139 113 92 239 247 120 419 72 295 190 131
We need to calculate the modular inverse of each number and map it to a character in the predefined character set in the description. I used a python script to do this. The modular inverse function was created with the assistance of this page.
Decryption Script
Flag
picoCTF{1NV3R53LY_H4RD_8A05D939}