The text is converted to a number by the following scheme:
a=01
b=02
c=03
d=04
e=05
f=06
g=07
h=08
i=09
j=10
k=11
l=12
m=13
n=14
o=15
p=16
q=17
r=18
s=19
t=20
u=21
v=22
w=23
x=24
y=25
z=26
Spaces are coded as 00 and all other characters as 99
Call the resulting number m
Then we choose two (very large) secret prime numbers p and q.
We compute their product n and make it public. In this case, n = 10683081960076689824380157655404250581208130674684407161717552784958286015376134725322317285000880803846917
Now we compute a = (p - 1)(q - 1) and pick
another secret number d and find a number e so that
ed has remainder 1 when we divide by a. In this case, e = 1538881947187475630269118728499309243962984730698421993222988433439753687771998523413212597312430011890963
Finally, to encrypt the message, we compute the remainder obtained
from multiplying m to itself e times and then dividing
by n. This is the number given as the encrypted message.
This method is very secure. The security is based on the
difficulty of factoring very large numbers. Can you factor n?
In practice, the numbers used are much much larger!
This method is used to tell people how to encrypt messages that they send
you that only you know how to decrypt. To get the original message back, we take
the encrypted message, multiply it by itself d times (remember, we
kept d a secret), and then look
at the remainder we get from dividing this number by n. The
resulting number turns out to be the original m, which you can
translate back into letters using the same scheme. Generally, only
e and n are public. For those who are curious, in this
case, d = 7056410014866816666030739739