Proposed Hybrid Cryptosystems Based on Modifications of Playfair Cipher and RSA Cryptosystem

: Cipher security is becoming an important step when transmitting important information through networks. The algorithms of cryptography play major roles in providing security and avoiding hacker attacks. In this work two hybrid cryptosystems have been proposed, that combine a modification of the symmetric cryptosystem Playfair cipher called the modified Playfair cipher and two modifications of the asymmetric cryptosystem RSA called the square of RSA technique and the square RSA with Chinese remainder theorem technique. The proposed hybrid cryptosystems have two layers of encryption and decryption. In the first layer the plaintext is encrypted using modified Playfair to get the cipher text, this cipher text will be encrypted using squared RSA to get the final cipher text. This algorithm achieved higher security to data but suffers from a long computational time. So Chinese remainder theorem has been used in the second hybrid cryptosystem to obtain less encryption and decryption time. The simulation results indicated that using the modified Playfair with the proposed square RSA has improved security. Moreover, using the Chinese remainder theorem achieved less encryption and decryption time in comparison to our first proposed and the standard algorithms.


Introduction:
Cryptography techniques are used to secure information from unauthorized personal intruders 1 . There are various cryptography algorithms to encrypt information. These algorithms can be classified into three types which are symmetric, asymmetric and hybrid cryptosystems. In the symmetric cryptosystem, the sender and receiver should have a specified secure channel to exchange the secret key and the initiation of this channel may cause problem. However, the advantage of using the symmetric algorithm is simplicity and hence less time consumption. Playfair cipher is one of the simplest symmetric cryptosystem. Playfair encryption from the ease of access can be revealed by cryptanalysis. Hence, the ease of utilize of this symmetric cipher has led many researchers to enhance and modify it, then use it in a hybrid cryptosystem to offer higher security and lower complexity.
The second type is an asymmetric cryptosystem which uses two different keys, public and private keys. The public key for encryption be publicly known and the private key is known only to the receiver to decrypt the message. RSA is one of the asymmetric algorithm. It consists of three steps, the first step is the generation of keys (public and private) that is used to encrypt and decrypt data, the second step is encryption, performs actual process of transformation of the encryption into ciphertext, and the third step is decryption, where decrypted ciphertext is translated into plaintext at the receiver 1, 2 . The idea of RSA cryptosystem that it is easy to multiply two large prime numbers and it is extremely difficult to factorize their product. 3 .
RSA algorithm based on a mathematical formula is a powerful algorithm because this algorithm is not easy to attack, but it takes longer time to process than a symmetric algorithm 4,5 .
The third type is a hybrid cryptosystem that combines symmetric and asymmetric to provide high security and more complexity against hackers 6 .
There are lots of hybrid cryptography methods that combine the Playfair cipher with the RSA cryptosystem technique [7][8][9] . Most of them used modified Playfair and the RSA cryptosystem without modification. In this work, the modified Playfair cipher and two modifications of the RSA will be made to increase the level of security and reduce the time required for encryption and decryption.
This research proposed two new cryptosystems, one of them called the hybrid cryptosystem using the Playfair cipher with the RSA square (HRSASQ). The second is a hybrid cryptosystem using the Playfair with the RSA square and Chinese remainder theorem (HRSASQ-CRT). These systems used two layers of encryption: First, encrypt with the Playfair cipher which used the modified Playfair matrix 7×13 to obtain the first ciphertext. Second, it used RSASQ or RSASQ-CRT to obtain the final ciphertext. The hybrid cryptosystem Playfair with RSASQ provides high security and more complexity against hackers to find the private keys since it does not use the public key directly. However, this technique suffers from computational complexity due to RSASQ. To overcomes, this problem proposed the use of CRT 10 in the second hybrid cryptosystem.
The remainder of this paper is organized as follows. Section 3 provides related work, Section 4 shows the proposed hybrid cryptosystem including modified Playfair with RSASQ and modified Playfair with RSASQ-CRT, while Section 5 discusses the simulation results and Section 6 demonstrates the conclusion and future works.

Related Work
Playfair was introduced by Charles Wheatstone in 1854 11 . Playfair cipher is the most widely used of all symmetric multialphabetic cipher techniques, in which a pair of characters is utilized instead of a single character 12 . Playfair cryptosystem uses a matrix of 5×5 characters. The 26 alphabetic letters are distributed to 25 cells, hence the J and I characters are shared with the same cell. To use Playfair encryption must arrange the keyword in the matrix from left to right sides and from top to bottom without duplicate 13, 14 . Reviser, Shamir, and Ad leman described an asymmetric RSA algorithm at the Massachusetts Institute of Technology 15,16 . RSA cryptosystem relies on Euler's theorem and the existence of unique inverse to the integer that are relatively prime to the modulo 2, 7 . Modified RSA by using CRT has been proposed by Samir et al. in 10 to decrease the time of RSA cipher.
There are lots of hybrid cryptography methods that combine RSA and Playfair cryptosystem techniques [7][8][9] . These hybrid methods overcome the disadvantages of RSA and Playfair methods 11,17,18 . While combining their advantages to produce a safer ciphertext with a low computational complexity 15 . They can be classified into four types. In 2021, Salih and Yousif 7 suggested a hybrid cryptosystem that provides high security by encrypting plaintext using two layers in which the first layer encrypts plaintext by Playfair then the second layer encrypts by RSA technique. Singh Chauhan et al. 9 Zakariyau et al. 17 and Mathur and Srivastava 11 in 2014, 2015 and 2017 respectively suggested hybrid cryptography that encrypts plaintext by Playfair and encrypts the key of Playfair by RSA. In 2017, Naga 8 presented a hybrid cryptosystem of Playfair and RSA with an XOR process that provides a complex process that is difficult to be attacked. In 2015, Iqbal et al. 18 suggested a hybrid cryptosystem of Playfair and a modified RSA in which hybrid cryptography that encrypts plaintext by Playfair and encrypts Playfair key by modified RSA that used dual levels for key exchanges.

Hybrid Cryptosystems: Modified Playfair with RSASQ and Modified Playfair with RSASQ-CRT
The proposed methods combine Playfair with RSASQ and RSASQ-CRT. They use the same steps to generate public and private keys but are different in some encryption and decryption steps. These hybrid methods consist of three phases: the key generation steps, encryption steps and decryption steps.  The steps to generate public and private keys of RSASQ and RSASQ-CRT are as follows: Step 1: Select two prime number p and q. It should be noted that choosing large prime numbers of p and q will give more security but need more computational complexity. Since the proposed technique will use two layers, hence p and q will be sufficiently bigger than the corresponding numbers of the Plaintext to satisfy Euler's theorem condition of getting relatively prime between the prime numbers and the corresponding numbers of the Plaintext 2, 19 .
Step 5: The receiver shares the public key ( , ) with the others. The following pseudocode shows the algorithm of generating the public and private keys of RSASQ and RSASQ-CRT.

Steps the Encryption of the Proposed Cryptosystems
Step 1: Design the modified Playfair matrix 7×13 which contains all characters and letters on the keyboard as shown in Table 1. Step 2: Let the keyword 1 be "Mathematics", then the duplicate characters should be eliminated and the rest will be "Mathemics". Apply the key 1 of Playfair on the modified Playfair matrix 7× 13 as shown in Table 2. Input  Create a pair of sufficiently enough random prime numbers p and q.
Step 4: Transform the plaintext M into ciphertext ( 1) by the Playfair algorithm.
Step 5: Convert the 91 characters of the Playfair matrix to suitable corresponding number from 2-93. It should be noted that ASCII table has not been used in this work due to computation complexity.
Step 6: The sender Bob will use the public key (e, N) of the hybrid cryptosystem algorithm received from Alice. Then square it and use the square key in RSASQ and RSASQ-CRT as follows: Find 1 such that 1 2 ≡ 1 2 . Find 2 such that 2 2 ≡ 1 2 2 ≡ ( 2 × × 1 + 2 × × 2 ) 2 .   Steps of Decryption of the Proposed Hybrid Cryptosystems: Step 1: Alice received 2 from Bob. Decrypt 2 to get 1 by using the private key ( 2, 2 ) as follows: Step 2: Create the key matrix 7 × 13 as shown in Table 2 by using the secret key 1.
Step 3: Utilize the same operations of Playfair cipher of encryption algorithm for C1 but in converse to get the final plaintext .  The following pseudocodes show the decryption algorithms of HRSASQ and HRSASQ-CRT. For more explanation, the following example illustrates the encryption and decryption of HRSA-CRT Key generation process at the receive  First create the public and private key at the receiver, let = 101, = 107 then = p × q = 10807 and ∅ ( ) = ( − 1) × ( − 1)= 10600, 2 = 10201 , 2 = 11449 Compute 2 = 2 × 2 then 2 = 116791249  Choose e such that 1< e < ∅ (N) such that ( , ∅ ( )) = 1and hence ( 2 , ∅ ( 2 )) = 1  ∅ ( 2 ) = ( 2 − ) × ( 2 − ) then ∅ ( 2 ) = 114554200  The public key is ( , ) = (23,10807)  Use the secret exponent d2 as invers multiplication of 2 mod ∅ ( 2 ) such that 2 2 ≡ 1( ( 2 )) Then d2=65830769 Encryption  Let the plaintext (M) = University of Baghdad  Let the key of Playfair (K1) = Mathematics  Split M into a blocks of two characters M = Un iv er si ty space o fspace Ba gh da dQ  Applying the key or Playfair on the Playfair matrix 7 ×13 as shown in Table 1  Find ciphertext by encrypt the plaintext by applying Playfair algorithm using the key matrix as shown  Using privet key to decrypt 2 as follows :  Create the key matrix 7 × 13 as shown in 

Simulation Results
Various simulations are performed to test the performance of our proposed HRSASQ and HRSASQ-CRT. The simulation results of the processing time determined using Matlab 14a software with an 'Intel(R) Core(TM) i7-7600 CPU@ 2.80GHz 2.90 GHz' process.
In the symmetric layer, the modified Playfair algorithm utilized 7×13=91 characters that covered all the keyboard characters which are easy for users in comparison to some other modified Playfair [ref]. It expands the 5x5 matrix that using 25 characters. Moreover, the ciphertext of Playfair 7×13 is more protected against hackers in comparison to the 5×5 Playfair since the hacker must find in 7×13 =91 characters. Expanding the matrix causes the key size to be increased and hence reduces the probability to break the code. The chance to break the code in Playfair 5×5 is 1/26 = 0.0384 15 , while the likelihood to break the modified Playfair is 1/91=0.010989011.
In the asymmetric layer, the proposed RSASQ technique provides more security when benchmarked with the RSA algorithm which utilizes the public key directly. RSASQ depends on the square of the public key indicating that if the public key was hacked, it would be difficult to break it. The second proposed technique uses CRT enhance the speed and simplify complex computations. The computations can be reduced by using modulo, this reduces computation time. Table 3 shows that the encryption time of RSASQ is about 3.03 times than RSA time in total. While the encryption time of our proposed RSASQ-CRT is about 0.5 of RSA encryption time and 0.17 of RSASQ encryption time in total. Figs 6 and 7 provide analysis diagrams of encryption time.

Conclusion and Future works
In this work two hybrid cryptosystems have been proposed, that combine a modification of the symmetric cryptosystem Playfair cipher and two modifications of the asymmetric cryptosystem RSA. These proposed techniques depend on two layers of encryption and decryption.
Our extensive research and simulation results showed that the first layer modification of the symmetric cryptosystem Playfair improved the standard Playfair and gives more security. Moreover, the second layer for our proposed RSASQ and RSASQ-CRT is more secure when benchmarked with the original RSA algorithm. The complexity of the RSASQ algorithm was overcome by using CRT in RSASQ-CRT which gives the less computational time when benchmarked with the RSA and RSASQ.
The future works will overcome the limitation of RSASQ by using simplified equation instead of square to give less complexity such that Euler theorem can still be satisfied, for example square root can be taken especially the domain is positive.
Moreover, using another symmetric cryptosystem in hybrid cryptosystem combined with the modified RSA.