A Comparative study on Cryptographic Image Scrambling

In the last few decades, a numerous number of image encryption algorithm has been proposed based on scrambling. Scrambling is the most crucial part of confusiondiffusion based encryption techniques. In the current scenario, the scrambling techniques are used without knowing the cryptographic effect, quality and computational complexity. Hence, an comparative study on scrambling techniques (permutation) is required. In this paper, a comparative study has been done on different scrambling techniques like matrix transformation, bit plane scrambling, 2D mapping and key based row and columns shifting techniques. To determine the quality and efficiency of the scrambling techniques, correlation, entropy, computational complexity have been considered. From the test results it was found that matrix based image scrambling applied on Arnold Transform was the best among the considered techniques in terms of correlation.


I. INTRODUCTION
In the past few decades, there has been a drastic change in the working habits, entertainment sources, modes of communication and shopping techniques.Due to this change a lot of multimedia information exchanges are done over the Internet everyday.Secure multimedia communication is increasingly becoming important as multimedia data can be easily intercepted by illegal sources.Law enforcement agents may find it very difficult to stay afloat above the ill intentions of hackers.Therefore, people should pay more attention to the security of media data.Techniques like encryption [10], [11], stanography [15], watermarking [12], secret sharing [13], [9] etc are used to secure data during the transmission over public channel.
Scrambling is widely used in encryption algorithms [16], [14], [8] for adding confusion.Scrambling refers to the permutations of pixel values or permutation of bit values in a bit plane.Transforming a plain image into a meaningless noise to eliminate the high correlation between adjacent is the aim of scrambling.Various image scrambling techniques are used in pay-TV, defense purposes, medical domain, private video conferencing and various other applications [28], [19].
This paper presents a comparative study of some popular cryptographic image scrambling methods like generalized matrix-based scrambling (transformation) [5] using Arnold's transform [1] and Fibonacci transform [27], gray code with bit plane transformation [25], 2D mapping [20], key based row and column shifting [18], [10] and Fu et.al.'s key based row and column shifting with bit-level permutation [3].
Arnold's cat map is a chaotic map named after, Vladimir Arnold who proposed the algorithm, and also applied to Fibonacci transform [28].Fibonacci transform [27] has a unique property of uniformity.The pixels that are at equal distance from each other in original image remain at equal distances in the encrypted image as well.The adjacent pixels are also spread as far as possible.In addition to having very low correlation this method has low computational overhead.
A quantum image gray-code and bit-plane scrambling [25], [21] is presented in which bit-plane scrambling is one of the famous image scrambling techniques.It is used as one of the basic steps in many encryption algorithm [26].The values of higher bit planes are XORed with the lower bit planes.The value of lowest bit plane be fixed.
Another image scrambling method based on 2D mapping [22] in which pseudo-randomness, aperiodicity and being sensitive to change with respect to initial conditions make chaotic maps one of the favorite techniques in scrambling.It is also used in scrambling of large amount of data such as video, audio etc [2].The watermark information of the image is embedded in the amplitude spectrum by 2D mapping [20].In this algorithm, a random sequence is generated using chaotic map(logistic map [23]).Then, the original image is XORed with the random sequence.Further image mirror mapping interlacing is used to scramble the image.
Key based scrambling for secure image communication is used in [18], [10], a random sequence is generated.Using this random sequence, the rows of the image is swapped.Similarly, the columns are swapped.Further, circular shifting of the rows and columns are done using using the same sequence.[24] also used a method involved row and column shifting with prediction error clustering for image encryption the compression scheme.[7], [17] also uses row and column shifting method for permutation of pixels.
A novel chaos-based bit-level permutation scheme [3] in which the image is extended to bit plane binary image.Chebyshev chaotic map is used to generate random sequences.The rows are permuted according to that random sequences.
Further, the columns are shifted according to the same random sequences.After that, the extended image is divided into 8 blocks of equal sizes and again permutation is applied on each block using generalized Arnold Cat Map.The blocks are then merged to obtain the cipher image [4].[6] uses a pixel-level permutation and bit-level permutation for image encryption.
Correlation between the original image and the encrypted image, correlation between the current pixel and horizontal, vertical and diagonal pixels, entropy, computational complexity are used as parameters of compare the scrambling techniques.
The next section describes the overview of the schemes compared followed by comparative results in section III.And finally conclusion is presented in section IV

A. Generalized Matrix-based Scrambling Transformation
The equation 1 transformation is the general model: In equation 1, A is a matrix of size n × n.A is called as scrambling parameter matrix.All the entries of A are nonnegative integers and det is called the module vector in which N j are positive integers representing the upper limit of the corresponding v ij = (i, j = 1, 2...) .The scrambling times of the image is denoted by a positive integer k. + denotes the set of positive integers.The case with equal module is defined as equi-modulo transformation, i.e., N = (N N...N ) ′ , then, equation 1 can be transformed into equation 2: 1) Matrix based Image Scrambling applied on Arnold Transform: Cat map, also known as Arnold transform was proposed by V.I.Arnold in the research of ergodic theory.A process of splicing and clipping which realigns the digital image matrix is called transform.The 2D Arnold transform is an invertible map described by equation 3 where It can be applied to scramble digital images sized N × N by the discrete form in equation 4: where is the original image's pixel coordinate; N is the height or width of the image processed; (x n+1 , y n+1 ) is the coordinate of the scrambled image.The transform changes the position of pixels, and if it is done several times, a disordered image can be generated.The Scrambling process: for each pixel A(i, j) do

2) Matrix based Image Scrambling applied on Fibonacci
Series: Fibonacci Series is a special series named after nineteenth-century mathematician Leonard Fibonacci.The following series is called Fibonacci series: 1, 1, 2, 3, 5, 8, . . .Let X and Y be two adjacent Fibonacci numbers, The transformation is known as the Fibonacci Transformation which is represented by equation 5: where x, y ∈ {0, 1, 2, 3 . . ., N − 1} The Scrambling process: for each pixel A(i, j) do

B. Quantum image gray code and bit plane scrambling
NEQR, based on FRQI(Flexible Representation of Quantum Image) is a splendid representation for a quantum image.According to the NEQR model, a quantum gray scale image can be described as equation 6 where |I stands for a 2 n × 2 n image and the gray range of image is 2 q .Then, binary sequence encodes the gray value The Scrambling process: The first operation performed on the image is bit plane slicing.Bit plane information rule states that high bit planes contain most of the information (50.19% information of the pixel is contained in the 8th bit plane) while the lower bit planes contain less information(0.003%information of the pixel is present in the 0th bit plane).
According to this rule, the elementary GB scheme adopts the Gray-code transformation in reverse order i.e 0 th bit plane is kept fixed.The elementary GB scrambling is denoted by the 262 PROCEEDINGS OF RICE.GOPESHWAR, 2017 following function 8: where n = (M + N )/2 The GB in the above equation stands for the elementary GB scrambling operation.The quantum circuit about this method is shown in figure 1 given below: Numbers 1 to 8 represent Step1: Generate a two dimensional random sequence R such that R(i, j), (i = 0, 1, 2, . . .M − 1; j = 0, 1, 2, . . .N − 1).
Step2 Since bit-exclusive-or operations are reversible in mathematics, it may be used to realise the counter operation of the algorithm.Chaos sequence R is used to change the original image A's pixel gray level to obtain image A 1 .The operation is: A1(i, j) = A(i, j) ⊕ R(i, j) Step3: The final encrypted image E is obtained by changing the pixels of A 1 .Using image mirror mapping in mathematics reversible can realize the operation of inverse algorithm, and make the symmetrical mirror image mapping to image A 1 .Image mirror maps can order around from top-bottom mirror and then left -right mirror, the opposite order can also be.In order to increase the degree of image scrambling, this article uses the image mirror mapping interlacing.First of all, take the image A's vertical median line as the symmetry axis, and then left-right mirror mapping to image A 1 's even-numbered columns to obtain image A 2 .This left right mirror mapping's formula can be expressed as equation 9: Then the symmetry axis is taken to be the horizontal median line of image A 2 , and then top-bottom mirror mapping to image A 2 's odd-numbered rows to obtain image A 3 .This topbottom mirror mapping's formula can be expressed as equation 10: And image A 3 is the encrypted image E.

D. Key based scrambling by row and column shifting
Key based scrambling algorithm is a very effective and simple method of image scrambling and encryption.In this method, the user specifies a key that forms a sequence of numbers.The content provider uses this sequence to generate another key sequence to scramble the image and transmit it.
Encryption in this method is key-based and subsequently a scrambled image is generated.The method is shown in figure 3.

The Scrambling process:
Step1-A secret key is used to generate a random sequence R that is of the length of the maximum dimension of the image.If an image is 256 × 128, then the key sequence will have a length of 256.
Step2-Now the key sequence is used to switch the Rows.If the 1 st value of the sequence is 66 then the 1 st row is swapped with 66 th row of the image.
Step3-Use the key sequence to switch the columns.The  [18] column switching process is similar to the row switching.
Step4-Now the Rows are circular shifted using the same key sequence as the scrambling achieved from row and Column switching is not acceptable.Step5-Similarly, the columns are also circular shifted using the key sequence.When the above 5 steps are applied to an image, the scrambled image is obtained.

E. Fu et. al.'s scrambling Scheme
This scheme is based on chaos based bit permutation.The scheme performs shuffling in two steps, first using a chaos sequence based on Chebyshev chaotic map and second using generalized Arnold transform.The scheme is successful in generating a secure image cipher.The steps are as follows: 1) Extend the image of size M ×N to M ×N ×8 bit plane binary image.2) Generate the chaotic sequences S 0 and S 1 of size M and N × 8 respectively using Chebyshev chaotic map in equation 11.
3) Permute the rows of the binary image using sequence S 0 .4) Permute the columns of binary image using sequence S 1 .5) Now, Divide the binary image into 8 blocks of equal size.6) Permute each block with generalized Arnold cat map (in equation 4) k times.
7) marge the blocks left to right to recover the pixel plane and further generate the Cipher Image.

III. COMPARATIVE STUDY AND RESULTS
Four images namely test image 1 in figure 4, test image 2 in figure 5, test image 3 in figure 6, test image 4 in figure 7 were taken for experiment.Those same images were scrabbled using different methods.(b) is scrambled using scheme using Arnold's transformation, (c) is scrambled using Fibonacci transformation, (d) is scrambled using gray code with bit plane transformation, (e) is scrambled using 2D mapping, and (e) is scrambled using key based row and column shifting method and (f) is scrambled using key based row and column shifting method with bit plane permutation.

A. Entropy analysis
Entropy is the measure of randomness and unpredictability in an image.It measures the randomness in the frequency of occurence of pixels with different intensities present in the image.Low entropy anywhere, especially via repeating keys or values, produces measurable statistical correlations, which are the basis of much of cryptanalysis.By contrast, more entropy means a bigger and less predictable key search space, with fewer and more difficult to detect redundancies and correlations.The entropy in a cipher is thus a measure of how difficult it is to break the cipher via brute force.
A good cipher has an entropy closer to 8. The table II shows the entropy of scrambled images.

B. Comparative Computational Complexity
The Comparative numbers of operation are presented in table I.Where k stands for number of iterations of ArnoldFibonacci transformGray bit plane scrambling.

Fig. 1 :Fig. 2 :
Fig. 1: The quantum circuit the bit planes.The gates used here is CNOT gates (Controlled NOT gate).

Fig. 4 :Fig. 5 :Fig. 6 :Fig. 7 :
SchemeOperation Arnold's transformation No of mod operations M × N × k No of swap operations M × N × k Fibonacci transformation No of mod operations M × N × k ; No of swap operations M × N × k gray code with bit plane transformation No of xor operations M × N ; No of mod operations M × N × 2; No of copy operations 3 × M × N 2D mapping No of xor operations 7 × M × N × k row and column shifting No of swap operations M × N + N × M = 2 × M × N ; Worst Case No of shift operations max(M, N ) × M + max(M, N ) × N row and column shifting with bit plane scrambling No of swap operations M + N × 8 + M × N × 8 × k; No of mod operations M × N × 8 × k

TABLE II :
Comparative results of correlations and entropy.(Correlation between current pixel and horizontal/diagonal/vertical pixel is found by choosing 1000 random pixels)