1 Introduction

Nowadays, multimedia data such as image, video, and audio is being used in many aspects of daily life. In today’s digital world, multimedia data processing, distributing, and storing are being carried out over the Internet. However, the existing IP networks are open and insecure, and the data transmitted can be easily interrupted, intercepted, or modified [1]. Thus, securing multimedia data from eavesdropper became a vital area of research [2]. Nowadays, robust, fast, and reliable security system is a key requirement in many multimedia applications like video conferencing, pay cable TV and medical imaging systems[1, 3, 4]. In recent years, many interesting and novel security technologies have been proposed for multimedia applications that involve images, video, and or audio contents [5,6,7,8,9,10].

Encryption and digital watermarking are considered two important areas that serve an important role in information security. In encryption, a message is converted into such a form that intruders doest not get any meaningful information from it [11]. In multimedia encryption, data is protected via key, and for correct decryption of that information, a decryption key is required [12]. The encrypted message is called ciphertext while the unencrypted message is called plaintext. Extracting a plaintext back from a ciphertext is known as decryption [11, 13]. In order to protect images from illegal operations and copying, digital watermarking has played a vital role since decades. A digital watermark is an arrangement of characters or code embedded in multimedia data to uniquely recognize its initiator and authorized user [14].

In [15], Liu et al. exploited interesting properties of Piecewise Linear Chaotic Map (PWLCM) for color image encryption. To check the security analysis of the scheme in [15], Liu et al performed only NPCR and UACI tests. However, only these two tests does not prove the security of a color image encryption as discussed in [6,7,8,9, 12]. A novel method of confusion and diffusion for images via PWLCM is discussed in [16]. A larger key space was achieved using both PWLCM and Chebyshev map. In [17], permutation of color images were carried out via PWLCM and a higher dimension Chen map was then employed in diffusion stage. The scheme [17] is resistant against various statistical and differential attacks. To resist chosen plaintext attack, Wang et al. proposed a new image encryption scheme [18]. In [18], Wang et al introduced the concept of intermediate parameter for initial conditions. Through this way, initial conditions are strongly dependent on image block and hence can resist plaintext attacks. Three component of color images, i.e. R, G, and B are effectively encrypted in [19]. Wang et al also discussed and carried out the analyses of classical attacks on proposed scheme [19]. Based on the concept of chaotic maps, other related algorithms can be found [20,21,22]

In recent years, research in multimedia encryption has been focused towards integrating encryption and compression. The basic idea is to encrypt multimedia data in such a way that the encryption overhead is small, and secondly, the encrypted data can be represented in a standard-compliant format. The term that is often used in the literature to describe such encryption schemes is selection encryption or partial encryption. Spanos and Maple [23] introduced the idea of selective encryption in 1995. Encryption and compression has a strong link as pointed out by Claude Shannon in his classical paper “Communication Theory of Secrecy Systems” [24]. Lookabaugh and Sicker [25] have pointed out Shannon’s perspective that redundancy in a source can make encryption weak. Shannon suggested that removing redundancy in the source can strengthen the encryption process. The basic idea behind selective encryption is to encrypt selected coefficients from either the intermediate or the final result of a compression system. The coefficients that are not selected are sent unencrypted. If no meaningful information can be deduced from the non-selected coefficients, then the security level of the system is the same as if all the coefficients have been encrypted.

In some scenarios, the quality of encrypted images can be checked through visual test; however, it doest not guarantee security [26]. To quantify the quality and security of an image encryption schemes a number of security parameters can be applied to check the security and efficiency [27,28,29,30,31]. Some of these parameters were applied in the proposed scheme, to check its efficiency.

Weakness in the existing Fawad et al.’s scheme

The degree of similarity between two variables can be computed via correlation coefficient [32]. Ideally, zero correlation coefficient value shows that the two images are completely uncorrelated while 1 shows that the images are perfectly related. − 1 correlation coefficient demonstrates that the images are negative of each other, between an image and completely uncorrelated image is zero [33, 34]. The mathematical formula for correlation coefficient has been given in [34]. The correlation coefficient (degree of similarity) were tested for original and image encrypted via Fawad et al.’s scheme between two adjacent pixels in all directions. The testing was done by randomly selecting 1000 pairs of two adjacent pixels in all the three directions i.e., (vertical, horizontal, and diagonal direction) from the original and corresponding cipher image. Simulation results for Cameraman and Baboon Girl, and Iris images are shown from Tables 123 and 4, respectively. The correlation coefficient in horizontal direction for Cameraman and Baboon images is 0.9522 and 0.9547, 0.9539 and 0.9593, respectively, which means that image encrypted by Fawad et al.’s scheme has high correlation in horizontal direction.

Table 1 Correlation coefficient analysis of two adjacent pixels: Cameraman image
Table 2 Correlation coefficient analysis of two adjacent pixels: Baboon image
Table 3 Correlation coefficient analysis of two adjacent pixels: Girl image
Table 4 Correlation coefficient analysis of two adjacent pixels: Iris image

Self-information about a source can be calculated via entropy. Basically, entropy provide information about a random process itself [35,36,37]. The mathematical formula for the calculation of entropy is given in [38]. Ideally, entropy of a source that produces 28 symbols with equal probability is 8 bits. An encryption scheme is vulnerable to statistical attack if entropy is less than 8 bits [38]. The entropy values obtained for Cameraman and Baboon Girl and Iris images are 7.1455 and 7.1404, 7.1413 and 7.1412, respectively. From information entropy test, it is clear that there is security risk and certain degree of predictability for Fawad et al.’s scheme.

The rest of the paper is organized as: Section 2 demonstrates the at hand scheme that improves a number of security parameters that shall be described in the later part of the paper. Experimental results, comparison and discussion of the proposed scheme with Fawad’s [39], Ahmed’s [40] and Amir’s [41] are presented in Section 3. Conclusion is given in Section 4.

2 The proposed Scheme

Some drawbacks in Fawad et al. scheme [39] like correlation in horizontal direction and low entropy values have been found in Section 2. Hence, the existing Fawad et al.’s scheme has been modified to remove the correlation in horizontal direction and as well as the entropy values and diffusion have been increased.

The basic encryption and decryption transformation in Fawad et al.’s scheme is as follows [39]:

  1. 1.

    C i P. The corresponding decryption transformation will be: Pi T Ci TΦ i P where Φi T Φ i = I = Identity matrix.

  2. 2.

    C = PΦ i . The corresponding decryption transformation will be: P = CΦi T = PΦ i Φi T.

Where, C is the ciphertext image, Φ i is the orthogonal matrix, P is the plaintext image and T is the transpose operator. Flow chat of the proposed image encryption scheme is shown in Fig. 1.

Fig. 1
figure 1

Flow chart of the proposed scheme based on orthogonal matrix, tent map, and XORed operation

Detail steps of the proposed scheme is outlined as below. Chaotic skew tent map and XOR operations are added to improve the security of Fawad’s et al scheme. Let P i n t is the initial plaintext image, P 0 is the plaintext image in 1st iteration, S k be a secret key of 128 bit, respectively. The secret key S k is only known to the sender. The initial seed κ is generated by bit XOR operation of H(P 0) and S k , where H(P i n t ) represent the hash of P i n t . The hash of P i n t can be generated by SHA-3 hashing algorithm. The 256 bit random hash value is generated via SHA-3 hashing algorithm. The initial seed κ is 256 bit which is generated by the sender during encryption process can be easily computed via S k Without loss of generality, the gray scale images have been considered. The whole encryption process is describes as follows:

Let the size of input plaintext image be m × n pixels. After the DCT transformation of P i n t , ∪0 is obtained where ∪0 represents DCT matrix of P i n t . The size of ∪0 is the same as the size of P i n t that is m × n . A 0 represents a S × S partition of ∪0 starting from ∪0(0,0), where ∪0(0,0) represents the DCT DC coefficient of ∪0. Total number of iteration are N and begin from 0 up to N − 1, and i shows the iteration count. The detail steps for iteration are as follows:

  • Step 1: Take the DCT of image P i ; by taking DCT of P i , ∪ i is obtained.

  • Step 2: For each iteration secret key is initialized and secret key is κ i = κ+i. For generation of Φ i which is S × S orthogonal matrix, Gram-Schmidt algorithm is used. The input to Gram-Schmidt algorithm is R i , where R i is S × S random matrix. The secret key κ i is utilized for the generation of random shifting array ψ i of size 1 × Q.

  • Step 3: The orthogonal matrix Φ i is generated by Gram- Schmidt and it is pre-multiplied with A i to get A i ~, where A i is S × S partion of ∪ i starting from DCT DC coefficient.

    $$\tilde{A_{i}} = {\Phi}_{i} X_{i}. $$
  • Step 4: ∪ i is modified in such a way that DCT partition A i is replaced with A i ~ and after modification ∪ i ~ is obtained.

  • Step 5: To get m × n spatial domain image, inverse DCT of ∪ i ~ is taken. and spatial domain image P i ̈ is obtained.

  • Step 6: Divide the image P i ̈ into X × X blocks. Blockwise shifting is carried out by using pseudo-random shifting array ψ i . The permuted version of P i ̈ is P i+1= ≺ ψ i (P̈ i ) , where ≺ ψ i (.) represents the shifting vector ψ i to perform the shifting.

  • Step 7: For each iteration, step 1 to step 6 is repeated.

  • Step 8: After last iteration that is Nth iteration, quantization and scaling is done to keep the pixel value between 0 and 255. The resultant image is ciphertext image C~ of size m × n. The next two steps are the proposed modification in the existing Fawad et al.’s scheme.

  • Step 9: Repeat the skew tent map for X 2 times to get α. Reshape values in a matrix form to get β. Mathematically, the skew tent map \(G:[0,1] \rightarrow [0,1]\) is given by as:

    $$\begin{array}{@{}rcl@{}} \alpha_{n+1} \!= G(\alpha_{n},p)\,=\, \left\{\begin{array}{ll} \frac{\alpha_{n}}{p}, & \textit{for}~ 0 < \alpha_{n} \leq p \\ \frac{1-\alpha_{n}}{1-p}, & \textit{for}~ p < \alpha_{n} < 1 \\ \end{array}\right. \end{array} $$
    (1)

    where p ∈ (0,1) is the positive control parameter and α n ∈ [0,1] is the state parameter of the skew tent map.

  • Step 10: C~ is divided into X × X blocks. β is bitwise XOR with the first block of C i . The i t h block of C~ is bitwise XOR with i − 1 t h cipher block of C~, to obtain cipher image C. C i = E(C~ ⊕ C i−1), C −1 = C 0 ~ ⊕ β. Horizontal correlation is removed when images are encrypted via the proposed scheme. Through Steps 9 and 10, the entropy values and diffusion have been increased, which will be discussed in the next section.

2.1 Image decryption algorithm

To get the plaintext images from ciphertext images, the decryption algorithm utilizes the secret key κ, Q, N, p, x 0, scaling, and quantization parameters. As decryption is the reverse process of encryption, so all transformation used during the encryption process are implemented in the reverse form. Let C̈ is the received ciphertext image at the decryption side. The transmitted or encrypted image was C, but due to the channel distortion or compression the ciphertext image, C changed to C̈. Let us assume that the channel has no distortion and C = C̈. The effect of noise will be discussed later on. The following describes the decryption procedure as outlined in [39] along with the proposed modification which is shown in step 1.

  • Step 1: Iterate skew tent map for X 2 to get α using the initial paramter p and x 0. Reshape α to get X × X matrix and store the obtained result in β.

  • Step 2: C is divided into X × X blocks. β is bitwise XORed with the 1st block of C. The block of C is bitwise XORed with (i − 1) t h block of C to obtain C 0 ̄.

  • Step 3: Inverse quantization and inverse scaling is implemented to C 0 ̄ to acquire C 0 ̆.

  • Step 4: For each iteration, the secret key is initialized to κ i = κ + (N − 1 − i). For generation of Φ i which is an S × S orthogonal matrix, Gram-Schmidt algorithm is used. The input to the Gram-Schmidt algorithm is R i , where R i is S × S random matrix. The secret key κ i is utilized to generate random matrix R i and pseudo-random shift of array ψ i of size 1 × Q.

  • Step 5: Divide the image C i ̆ into X × X blocks. Blockwise inverse shift is carried out by using pseudo-random shift sequence ψ i . The inverse shifted form of C 0 ̆ is expressed by ≺ψ i −1(C i ̆), where ≺ψ i −1(.) illustrates the inverse shift function that utilize the shift vector ψ i .

  • Step 6: Δ i is obtained by taking DCT of ≺ψ i −1(C i ̆).

  • Step 7: Let y i ̂ indicates the S × S partition of Δ i beginning from Δ i (0,0) that is the DCT DC coefficient. The transpose of Φ i is multiplied by y i ̂ to obtain y i ̄. y i ̄ =Φi T y i ̂.

  • Step 8: Δ i is modified in such a way that the DCT portion of y i ̂ is replaced with y i ̄ to get modified Δ̄ i .

  • Step 9: To get m × n spatial domain image. Inverse DCT of Δ̄ i is applied to obtain C̆ i+1, which is the m × n spatial domain image.

  • Step 10: Steps 3 to 8 is repeated for each iteration. After scaling and quantization, P d e c is obtained, where P d e c is the decrypted image and min (P d e c ) = 0 and max (P d e c ) = 255.

3 Security analysis

In this section, experiments are carried out for Cameramen and Baboon images having a size of 256 × 256 pixels. In the following sections, experimental results prove the resistance of the at-hand scheme to attacks like brute force attacks, differential attacks, and statistical attacks.

3.1 Image encryption and decryption

Some images were encrypted by the proposed scheme. Encryption and decryption results are shown from Figs. 234 and 5. The test results show that from ciphertext images, original plaintext images can be recovered. In all the experiments, the iteration count was 4.

Fig. 2
figure 2

Encryption and decryption result: Cameraman image

Fig. 3
figure 3

Encryption and decryption result: Baboon image

Fig. 4
figure 4

Encryption and decryption result: Girl image

Fig. 5
figure 5

Encryption and decryption result: Iris image

3.2 Evaluation and security analysis

This section presents the security and comparison analysis of the proposed scheme with some other traditional schemes. The schemes outlined in [39,40,41] and the the proposed scheme are analyzed in detail. Mathematical formulas of all security parameters can be found in our previous work [12, 27, 42, 43]

3.2.1 Correlation coefficient analysis

To check the degree of similarity between two adjacent pixels, analysis known as correlation coefficients has been done on both Cameraman and Baboon images. In all (three) dimensions (vertical, horizontal and diagonal) 1000 pairs of two adjacent pixels were selected in random manner. Computation of correlation coefficient was same as in [34]. Tables 5 and 6 depict the correlation coefficients values in all directions. It can be seen from both tables that the correlation coefficients for both ciphertext are nearly zero when the proposed scheme is used. It is clear from Tables 1 and 2 that the proposed modification in Fawad’s scheme reduced horizontal correlation. Moreover when compared with other methodologies, the proposed scheme has less correlation values(Tables 7 and 8).

Table 5 Correlation coefficient analysis of two adjacent pixels: Cameraman image
Table 6 Correlation coefficient analysis of two adjacent pixels: Baboon image
Table 7 Correlation coefficient analysis of two adjacent pixels: Girl image
Table 8 Correlation coefficient analysis of two adjacent pixels: Iris image

3.2.2 Entropy analysis

The value of entropy for Cameraman and Baboon images are shown in Table 9, which shows that entropy values are near to the ideal value of 8 for the proposed scheme. The at hand scheme is secure against entropy attack when compared with traditional schemes. An attacker cannot predict the ciphertext and there is no security risk with respect to entropy attack.

Table 9 Entropy analyses of Fawad’s [39], Ahmed’s [40], Amir’s [41], and the proposed algorithm

3.2.3 Encryption quality measurement

By visual inspection it has been shown that the proposed scheme has high encryption quality. This means that ciphertext does not disclose any particulars or fact about the plaintext image. Now the question is how to judge the quality of encryption merely by visual inspection. Numerical results are showed to demonstrate encryption quality of the anticipated scheme. It is needed to show numerically that the modified algorithm has high encryption quality. To check encryption quality numerically, histogram uniformity test has been carried out. For any encryption scheme if the histogram of ciphertext image is uniform that is each gray level is uniformly distributed then the encryption quality is high [44].

The histogram of encrypted images are shown in Figs. 6 and 7. The proposed scheme generates uniform histogram for all encrypted images. It is observed from Figs. 6 and 7 that the histogram of plaintext image and encrypted image is significantly different. Similar results are obtained for Girl and Iris images. This shows the encrypted images bear no statistical similarity with plaintext images. Deviation is another parameter used to judge the quality of encryption algorithm. The encryption quality of an image encryption algorithm can be numerically computed via maximum deviation, irregular deviation, and the uniform histogram deviation [3, 26]. Simulation results for all three parameters are shown in Tables 1011, and 12, respectively. The higher value of maximum deviation (D) confirm the robustness of the anticipated algorithm, which means that encrypted image is more deviated from plaintext image. With respect to irregular deviation experimental analysis, the proposed scheme tends to have lower value of I D , which are actually required for encryption algorithms, as discussed in [3, 26]. If the value of U D is low, then this indicate the encrypted image is less diverged from ideal assumed histogram [3]. Hence, encryption quality of the presented algorithm is high due to the lower value of U D when compared to other schemes.

Fig. 6
figure 6

Histogram demonstration of plaintext and ciphertext: Cameraman images

Fig. 7
figure 7

Histogram demonstration of plaintext and ciphertext Baboon images

Table 10 Maximum deviation analyses of Fawad’s [39], Ahmed’s [40], Amir’s [41], and the proposed algorithm
Table 11 Irregular deviation analyses of Fawad’s [39], Ahmed’s [40], Amir’s [41], and the proposed algorithm
Table 12 Uniform Histogram deviation analyses of Fawad’s [39], Ahmed’s [40], Amir’s [41], and the proposed algorithm

3.2.4 Diffusion characteristics of the proposed scheme

Avalanche effect

This test is carried out for the proposed scheme, which is one of the desirable properties for an encryption algorithm [45, 46]. The diffusion characteristic is tested by changing only one bit in the plaintext, that is the plaintext is changed from P to P̄ and the corresponding ciphertext is changed from C to C̄. The formula for MSE is given in [47]. Simulation results are shown in Table 13. There should be quality difference between the two images if M S E ≥ 30 dB [48]. From Table 13, quality difference is evident and it shows that the proposed scheme has strong diffusion mechanism.

Table 13 MSE results (dB) of Fawad’s [39], Ahmed’s [40], Amir’s [41], and the proposed algorithm

NPCR and UACI

The NPCR [30] test is carried out for the proposed scheme, in order to check the dissimilarity rate of pixels in ciphertext images due to one one pixel change in the plaintext original image . To check the average of these changes, UACI is calculated as in [49,50,51]. Tests were performed on Cameraman and Baboon images, to identify the impact of a single pixel change on the anticipated scheme. Simulations results are shown in Tables 14 and 15. The values obtained in Tables 14 and 15 are higher than the values obtained in Fawad’s [39], Ahmed’s [40], and Amir’s [41], so the proposed scheme is better. All other schemes indicate very limited sensitivity to minor changes in original images.

Table 14 NPCR results of Fawad’s [39], Ahmed’s [40], Amir’s [41], and the proposed algorithm
Table 15 UACI results of Fawad’s [39], Ahmed’s [40], Amir’s [41], and the proposed algorithm

3.2.5 Key space analysis

To test the performance of the proposed scheme against brute force attack, key space analysis was performed.

Exhaustive key search

An exhaustive key search requires 2k operation to succeed, where k is key size in bit. In the proposed scheme, a key size of 128 bits has been used; hence , 2128 operations are required for determination of key. In order to predict the key via brute force attack, an attacker requires 10.790283 × 1021 years, if 1000 MIPS computer is employed.

Key sensitivity test

To check the key sensitivity of anticipated algorithm, plaintext image was encrypted using two different keys. These keys differ by only one bit. The resultant ciphertext images are C 1 and C 2. The two ciphertext images obtained through the proposed scheme are shown in Fig. 8, but by visual inspection, it is difficult to guess that two ciphertexts are different or same. The same scenarios are found in other schemes as well, so the percentage difference between two ciphertext were calculated for all scheme. Simulation results are highlighted in Table 16. It can be seen from Table 16 that keys which differ by only one bit, the resultant ciphertexts are different, approximately more than 99% for all schemes except Amir’s scheme [41]. Generally, these obtained results show that, the all schemes are sensitive towards different keys.

Fig. 8
figure 8

Results of the difference test

Table 16 Key sensitivty test of Fawad’s [39], Ahmed’s [40], Amir’s [41] and the proposed algorithm

3.2.6 Classical attacks

As outlined in [19], classical attacks such as chosen plaintext attack, plaintext-only attack, chosen ciphertext attack, and ciphertext-only attack are most common attacks in cryptography. In such attacks, an intruder has access to the design and working mechanism of an encryption algorithm. In such scenarios, only key is kept secret from eavesdroppers. In these attacks, chosen plaintext is the most powerful attack [19]. If an encryption algorithm resist the chosen plaintext attack, then it is resistant to other attacks as well [19]. In the proposed scheme, if one bit in plaintext changes, the corresponding initial conditions generated via SHA-3 changes and hence orthogonal matrix change. The encrypted image is not only dependent on SHA-3 but also dependent on Tent map initial conditions. With a slight change in Tent map initial conditions, the corresponding ciphertext will be completely different. Hence, the proposed scheme is resistant against ciphertext/plaintext attack.

3.2.7 Time and complexity analysis

Without loss of generality, all images were gray scale with size 256 × 256. The proposed algorithm was tested on MATLAB R2014 with CPU 2.0 GHZ and 3 GB memory. One can see from Table 17 that the proposed encryption consumes less time as compared with Ahmed’s and Amir’s schemes. But when compared with Fawad’s scheme, the proposed scheme consumes much time. Basically, in the proposed modified scheme, Tent map and XOR operation were added to achieve higher security.

Table 17 Processing time (Sec) required for Fawad’s [39], Ahmed’s [40], Amir’s [41], and the proposed algorithm

4 Conclusion

In this paper, we initially investigated the drawbacks in an existing traditional encryption scheme. Then, we proposed an enhanced version of that scheme. The new scheme overcomes many issues that exists in some traditional schemes. To show the strength of the proposed scheme, we evaluate it through different tests such as correlation coefficient, information entropy, deviation, NPCR, UACI, and key sensitivity. These security analyses indicate that our proposed scheme based on skew tent map and XOR operation has advantages over traditional encryption techniques.