I think I understand correctly how to encrypt something with an RSA cipher, but I am a little lost on how to find the decryption key...(also I apologize for the formatting errors)
- An RSA cipher is set up with modulus $n=210757$ and encryption key $a=3$. The plaintext is "$54321$". Encrypt it.
$$E_{N,e}(x)=x^e\pmod N$$ $$E_{210757,3}(54321)=54321^3\pmod{210757}$$ $$E_{210757,3}(54321)=(54321^2*54321)\pmod{210757}$$ $$E_{210757,3}(54321)=(54321^2*54321)\pmod{210757}$$ $$E_{210757,3}(54321)=(2950771041*54321)\pmod{210757}$$ $$E_{210757,3}(54321)=(173041*54321)\pmod{210757}$$ $$E_{210757,3}(54321)=9399760161\pmod{210757}$$ $$E_{210757,3}(54321)=208718\pmod{210757}$$
- An RSA cipher is set up with modulus $n=14659$ and encryption key $a=3$. Find the decryption key.
$$E_{N,e}(x)=x^e\pmod N$$ $$E_{14659,3}(x)=x^3\pmod{14659}$$
$$D_{N,d}(y)=y^d\pmod N$$ $$D_{14659,d}(y)=y^d\pmod{14659}$$
We have the following for 5)$$n=14659, a=3$$
Here we can find the prime factorisation for $n$, e.g. $n=107 * 137$
Take one from both of these prime factors, and multiply.$$(107-1)(137-1)=14416$$ We will now use this number as the modulo for $a^{-1}$, this will give us our required $b$ for decryption $\text{e}^b\pmod{n}$
$$b= a^{-1} \pmod {14416}$$$$3^{-1}\pmod {14416}=9611$$
Now we can take the cipher text and take it to the power of $9611\pmod{14659}$
Example: We want to decrypt the cipher 33.
Since we know $b$, this simply requires us to compute $33^{9611} \pmod {14659}=11282 \pmod{14659}$