Data Encryption Using Image Processing: A Brief Study

We can see considerable growth in the field of science and technology over the past few decades. This growth has also brought an enormous threat to the data used by users. Encryption and decryption of data play an important role in safeguarding the data. Many authors have contributed much outstanding research on unauthorized access to user data. In this journal, I have proposed an algorithm for data encryption using images. The main aim is to provide a new and highly customizable approach to protecting data using images and eliminating the use of plaintext. In my research, I will use images to encrypt and decrypt data rather than using plaintext.

message, B will use the same key as A to decrypt the message to get the original data back. While C who is an eavesdropper won't be able to get the original message as it is encrypted which is shown in Fig. 1

Classification
Cryptography is classified into two categories: Symmetricand Asymmetric Key Cryptography. Sometimes we can find a combination of symmetric and asymmetric key cryptography in some applications called hybrid schemes. It is because both types of algorithms have their strength and weakness. When they are combined, they protect each other weaknesses.

Symmetric Key Cryptography
Symmetric Key Cryptography is a type of cryptography where a single secret key is used for both encryption and decryption. When parties send a message to another party, they use a single key to encrypt and decrypt their data. This Symmetric Key Cryptography has two types of structure.

Stream cipher
In this type data is encrypted bit by bit or byte by byte at a single time. The A5 algorithm is the best example of this type which is used in mobile phone calls.

Block cipher
In these types of cipher, data is divided into blocks and then encrypted at the same time. There are plentyof examples of this type of structure. One of the most popular algorithms which are used worldwide is the AES algorithm.

Asymmetric Key Cryptography
Asymmetric Cryptography is also called publickey cryptography. Inasymmetricor public-key cryptography, there are two keys: a private key and a public key are used (Jirwan et al., 2013). When someone wants to encrypt their data, they generate these two keys and used their private key to encrypt their data and use their public key to decrypt. The RSA algorithm is the best example of this kind of cryptography.

Encryption and Decryption of Data Using Image Algorithim
Encryption and Decryption of data using images need several steps which are enlisted below: These three variables should be implemented in the algorithm for encryption and decryption and must be the same for both. If all values of these three are chan-ged in the algorithm, then all values of these three variables have to be changed and have to be the same in the decryption algorithm also for a given connection. For instance, if a and b want to transfer data to each other then a will encrypt his data and b will decrypta's data using the same value of these three variables.

Plaintext Processing
It is a mapping-like algorithm. It maps several characters to several boxes. We use two important parameters: 1) Number of characters to map per row (character = byte) 2) The number of rows and columns need to map into Number of Characters to map per row have to be smaller than or equal to the number of rows needed to map. These two parameters are hardcoded in the algorithm. Now, it takes the plain text and split the text depending on those two parameters if there are any remaining characters it will take those characters after doing the encryption of previous characters. For example, let us assume the plain text is "001122334-45566778899AABBCCDDEEFF", the Number of characters to map per row is 2, the Number of rows needs to map into is 16, and the number of columns needs to map is 10. So, the actionsare, 1) Convert every character to their ascii value. So, the ascii hex value of plaintext will be ' 2) Then, from the parameter, every two ASCII values will be mapped into every 10 rows. It will be like this

Key Generation
In this part, we take an image as a key. Let us assume, we take a 20 X 20 size image which is 20 * 20 = 400 * 8 = 3200 bit key. We take any channel from R, G, or B and use it as a key.    Let's take the red channel for demonstrating the example. After taking a channel, split it according to the value of the Number column to map. So, we split it on every 10 values until we reached the end of the red channel. If the last split misses some value, we will fill up those values using the beginning value of the red channel. Fig. 9 will depict the process.

Encryption
We begin the encryption by XORing all mapped plaintext by the first key row.  After that, we do a circular right shift to the first row of the result of XOR where the amount is the number of rows needed to map subtract to the current row number. After that, we generate a fixed random matrix/array where the length of it is equal to the number of the column. These random numbers are unique and should not be greater than the number of columns. Then, we randomize the right-shifted row cells according to the random number.  Then we again do a circular right shift to the entire matrix/array. Where the amount of right shift is the number of keys subtracted from the row number of the current key.

Key Generation
Generating a key in the Decryption processis the same as the key generation processes of Encryption.

Decryption Process
The decryption algorithm is the exact opposite of the encryption algorithm. First, we convert the chipper text to the number of columns needed to map by the Number of rows needed to map the matrix then we do a full circular left shift and then we reconstruct the row from the randomized row and do a circular left shift until all row is done and then XOR it from the last row number or the last key until the first. And the result will be plain text.

Evaluation Introduction
To implement it in a system, it hasto pass some speed tests. To evaluate it properly we are going to do a speed test for different keys so that we can conclude which key is most appropriate for general use in terms of length.

Speed Measurement
For the speed test, we will use 256-bit text and 3200bit, 28800-bit, and 20280000-bit images. We are going to five times for every key and going to take their average.

CONCLUSION AND RECOMMENDATIONS:
People use cryptography to safeguard their personal and commercial data. There are many algorithms available for that like AES, and RSA but a problem with those is a limited length of key and every complex algorithm to implement. On top of that, remember plain text key is a tough job. In this research, I have used an image as a key, which opens up a door to remove the plain textkey and introduce a limitless bit of key which doesn't require memorization of the key. It also pro-vides a highly customizable algorithm where we can also use any kind of matrix-based mathematical function which produce an 8-bit int result and has an inverse function.This algorithm has a huge amount of chance for customization. Combining it with AES may create more security than it is now. Also,through some research,there are some possibilities of optimizing this algorithm for the longer keys to reduce time complexity.

ACKNOWLEDGEMENT:
First of all, I would like to express my profound-gratitude to my honorable supervisor, Ms. Tania Akter Setu, for her constant and meticulous supervision, valuable suggestions, patience, and encouragement to complete the project work. I would also like to thank the CSE department of the UITS for providing us with the opportunity to have an industrial-level design experience as part of our curriculum for the master's program. Finally, I would like to thank our families and everybody who supported us and provided us with guidance for thecompletion of this project.

CONFLICTS OF INTEREST:
The authors state that there is no potential conflict of interest in publishing this research article.