Implementation and Analysis of Various Public Key Algorithms
Implementation and Analysis of Various Public Key Algorithms
net/publication/341735789
CITATIONS READS
0 125
3 authors:
Sowmiya Balasubramanian
SRM Institute of Science and Technology
14 PUBLICATIONS 3 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
IMPLEMENTATION AND ANALYSIS OF VARIOUS PUBLIC KEY CRYPTOGRAPHIC ALGORITHMS View project
All content following this page was uploaded by Fancy Chelladurai on 16 July 2020.
Abstract
Public key cryptography plays a major role in the security field. It makes use
of two keys, public key, a private key, and a few operations are performed with the
keys to determine the cipher value and then to recover the original value
respectively. Popular public key cryptographic algorithms include RSA (Rivest-
Shamir-Adleman) and ECC(Elliptic curve cryptography). Elliptic Curve
Cryptography has recently gained a lot of interest and attention in security
industry. Hence it is proposed to implement the concept of ECC, which is compared
with a modified version of RSA algorithm to find out which one is better promise
for a faster and a more secured method of encryption and decryption. Since to meet
the security requirements, the power of processor is also a notable issue.
1. Introduction
Public-key cryptography [1] includes the usage of two keys which are termed
as private and public. Public key is exposed to everyone. It is useful for encrypting
messages, and verifying signatures. On the other hand, the private key is chosen
by the recipient themselves, which is not shared. It is useful for decrypting
messages, and creating signatures. The concept can also be called as asymmetric
key cryptography because those who encrypt messages or verify signatures cannot
decrypt messages or create signatures. Public key schemes can be used for
maintaining secrecy or authentication, or both. Public key applications can be
classified under three categories: i)Providing Secrecy through encryption and
decryption, ii) Achieving authentication with the help of digital signatures, iii)
Exchange of session keys.
2021
International Journal of Pure and Applied Mathematics Special Issue
Nomenclatures
d Decryption key
e Encryption key
G Base point
p Field value
PR Private key
PU Public key
Abbreviations
2022
International Journal of Pure and Applied Mathematics Special Issue
RSA Rivest-Shamir-Adleman
The following Figs.1 shows the overview of Public key cryptographic algorithm.
2. Literature Review
2.1.RSA Algorithm
The author Xin Zhou[1], implemented the RSA public key algorithm. He coded the
algorithm using .NET platform and C++ class libraries. They stated the
mathematical complexities of the classical RSA algorithm and explained how it is
important in security of various domains.
The author Yunfei Li[2], focussed on improving the computational speed of RSA
decryption. He reduced the modules and private exponents by the modular
exponentiation. He utilized a new variant that includes both Multiprime RSA and
RSA-S2 system. The variant can also be easily implemented in parallel. Thus it got
higher processing speed.
2023
International Journal of Pure and Applied Mathematics Special Issue
The author Thangavel[3] focussed on enhancing the classical RSA algorithm. The
proposed algorithm used included two more prime numbers in the conventional
RSA algorithm, so that the complexity of the existing algorithm is increased.
Hence, the algorithm is stronger to break. The public value n is calculated by
multiplying two of the selected prime numbers, but the key value (N) for
Encryption and Decryption are calculated by multiplying all the selected four
prime numbers. Hence, only with the knowledge of n, it is not possible to find the
keys used for Encryption and Decryption. Thus the system becomes more secure.
The author Dolendro Singh[6] explains clearly about the implementation of Elliptic
Curve Cryptography algorithm. The conversion of plain text to elliptic curve
coordinates is also explained with example. Initially, the corresponding ASCII
values for the plain text alphabets is identified. Then they are partitioned into
groups according to a given group size. It is converted into big integer values with
base 65536. The single pair is sent as input to the encryption algorithm and the
corresponding cipher is achieved.
In the paper[7], the plain text characters are mapped to coordinate points by the
non-singular matrix method. They processed the coordinate points using the
ElGamal scheme and the cipher values are obtained. When the receiver gets the
cipher value, a product of that value with the inverse of non-singular matrix is
2024
International Journal of Pure and Applied Mathematics Special Issue
calculated. Then the ElGamal decryption technique is used to retrieve the plain
text. The modified ECC algorithm improved security and message confidentiality.
The author V Gayoso Martinez[10] clearly explained about the java implementation
issues for elliptic curve cryptography. He concluded that the cryptographic
capabilities are installed in J2SE, J2EE platforms as well as in Java cards. He
added that it is also needed in Java cards to include some more methods for
performing ECDSA and ECDH operations. High quality java implementations are
provided by Bouncy Castle, IAIK and can be used as open source in non-
commercial applications.
The author Reza Azarderakhsh[11] introduced a new technique for point addition of
ECC. It makes use of affine coordinates that works efficiently by utilizing less
number of registers. He proposed exceptionally tiny processor framework for the
working of point multiplication operation. He named it as crypto-processor. It is
then evaluated on three parameters. The parameters are area, performance and
power consumption. Based on the results it is confirmed, the proposed work is
more suitable for tremendously- controlled and protected location.
3. Implementation
All the three algorithms namely RSA, modified RSA and Elliptic curve
cryptography are implemented in C++ programming language. The
experimentation is performed in various systems whose basic configurations are
given in the below table:
2025
International Journal of Pure and Applied Mathematics Special Issue
Key Generation:
Key Generation:
• Two large primes(p,q) and two more random numbers(x,y) are selected.
• Obtain z1 and z2 by computing
𝑧1 = 𝑥 ∗ 𝑦 ∗ 𝑎 ∗ 𝑏 (4)
2026
International Journal of Pure and Applied Mathematics Special Issue
𝑧2 = 𝑥 ∗ 𝑦 (5)
• Compute
∅(𝑧) = (𝑥 − 1) ∗ (𝑦 − 1) ∗ (𝑎 − 1) ∗ (𝑏 − 1) (6)
• Select the public encryption key by the condition, 1<e<ø(z) and gcd(e,ø(z))=1
• Key to perform decryption (d) is calculated by, e.d=1 mod ø(z) and 0≤d≤n
• The public key is shared: PU={e,z1}
• The private key is kept undisclosed: PR={d,z2}
Encryption:
• Receiver uses their private key PR={d,n} and retrieves the plain text by
computing:
𝑀 = 𝐶 𝑑 𝑚𝑜𝑑 𝑧2 (8)
The elliptic curves cryptography basically revolves around elliptic curves which are
defined over a finite fields. The Weierstrass equation of an elliptic curve is given
by,
The following are the sample sites which uses the ECC :
2027
International Journal of Pure and Applied Mathematics Special Issue
One of the most popular elliptic curve in use today and also provided by recognized
standard bodies is X25519:Eg: whatsapp
In 1999, NIST recommended the following elliptic curves. Particularly, FIPS 186-3
has 10 suggested finite fields:
There are two fields possible.i)Prime field and ii)Binary field.
• Prime fields is available for certain varying sizes 192, 224, 256, 384, and
521[14] bits. An elliptic curve is possible for every Prime field.
• Binary fields for 163, 233, 283, 409, and 571. An elliptic curve and a koblitz
curve can be selected for
Thus NIST[15] recommends a total of 5 prime curves and 10 binary curves. The
curves were believed to provide best possible defense and performance
competence.
Encryption:
𝑃𝐴 = 𝑛𝐴 ∗ 𝐺 , 𝑃𝐵 = 𝑛𝐵 ∗ 𝐺 (10)
• compute shared key:
𝐾 = 𝑛𝐴 ∗ 𝑃𝐵 , 𝐾 = 𝑛𝐵 ∗ 𝑃𝐴 (11)
(12)
• Encryption of Plain Text Pm is done by the following formula:
𝐶𝑚 = {𝑘 ∗ 𝐺, 𝑃𝑚 + (𝑘 ∗ 𝑃𝑏 )}, 𝑘 𝑟𝑎𝑛𝑑𝑜𝑚 (13)
4. Results
The working of the three algorithms are analyzed based on the execution time
obtained on machines with different hardware specifications namely fourth
generation Intel i7, i5 and i3 processors. The results of the implementation are
explained below.
2028
International Journal of Pure and Applied Mathematics Special Issue
The meaning of Cipher Consider, the attacker tries to break the data knowing the
cipher text and the encryption algorithm been used. If the encryption is done by
elliptic curve cryptography, it is confirmed by research that attacker cannot reveal
the plain text easily.
Consider, the cryptanalyst knows the cipher text, few plaintext and its
corresponding cipher text, and the algorithm used along with the secret key. Since
the private value k is a randomly generated number in ECC implementation, the
plaintext cannot be found out.
– It is impossible to find the correct key by trial and error method even
if the size is known.
– Knowing the properties of RSA, the hackers attack the cipher value.
The time taken to execute the RSA, modified RSA and ECC algorithm is
experimented at various machines and the following comparison graphs are
obtained.
2029
International Journal of Pure and Applied Mathematics Special Issue
0
1 2 3
Processor Type
Fig 3: Time complexity of various algorithms (1,2,3 refers to i3, i5, i7 processors
respectively)
6. References
[1] Xin Zhou and Xiaofei Tang, Research and Implementation of RSA Algorithm for
Encryption and Decryption, IEEE, 2011.
[2] Yunfei Li; Qing Liu and Tong Li, Design and Implementation of an Improved
RSA Algorithm, , IEEE, 2010.
2030
International Journal of Pure and Applied Mathematics Special Issue
[5] Balram Swamia; Ravindar Singh and Sanjay Choudhary, Dual Modulus RSA
based on Jordan-Totient function, Elsevier, 2015.
[7] Balamurugan.R etal, Enhancing Security in Text Messages Using Matrix based
Mapping and ElGamal Method in Elliptic Curve Cryptography, IEEE, 2014.
[8] Moncef Amara and Amar Siad, Elliptic Curve Cryptography And Its
Applications, IEEE, 2011.
[12] Dhananjay Pugila; Harsh Chitrala; Salpesh Lunawat and P.M.Durai Raj
Vincent, An Efficient Encrpytion Algorithm Based On Public Key Cryptography,
International Journal of Engineering and Technology (IJET), 2013.
2031
2032