Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1.Introduction
In the past, cryptography was based on symmetric keys, where the sender and the receiver share
identical key, the sender encrypts their message using a specific key, and the receiver decrypts
the message by using the same key.
In 1976 a new approach of the public-key cryptosystem was introduced by Diffie and Hellman, it
was the first revolutionary in public-key cryptography history. However, cryptography is a
technique to grantee the security of sensitive information (Nitaj,2016). This information can be
stored or transmitted across the network with the insurance that a third person cannot access to
this private information(George, Bonifus,2013). Cryptography is executed by several encryption/
decryption steps. It secures the transfer of message by using keys, and those keys are divided into
a symmetric and asymmetric key, the symmetric key is the public key. The asymmetric key is
knowing as a private key. Private key uses one key shared by both sender and the intended
receiver, and the Public key has two exponents, the first exponent is used for encryption and the
second for decryption (Kumar, Pradhan, 2011).
Diffie and Hellman have developed the concept of cryptography by using a number of
mathematical theories, they introduced a new method called Diffie-Hellman key agreement, the
idea is based on establishing secret keys by parties who don’t previously share a secret, yet
Diffie-hellman couldn’t identify a method with the public-key encryption/decryption
(Kaliski, n.d)
Since the Diffie and Hellman proposal, several public-key cryptosystems was proposed to realize
a better concept of public-key cryptography. At present, the best known and most extensively
used public-key system is RSA (Sonal, Parshant,Ravi, 2011), it was invented in 1977 by Ronald
Rivest, Adi Shamir and Leonard Adleman. A number of theories were used to invent the
asymmetric cryptosystem, in another aspect private key has a mathematical relationship with the
public key (Rivest, Shamir and Adleman, 1983). “The security of the RSA public key scheme is
based on the intractability of factoring the integer modulus which is the product of two large and
distinct prime numbers that is a difficult computational problem to find” (Aboud, Al-Fayoumi,
2509700
Jabbar,2008) For instance. web traffic, e-mail and bank security system are secured by the rsa
public-key cryptosytem .
This paper proposed an implementation of a detailed and practical RSA encrypt/decrypt solution
based on the study of the RSA public key algorithm.
c=me mode n
1. Modular exponentiation
2. Raise c to the exponent d m=cd moden
3. Which undo the first operation
applied to m and return the original
message m. m=me∗d mode n
4. By combining the first and second
operation, the combination gave us
m to the power of e, to the power of
d.
5. The result is m to the power of e
times d, (e is used for encryption,
while d for encryption)
2.1.1 Result:
Figure 1: less than 50 bits figure 2: less than 100 bits figure 3: more than 100 bits
(cruise, 2015)
2.2.1 Observation
the time necessary to find the answer increases as the numbers increase, multiplication requires
more time to compute than prime factorization when the numbers are small.
Now, compare this to prime factorization, the time needed to perform the calculations increases
rapidly, as the size of the number increase, the computer needs more time (minutes then hours,
years. However, the time needed for multiplication remains constant, less than one second
“Multiplication can be computed in polynomial time, whereas factoring time can grow
exponentially proportional to the size of the number” (Sharma, Sharma, Dhakar,2011).
2.2.2 Result
Multiplication
Given p and q, it’s easy to find the product of n, n = p*q.
Prime factorization
Given integer n, it appears to be quite hard to recover the prime factors p and q.
From the previous observation, Prime factorization is the solution to build the trap door and to
make the transfer operation much more complicated
1. The receiver generates two large prime numbers, p and q
2. Multiplying p and q together, to get the composite number, n
3. The receiver takes the factorization of n and saves it.
However, it is required to find a function which depends on knowing the factorization of N, for
this, Leonhard Euler, a swiss mathematician, has worked on prime numbers, and discovered some
mathematical theories and facts, they are useful in RSA cryptography
2509700
Furthermore, RSA is the most widely used public-key cryptosystem. The conception behind RSA
public-key cryptography is that a public key (n, e) is used to encrypt a message, which is known
as ’plain text’. The encrypted plain text is called’ cypher text’ and can be sent to the designated
person without the need for a secure connection. The cypher text cannot then be decrypted except
if the private key (n, d) is known; this private key is kept secret and known only by the intended
recipient (weaving,2016).
(weaving,2016)
2509700
table 2: gives a small example showing the encryption of some messages, which we will
represent it as numbers m from 0 to 9 as well as decryptions of the resulting ciphertexts
Key Pair Key Pair Generation
Public key (n = 55, e = 3) Two Prime numbers: p = 5, q = 11
Private key (n = 55, d = 7) Modulos : n = p*q = 5*11=55
Encryption exponent : e = 3
decryption exponent: d= 7
Message Encryption c = m3 mod Decryption m = c7 mod n
n
m m3 mod n c7 mod n
0 0 0
1 1 1
2 8 2
3 27 3
4 9 4
5 15 5
6 51 6
7 13 7
8 17 8
9 14 9
3 p = N/q
4 Φ(n) = ((N/q)-1)*(q-1)
5 q2 − (N + 1 − φ(N))q + N = 0……….(2)
Is second a quadratic equation, by solving this equation we can find q and then we will use (1) to
find p
The solution is :
2
N +1−φ ( N)+ √ ( N +1−φ ( N ) ) −4 N ,
q=
2
2
N +1−φ ( N )−√ ( N +1−φ ( N )) −4 N ,
p=
2
(nitaj,2016)
4. Conclusion
This report aims to explore the original version of the RSA cryptosystem. It relies on facts of
mathematics that prove that given a vast number, it is quite challenging in today’s aspect to
conclude two prime numbers whose product is the given number. If the size of the number gets
larger, the possibility for factoring the given number decline, the secret of RSA it in prime
number complexity. However, in the suggested scheme, it is quite challenging to find the
public/privet exponents when the given number is vast, also a method to lunch attacks on the
RSA cryptosystem. Even though RSA was the first asymmetric proposal in cryptography, it
creates new directions in cryptography, it became an indispensable part of modern world
information security, by improving the security of the virtual world.
2509700
References
1 D. George and P. L. Bonifus, "RSA encryption system using an encoded multiplier and
Vedic mathematics," 2013 International Conference on Advanced Computing and
Communication Systems, Coimbatore, 2013, pp. 1-4.
4 Clay S. Turner, ‘Euler’s Totient Function and Public Key Cryptography Clay S’. Nov 7,
2008, available at <http://www.claysturner.com/dsp/totient.pdf>
5 Weaving, T., 2020. Euler’S Theorem And RSA Public Key Cryptography. Available at:
<https://vknight.org/Computing_for_mathematics/Assessment/IndividualCoursework/PastC
ourseWorks/2015-2016/weaving2015-2016.pdf>
7 R.L. Rivest, A. Shamir, and L. Adleman, A method for obtaining digital signatures and
public-key cryptosystems, Commun. ACM, Feb. 1978,21(2): 120-126.
10 cruise, b., 2015. Time Complexity (Exploration). [online] Khan Academy. Available at:
<https://www.khanacademy.org/computer-programming/time-complexity-
exploration/1466763719> [Accessed 20 March 2020].