So the arithmetic is easy to follow, we use small primes
and
and encrypt the single letter ``X'' using the RSA cryptosystem.
- Choose
and
: Let
,
, so
.
- Compute
:
- Randomly choose an
: We choose
.
- Solve
Using the GCD algorithm, we find that
solves
the equation.
The public key is
, so the encryption
function is
and the decryption function is
.
Next, we encrypt the letter ``X''. It is encoded as the number
, since X is the
th letter of the alphabet.
We have
To decrypt, we compute
:
This next example illustrates RSA but with bigger numbers.
Let
Then
and
Using a pseudo-random number generator on a computer, the
author randomly chose the integer
Then
Since
, we can encode then
encrypt single blocks of up to 38 letters. Let's encrypt ``RUN NIKITA'',
which encodes as
. We have
Remark 3.2
In practice one usually choses
to be small, since that
does not seem to reduce the security of RSA, and makes the
key size smaller. For example, in the OpenSSL documentation
(see
http://www.openssl.org/)
about their implementation of RSA it states that
``The exponent is an odd number, typically 3, 17 or 65537.''
William
2007-06-01