INFORMAZIONI SU QUESTO ARTICOLO

Cita

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 (Hamdi et al., 2017).

An efficient way to cope with large data sizes is to compress the data before it is transmitted or stored (Santoso et al., 2011; Santhosh et al., 2013; Sharadha and Bhanuprakash, 2013; Karthikeyan et al., 2014; Kumar and Vaish, 2016; Setyaningsih and Harjoko, 2017), while the problem of information security can be overcome using cryptography. Theoretically, compression and cryptography are two different things. Cryptography ensures transmitted data has reliability and integrity by converting legible data into illegible data through an encryption process, while compression reduces the amount of data to be transferred or stored by searching for multiple data sections or data patterns that can be removed in order to reduce the data size (Morales-Sandoval and Feregrino-Uribe, 2005). Therefore, cryptographic methods can be combined with compression methods to improve the effectiveness and security of data transmission processes in computer networks.

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 (Patrick, 2011; Sharma, 2012; Ayele and Screenivasarao, 2013; Somani and Mangal, 2014). Symmetric cryptography is faster than asymmetric cryptography because it does not require the high computation due to complex mathematical calculation (Mahaveerakannan and Dhas, 2016). Moreover, the authentication of the sender can be verified directly by the receiver because the sender and the receiver use the same key. However, symmetric cryptography has a weakness in key management (Wang and Zhao, 2010; Koops, 1999; Alleaume et al., 2014). The key management issues of symmetric cryptography include key security and the symmetric key generation. The key must be generated in such a way that it is impossible for cryptanalysts to predict it.

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 (Alleaume et al., 2014). Therefore, symmetric keys should not be used more than once in order to avoid the use of identical keystream to encode the data. One of the methods to generate keystream is by utilizing the concept of chaos. Current research focuses on improving the security of image data by developing the concept of chaos to generate random keys (Al-Maadeed et al., 2012; Tong et al., 2013; Fira, 2015; Murillo-Escobar et al., 2015; Deng et al., 2017; Hamdi et al., 2017; Kumar and Vaish, 2017; Zhang et al., 2017), randomizing pixel positions (Chen et al., 2011; Gupta and Silakari, 2012; Boriga et al., 2014; ; Chen et al., 2014; Goel et al., 2014; Xiang et al., 2014; Zhou et al., 2014; Li and Lo, 2015; Chen et al., 2016; Kumar and Vaish, 2017; Vaish et al., 2017; Xiaoyong et al., 2017) or both (Abd El-Latif and Niu, 2013; Rahmawati et al., 2013; Huang et al., 2014; Ahmad et al., 2017; Belazi et al., 2017; Tong et al., 2017). However, if the sender and the receiver do not establish the new key, the symmetric key to generate the keystream will be the same. In fact, a good cryptographic system must have the ability to change symmetric keys every time the encoding process is performed. Changes to the symmetric key will generate different keystreams for every data to being encoded. Thus, the transmitted image data are safe against ciphertext-only attack because the relationship between plaintext and ciphertext is hidden.

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: Section “Related Work” presents related work. Section “Propsed Key Generation Alogrithm” explains the algorithm to generate initial symmetric keys and session keys. Section “New Compression–Encryption Alogorithm Using Chaos Based Dynamic Session Key” describes the image encoding and decoding algorithms using the proposed dynamic session key. Evaluation and analysis of the proposed algorithms are discussed in section “Evaluation and Analysis”. Finally, section “Conclusion” presents the conclusions of this paper along with future work.

Related work

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 (Al-Maadeed et al., 2012; Setyaningsih and Wardoyo, 2017). Nonchaos-based encryption algorithms use fixed keys to encrypt data, hence, it is less secure because the key space is not large. On the other hand, chaos-based encryption uses dynamic keys to encrypt data because it has unpredictable and large key space, high sensitivity, and ergodicity. These make chaos-based encryption is a good candidate for fast and safe image encryption scheme.

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 (Belazi et al., 2017).

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 (Al-Maadeed et al., 2012). An encryption scheme that uses merging with compression methods in addition to securing image data also aims to reduce the size of the data to make the transmission process faster and safer, while the encryption without compression scheme is more focused on how to secure the transmitted data. To improve the security of image data, and at the same time, increase the speed of data transmission, we can select the appropriate group of algorithms for each classification described above. The use of chaos-based encryption, which is combined with compression and selective encryption, can be considered as the best combination for improving data security and increasing data transmission.

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 (Al-Maadeed et al., 2012; Xiang et al., 2014; Wang et al., 2015; Hamdi et al., 2017; Kumar and Vaish, 2017; Vaish et al., 2017). Selective compression–encryption models are proposed in (Kumar and Vaish, 2017; Vaish et al., 2017; Wang et al., 2015) by encrypting each sub-image and then compressing each using a different algorithm. In Wang et al. (2015), before DWT transformation, Schema Lifting (LS) is performed, which is followed by the quantization method and arithmetic coding. On the other hand, in Kumar and Vaish (2017), LS is not used, and after the encryption process which uses permutation coefficients on LH, HL, and HH sub-bands, the compression process is performed using Singular Value Truncation and Huffman methods. Then, the encryption process is applied to LL sub-band using the pseudorandom method, which is followed by compression. Another selective method is performed by combining the LW sub-band of DWT results and the error measurements, while the LH, HL, and HH sub-bands are combined using the maximum method. The information of LL sub-band is compressed using error measurement, encrypted using a coefficient permutation, and finally encoded. The LH, HL, and HH sub-bands are compressed using quantization parameters, encrypted using permutation coefficients and encoded using the Huffman method (Vaish et al., 2017).

The selective compression–encryption method proposed by Al-Maadeed et al. (2012) performs the encryption process to the LL sub-band of DWT transformation using a chaos-based encryption algorithm. Compression for LH, HL, and HH sub-bands is conducted using quantization method and bitstream coding. The basic idea of the method is to show the effect of using multiple keys to improve security by increasing the number of external keys in the encryption process on the LL sub-band, which is divided into one, two, or three partitions. Compression–encryption model that uses more than one key is also performed in Hamdi et al. (2017). The proposed method adopts a confusion and diffusion technique that are integrated or connected into a compression chain using three keys. Three keys to the encryption process are formed using the Chirikov Standard Map algorithm. Then, the bit encryption to the LW sub-band of DWT transformation is performed using the first key, while the encryption to the LH, HL, and HH sub-bands is performed using the LIP list and the second key. The third stage is a permutation after SPHIT coding. This stage is used to improve the diffusion of the encrypted images.

The compression–encryption methods using S-Box are proposed in Belazi et al. (2017) and Hassan and Younis (2013). In Hassan and Younis (2013), a partial method is used, in which part of the compressed data is encrypted using Advanced Encryption Standard (AES). Meanwhile, Belazi et al. (2017) proposes a new chaos-based base scheme using S-box construction with chaos and linear fractional transform (LFT).

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 Figure 1. Furthermore, in the process of selective encryption, the session keys consist of four dynamic keys. The session keys, which are generated from symmetric keys, consist of two keystream-shaped keys to encode the LL sub-band as well as the LH, HL and HH subgroups produced by DWT 2D transformation, and two S-box shaped keys to scramble the pixel position.

Figure 1

The proposed compression–encryption model.

Proposed key generation algorithm

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.

Symmetric key generation algorithm

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

Step 1: Transform the image data using two-dimensional Discrete Wavelet Transform (DWT 2D). The goal is to filter the data into a low pass that represents an important part of data in low resolution. DWT 2D transformation is performed to rows (horizontal), and to columns (vertical). This is done by passing the signal on high pass and low pass filters, and then half of each output is taken using subsampling operation. This process is called a one-level decomposition process. The output of the low pass filter is referred to as the LL sub-band value which is then used as the input of the next level decomposition process as illustrated in Figure 3.

At this stage, if the plain image size is n × n pixels, the decomposition process is repeated until level L, that is, until the size of the produced LL sub-band is nLL × nLL, with 32<nLL≤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 m × n pixels, the decomposition of DWT 2D transformation is performed until the sub-band LL size of min(m2L,n2L) is greater than 32 and less than or equals with 64, where L is the level of wavelet decomposition. For example, if the plain image size is 383 × 510 pixels then the DWT 2D transform is performed until the 3rd level because at the 3rd level one of the rows or column sizes of the LL sub-band is (38323,51023)=48pixel .

Step 2: Scramble the position of LL sub-band data element produced by the L-level decomposition. The positioning of mLL × nLL 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 (Zhu et al., 2011; Wang et al., 2015); [xi+1yi+1]=[1bcbc+1][xiyi]mod(N).

The determinant value of the matrix is: [1bcbc+1]=1.

Parameters b and c are positive integers. In this study, the parameters b and c are generated randomly until we find the values of b and c that satisfy Eq. (2). Value [xi, yi] and [xi+1, yi+1] is a nonnegative integer i.e. {0,1, 2, N−1} with N is min (mLL, nLL). [xi, yi] is the position of the original image element and [xi+1, yi+1] is the position of the image element after the permutation is done using ACM.

Step 3: Form a 4 × 4 pixels B matrix based on the result of step 2. The matrix is filled in row by row, as illustrated in Figure 4.

The next step is to form column vector A using Eq. (3) as the initial value in the Cipher Block Chaining (CBC) process. Ai=j=14|round(B(i,j))|

The value of i is 1 to 4, and B is the permutation matrix produced using ACM, as specified in Step 3.

Step 4: Convert the element of vector A = [A1, A2, A3, A4] to binary form, such that each element has a maximum data length of 32-bits. After that, each element of vector A is encrypted using the CBC algorithm, in which the value of C0 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 A is used as the input. Therefore, this algorithm is suitable to generate symmetric keys in which each key component is expected to have a different value. Then, the result is returned to decimal format to obtain symmetric keys consisting of K1, K2, K3, and K4, as illustrated in Figure 5. These symmetric keys are 32 bits long each, so the total symmetric key length is 128 bits. These symmetric keys are then sent via a secure channel.

Figure 2

Symmetric Key Generation Algorithm.

Figure 3

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

Figure 4

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

Figure 5

Formation of symmetric keys K1, K2, K3, and K4.

Session key generation algorithm

This step is performed to obtain KG1, KG2, KG3, and KG4 session keys used to encrypt each compressed sub-band and to randomize the pixel position.

Algorithm to generate session key KG1

The KG1 row-shaped session key is randomly generated using chaos logistic map method using Eq. (4). xi+1=rxi(1xi), where xi is the chaos value of the requirement that 0≤x1≤1. Parameter r is also called the growth rate with 1≤r≤4. The advantage of this scheme is that each image data will have different parameter pair of x0 and r because they are determined based on the symmetric key value of K1. The ideal value of the parameter r in Eq. (4) is 3.57≤r≤4 (Goel et al., 2014; Zhou et al., 2014; Ahmad et al., 2017; Belazi et al., 2017; Deng et al., 2017). Therefore, the parameter value of r for chaos generator used in our method is 3.57≤r≤4, which is obtained from the normalization of values K1 using minmax normalization method. Normalization min–max maps a value of v to v′ into the range [min range, max range] based on Eq. (5): v=(vminv)(maxvminv)×(maxrangeminrange)+minrange

v is symmetric key K1, v′ is the result of normalization data that becomes parameter value r, minv is the minimal value of the initial symmetric key (min(K1, K2, K3, K4)) and maxv is the maximum value data of symmetric key (max(K1, K2, K3, K4)). The value of x0 for Eq. (4) in our method is determined from the value of symmetric key K1, which is normalized to a value ranging between 0 and 255 using Eq. (6): T(x,size)=x*10count,x0

size is the desired length of the number, while the value of count starts from 1 and is increased by 1 until x*10count>10size−1. Only the integer part of the produced decimal is used (Munir, 2012). Next, value x1 up to xn are obtained using Eqs. (4) and (6) according to the length of the sub-band LL compression vector. The produced vector value [x0 x1 x2xn] is then referred to as session key KG1.

Algorithm to generate session key KG2

Key KG2 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 KG2 is generated in the same way as the generation of KG1, but the length of the session key vector is 256, which is referred to as B1. The nth block (Bn) is obtained by randomizing the data position Bn-1 using the concept of permutation employed in RC4. The produced key KG2 is the combination of vector blocks [B1 B2Bn].

Algorithm to generate session key KG3

The S-Box shaped key KG3 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 KG3 first a matrix of b × k size, which is adjusted to the size of the block cipher being processed, is determined. The value of the first element of the session key KG3 is derived from symmetric key K3 using the Chaos Logistics Map method, similar to the generation of session key KG1, with the requirement that 1 < session key value KG3b×k. For example, if the size of the block cipher is 5×5 the session key value of KG3 ranges between 1 and 25. The next session key elements of KG3 are generated randomly using the Chaos Logistics Map method, with the requirement that there is no repeated value. Figure 6 shows an example of the KG3 formation.

Figure 6

(a) Initial cipher block of size 5×5, (b) session key KG3 which is formed using the proposed algorithm.

Algorithm to generate session key KG4

Key KG4 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 KG3. The values of each element should be unique and ranges from 0 to 255. Figure 7 shows an example of session key matrix KG4, which is generated from symmetric key K4 and then normalized to the range of [0,255] using Eq. (6) to obtain KG4 (1,1)=95. The key elements KG4(1,2) to KG4(16,16) are generated using Eqs. (4) and (6).

Figure 7

Example of key session KG4 which is randomly generated from the value of symmetric key K4 using the proposed algorithm.

New compression–encryption algorithm using chaos-based dynamic session key

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.

Image compression–encryption algorithm

The CEA-CBDSK method for securing image data on the sender side is divided into three stages: symmetric key generation, compression, and encryption. Figure 8 illustrates the details of the image data security model on the sender side.

Symmetric key generation: This part performs the symmetric generation process that has been discussed in Section “Proposed Key Generation Algorithm”.

Compression: This part conducts selective compression process using DWT 2D transformation, uniform quantization, and coding process as shown in Figure 8. The DWT 2D transformation will produce four sub-bands: LL sub-band representing the approximate coefficient, and LH, HL, and HH sub-bands, each of which representing image detail coefficients. Uniform quantization is then applied to each sub-band value representing the approximate and detail coefficients. This quantization has the same gray level clustering interval (e.g., intensity value of 1 is given to LL sub-band value of 1 to 10, intensity value 2 is given to LL sub-band value of 11 to 20, and so on). The range of the interval is defined by stepsize=maxsubbandvalueminsubbandvaluequantizationvalue.

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 4 7 11 3 1 is the produced quantization-10 data. Conversion of the data to binary form will produce five 4-bit blocks as shown in Figure 9.

Encryption: This part will encrypt the compressed data. As shown in Figure 8, the proposed encryption algorithm consists of six process stages to encode compressed image data using four-session keys. The encryption process is as follows:

Encrypt the LL sub-band data that has been compressed with key KG1 using Eq. (8): EKG1(SubbandLL)=(SubbandLL+KG1)mod256

Encrypt the LH, HL, HH sub-band data that has been compressed with key KG2 using Eq. (9) EKG2(SubbandLH,HL,HH)=((SubbandLH,HL,HH)+KG2)mod256

Incorporates the LL, LH, HL, and HH sub-bands encryption results and change the form from row vectors into an m × n -sized matrix. The value of n will be equal to the number of columns in the original image, whereas the value of m will be adjusted to the number of merged data, as shown in Figure 11, using the following rules:

a. Rows 1 through row m −1 are used to place the result of LL sub-band encryption, followed by the LH, HL, HH sub-bands encryption.

b. The mth row contains the end of HH sub-band encryption data, padding bits, and 6 last pixels which are used to provide the information about the number of rows, the number of padding data and the number of LL sub-band data. Each of the information is stored in 2 pixels; this is because each pixel element has a maximum value of 255, while the stored information may be very large. To store very large data, each information is divided into 2 pixels where the first pixel (col n−5, col n−3, col n−1) contains the integer part of the data division with 256, while the second pixel contains the fraction part (col n−4, col n−2, col n). Hence, the maximum value to store the information is 255×255+255=65,535.

Divide the matrix produced in Step 4 into b×k blocks to do the process of block permutation cipher using session key KG3. 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 KG4 This step uses the modification of the Playfair cipher method (Dhenakaran and Ilayaraja, 2012) to permutate the pixel value so that the hidden information that is still in one block position of the fourth step results can be scrambled. To do this, the matrix is divided into blocks, each of which contains 2-pixel elements of the matrix, referred to as c1 and c2. Any pair of pixels containing c1 and c2 needs to perform block permutation using rules on the Playfair cipher method (Dhenakaran and Ilayaraja, 2012) with session key KG4.

Do substitution on cipher image produced in Step 5 using key KG4 of size 16 × 16 pixels, which is expanded using a keystream generator into m × n size. If the length of the cipher image is greater than 16 × 16 pixels, do key padding to KG4 using keystream generator (Dhenakaran and Ilayaraja, 2012). Before doing key padding, KG4 is converted into line vector form. Do the padding process to key KG4 o that its length equals the length of the cipher image (m × n). After padding process is done, the produced key, which is called KG4new, is reshaped into a m × n matrix. The substitution process is done using Eq. (10):

EKG4New(Cipherimage)=(Cipherimage+KG4New)mod256

Figure 8

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

Figure 9

Illustration of quantization result in binary form The bits are then grouped into 8 bit sized blocks, which produces 71 179 1 (in decimal), as shown in Figure 10.

Figure 10

Illustrated by data coding results.

Figure 11

The process of resizing the encrypted LL, LH, HL, and HH sub-bands data from the column vector to a matrix of size m × n 4) Divide the matrix produced in Step 4 into b × k blocks to do the process of block permutation cipher using session key KG3. The goal is to randomize the element.

Image decryption–reconstruction algorithm

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

Step 1: Reconstruct symmetric keys KG1, KG2, KG3, and KG4 using the same symmetric key generation algorithm as in the encryption process.

Step 2: Decrypt the cipher image using substitution method with session key KG4 new using modulo 256 operations. Do permutation to the block using the Playfair cipher decryption process.

Step 3: Descrambling the pixels to put the data block to their original positions using session key KG3.

Step 4: Convert m×n matrix produced in Step 3 into a vector to separate the LL sub-band from LH, HL, HH sub-band. The separation is performed using the following algorithm:

Find the number of image rows (y1), the number of padding data (y2) and the number of LL sub-band (y3) data, using Eqs. (11) to (13). y1=colelement(n5)*256+colcontents(n4) y2=colelement(n3)*256+colcontents(n2) y3=colelement(n1)*256+colcontents(n)

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

Obtain the value of LH, HL, and HH sub-bands form the row vector, taken from elements in position (1, y3+1) to position (1, ymy2−6).

Step 5: Decrypt the LL sub-band value produced from the fourth step using modulo 256 operations with session key KG1. Then, decrypt the LH, HL, HH sub-bands using modulo 256 operations with session key KG2.

Step 6: Reconstruct LL sub-band vector and LH, HL, and HH sub-bands vector using the decoding process, and do dequantization on each vector. After that, combine the two vectors to produce the same image size as the original message. Finally, perform the inverse of DWT 2D transformation to the image.

Figure 12

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

Evaluation and analysis

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.

Result and analysis of symmetric key generation algorithm

Figure 13 shows the values of symmetric keys obtained from Lena grayscale image of 512 × 512 sizes, with intensity value lowered to 40 and raised up to 40. In Figure 13(A), when the proposed algorithm is not used, if the intensity value is increased, the symmetric key value will rise linearly. However, when the symmetric key is generated using the proposed algorithm, the generated produces symmetric keys are random as shown in Figure 13(B).

Figure 14 shows four images with different characteristics and the graphics of the generated symmetric key values in 30 experiments. The results show that the symmetric key generated using the same image will always be different. This is also proven using the run-test that with a=5% P-value > 0.05 as seen in Table 1.

Based on Figure 13(B), Figure 14, and Table 1, it is proven that the proposed algorithm is capable of generating random symmetric keys. Thus, the session key is dynamic. As a result, the image data are safe from ciphertext-only attack because there is no connection between plain image and cipher image.

Figure 13

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

Figure 14

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

Results and analysis of the proposed compression–encryption method

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: K1 = 2394732439996, K2 = 3619928903909, K3= 2694188048471, and K4= 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.

Visual analysis and histogram analysis

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 Figure 15.

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.

Figure 15

Result of visual analysis to cipher image.

Differential analysis

The Differential attack is an attack that traces the difference and tries to find the relationship between plain image and cipher image (Hua and Zhou, 2017). There are two parameters used to measure the ability to withstand differential attacks. The first parameter is the Number of Pixel Change Rate (NPCR), which is used to measure the number of pixel changes in each image pixel of the plain image. The second parameter is the Unified Average Changing Intensity (UACI), which is used to measure the average intensity of the differences between the plain image and the cipher image. The calculations of NPCR and UACI use Eqs. (13) and (14), respectively: NPCR=x,yD(x,y)M×N×100%, UACI=1M×N(x,y|f1(x,y)f2(x,y)|255×100%), where M and N represent the number of rows and columns, respectively, f1 represents the original image, f2 represents the reconstructed image, while D(x, y) is defined as follows: D(x,y)={1iff1f2,0iff1=f2.

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 (Hamdi et al., 2017; Teng et al., 2017).

Figure 16 shows the average values of NPCR and UACI of the images using different wavelet filters and quantizations. It can be seen that the average value of NPCR and UACI is the best when Haar filter is used on quantization of 30. The average value of NPCR is 99.7666%, while the average value of UACI = 40.0053%. It also shows that the proposed algorithm is secure against differential attacks.

Figure 16

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

Entropy analysis

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 (Younes and Jantan, 2008). If a grayscale image is encrypted and, hence, in random condition, the ideal value of entropy is ≈8. It can be said that the corresponding encryption system is safe from entropy attacks. In contrast, entropy value much smaller than eight indicates that the encryption system is still predictable (Jolfaei and Mirghadri, 2011).

Figure 17 shows the average of entropy value using different filters and quantizations. It can be seen that if the quantization value is greater, the average entropy value is also greater using either Haar, Bior3.5, or Bior4.4 filter. The average entropy values for all scenarios is above 7.9989, which means the proposed algorithm is safe against the entropy attack. The best entropy value is 7.9991, which is obtained when the Bior4.4 filter is used with a quantitative value of 35.

Figure 17

The average value of entropy from four testing images.

Quality analysis and image compression ratio

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 (Bull, 2014). To measure the ratio of image data compression (CR ), the size of original image size (C1) is divided by the size of the compressed image (C2) (Wang and Gao, 2015).

Figure 18 shows the value of PSNR and compression ratios of the four images. It can be seen that the greater the quantization value, the better the image reconstruction quality. In contrast to the image ratio, the average image compression ratio starts to decline when the quantization value is 35. This is because the quantization process using the value 35 will result in compression from 8 bits to 6 bits, which means that the size drops only 2 bits per data element, whereas, for another quantization value, the compression is from 8 bits to 5 bits per data element. The best image compression ratio is 37.2338, which is obtained when haar filter is used with a quantization of 30. This means that the proposed algorithm can reduce data redundancy by more than 37%. The best average PSNR is 35.5645 dB, which is obtained when haar filter is used on quantization 35. However, this produced rather low average compression rate. When haar filter is used with the quantization value of 30, the PSNR value is still quite good at 34.9380 dB, while the compression ratio is around 37. Hence, it can be concluded that to get high ratio performance with good quality image data, Haar wavelet filter can be used with a quantization value of 30.

Table 2 shows the average values of NPCR, UACI, entropy, CR, PSNR as well as the time of encryption and decryption process of four testing images, in which each image is encrypted using 30 different symmetric keys. The results show that the use of different symmetric keys does not affect the value of the compression ratio and the quality of the reconstructed image data, which is indicated by the similar CR and PSNR values. However, for the data security measure, the use of different keys affect the security level of image data.

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.

Figure 18

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

Results and comparative analysis of proposed methods against other research

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 Belazi et al. (2017), Hamdi et al. (2017), Kumar and Vaish (2017) and Zhang and Tong (2017).

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 Tencryption (seconds) Tdecryption (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 Belazi et al. (2017), Hamdi et al. (2017), and Zhang and Tong (2017).

NPCR UACI
Citra Size Classification Proposed Ref (Hamdi et al., 2017) Ref (Belazi et al., 2017) Ref (Zhang and Tong, 2017) Proposed Ref (Hamdi et al., 2017) Ref (Belazi et al., 2017) Ref (Zhang and Tong, 2017)
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 Belazi et al. (2017) and Zhang and Tong (2017).

Entropy
Citra Size Classification Proposed Ref (Belazi et al., 2017) Ref (Zhang and Tong, 2017)
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 Hamdi et al. (2017), and Kumar and Vaish (2017).

PSNR CR
Citra Size Classification Proposed Ref (Hamdi et al., 2017) Ref (Kumar and Vaish, 2017) Proposed Ref (Kumar and Vaish, 2017)
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

Table 3 shows the comparison between our method and another method in terms of NPCR and UACI values. The average NPCR value for the 512 × 512 images using CEA-CBDSK is about 0.16% better than (Zhang and Tong, 2017), while the average UACI score is about 1.52% better. When compared to Hamdi et al. (2017), the average NPCR value of our proposed method is almost the same; however, the average UACI value is still 1.38% better. The value of NPCR and UACI of the 256 × 256 images using the CEA-CBDSK method is also better than Hamdi et al. (2017) and Belazi et al. (2017), in which the NPCR average is about 0.2% better, while the UACI value is about 13.64% better. This suggests that the proposed algorithm works better because it generates high randomness and is sensitive to the characteristics of the encoded image data.

Table 4 shows the comparison between our model with Belazi et al. (2017) and Zhang and Tong (2017) in terms of entropy value. It can be that the CEA-CBDSK method is slightly better than Belazi et al. (2017) and Zhang and Tong (2017). This means that the proposed method is more resistant to entropy attack than the other two algorithms.

Table 5 shows the comparison between the CEA-CBDSK method with Kumar and Vaish (2017) in terms of PSNR and CR values. The results indicate that the CEA-CBDSK method produced images with PSNR value 15.15%, higher than Kumar and Vaish (2017), while the average compression ratio is about 17.78% higher. This shows that the proposed method is better in terms of the produced quality image as well as compression value compared to Kumar and Vaish (2017). However, compared to Hamdi et al. (2017), the average PSNR score of images using CEA-CBDSK is 4.74% less. This means that Hamdi et al. (2017) produces a better quality of the reconstructed image.

Conclusion

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.

eISSN:
1178-5608
Lingua:
Inglese
Frequenza di pubblicazione:
Volume Open
Argomenti della rivista:
Engineering, Introductions and Overviews, other