No Padding, No Problem
Oracles can be your best friend, they will decrypt anything, except the flag's ciphertext. How will you break it? Connect with nc mercury.picoctf.net 10333
Note that the ciphertext is decrypted as follows:
Last updated
Oracles can be your best friend, they will decrypt anything, except the flag's ciphertext. How will you break it? Connect with nc mercury.picoctf.net 10333
Note that the ciphertext is decrypted as follows:
Last updated
Upon connecting, we get the values of and as well as the encrypted ciphertext that represents the flag. We then have a decryption oracle, which can decrypt anything except for the flag.
If we ask to decrypt instead, we get
Note the last congruence is because is odd, so .
This means that if we pass in the negative of , we can get the negative of the decryption!
There are other ways to do it too - you could calculate and multiply by that, which would yield you after decryption, and you'd just need to halve it, as described in this writeup.