Really simple RSA style public private key generator I am giving a talk to high school students and would love to do a real life encryption/decryption demonstration. I am not too familiar with the maths but is it possible to create like a 5-10 bit public-private key set, so I can get two teams to encrypt / decrypt  a message that is passed across the room? I need something simple enough to do on paper?
A simple example would be:
$e=3\;$ which is the lowest usable public exponent in RSA, and will simplify encryption
$p=23\;$ a prime such that $\gcd(p-1,e)=1$
$q=41\;$ a prime other than $p$ such that $\gcd(q-1,e)=1\;$ and
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; also such that $e^2\bmod\operatorname{lcm}(p-1,q-1)\ne1$
$n=943=p\cdot q$
$d=147=e^{-1}\bmod\operatorname{lcm}(p-1,q-1)\;$ or $d=587=e^{-1}\bmod((p-1)\cdot(q-1))$.

Encryption of a message with symbols restricted to !"#$%&amp;'()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ and perhaps control characters such as LF, using public key $(n,e)=(943,3)$ is, for each symbol in the message:


convert the symbol to an integer less than 91 by using its ASCII code; for example, A would give $65$.
right-pad a random digit in range [0…9], yielding an integer $m$ less than 910, thus less than $n$; for example A giving $65$ and the random digit $7$ would yield $m=657$.
compute $c=m^3\bmod943=m^e\bmod n$ which can be done with a 9-digits calculator and a single final modular reduction (or by hand; in that case, or using an 8-digits calculator, we want to compute $m_2=m^2\bmod n\;$ then $c=m_2\cdot m\bmod n\;$); for example $m=657$ would yield $c=288$.
output ciphertext block $c$ as 3 decimal digits, with leading zeroe(s) if necessary.


Decryption using private key $(n,d)=(943,147)$ is more tedious, because it involves computing $c^{147}\bmod943=c^d\bmod n$. It can be done by left to right scanning of the binary expression of the exponent $147=10010011_b$, thus computing $c_2=c^2\bmod n\;$, $c_4={c_2}^2\bmod n\;$, $c_8={c_4}^2\bmod n\;$, $c_9=c_8\cdot c\bmod n\;$, $c_{18}={c_9}^2\bmod n\;$, $c_{36}={c_{18}}^2\bmod n\;$, $c_{72}={c_{36}}^2\bmod n\;$, $c_{73}=c_{72}\cdot c\bmod n\;$, $c_{146}={c_{73}}^2\bmod n\;$, $c_{147}=c_{146}\cdot c\bmod n\;=m\;$.

With $c=288\;$, we compute $c_2=903\;$, $c_4=657\;$, $c_8=698\;$, $c_9=165\;$, $c_{18}=821\;$, $c_{36}=739\;$, $c_{72}=124\;$, $c_{73}=821\;$, $c_{146}=739\;$, $c_{147}=657=m\;$; we then discard the rightmost digit giving $65$, and fetch the ASCII table to be back to A.



Notes: 


Random padding is a necessary step in secure RSA encryption; the minimalist scheme used here is enough to hide repeated uses of the same symbol (with odds 9/10 for any pair of uses of the same letter). Many RSA illustrations with artificially small parameters omit random padding, thus are very vulnerable to construction of a dictionary of plaintext letter to ciphertext block, using only the public $(n,e)$.
With the artificially small parameters, and even though we are at the upper-end of the 10-bit limit of the question, there are two major weaknesses:


it is trivial to factor $n$ to yield $p$ and $q$ and compute a working $d$; we'd need to go to at least 320 bits to make this attack even so slightly challenging.
it is also possible to compute the 10 possible encryptions for each symbol (perhaps starting with the most common ones); this attack turns out to be easier than the normal decryption procedure for message of any significant size; larger parameters allow to fix this, see 6.

The condition $e^2\bmod\operatorname{lcm}(p-1,q-1)\ne1$ ensures that the public key can not be used as private key, which is all too common in artificially small RSA examples, and would introduce confusion in the audience if anyone tries it, perhaps by accident. Checking this condition is pointless in real uses of RSA, because it is true with overwhelming odds.
$d\equiv e^{-1}\pmod{\operatorname{lcm}(p-1,q-1)}\;$ is the necessary and sufficient condition for $d$ to be a working private exponent, and tends to ease calculations.
A spreadsheet such as Excel is suitable for such explorations, including with slightly less small parameters; it can easily handle modulus $n$ up to at least 25 bits; =MOD(A1*A2,A3) will compute $A_1\cdot A_2\bmod A_3$ exactly and =MOD(MOD(A1*A1,A3)*A1,A3)will compute ${A_1}^3\bmod A_3$ exactly, assuming $A_1$, $A_2$, $A_3$ are at most 24-bit.
Suitable parameters with 25-bit modulus are $n=28157923=4967\cdot5669\;$, $e=3\;$, $d=360863\;$; that allows encoding $0\le m&lt;2^8$, with 5 decimal digits of random padding instead of 1.