This research proposes New Compression–Encryption Algorithm Using Chaos-Based Dynamic Session Key (CEA-CBDSK) to encrypt image data. CEA-CBDSK consists of an algorithm to generate initial symmetric keys and an algorithm to encrypt image data using four dynamic session keys derived from the initial keys. The key generation uses Discrete Wavelet Transform, Arnold Cat Map, and Cipher Block Chaining, while the image encryption is performed using the session keys produced by the chaotic logistic map method. From the evaluation, it is proven that CEA-CBDSK is able to protect transmitted image data against ciphertext-only attack, statistical attack, and differential attack.

The development of information and communication technology and storage causes the change in the form of secret documents, from paper-based documents into digital documents.

One of the problems that arise with the application of document-based information transactions in digital form, especially image data, is the larger data size due to the need for high image quality. The transmission of digital documents through communication channels also poses a risk when sensitive and valuable information is accessed by unauthorized persons. Consequently, it takes more time to transmit the large data through the communication line. The transmission becomes slow and unsafe because it is vulnerable to eavesdropper (

An efficient way to cope with large data sizes is to compress the data before it is transmitted or stored (

Cryptography does not guarantee full security because the key confidentiality and the encryption algorithm to be used also determine the level of security. If one cryptographic algorithm is resolved, new more reliable algorithms are needed to maintain data security. This causes cryptography, including symmetric cryptography, will never stop growing. For image security, symmetric cryptography is usually preferred than asymmetric cryptography because of its speed (

To produce unbreakable ciphers, random keys with the same length as the data to be encoded, as in the One-Time Pad (OTP) algorithm, are needed. This concept creates problems with the storage and distribution of keys. The problem can be solved using a relatively short secret key to be easily remembered by the sender and the receiver. The secret key is then referred to a symmetric key, which is then used to generate random keystream with the same length as the data to be encoded (

The proposed New Compression–Encryption Algorithm Using Chaos-Based Dynamic Session Key (CEA-CBDSK) method consists of two algorithms. The first algorithm is symmetric key generation algorithm, which utilizes the characteristics of the image data to be encoded so that each plain image will be encrypted using a different symmetric key. The second one is an algorithm to improve the security of the image data being transmitted by compressing the image to reduce data redundancy and encrypting the compressed image using 4 (four) session keys.

The paper is organized as follows:

There are several ways to classify image encryption algorithms. With respect to the approach to constructing the encryption scheme, the image data security algorithm can be divided into two groups: the chaos-based methods and the nonchaos-based methods (

In terms of the amount of data being encrypted, image encryptions are classified into two, namely a full encryption scheme and partial (selective) encryption schemes. Full encryption is mainly used for applications that have requirements for high security, such as privacy protection, information security, and military applications. On the other hand, partial encryption can save the encryption time to meet the requirement of real-time applications as it can reduce enormous computing time for image or video data encryption (

Based on the involvement of compression method, the encryption scheme can be grouped into two as well, i.e. encryption with compression methods and encryption without compression methods (

Discrete Wavelet Transform (DWT) is one of the methods used in digital image processing. DWT divides the image into four sub-bands denoted LL, HL, LH, HH. The LL sub-band looks like the original image and smoother as it contains the lower frequency components of the original image. Sub-bands LH, HL, and HH will look like a rough version of the original image because they contain high-frequency components of the original image. Existing research develops a compression–encryption scheme using a selective concept of encryption of data on LL sub-band, while and LH, HL, and HH sub-bands are transformed using different algorithms (

The selective compression–encryption method proposed by

The compression–encryption methods using S-Box are proposed in

The CEA-CBDSK method proposed in this paper will be implemented on image data to be transmitted over an unsafe channel. Therefore, the proposed algorithms are based on some of the concepts in the existing research, with some modifications. The main differences between our method and the existing work are related to the symmetric keys to be used to generate the session keys, and the details of the compression and encryption algorithms. In the existing work, symmetric keys to encode data are based on the agreement between the sender and the recipient, while in our method, they are derived from the characteristics of the image data to be encoded. The symmetric keys are generated and then transmitted to the receiver via a secure path as illustrated in

The proposed compression–encryption model.

The proposed key generation algorithm consists of two parts: algorithms to generate symmetric keys and algorithms to form session keys which are used to encrypt image data. Both algorithms are explained in detail in this section.

The step to obtain the symmetric keys that will be used to generate session keys can be seen in

At this stage, if the plain image size is _{LL} × _{LL}, with 32<_{LL}≤64pixel. For example, if the plain image size is 256 × 256 pixels, the DWT 2D transformation will be performed until the 2nd level, because the LL sub-band size on the 2nd level has reached 64 × 64 pixels. If the plain image size is

_{LL} × _{LL} sized data is conducted using Arnold Cat Map (ACM). The goal is that the value of neighboring matrix elements is significantly different. The definition of Arnold’s Cat Map is presented by (

The determinant value of the matrix is:

Parameters _{
i
}, _{
i
}] and [_{
i+1}, _{
i+1}] is a nonnegative integer i.e. {0,1, 2, _{LL}, _{LL}). [_{
i
}, _{
i
}] is the position of the original image element and [_{
i+1}, _{
i+1}] is the position of the image element after the permutation is done using ACM.

The next step is to form column vector A using

The value of

_{0} is a 32-bit key that is randomly generated. The CBC algorithm is chosen because it produces a different symmetric key even though the same vector _{1}, _{2}, _{3}, and _{4 ,} as illustrated in

Symmetric Key Generation Algorithm.

DWT decomposition 2D (a) one level (b) two levels.

Formation of matrix B from the result of LL sub-band element scrambling using ACM method.

Formation of symmetric keys _{1}, _{2}, _{3}, and _{4}.

This step is performed to obtain KG_{1}, KG_{2}, KG_{3}, and KG_{4} session keys used to encrypt each compressed sub-band and to randomize the pixel position.

The KG1 row-shaped session key is randomly generated using chaos logistic map method using _{
i
} is the chaos value of the requirement that 0≤_{1}≤1. Parameter _{0} and _{1}. The ideal value of the parameter _{1} using min

_{1}, _{v} is the minimal value of the initial symmetric key (min(_{1}, _{2}, _{3}, _{4})) and max_{v} is the maximum value data of symmetric key (max(_{1}, _{2}, _{3}, _{4})). The value of _{0} for _{1}, which is normalized to a value ranging between 0 and 255 using

size is the desired length of the number, while the value of count starts from 1 and is increased by 1 until ^{count}>10^{size−1}. Only the integer part of the produced decimal is used (_{1} up to _{
n
} are obtained using _{0} _{1} _{2}… _{
n
}] is then referred to as session key KG_{1}.

Key KG_{2} is in the form of a block, in which each block is a row vector with the length of 256. The number of blocks is adjusted according to the number of blocks of the compressed LH, HL, and HH sub-bands. The first block of session key KG_{2} is generated in the same way as the generation of KG_{1}, but the length of the session key vector is 256, which is referred to as _{1}. The _{
n
}) is obtained by randomizing the data position B_{
n-1} using the concept of permutation employed in RC4. The produced key KG_{2} is the combination of vector blocks [_{1} _{2}… _{
n
}].

The S-Box shaped key KG_{3} is used in the process of scrambling the block cipher. The size of the subblock is 16 × 16 pixels which refer to the sub-block size used in JPEG2000 compression. To get session key KG_{3} first a matrix of _{3} is derived from symmetric key _{3} using the Chaos Logistics Map method, similar to the generation of session key KG_{1}, with the requirement that 1 < session key value KG_{3}≤_{3} ranges between 1 and 25. The next session key elements of KG_{3} are generated randomly using the Chaos Logistics Map method, with the requirement that there is no repeated value. _{3} formation.

(a) Initial cipher block of size _{3} which is formed using the proposed algorithm.

Key KG_{4} is also an S-Box with the size of 16×16. Each element of the matrix is generated using the Chaos Logistics Map method, similar to the generation of session key KG_{3}. The values of each element should be unique and ranges from 0 to 255. _{4} (1,1)=95. The key elements KG_{4}(1,2) to KG_{4}(16,16) are generated using

Example of key session KG_{4} which is randomly generated from the value of symmetric key _{4} using the proposed algorithm.

The proposed CEA-CBDSK method consists of two parts, the image compression–encryption algorithm at the sender side and the decryption–reconstruction algorithm at the receiving end. Both will be described in detail in this section.

The CEA-CBDSK method for securing image data on the sender side is divided into three stages: symmetric key generation, compression, and encryption.

The coding process is then applied to the quantization result. It is started by converting the quantization result of each sub-band to binary form. The results are combined to form 8 bit sized blocks. To illustrate, suppose that

Encrypt the LL sub-band data that has been compressed with key KG_{1} using

Encrypt the LH, HL, HH sub-band data that has been compressed with key KG_{2} using

Incorporates the LL, LH, HL, and HH sub-bands encryption results and change the form from row vectors into an

a. Rows 1 through row

b. The

Divide the matrix produced in Step 4 into _{3}. The goal is to randomize the element positions of the matrix so that the additional information stored on the last line is not known by cryptanalysis.

Encrypt the result of a block cipher in Step 4 using block substitution method with session key KG_{4} This step uses the modification of the Playfair cipher method (_{4}.

Do substitution on cipher image produced in Step 5 using key KG_{4} of size 16 × 16 pixels, which is expanded using a keystream generator into _{4} using keystream generator (_{4} o that its length equals the length of the cipher image _{4new}, is reshaped into a

Detailed proposed image compression–encryption model on the sender side.

Illustration of quantization result in binary form The bits are then grouped into 8 bit sized blocks, which produces

Illustrated by data coding results.

The process of resizing the encrypted LL, LH, HL, and HH sub-bands data from the column vector to a matrix of size _{3}. The goal is to randomize the element.

The model of image data security on the receiving side is divided into two algorithms, namely: decryption algorithm, and reconstruction algorithm as illustrated in

_{1}, KG_{2}, KG_{3}, and KG_{4} using the same symmetric key generation algorithm as in the encryption process.

_{4 new} using modulo 256 operations. Do permutation to the block using the Playfair cipher decryption process.

_{3}.

Find the number of image rows (

Obtain the LL sub-band value form the row vector, taken from the elements in position (1,1) to position (1,

Obtain the value of LH, HL, and HH sub-bands form the row vector, taken from elements in position (1,

_{1}. Then, decrypt the LH, HL, HH sub-bands using modulo 256 operations with session key KG_{2}.

Detailed propoed image decryption–reconstruction model on the receiver side.

The proposed method is implemented using Matlab R2013a application which runs on a computer with CPU specifications using Intel Core i3-4005U 1.7 GHz and 2 GB of RAM. The performance of the proposed method will be evaluated by implementing the method to four grayscale images with different sizes and characteristics. The image to be used are

Artichare (400×594 pixels), representing bright images, the Pool (383×510 pixels), representing a dark image, Lena (512×512 pixels), representing a moderate image, and the Boat (512×512 pixels), representing high contrast image, wich are characterized by the uniform histogram with a range of image intensity values [0,255]. Other grayscale image standards are also used to compare the performance of proposed methods to other research.

For the symmetric generator algorithm, the run-test analysis is used to measure the randomness of the keys generated by the algorithm. Visual analysis, i.e. displaying the encrypted image and histogram image form, is applied to the compression–encryption algorithm. In addition, the evaluation also uses statistical analysis, which includes entropy values, key sensitivity, and image compression ratios aimed at analyzing the performance of image data and image data sizes. Testing on the decryption–reconstruction algorithm uses peak signal noise ratio (PSNR) method that aims to measure the quality of the reconstructed images.

Based on

Symmetric key values of Lena images with different intensities. (a) Without using the proposed algorithm and (b) using the proposed algorithm.

Symmetric keys generated in 30 experiments using Artichare, Pool, Lena, and Boat images.

The encryption–encryption algorithm is considered safe against cryptanalyst attacks if the results of the analysis visually, as well as statistical analysis (entropy, key sensitivity, compression quality, and compression ratio), meet the requirements set by each measuring instrument used. This study will test the use of wavelet filters and quantization values to obtain the best combination of parameters. The tested filter is Haar filter, representing an orthogonal filter, as well as a Bior3.5 and Bior4.4 filter, representing a biorthogonal filter. The Haar filter is selected because it is a simple filter and it can be used to quickly analyze local features used in signal and image compression. Bior3.5 and Bior4.4 filters are selected because these filters are used by JPEG2000, which is the standard method of image compression today. The uniform quantization values to be tested are 15, 20, 25, 30, and 35 because in that range each quantized element will be compressed into 4 bit, 5 bit, and 6-bit data. Thus, it is expected to reduce image data redundancies by about 30% while the image quality is still quite high. The level of decomposition to be used are level 2 or level 3 to obtain the decomposed sub-band LL of size 32 to 64 pixels, which is the standard block size used in JPEG2000.

Result of Run-Test test to evaluate the randomness of the symmetric keys.

Test Image Data | Symmetric Key | P-Value | Conclusion | Test Image Data | Symmetric Key | P-Value | Conclusion |
---|---|---|---|---|---|---|---|

Artichare | K1 | 0.930 | Random | Lena | K1 | 0.168 | Random |

K2 | 0.154 | Random | K2 | 1.000 | Random | ||

K3 | 0.930 | Random | K3 | 0.670 | Random | ||

K4 | 1.000 | Random | K4 | 0.624 | Random | ||

Pool | K1 | 0.145 | Random | Boat | K1 | 0.727 | Random |

K2 | 1.000 | Random | K2 | 0.593 | Random | ||

K3 | 0.565 | Random | K3 | 0.353 | Random | ||

K4 | 0.234 | Random | K4 | 0.098 | Random |

Both visual and statistical test use the same set of symmetric key: _{1} = 2394732439996, _{2} = 3619928903909, _{3}= 2694188048471, and _{4}= 5332757722018. They are produced using the proposed symmetric key generation algorithm. In addition, to evaluate the influence of image characteristics to the performance of the proposed algorithm, the proposed method will be tested to four images with different characteristics. Analysis of each image on its security performance is performed using 30 different symmetric keys generated randomly using the proposed algorithm.

The visual analysis of four images at level 3 of decomposition using Haar, Bior3.5, and Bior4.4 filters and the quantization value 30 with the same symmetric keys can be seen in

The four images look random, this shows that visually the information on the image cannot be seen. Thus, it can be concluded that the image to be delivered is safe from manual inspection. Furthermore, the cipher image histogram looks flat, indicating that there is no prominent pixel intensity in the cipher image. Hence, cryptanalyst is not able to use the histogram for doing statistical attack. The use of different wavelet filters does not affect the security of the encrypted data, which can be seen from visual tests and histograms that look the same.

Result of visual analysis to cipher image.

The Differential attack is an attack that traces the difference and tries to find the relationship between plain image and cipher image (_{1} represents the original image, _{2} represents the reconstructed image, while

The ideal value of NPCR is greater than 99%, while the ideal value of UACI is greater than 33%, which indicates that the algorithm is very sensitive to small changes in image data (

Average value of (a) NPCR, (b) UACI using the four testing images.

An entropy calculation is performed to assess the quality of the encrypted and decrypted images. Higher entropy means that the encryption system is more secure (

The average value of entropy from four testing images.

The quality of an image is subjective and relative, depending on the observation of the person judging it. The measurement of image compression quality can be measured quantitatively by using the amount of PSNR. The compression technique is said to be good if the value of PSNR is high, which means the error of the compression technique is very small and the reconstruction image of the original image has a high similarity with the original one. The image quality produced from lossy compression is said to be good if the value of PSNR between 30 and 50 dB. If the PSNR value is above 40 dB, the quality of the image is considered very good. Conversely, if the PSNR value is below 20 dB, it is usually unacceptable (_{R} ), the size of original image size (_{1}) is divided by the size of the compressed image (_{2}) (

From the table, we can conclude that all security requirement is met by our proposed model. It shows that the CEA-CBDSK algorithm is able to guarantee the security of the data, reduce data redundancy, while at the same time maintain the image quality at about 34 dB. Nevertheless, CEA-CBDSK does not work best when applied to images with dark characteristics, as the average value of UACI image is still below 33%. The processing time of both encryption and decryption algorithms can be considered reasonable because it takes less than 15 sec to encrypt and less than 20 sec to decrypt an image size around 512 × 512 pixels. Fastest processing time is obtained for encryption and decryption of dark images, while it takes more time to encrypt and decrypt images with medium or high contrast characteristics. This is because the image size also influences processing time.

Average value of (a) PSNR, (b) compression ratio of the four testing images.

The best performance of the proposed algorithm is obtained when haar filter with a quantization value of 30 is used. Using these parameters, we conduct comparison evaluation between our proposed method with four other methods proposed in

The average of PSNR, UACI, entropy, CR, PSNR values and encryption and decryption process times using 30 different keys.

File | Classification | NPCR | UACI | Entropy | CR | PSNR | T_{encryption} (seconds) |
T_{decryption} (seconds) |
---|---|---|---|---|---|---|---|---|

Artichare | Bright image | 99.7554 | 59.9266 | 7.9988 | 37.2500 | 36.0186 | 12.8361 | 18.1816 |

Pool | Dark image | 99.7546 | 30.7441 | 7.9985 | 37.0757 | 36.4626 | 11.2455 | 14.7797 |

Lena | Moderate contrast image | 99.7535 | 34.7743 | 7.9989 | 37.3047 | 35.7978 | 14.8640 | 19.8693 |

Boat | High contrast image | 99.7548 | 34.6731 | 7.9989 | 37.3047 | 34.3238 | 14.9430 | 19.8642 |

Comparison of NPCR and UACI values between the proposed method and the method in

NPCR | UACI | |||||||||
---|---|---|---|---|---|---|---|---|---|---|

Citra | Size | Classification | Proposed | Ref ( |
Ref ( |
Ref ( |
Proposed | Ref ( |
Ref ( |
Ref ( |

peppers | 512×512 | High contrast | 99.7391 | 99.9676 | - | 99.6100 | 34.3270 | 33.3208 | - | 33.4700 |

Lena | 512×512 | Moderate contrast | 99.7482 | 99.9150 | - | 99.5900 | 34.7650 | 33.5107 | - | 33.4200 |

barbara | 512×512 | Moderate contrast | 99.7604 | 99.3656 | - | 99.5700 | 32.6374 | 33.4989 | - | 33.2900 |

Average | 99.7492 | 99.7494 | - | 99.5900 | 33.9098 | 33.4435 | - | 33.3933 | ||

Lena | 256×256 | Moderate contrast | 99.7360 | 99.8817 | 99.5895 | - | 34.7258 | 33.6860 | 33.4646 | - |

house | 256×256 | Moderate contrast | 99.7742 | 98.9948 | 99.6353 | - | 35.5474 | 33.9622 | 33.4534 | - |

airplane | 256×256 | Bright image | 99.7833 | 99.6680 | 99.5989 | - | 46.2548 | 33.2705 | 33.4396 | - |

Average | 99.7645 | 99.5148 | 99.6079 | - | 38.8427 | 33.6396 | 33.4525 | - |

Comparison of entropy value between our proposed model with

Entropy | |||||
---|---|---|---|---|---|

Citra | Size | Classification | Proposed | Ref ( |
Ref ( |

Airplane | 512×512 | Bright image | 7.9988 | 7.9024 | 7.9931 |

house | 512×512 | Moderate contrast | 7.9990 | 7.9027 | 7.9931 |

Lena | 512×512 | Moderate contrast | 7.9989 | 7.9030 | 7.9929 |

barbara | 512×512 | Moderate contrast | 7.9989 | 7.9025 | 7.9917 |

Average | 7.9989 | 7.90265 | 7.9927 |

Comparison of PSNR and CR values between images produced using the proposed and image produced by

PSNR | CR | ||||||
---|---|---|---|---|---|---|---|

Citra | Size | Classification | Proposed | Ref ( |
Ref ( |
Proposed | Ref ( |

peppers | 512×512 | High contrast | 34.3206 | 32.6900 | 37.3047 | 30.0400 | |

boat | 512×512 | High contrast | 34.3238 | 31.0300 | 37.3047 | 30.3200 | |

baboon | 512×512 | Moderate contrast | 35.0083 | 24.8000 | 37.3047 | 31.7100 | |

Lena | 512×512 | Moderate contrast | 35.7503 | 33.2700 | 37.3047 | 29.9500 | |

barbara | 512×512 | Moderate contrast | 35.0709 | 26.2600 | 37.3047 | 31.3400 | |

Average | 35.7752 | 29.6100 | 37.3047 | 30.6720 | |||

house | 512×512 | Moderate contrast | 37.6866 | 39.674 | |||

airplane | 256×256 | Bright image | 36.3147 | 38.013 | |||

Average | 37.0007 | 38.8435 |

This research has produced a model for securing image data using compression–encryption methods using dynamic session keys that are able to improve image data security. The proposed symmetric generator algorithm is able to generate session keys that are sensitive to the characteristics of the image to be encoded so that the same plain image will not produce the same cipher image. Therefore, the transmitted data are safe against ciphertext-only attacks, statistical attack, and differential attack. This is evident from the runs test, the visual and histogram analysis, differential analysis, and entropy analysis. In addition, the proposed method succeeded in reducing data redundancy up to 37% while maintaining the image quality up to 34 dB. The running time of the algorithm is also low, less than 15 sec for encryption and less than 20 sec for decryption process.

The proposed model was tested on grayscale image data; therefore, further research is conducted to implement it to color images. Furthermore, since the symmetric key is used, the key distribution still becomes the problem in this method. For future work, an algorithm to solve the key distribution problem needs to be integrated with the proposed model.