# Using an integer ring with RSA

I'm new to RSA and instead of using RSA to encrypt a symmetric encryption key to encrypt data with (although it might help to understand) I would like to use an integer ring with RSA.

My question is what are the minimum/maximum values of $$P$$ before being turned into $$E$$ cannot be recovered, and how can I encrypt with a ring, i.e $$1 \leq P \leq 26$$ and $$1 \leq E \leq 26$$

• The aim is to see if Cicada 3301 used RSA alone to encrypt their liber primus. I doubt it will add anything to it's security, maybe it would take away from it's security, I do not know. – mr c r Oct 1 '19 at 11:45
• Thankyou for your explaination @fgrieu, I feel that from what you said, it is totally ilogical to try what I am speaking of and is wrong. – mr c r Oct 1 '19 at 11:47
• I would still like to know how it's done even if it's wrong. – mr c r Oct 1 '19 at 11:49
• cicada 3301 LP is meant to be broken. That is why I am asking for a breakable method. – mr c r Oct 1 '19 at 11:56

It seems to be asked textbook RSA with plaintext and ciphertext in the set $$\{1,2,\dots,25,26\}$$. That's wholy unreasonable, for in RSA the public key gives the mapping of plaintext to ciphertext, and with such small set it is trivially inverted. Let's see how it can be done nevertheless.
Textbook RSA operates on the set $$\{0,1,\dots,N-1\}$$ with $$N$$ the product of distinct primes. In order to use the desired set, I propose to use $$N=26=2\times13$$, and assimilate $$0$$ with $$26$$. We can now use textbook RSA, where encryption goes $$C=P^e\bmod N$$ ($$P$$ is the plaintext, $$C$$ is the ciphertext that the question calls $$E$$, and $$e$$ is the public exponent).
$$\lambda(N)=\operatorname{lcm}(1,12)=12$$, the public key $$e$$ must be coprime to that, and $$e\times d$$ must be one above a multiple of $$\lambda(N)$$, therefore we must have $$e$$ one of $$1$$, $$5$$, $$7$$ or $$11$$, with $$d=e$$ (within some multiple of $$12$$). $$d=e$$ means encryption and decryption are the same operation. Beside, ciphertext and plaintext are identical for $$e=1$$.
For example, with $$e=5$$, the plaintext $$P=2$$ is enciphered into $$C=P^e\bmod N$$, that is $$C=2^5\bmod26$$, that is $$C=6$$. And $$C=6$$ is deciphered into $$P=C^d\bmod N$$, that is $$P=6^5\bmod26$$, that is $$P=2$$.
We end up with a dumb mono-alphabetic substitution cipher with only four possible keys, one of which leaving plaintext unchanged, all with three fixed points $$1$$, $$25$$, $$26$$, and such that encryption and decryption are the same.