 and
and  and encrypt the single letter ``X'' using the RSA cryptosystem.
 and encrypt the single letter ``X'' using the RSA cryptosystem.
 and
 and  : Let
: Let  ,
,  , so
, so 
 .
.
 :
:
|  |  | |
|  | 
 : We choose
: We choose  .
.
 
Using the GCD algorithm, we find that
 solves 
the equation.
 solves 
the equation.
The public key is  , so the encryption
function 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
, since X is the  th letter of the alphabet.
We have
th letter of the alphabet.
We have
 
To decrypt, we compute  :
:
 
This next example illustrates RSA but with bigger numbers. Let
 
Then
 
and
|  |  | |
|  | 
 
Then
 
Since 
 , we can encode then
encrypt single blocks of up to 38 letters.  Let's encrypt ``RUN NIKITA'',
which encodes as
, we can encode then
encrypt single blocks of up to 38 letters.  Let's encrypt ``RUN NIKITA'',
which encodes as 
 .  We have
.  We have
|  |  | |
|  | 
 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.''
 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