PicoCTF - ComputeRSA

RSA encryption/decryption is based on a formula that anyone can find and use, as long as they know the values to plug in. Given the encrypted number 150815, d = 1941, and N = 435979, what is the decrypted number?

In order to decrypt the message we have to take a look at this equation, as shown in Wikipedia entry.

m = c^d % n

So it's just a matter of computing this m number, as everything is provided in the challenge.

[email protected] ~> python
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> c = 150815
>>> d = 1941
>>> n = 435979
>>> pow(c, d, n)

Easy and fun, right?

Keep learning and stay safe! ~ W3ndige