Abstract
Standard methods used in the encryption and decryption process are implemented to protect confidential data. These methods require many arithmetic and logical operations that negatively affect the performance of the encryption process. In addition, they use private keys of a specific length, in addition to the fixed length of the data block used in encryption, which may provide the possibility of penetration of these methods, thus decreasing the level of security. In this research paper, a new method of digital image cryptography is introduced. This method is based on using a color image as an to generate a sophisticated matrix private key (MPK) that cannot be hacked. The proposed method uses an initial state to set the required parameters, with secret information needed to generate the private key. The data-block size is variable, and the complicity of the MPK depends on the number of selected rounds and the data-block size. The proposed method is appropriate for publication in Symmetry because it employs a symmetrical complex matrix key to encrypt and decrypt digital images. The proposed method is simple yet very efficient in terms of throughput and scalability. The experiments show that the proposed method meets the quality requirements and can speed up the encryption–decryption process compared with standard methods, including DES, 3DES, AES, and Blowfish.
1. Introduction
Digital images [1,2], especially colored ones, are considered to be one of the most important types of data circulating among various people and institutions, as they can be obtained easily and at no cost. A digital color image is represented by a three-dimensional matrix, where one dimension is assigned to each of the three colors (red, green, and blue), as shown in Figure 1.
Figure 1.
Digital image.
Digital images are mainly characterized by their ease of processing, and in this study, we are concerned with the process of reshaping and resizing the image to change the image dimensions. Resizing the image is achieved by either reducing or increasing the size of the image using the reduction process, as shown in Figure 2. Here, we resize a color image to obtain a matrix of a defined dimensions (one row, one column, or a 2D matrix), and the process of resizing depends on the required matrix dimension.
Figure 2.
Color image resizing example.
On the other hand, image reshaping keeps the image size unchanged but can be used to convert a 3D image to 1D, as shown in Figure 3.
Figure 3.
Image reshaping example.
Digital images are used in many vital applications such as protection, security applications, and medical applications. These applications require the image to be protected, as it may be confidential or of a personal nature, or may possibly carry confidential data [3,4]. The process of protecting the digital image will prevent intruders, data thieves, hackers, or unauthorized persons from understanding the digital image. One of the important methods used to protect digital photos is the use of data cryptography, i.e., data encryption and decryption, which is implemented through the use of a private key and performs some arithmetic and logical operations on the data using this key to encrypt and decrypt the data, as shown in Figure 4. The inputs and outputs of the encryption and decryption process are digital images, which are a type of digital data that can be easily processed [5,6,7,8,9].
Figure 4.
Image cryptography.
The method chosen to perform the image encryption–decryption process must achieve the following [10,11,12,13,14]:
- Provision of the necessary protection for the digital image, completely preventing unauthorized parties from understanding the image and knowing its contents.
- Distortion of the encrypted digital image so that it becomes unclear or cannot be understood, in such a way that the original image is fully restored upon decoding. Here, the extent of distortion can be measured by the calculated quality parameter, the mean square error (MSE) value, which must be very large when encrypting and zero when decrypting, and/or the peak signal-to-noise ratio (PSNR), which must be very low when encrypting and infinite when decrypting the image.
- Very high encryption efficiency in order to reduce the time for encryption and decryption, thus increasing the permeability (throughput) by increasing the number of processed bits per second.
- Flexibility and scalability by enabling the user to modify the length of the private key, modify the data-block size, or modify the number of rounds required to apply encryption/decryption.
- Ease of use and application through the use of simplified arithmetic and logical operations.
- Versatility of use, so that it is easy to use the method to protect different types of data including text messages, text files, and digital images.
This paper aims to improve the performance of encryption methods based on classical methods by shortening the arithmetic and logical operations, shortening the time required to generate private keys, and increasing the degree of security of the encryption process through the use of the procedures presented. The following benefits can be achieved:
- Using the colored digital image as a key, through which private keys can be generated easily. This process is very safe, especially since the image is kept secret through an agreement between the sender and receiver regarding the image to be used, without resorting to the image transmission process.
- The data blocks used in the image splitting process are variable, as is the length of the secret key.
- A variable number of encryption cycles.
- The possibility of using the procedures provided to encrypt text messages and images with high efficiency.
In this paper, Section 2 describes the work most closely related to the proposed algorithm. The proposed method is represented in detail in section, and the results obtained using the proposed method and a comparison with other traditional encryption algorithms are provided in Section 4. A detailed explanation of the results is given in the Results Analysis section.
2. Related Work
Nowadays, multiple methods of encryption and decryption are used, and the majority of these algorithms are based on standard DES (Data Encryption Standard), 3DES, AES, and Blowfish (BF) methods [15,16,17,18]. The above-mentioned standard methods have similar encryption and decryption mechanisms. These methods, as indicated in Table 1, have the following characteristics:
Table 1.
Standard encryption method features [19,20,21,22,23,24].
- The use of a single private key with a fixed length that does not change and in some cases can be hacked. This is a problem that must be eliminated.
- Dividing the data to be encrypted into blocks of fixed length that cannot be changed. This is one of the disadvantages of these methods.
- Use of a fixed and unchangeable number of rounds.
- All other sub-private keys used in the encryption are generated from the private key using specific arithmetic operations. This, in turn, makes the degree of security and protection completely dependent on the private key.
- These methods provide excellent values of MSE and PSNR in both phases, i.e., encryption and decryption.
- These methods are designed to encrypt and decrypt messages and text files using large quantities of data, as a color image will reduce the efficiency of data cryptography by requiring longer encryption and decryption times.
- These methods require many rounds, and this will negatively affect the efficiency. Each round contains a set of operations that will require extra time for execution.
- Generating and manipulating an S-box will add extra execution time, thus affecting the speed of the cryptography process. For datasets with large sizes (such as a color image), the number of generated blocks will be so large that extra time will be required for data division before encryption and assembly after decryption.
3. Proposed Method
To ensure a very high level of data security and protection, the proposed method includes implementing an initialization stage, in which confidential information is used that is agreed upon by the sender and receiver. This information is used to build the 2D matrix private key (MPK) with the number of rows equal to the number of rounds and the number of columns equal to the block size. The information includes the following:
- Image to be used as an .
- Type of MPK generation: 1: extracting; 2: resizing.
- Color to be used: 1: red; 2: green; 3: blue.
- Number of rounds.
- Block size in bytes.
- Row number if type equals 1.
- Column number if type equals 1.
Here the contents and the size of the MPK will depend on the settings values of the initial state. Figure 5, Figure 6, Figure 7 and Figure 8 illustrate examples of generating an MPK using two different .
Figure 5.
MPK extraction, example 1.
Figure 6.
MPK extraction, example 2.
Figure 7.
MPK generation by image resizing, example 1.
Figure 8.
MPK generation by image resizing, example 2.
We can see from the above examples that the MPK changes automatically when:
- The key image is replaced, preserving the other setting parameters unchanged.
- The value of any one or more of the set parameters is changed.
The encryption process using the proposed method can be implemented by applying the following steps:
- Step 1: Initialization:In this step, we select the and assign values for generation type, color to be used, number of rounds, block size (BLS), rows, and columns. This information is needed to create the MPK.The following algorithm can be used to generate the MPK:Input: Image-key;Output: MPK;Operations:
- −
- Select the color channel (1: red; 2: green 3: blue);
- −
- Select the operation type (ot = 1: extraction; 2: image resizing);
- −
- Select the block size (bs);
- −
- Select the number of rounds (nr);
- −
- If ot = 1thendefine the row and column from which to start extracting MPK with size =ElseResize the image to the size ;
- −
- Save MPK.
- Step 2: Apply the operations shown in Figure 9:
Figure 9.
Proposed method implementation.
For each byte in any round, a Feistel function will be assigned to perform the required byte rotation. Table 2 shows the operation of these functions in the encryption and decryption phases (the order of these functions can be changed).
Table 2.
Feistel functions.
The following example shows the method for implementing the rotation (FF3 and FF’3):
Value: 123
Binary: 01111011
Rotate right 3 digits:
011 01111
Decimal: 111
Binary: 011 01111
Rotate right 5 digits:
01111011
Decimal: 123
Each row in the MPK will be assigned to the associated round, and the results of the Feistel function must be XORed with the associated part of the MPK, as shown in Figure 9. The decryption phase must be implemented inversely.
4. Implementation and Experimental Results
The proposed method was programmed using MATLAB, and the scripts were run using a Core i5 2.5 GHz processor with 8 GB of RAM. The 12 images with information shown in Table 3 were used in the experiments.
Table 3.
Information for color images used.
To measure the performance of the proposed method, multiple colored images of different sizes were selected. The focus was placed on the efficiency coefficients, in order to prove the extent of distortion in the encrypted image by calculating the values of MSE and PSNR. The calculated values were compared with the values for the standard methods used in encryption, to prove the reliability of the proposed method. The encryption and decryption times were chosen to perform the necessary comparisons, to prove the efficiency of the proposed method.
The following cases were executed:
- Case 1: Using a small image as an (image 2). Number of rounds = 4, BLS = 16 byte = 128 bits (number of keys = 64, MPK dimension: 4 × 16). Table 4 shows the obtained results after executing the proposed method for case 1.
- Case 2: Using a medium image as an (image 3). Number of rounds = 4, BLS = 16 byte = 128 bits (number of keys = 64, MPK dimension: 4 × 16). Table 5 shows the obtained results after executing the proposed method for case 2.
- Case 3: Using a large image as an (image 12). Number of rounds = 4, BLS = 16 byte = 128 bits (number of keys = 64, MPK dimension: 4 × 16). Table 6 shows the obtained results after executing the proposed method for case 3.The proposed method was executed with various block sizes, fixing the number of rounds at 4. Table 7 shows the obtained experimental results.
Table 4.
Case 1 results.
Table 5.
Case 2 results.
Table 6.
Case 3 results.
Table 7.
Varying block sizes, with image 12 as . Number of rounds = 4.
The proposed method was executed with various numbers of rounds, fixing the block size to 16 bytes (128 bits). Table 8 shows the obtained experimental results.
Table 8.
Varying number of rounds, with image 12 as . BLS = 16.
For performance evaluation purposes, the standard methods of data cryptography were programmed and executed using the same 12 images. Table 9 shows the obtained results.
Table 9.
Standard methods results.
5. Results Analysis
From the obtained experimental results presented in Section 4, we can extract the following facts:
- Increasing the block size rapidly increases the encryption time, especially for images with large sizes; thus, it is recommended to use data blocks with small sizes (8 or 16 bytes) when dealing with large-sized images, (see Table 7 and Figure 10).Figure 10. Relationship between block size and encryption time.
- Increasing the number of rounds slowly increases the encryption time for any image of any size (see Table 8 and Figure 11).Figure 11. Relationship between number of rounds and encryption time.
- The proposed method increases the level of security by using a 2D matrix as an MPK. This key is subject to change, due to changes in the image-key, the number of rounds, the block size, and other settings parameters.
- Compared with standard methods, the proposed method increases the cryptography process efficiency by decreasing the encryption time (see Table 5 and Table 9 and Figure 12).Figure 12. Relationshipbetween number of rounds and encryption time.
- The proposed method can easily be used to encrypt and decrypt other types of data such as short messages and text files, and these can be treated using the same procedures as for color images.
The proposed method shows good speedup and increases the cryptography process throughput. The speedup calculations are shown in Table 10 and Table 11:
Table 10.
Throughput for different methods.
Table 11.
Speedup calculation.
6. Conclusions
The proposed method was implemented using multiple images and the obtained practical results were compared with the practical results of standard methods, in order to prove the extent of the improvement in the efficiency achieved by the proposed method by reducing the time of encoding and decoding without preserving the values of the quality parameters MSE and PSNR.
A novel method for color image cryptography was introduced, tested, and implemented. The obtained results showed that the introduced method satisfies the requirement for image quality by providing acceptable and good values for MSE and PSNR during the encryption and decryption phases. The proposed method can be easily used to encrypt and decrypt short messages, text files, or any image. The obtained results were analyzed, and it was shown that the proposed method increased the efficiency by decreasing the encryption–decryption times. The speedup with respect to other methods was calculated, and it was shown that the proposed method showed significant speedup. The proposed method enhanced the data protection degree by increasing the level of security, and this was achieved by using a sophisticated 2D matrix as a private key. The dimensions and contents of this matrix can be changed, depending on the settings parameters used in the initial state.
Author Contributions
Conceptualization, M.A.-F.; Formal analysis, M.A.-F.; Methodology, A.A.-H.; Supervision, Z.A.; Writing—original draft, A.A.-H.; Writing—review & editing, Z.A. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Asad, A.S.N.; Shayeb, I.; Jaber, Q.; Ayyoub, B.; Alqadi, Z.; Sharadqh, A. Creating a Stable and Fixed Features Array for Digital Color Image. IJCSMC 2019, 8, 50–62. [Google Scholar]
- Al-Dwairi, M.O.; Hendi, A.Y.; Soliman, M.S.; Alqadi, Z.A. A new method for voice signal features creation. Int. J. Electr. Comput. Eng. (IJECE) 2019, 9, 4092–4098. [Google Scholar]
- Mandal, A.K.; Parakash, C.; Tiwari, A. Performance evaluation of cryptographic algorithms: DES and AES. In Proceedings of the 2012 IEEE Students’ Conference on Electrical, Electronics and Computer Science Innovation for Humanity, Bhopal, India, 1–2 March 2012; IEEE: Piscataway, NJ, USA, 2012; pp. 1–5. [Google Scholar]
- Verma, O.P.; Agarwal, R.; Dafouti, D.; Tyagi, S. Performance analysis of data encryption algorithms. In Proceedings of the 2011 3rd International Conference on Electronics Computer Technology, Kanyakumari, India, 8–10 April 2011; IEEE: Piscataway, NJ, USA, 2011; Volume 5, pp. 399–403. [Google Scholar]
- Asok, S.B.; Karthigaikumar, P.; Sandhya, R.; Jarold, K.N.; Mangai, N.S. A secure cryptographic scheme for audio signals. In Proceedings of the 2013 International Conference on Communication and Signal Processing, Melmaruvathur, India, 3–5 April 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 748–752. [Google Scholar]
- Sharma, S.; Kumar, L.; Sharma, H. Encryption of an audio file on lower frequency band for secure communication. Int. J. Adv. Res. Comput. Sci. Softw. Eng. 2013, 3, 79–84. [Google Scholar]
- Gandhi, R.A.; Gosai, D.A.M. Steganography—A Sin qua non for Diguised Communication. Int. J. Innov. Res. Adv. Eng. 2014, 1, 184–191. [Google Scholar]
- James, S.P.; George, S.N.; Deepthi, P. Secure selective encryption of compressed audio. In Proceedings of the 2013 Annual International Conference on Emerging Research Areas and 2013 International Conference on Microelectronics, Communications and Renewable Energy, Kanjirapally, India, 4–6 June 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 1–6. [Google Scholar]
- Babu, S.G.; Ilango, P. Higher dimensional chaos for Audio encryption. In Proceedings of the 2013 IEEE Symposium on Computational Intelligence in Cyber Security (CICS), Singapore, 16–19 April 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 52–58. [Google Scholar]
- Aathithan, N.R.; Venkatesulu, M. A complete binary tree structure block cipher for real-time multimedia. In Proceedings of the 2013 Science and Information Conference, London, UK, 7–9 October 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 346–352. [Google Scholar]
- Pavithra, S.; Ramadevi, E. Throughput analysis of symmetric algorithms. Int. J. Adv. Netw. Appl. 2012, 4, 1574. [Google Scholar]
- Abd Elminaam, D.S.; Abdual-Kader, H.M.; Hadhoud, M.M. Evaluating The Performance of Symmetric Encryption Algorithms. Int. J. Netw. Secur. 2010, 10, 216–222. [Google Scholar]
- Singhal, N.; Raina, J. Comparative analysis of AES and RC4 algorithms for better utilization. Int. J. Comput. Trends Technol. 2011, 2, 177–181. [Google Scholar]
- Sharma, S.; Pateriya, P.K. A study on different approaches of selective encryption technique. Int. J. Comput. Sci. Commun. Netw. 2012, 2, 658. [Google Scholar]
- Al-qdah, M.; Hui, L.Y. Simple Encryption/Decryption Application. Int. J. Comput. Sci. Secur. 2007, 1, 33. [Google Scholar]
- Gadanayak, B.; Pradhan, C.; Dey, U.C. Comparative study of different encryption techniques on MP3 compression. Int. J. Comput. Appl. 2011, 26, 28–31. [Google Scholar]
- Sharma, S.; Sharma, H.; Kumar, L. Power spectrum encryption and decryption of an audio file. Int. J. Res. Comput. Sci. 2013, 1, 1–4. [Google Scholar]
- James, S.P.; George, S.N.; Deepthi, P. An audio encryption technique based on LFSR based alternating step generator. In Proceedings of the 2014 IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT), Bangalore, India, 6–7 January 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 1–6. [Google Scholar]
- Minaam, D.S.A.; Abdual-Kader, H.M.; Hadhoud, M.M. Evaluating the Effects of Symmetric Cryptography Algorithms on Power Consumption for Different Data Types. Int. J. Netw. Secur. 2010, 11, 78–87. [Google Scholar]
- Kumar, R.; Saini, B.; Kumar, S.; Kurukshetra, N. A Novel Approach to Blowfish Encryption Algorithm. Int. J. Adv. Found. Res. Sci. Eng. 2014, 1, 62–67. [Google Scholar]
- Rizvi, S.; Hussain, S.Z.; Wadhwa, N. Performance analysis of AES and TwoFish encryption schemes. In Proceedings of the 2011 International Conference on Communication Systems and Network Technologies, Jammu, India, 3–5 June 2011; IEEE: Piscataway, NJ, USA, 2011; pp. 76–79. [Google Scholar]
- Singh, P.; Singh, K. Image encryption and decryption using blowfish algorithm in MATLAB. Int. J. Sci. Eng. Res. 2013, 4, 150–154. [Google Scholar]
- Mhaidat, K.; Altahat, M.; Al-Khaleel, O. High-Throughput Hardware Implementation of Threefish Block Cipher on FPGA. In Proceedings of the 4th International Conference on Information & Communication Systems (iCICS), Iribd, Jordan, 23–25 April 2013. [Google Scholar]
- Raghunandhan, K.; Radhakrishna, D.; Sudeepa, K.; Ganesh, A. Efficient audio encryption algorithm for online applications using transposition and multiplicative non-binary system. Int. J. Eng. Res. Technol. (IJERT) 2013, 2, 472–477. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).











