You are on page 1of 4

Miguel Luna

4/20/2018
RSA Encryption
 Private Key Cryptography
Before the RSA encryption, up until 1970, the traditional encryption involved a symmetrical
encryption. This means that the sender encrypts the message using a private key and the receiver
decrypts that message using an identical key. However, establishing a shared key is almost
impossible if the sender and receiver if they cannot meet physically. Hence does not protect
sender from receiver forging a message & claiming is sent by sender. Additionally, if the sender
needs to communicate with multiple people, the sender must exchange distinct keys with
different receivers. Besides all these problem, if the key is disclosed communications are
compromised. So, a new way of encryption was needed to improve the privacy of the
communications from third parties. RSA encryption is a more secure and easier to compute
algorithm for communication, and it does not require a physical meeting to establish the
messages.
 RSA Encryption History
In 1970, James Ellis, a British engineer and mathematician, was working on an idea for non-
secret encryption. The idea is based on splitting a key into two parts: an encryption key and a
decryption key. The decryption key performs the inverse operation which was applied by the
encryption key. However, a mathematical interpretation was needed to make it work in practice.
The solution was found by another British mathematician cryptographer, Clifford Cocks, which
involved a trapdoor one-way function. This a mathematical function that it is easy to compute in
one direction, but difficult in the opposite direction unless the user has a special information, also
known as the private key. This involved based-on exponentiation in a finite (Galois) field over
large integers modulo a prime (modular exponentiation), which will be explained in detail later.
Its biggest improvement in security is due to the cost of prime factoring large numbers, which
will take hundreds of years even with the most powerful and fastest network of computers. This
algorithm was immediately classified after its publication. However, it was independently
rediscovered in 1977 by Ron Rivest, Adi Shamir and Len Adelman, MIT professors, which is
why it is known as RSA encryption. It has been the most widely used public key algorithm in the
world and the most copied software in history. All thanks to the hardness of prime factorization
which is the result about the distribution of prime numbers.
 RSA Encryption Steps
The RSA Encryption can be resumed in three steps:
1. Trapdoor One-way function
2. Function that depends in the factorization of N
3. How to connect phi function to modular exponentiation
Miguel Luna
4/20/2018
 First Step: Trapdoor One-way function
Clifford Cocks came with the idea of using a one-way function. As mentioned before, a one-
way function is mathematical operation which is easy to compute in one direction but difficult in
the opposite direction unless the user has an especial information, also called the trapdoor. For
this, Cocks used the modular exponentiation formula.

This formula is very useful for this purpose. Imagine the sender sends a message which is
converted into a number M, then raised to a power e (not specifically Euler´s number) where e is
a public exponent. Then, the result is divided by number N and outputs the remainder c of the
division.

This calculation is very easy to perform. However, given only C, e and N, it is more difficult
to determine which M was used we would have to resort to some trial and error.

In order to get the initial message M, c is raise to a d exponent divided by the same N number
which outputs the original message M.

We can rearrange both operations and put them together so that M raised to the power of e
times d times the module of N outputs the original message M, where e is the encryption key and
d is the decryption key.

Therefore, we need a way to construct e and d, which makes difficult to find d. For this, we
use a second one-way function involving prime factorization.
Miguel Luna
4/20/2018
 Function that depends in the factorization of N
Two thousand years ago, Euclid showed that every number has only one prime factorization
i.e. decomposing a number into its prime number factors. Prime factorization is very complex
problem because it involves trial an error to find the prime factors of a number N. For a
computer, it is easy to multiply two numbers. So easy, that it takes less of a second to compute
the result. However, as the graph shows, it takes a lot of time to find the correct factorization.
Notice that the time needed increases exponential as the N value increases.

So, Cocks used the prime factorization as his trapdoor information for decrypting the
original message. Now, he needed function that depends on knowing the prime factorization of
N. For this, he used the work done of Swiss mathematician, Leonard Euler, back in 1760. Euler
defined one important function that involved the distribution of prime numbers, which he called
Phi function. This function outputs how many integers are less than or equal to N that do not
share any common factor except 1. The Phi function is usually very hard to calculate except for
prime numbers. Since prime numbers have no factors greater than one and itself the Phi of any
prime number is itself minus one, which means that Phi of a prime number is easy to compute.

Phi function also has the property of being distributive. This means that if N is the
product of two prime numbers P1 and P2, then Phi of N is equal to the multiplication of Phi of
P1 and Phi of P2. Since P1 and P2 are prime numbers, the multiplication of Phi of P1 and Phi of
P2 equal to P1 minus one times P2 minus one.
Miguel Luna
4/20/2018
 How to connect Phi function to modular exponentiation
Euler’s theorem is a relationship Phi function and modular exponential in which m and n do
not share a common factor as seen below. (This is not an equation. It is a relationship)

M raised to the power of Phi N is congruent to 1 times the module of N. If we multiply N for
both sides and after some modular arithmetic, we end up with the following.

This formula is very similar to:

Therefore, the multiplication of e and d is equal to:

Which means that the function for the private key d is, which will responsible for the decryption:

Consequently, d is easy to calculate if the factorization of N is known which means that d is


the sender´s private key. This is the trapdoor which will allow to undo the effect of e. Notice that
even if a third party has N, c and the public key e, they can only calculate d if they can calculate
Phi N which requires the prime factorization of N. If N is large enough, it can take hundreds of
years to find the correct prime factorization. This is where the strength of the RSA encryption
relies on.

You might also like