## Intro to RSA

Learn the basics of a common public key cryptosystem

### Introduction

RSA is perhaps the most well known public public key cryptosystem out there. A lot of the problems on this site deal with RSA so if you aren't familiar with RSA consider this a short primer on the system. The basic idea behind public key cryptography is that there are two keys, a public key and a private key. The public key is used for encrypting and verifying messages and can be distributed to anyone whereas the private key is used for decrypting and signing messages and should be kept secret by the party that generated the keys. For the purposes of this problem we'll only concern ourselves with encryption and decryption.### RSA Basics

RSA is composed of three algorithms, namely $Key$ $Generation$ $(Gen)$, $Encryption$ $(Enc)$ and $Decryption$ $(Dec)$. In RSA the public key is a pair of integers $(e, N)$ and the private key is an integer $d$. The three algorithms are described below:#### $Gen$

#### $Enc$

#### $Dec$

If you're interested you can refer to this page for the proof of correctness that $Dec(Enc(m)) = m$.

### Concrete Example

### Some Details

Note that we can only encrypt integers smaller than $N$ with RSA as decryption will always yield a term less than $N$. Also note that if we wish to encrypt strings or other data types we must first convert them to integer form (e.g. by interpreting the datas binary representation as an integer). As long as after decryption we convert back from integer to the data type we originally had this is no problem. The security of the scheme comes from the difficulty of recovering $m$ given $c$ and $(e, N)$. We can try to compute the $e$th root modulo $N$ of $c$ to recover $m$, which is actually known as the RSA Problem and is conjectured (but not proven) to be computationally intractable. Another approach would be to compute $d$ from $(e, N)$ and then perform a decryption operation. This reduces to factoring $N$ into $p$ and $q$ which is again conjectured to be computationally intractable (for sufficient size $N$).### The Problem

Given the following public key, private key, and encrypted message ($c = m^e \text{ mod } N$), compute the original message ($m$). Submit your answer as a hex integer (no lead 0x, all lower case characters).(e, N) = (0x3, 0x64ac4671cb4401e906cd273a2ecbc679f55b879f0ecb25eefcb377ac724ee3b1) d = 0x431d844bdcd801460488c4d17487d9a5ccc95698301d6ab2e218e4b575d52ea3 c = 0x599f55a1b0520a19233c169b8c339f10695f9e61c92bd8fd3c17c8bba0d5677e