Public-Key hybrid cryptosystem based on Blowfish and RSA Elza Jintcharadze Maksim Iavich Faculty of Informatics and Control Systems Cyber Security Department Georgian Technical University Caucasus University, Tbilisi, Georgia Tbilisi, Georgia elza.jincharadze@gmail.com m.iavich@scsa.ge Abstract— Nowadays data security is one of the important RSA generates two keys: a public key for encryption and issues, especially for increasing transactions via the internet. private key to decrypt the message. RSA algorithm can be This paper presents a hybrid cryptosystem using RSA divided into three steps: the first step is to generate a key (Asymmetric) and Blowfish (Symmetric) algorithm. Hybrid which can be used as key to encrypt and decrypt data; encryption is a combination of symmetric and asymmetric Second step is encryption, where plaintext is converted into encryption methods. Symmetric algorithms are mostly used ciphertext; and the third step is decryption, where encrypted for encryption of messages than asymmetric. text is converted in to plain text at another side. RSA is based on the factoring problem of finding the product of two The objective of this research is to evaluate the performance of RSA, Blowfish cryptography algorithms and large prime numbers. Key size is 1024 to 4096 bits [5]. RSA&Blowfish hybrid cryptography algorithm. The The negative side of RSA algorithm is the low speed of performance of the implemented encryption algorithms is encryption. Because the encryption and decryption process evaluated by means of encryption and decryption time and with RSA algorithm needs more time than other algorithms. memory usage. To make comparison experiments, for those As other symmetric encryption systems, RSA uses two algorithms is created program implementation. The different keys: A public and a private one. Both keys work programming language Java is used for implementing the corresponding to each other, which means that a message encryption algorithms. encrypted with one of them can only be decrypted by its Keywords— Symmetric cryptography, Asymmetric counterpart. The latter is usually available to the public cryptography, Data encryption, Ciphertext, Decryption, because private key cannot be calculated from the public Hybrid cryptosystem. key. III. BLOWFISH Blowfish is one of the symmetric key algorithms with a I. INTRODUCTION 64-bit block cipher and it was developed by Bruce Nowadays strength of the cryptosystem cannot be totally Schneider [1]. Blowfish is a block cipher, the encryption ensured. The main goal of all cryptography algorithms is to process, and the decryption, Blowfish divides a message offer the best security, but due to the fact that technology is into blocks of equal size in length, i.e. 64 bits. Nowadays rapidly developing proposed security systems becoming blowfish provides good security level and there is no less resistant to every known or new attacks. successful crypto attack against it. By encryption time Blowfish is faster than DES, but the weak point for this Both symmetric and asymmetric key algorithms have algorithm is its weak key. their advantages and disadvantages. Symmetric key algorithms are faster than asymmetric algorithms. The main IV. DESCRIPTION OF HYBRID CRYPTOSYSTEM requirement is that the secret key must be shared in a secure Hybrid encryption is a method of encryption that way. Asymmetric systems provide secure transmission of combines two or more encryption systems. It integrates a keys, but this process needs much more time. To improve combination of asymmetric and symmetric encryption to this problem is used the hybrid algorithm, which means take benefit from the strengths of each form of encryption. using a different type of cryptosystems together [22]. These strengths of the algorithm are defined as speed and security of this algorithm. Hybrid encryption is considered II. RSA a highly secure type of encryption as long as the public and RSA is founded in 1977 is a public key cryptosystem. private keys are fully secure [4]. RSA is an asymmetric cryptographic algorithm named after its founders Rivest, Shamir &Adelman [5]. In general, RSA A hybrid encryption scheme is one that combines the cryptosystem is used to provide privacy and ensure the convenience of an asymmetric encryption scheme with the authenticity of digital data. Nowadays RSA is implemented effectiveness of the symmetric encryption scheme. There in many commercial systems. RSA is used to ensure privacy are various advantages of the combination of encryption and authenticity for web servers and browsers, to provide methods. One is that users have the ability to communicate security for web Email and remote login sessions for credit- through hybrid encryption. Usually, during the encryption card payment systems. RSA is frequently used in process, the asymmetric algorithm is slowing down the applications where the security of digital data is important. encryption process [15]. But hybrid cryptosystem is using 52 symmetric encryption synchronously so both forms of algorithms. To make more exact calculations was used encryption (symmetric and asymmetric) are improved. The console work with Java NetBeans IDE. result of the hybrid encryption process has an additional security level with overall improved system performance. In general encryption time is connected to algorithm Symmetric and asymmetric cryptography algorithms architecture. Table 1 shows encryption and decryption have their own advantages and disadvantages. In general, results on Blowfish algorithms. Size of used key is 16 bits. symmetric ciphers are considerably faster than asymmetric TABLE I. STATISTICAL RESULTS OF BLOWFISH ENCRYPTION AND ciphers, but require all parties to somehow share a secret DECRYPTION PROCESS key. Also, we have to take into consideration that Plain Plaintext Blowfish Blowfish Blowfis Blowfish asymmetric algorithms allow public key arrangements and text size Encrypti Decryption h used key exchange systems, but this slowdowns encryption size (Bytes) on Time time Encrypt RAM process speed [4]. A hybrid cryptosystem is using multiple (KB) (Nanosec (Nanosecon ed File (Bytes) onds) ds) size ciphers of different types together, each to its best (KB) advantage. One common method of a hybrid cryptosystem 32 32710 10753053 1984528 59241 9762104 is to generate a random secret key for a symmetric cipher, 64 65420 12169867 2743007 119493 10696784 and then encrypt this key via an asymmetric cipher using the recipient’s public key. After this step, the plaintext is 128 130840 12567266 5602025 236670 12556416 encrypted using the symmetric cipher and the secret key. After the encryption process, the encrypted secret key and 256 261680 18200673 9356337 475738 16252696 the encrypted message will be then sent to the receiver. 512 523360 23987822 16802548 954280 23511600 1024 1048460 35550482 26062972 1915678 15407800 2048 2096920 43489299 40463494 3804367 28875368 4096 4193840 62097598 56950097 7552059 55642240 The same experiment was done on RSA system, where was used different size of plaintext. Table 2 shows used encryption time in nanoseconds. TABLE II. STATISTICAL RESULTS OF RSA ENCRYPTION AND DECRYPTION PROCESS RSA RSA Encryption RSA Decryption Plaintext Plaintext Decrypted RSA Used time Time size (KB) size (Bytes) file size RAM (Bytes) (nanoseconds) (Nanoseconds) (KB) 32 32710 1536637771 118780 55542452 5611360 64 65420 3208498484 237689 121344997 4677800 128 130840 6149709140 474654 284935252 62035768 256 261680 10574937240 946614 671696785 72146728 Fig. 1. Main idea of proposed hybrid cryptosystem 512 523360 20368096461 1896331 1991097468 117161952 The main goal of a hybrid cryptosystem is to generate a 1024 1048460 41504791208 3795983 6934459468 238824584 random key for the symmetric system and after this encrypt this key for the asymmetric system. So, we will get a secret 2048 2096920 89946149790 7586016 27974097086 371242008 key that will be used for encryption plaintext. During 4096 4193840 181620236481 15179673 121238321204 572478144 Hybrid encryption process data are transferred using unique session keys along with symmetrical encryption. The public The proposed hybrid cryptosystem works as following key encryption process is implemented for random at first system reads plaintext and generates the secret key symmetric key encryption. After the receiver gets the with RSA and public keys are generated automatically. The encrypted message, the public key encryption method is next step is to generate Blowfish symmetric key which will used to decrypt the symmetric key. After recovering of the symmetric key, then it is used to decrypt the message. be encrypted with RSA system. This provides high security for the key because the usage of RSA algorithm decreases V. PROPOSED WORK – HYBRID CRYPTOSYSTEM WITH the decryption probability of public key. So, when we share COMBINATION OF BLOWFISH AND RSA the public key, will be shared also RSA secret key. After To create a strong encryption algorithm there is a these steps, the plaintext is encrypted using Blowfish, proposed combination of two encryption algorithms - because as other symmetric algorithms Blowfish is fast. The Blowfish and RSA. There were done experiments on decryption process is the reverse process of the above- proposed algorithms by terms of their encryption speed, used memory and system requirements. The programming language Java is used for implementing the encryption 53 described encryption. 60000000 50000000 40000000 30000000 20000000 10000000 Fig. 2. RSA + Blowfish - the proposed hybrid system architecture 0 32 64 128 256 512 1024 2048 4096 There was created program, implementation for this hybrid cryptosystem on Java programming. Table 3 shows Blowfish Decryption time (Nanoseconds) program execution results on different size plaintext. RSA + Blowfish Decryption time (nanoseconds) TABLE III. BLOWFISH + RSA HYBRID SYSTEM ENCRYPTION TIME Plaint Plaintext RSA+Blowf RSA + RSA + RSA + Fig. 4. Comparison of Blowfish and RSA + Blowfish cryptosystems ext size ish Blowfish Blowfish Blowfish decryption time size (Bytes) Encryption Encrypted Decryption Used (KB) time File size time RAM VI. CONCLUSION AND SCOPE OF FUTURE WORK (nanosecon (KB) (nanoseconds (Bytes) ds) ) This paper provides a description and comparative 32 32710 9047797 59355 1881211 9498968 analyses of the new hybrid cryptosystem model. The new 64 65420 12203366 118428 2189046 22598000 hybrid model combines Blowfish (symmetric) and RSA 128 130840 13555651 237417 5057937 26353056 (Asymmetric) cryptosystems. The paper shows program implementation and experimental research results with java 256 261680 14240434 477370 9345405 27380576 programing language. Described algorithms and hybrid 512 523360 29886045 951418 18116046 29011368 models are evaluated by terms of encryption speed, memory 1024 1048460 40855251 1898922 25666278 30336472 usage, encrypted file size and ensured security level. Taking into account the time and consumption of the technical 2048 2096920 43979084 3813804 44415486 43218240 resources, Blowfish is the best one else than the other 4096 4193840 63542269 7624638 54848853 56610432 reviewed. 700000000 140000000 600000000 120000000 500000000 100000000 400000000 80000000 300000000 60000000 200000000 40000000 100000000 20000000 0 32 64 128 256 512 1024 2048 4096 0 Blowfish used RAM (Bytes) 32 64 128 256 512 1024 2048 4096 RSA Used RAM (Bytes) RSA+Blowfish Encryption time (nanoseconds) RSA + Blowfish Used RAM (Bytes) Blowfish Encryption Time (Nanoseconds) Fig. 5. Used memory comparison chart - Blowfish, RSA and Blowfish+RSA Fig. 3. Comparison of Blowfish and RSA + Blowfish cryptosystems encryption time 54 16000 REFERENCES [1] B. Schneier, “Description o f a New Variable-Length Key,64-Bit 14000 Block Cipher (Blowfish)”, Fast Software Encryption, Cambridge Security Workshop proceedings (December 1993), Springer-Verlag, 12000 1994, pp. 191-204 [2] "The Digital Millennium Copyright Act of 1998" (PDF). United 10000 States Copyright Office. Retrieved 26 March 2015. [3] Cramer, Ronald; Shoup, Victor (2004). "Design and Analysis of 8000 Practical Public-Key Encryption Schemes Secure against Adaptive Chosen Ciphertext Attack" 6000 [4] Hofheinz, Dennis; Kiltz, Eike (2007). "Secure Hybrid Encryption from Weakened Key Encapsulation". Advances in Cryptology - 4000 CRYPTO 2007 [5] Johhanes A. Buhman, Introduction to Cryptography, Second 2000 Edition, 2000 [6] Alfred J. Menezes, Paul C. van Oorschot, Scott A. Vanston, 0 Handbook of Applied Cryptography, Massachusetts Institute of 32 6 4 1 2 8 2 5 6 5 1 2 1 0 2 42 0 4 84 0 9 6 Technology, June 1996 [7] Ilya KIZHVATOV, Physical Security of Cryptographic Algorithm RSA Decrypted file size (KB) Implementations, L’UNIVERSITÉ DU LUXEMBOURG, 2009 [8] Simson Garfinkel, Alan Schwartz, Gene Spafford, Practical UNIX RSA + Blowfish Encrypted File size (KB) and Internet Security, 3rd Edition Securing Solaris, Mac OS X, Linux & Free BSD Fig. 6. Encrypted file size comparison chart - RSA and Blowfish+RSA [9] The official Advanced Encryption Standard". Computer Security Resource Center. National Institute of Standards and Technology. As a conducted experimental result shows provided Retrieved 26 March 2015. new hybrid model is significantly faster and secure because [10] Баричев С. В. Криптография без секретов. – М.: Наука, 1998. it takes all advantages and strength of symmetric and [11] Шнайер Б. Прикладная криптография. Протоколы, алгоритмы и исходные тексты на языке С, 2-е изд . – М.: Вильямс, 2003. asymmetric systems. The experiment showed the following [12] "Quantum cryptography: An emerging technology in network results: security". - Sharbaf, M.S. IEEE International Conference on Technologies for Homeland Security. 2011  If Blowfish, RSA and Blowfish + RSA hybrid [13] Adleman, Leonard M.; Rothemund, Paul W.K.; Roweis, Sam; algorithms are compared according to the memory Winfree, Erik (June 10–12, 1996). On Applying Molecular used, the highest technical resources require RSA Computation To The Data Encryption Standard. Proceedings of the algorithm, and Blowfish is slightly behind the Second Annual Meeting on DNA Based Computers. Princeton University. Blowfish + RSA hybrid scheme. [14] Cramer, Ronald; Shoup, Victor (2004). "Design and Analysis of  Considering the option of encryption Blowfish Practical Public-Key Encryption Schemes Secure against Adaptive Chosen Ciphertext Attack" keeps its initial first position and is the fastest of [15] Hofheinz, Dennis; Kiltz, Eike (2007). "Secure Hybrid Encryption these systems. However, the Blowfish + RSA from Weakened Key Encapsulation" hybrid algorithm is far below and significantly [16] Taher ElGamal (1985). «A Public-Key Cryptosystem and a faster than RSA. And RSA takes the longest time Signature Scheme Based on Discrete Logarithms to encrypt and is very slow. [17] Ященко В. В. Введение в криптографию. СПб.: Питер, 2001. [18] Hamdan O. Alanazi, B. B. Zaidan, A. A. Zaidan, Hamid A. Jalab,  Observation of the decryption time parameters has M. Shabbir and Y. Al-Nabhani, “New Comparative Study Between shown that the Blowfish + RSA hybrid algorithm DES, 3DES and AES within Nine factors”, Journal of Computing, Volume, 2, Issue 3, March 2010, pp. 152-157. and the blowfish algorithm are almost equally fast [19] Dr. Prerna Mahajan and Abhishek Sachdeva, “ A study of with the decryption process and are faster than the Encryption Algorithms AES, DES and RSA for Security”, Global RSA algorithm. Journal of Computer Science and Technology Network, Web & Security, Volume 13 Issue 15 Version 1.0 Year 2013, pp. 15-22.  As an overview of the encrypted file size setting, [20] Deepak Kumar Dakate and Pawan Dubey, “Performance the lowest memory needs Blowfish system, the comparison of Symmetric Data Encryption Techniques”, following is Blowfish + RSA, and the RSA International Journal of Advanced Research in Computer Engineering and Technology, Volume 3, No. 8, August 2012, pp. algorithm increases the size of an encrypted file 163-166. with the highest rate. [21] Sumitra, “Comparative Analysis of AES and DES security Algorithms”, International Journal of Scientific and Research For the future is possible to review another hybrid Publications, Volume 3, Issue 1, January 2013, pp. 1-5. model of symmetric and asymmetric algorithms. It is [22] Maksim Iavich ; Sergiy Gnatyuk ; Elza Jintcharadze ; Yuliia possible to conduct a series of entropy research of the Polishchuk ; Roman Odarchenko, “Hybrid Encryption Model of different cryptographic algorithms and the above-presented AES and ElGamal Cryptosystems for Flight Control Systems”, Oct. 2018 hybrid model. This will allow us to identify the [23] Damaševičius, R., Napoli, C., Sidekerskienė, T., & Woźniak, M. sustainability of each algorithm against different types of (2017). IMF mode demixing in EMD for jitter analysis. Journal of attacks, including the frequency analysis of the encrypted Computational Science, 22, 240-252. text. 55