A Modified and Secured RSA Public Key Cryptosystem Based on “ n ” Prime Numbers

Cryptography is the study that provides security service. It concerns with confidentiality, integrity, and authentication. Public key cryptography provides an enormous revolution in the field of the cryptosystem. It uses two different keys where keys are related in such a way that, the public key can use to encrypt the message and private key can be used to decrypt the message. This paper proposed an enhanced and modified approach of RSA cryptosystem based on “n” distinct prime number. This existence of “n” prime number increases the difficulty of the factoring of the variable “N” which increases the complexity of the algorithm. In this approach, two different public key and private key generated from the large factor of the variable “N” and perform a double encryption-decryption operation which affords more security. Experiment on a set of a random number provided that the key generation time, analysis of variable “N”, encryption and decryption will take a long time compared to traditional RSA. Thus, this approach is more efficient, highly secured and not easily breakable.


Introduction
Security refers to the process of keeping information confidential by protecting it from unauthorized users.According to security goal, confidentiality means to keep a data secured.It must be hidden from unauthorized access.Integrity proposes prevention of modifications.Availability means data being available to communication and prevents the public from reading private messages.The cryptographic system is usually characterized by three main dimensions.They are, the operations involved in the transformation of plain text to cipher text, the number of secret keys used and the method of processing the plaintext [2].
Based on that property, cryptography is classified into two broad classifications.
One of them is symmetric key and another is asymmetric key.Symmetric key cryptosystem uses the same key for encrypting and decrypting a message.
Asymmetric key cryptosystem uses two different keys, the Public key for encrypting the message and private key for decrypting the message.
The Public key cryptosystem is based on two related keys, one is a public key and another is a private key.The sender generates a public key and encrypts the message.Sender shares one key which is called a private key and receiver decrypts the message using that key.The encrypted message cannot be decrypted by unwanted people, who know the public key only.In public key cryptography, the private key is always link with mathematically to the public key.It is always possible to attack public key system to generate a private key.This attack can be opposed by creating problem to generate a private key from the public key.Some public key algorithms designed such that deriving the private key from public key need to factorize large number by the attacker.RSA is known for such type of algorithm [3].It takes two large prime number "p" and "q" and multiplies them to get a big number "N".The idea behind RSA is some mathematical operation easier to do but the inverse is very difficult without any additional information.This research presents a new modification of RSA algorithm which is Modified RSA (MRSA) based on "n" distinct prime numbers with double encryption and decryption process.The weakness of RSA algorithm is the use of two prime numbers, small encryption exponent and use the same key for encryption and signing.This schema is based on "n" distinct prime numbers instead of two prime numbers which give an opportunity to select a big encryption exponent from large product "N" to enhance the security.Numerous prime numbers and big encryption exponent increase the factoring time comparing to RSA algorithm.The double encryption and decryption process make the algorithm stronger than RSA.
The rest of the paper is structured as follow.In Section 2, the proposed scheme represents some related work.In Section 3, there is a discussion about research methodology.The RSA algorithm and proposed model for RSA modification is described in Section 4 and 5. Section 6 represents implementation and result.Conclusion and future work are discussed in Section 7.

Related Works
This section involves the work done by various researchers in the field of RSA Journal of Computer and Communications cryptosystem.The discussion is based on the Modification of RSA algorithm through the recent past.M. Thangavel et al. [4] proposed a modified RSA key generation algorithm which uses four primes instead of two primes and thereby increasing the time needed to find these primes.While increasing the security, the key generation time of the proposed algorithm is higher than original RSA.
According to [5], encryption and decryption are not only dependent on "N" but also other new factors computed.The encryption and decryption technique is very complex and several factors are introduced without clearly justified.H. M. Sun et al. [6] came up with an algorithm which is known as dual RSA having two aspects from RSA with decreasing the needs of the storage for keys.It has two applications, first one is known as blind signature and other is known as security.
Segar's [7] introduced a new idea to determine the private key without using the factoring approach using Pell's equation.Pell's RSA increases the strength that taking the private key "d" above the Wiener's possible range [8].
A Modified RSA introduced in the paper [9] that usage of three prime numbers instead of two prime numbers.The encryption and decryption process is the same as original RSA algorithm.Paper [10] ensures higher security by reducing modulus and private exponent in modular exponentiation.The performance of the decryption and signature generation are improved by this approach.A modification in encryption and decryption which involves magic rectangle and randomness of ciphertext which is calculated from the plain text was proposed in paper [11].The main drawback of this approach is the need of additional time for constructing a magic rectangle.Chhabra and et al. [12] introduced an approach that eliminated the requirement of transferring "N" making it difficult for hackers to derive at the prime numbers used.Though the system can be cracked with the value of "k p " and "d" unknown.Security is ensured by using dual modulus based double encryption and decryption with the use of Jordan function in the paper [13].A new concept of adding a third prime number in the paper [14] increases the divisible time of modulo "N".The speed of encryption and decryption is increased compared to traditional RSA.Kong et al. [15] came up with an attack on the Encinas-Masqu'e-Dios algorithm.This algorithm uses two prime number "s", "t" and "N" represents the multiplication of these two prime numbers.The algorithm is insecure when the "public key" e satisfies the conditions e > s + t and e > N 1/4 .Rui's paper [16] developed a method which surpasses the original RSA algorithm in term of encryption and decryption speed.This algorithm is known as k-RSA algorithm combined k th power residue theory and RSA algorithm.This research focuses on to modify RSA algorithm and enhance the security.
The schema is based on "n" prime numbers instead of two prime numbers with double encryption and decryption process.Multiple prime numbers increase the factoring time to get the private key.The encryption and decryption process is considered a pair of a random number and their modular multiplicative inverse to increase the security of RSA to a great extent.

Research Methodology
A modify RSA algorithm is proposed using "n" distinct prime numbers.A pair of a random number and their modular multiplicative inverse is used to increase the security of the RSA algorithm.Key generation, encryption and decryption time of Modified RSA (MRSA) algorithm to break the system is significantly higher.An observation has been performed using JAVA programming language.Modified RSA (MRSA) is implemented using JAVA Big Integer library functions for simulation purpose [17].It is possible for the user to enter a prime number or set the bit length of prime numbers to generate automatically using the secure random function.Big Integer library provides various functions such as modular arithmetic, GCD calculation, primality testing, prime generation, bit manipulation and some other operations.Various bit length prime numbers are generated by using the prime generator function of Java Big Integer library to calculate key generation, encryption and decryption time.The Modified RSA (MRSA) model performs a comparison for key generation, encryption and decryption time between RSA and Modified RSA (MRSA) based on these calculated times for specific bit length.

RSA Cryptosystem
RSA is a public key algorithm based on the assumption that some mathematical operation easier to do in one direction but the inverse is very difficult.The idea behind RSA is that it is easier to multiply but difficult to factor the large number.( )

Proposed Model
The proposed Modified RSA (MRSA) scheme focuses on mitigating the major issues of RSA system.Most cases the major issue is, it is breakable because of easily computation of keys based on "N".Since it is the only product of two prime numbers, "N" can be easily traceable [18].Once the value of "N" is obtained, a hacker can find the keys and break the system.The major modifications which make the system efficient and secure are discussed in the below section.

MRSA KEY GENERATION
The proposed model involves "n" distinct prime numbers.In this paper, all calculation and performance analysis is performed using four large prime numbers.The public and private key exponent consists of three components."N" is the product of four prime numbers "w", "x", "y", and "z".The public key exponent consists of three components (e, f, N) where "e" and "f" are randomly taken.
It further adds more complexity along with the factoring of "N".Since only the value of "N" is kept as a public and private component, an attacker with the knowledge of "N" cannot determine the value of four prime numbers which are the basis for finding the value of "N" and subsequently "e" and "f".The private key exponent consists of three components (d, g, N).For security purpose, the bit length of all four-chosen prime is of the same length as in case of traditional RSA.The algorithm is presented below.) ( ) ( ) ( ) Find a random variable e, satisfying ( ) Find another random variable f, satisfying ( ) Compute a random number d, such that ( ) Compute another random number g, such that ( )

MRSA ENCRYPTION AND DECRYPTION
The encryption is done with the help of public key exponent and the decryption is done with the help of private key exponent.The encryption and decryption are not only related to "N" which consists of four large prime numbers making it difficult to factor but also four random components "e", "f", "d", "g" are involved to make it even more difficult to break the system.

Implementation and Result
The algorithm is implemented in JAVA 8 running on an Intel (R) Core (TM) i5-3230M CPU @ 2.60 GHz machine and 4.00 GB RAM.The algorithm (RSA and MRSA) have different important parameter affecting its level of security and speed.Increasing the modulus length invoke complexity of decomposing it into factor.Thus, also increase the length of the private key and hence difficult to detect the key.The RSA and Modified RSA (MRSA) parameter changes depend on time and others remain fixed to study the relative emphasis.

Performance Analysis
The proposed Modified RSA (MRSA) algorithm is examined on varying bit sizes of input.
Performance of original RSA algorithm by Rivest, Shamir, and Adleman [3] are depicted in Table 1.Also the performance of Modified RSA (MRSA) scheme in terms of key generation, encryption time and decryption is shown in Table 2.
Comparing the above tables, it can be concluded that the time of key generation of Modified RSA (MRSA) is higher than that of RSA.The higher key generation time of Modified RSA (MRSA) can be seen as an advantage by the fact that the time to break the system is high because of the extra complexity added.But with the increase of bit length, the difference between curves rises rapidly.From the above graphs, it can be easily seen that encryption and decryption times are higher than RSA.The increase in time is adaptable because it increases the security to a great extent in the proposed Modified RSA (MRSA) method.

Complexity Analysis
Comparison between complexity analysis of RSA algorithm and Modified RSA (MRSA) algorithm is discussing in below.
Multiplication can be computed in polynomial time whereas factoring time can grow exponentially proportional to the size of the number.key exponent: {e, N} Private Key exponent: {d, N} Procedure:

Find
done with the help of public key exponent and the decryption is done with the help of private key exponent.
w, x, y, and z Output: Public key exponent: {e, f, N} Private Key exponent: {d, g, N} Procedure:

Figure 1 .
Figure 1 present flow chart representation of Modified RSA (MRSA) algorithm.Four distinct prime number is taken as input to calculate N and Φ(N).A Pair of the random number (e, f) is selected from the range 1 < e < Φ(N) as the public key exponent.The modular multiplicative inverse of those random numbers (d, g) is calculated to use as the private key exponent.Encryption and decryption is done by using those private key and public key exponents.Let us discuss an example problem using the proposed Modified RSA (MRSA) algorithm.MRSA example • Take four distinct prime numbers 53, 41, 43, 47 w x y z = = = = .

Figure 2
Figure 2 depicts the encryption time comparison between RSA and proposed Modified RSA (MRSA) scheme.It illustrates that, for the lower bit length of prime numbers, two algorithms consume the almost identical amount of time.

Figure 3
Figure 3 shows the decryption time comparison between RSA and proposed Modified RSA (MRSA) scheme.It demonstrates the almost identical amount of time consumed by RSA and Modified RSA (MRSA) for the lower bit length of prime numbers.With the increase of bit length, the difference between curves elevates rapidly.For example, input primes of bit length 4096, decryption time in Modified RSA (MRSA) is 19,983.37ms and original RSA takes 1116.24ms

Table 1 .
Performance of RSA.