Performance Comparison of ACM and GRP Methods for Image Permutation

Permutation and substitution processes of an image are most widely used in image encryption algorithms as they are thought to increase system security in cryptography. Permutation is the first process that all pixel positions in an image are shuffled in specific order or randomly in order to break strong correlation between pixels. Secondly, substitution is used to change pixel values by mixing a secret key in the permutated image. In an ordinary image, adjacent pixels have close values so they have strong correlation and this correlation needs to be broken effectively before encryption. The degree to which this process is performed, directly affects the overall system security. In this paper, performance evaluations for Group (GRP) and Arnold’s Cat Map (ACM) method are analyzed through some numerical results and their performances are compared to figure out which one is better. Experimental results consist of numerical and visual results determined in Matlab R2015a.

Due to simplicity and effectiveness, ACM is one of the most frequently used methods in chaos-based image encryption systems by researchers [11][12][13][14].The function of ACM method is that image rotates continuously resulting in a form that is not visible by the naked eye. In addition, it has a characteristic of area-preserving which means that if it is iterated enough times, then the original image reappears. Another permutation method to be examined in this paper is GRP. GRP is an important bit permutation technique in cryptography which changes the position of bits in a given sequence by employing a control bit [15]. Permutation performances between these two methods are compared in detail in this study. In this sense, average moving distance of scrambling (AMDS), number of equal pixel rate (NEPR) and correlation coefficient of adjacent pixels are considered to compare the performance of both permutation methods. The rest of the paper is organized as follows: Section 2 gives the brief overview of GRP and ACM methods. Section 3 introduces chaotic Logistic map that is used to be a control bit generator for GRP. Performance comparison of both methods is analyzed in Section 4. Finally, the conclusions are discussed.

II. MATERIALS AND METHODS
In this section, two mentioned methods for pixel replacement in an image are introduced. Then, some explanations and techniques are given about how to generate control bit from using Logistic map for GRP method. Some mathematical tests of AMDS, NEPR and CCAP are explained briefly which are used to compare performances of both methods.

A. ACM Method
ACM is a simple and invertible discrete system that is defined in (1).
Here, (x, y) is pixel position of the source image sized in NxN and ( ′ , ′) refers corresponding pixel position. p and q are control parameters of the system which are positive integers. The inverse of ACM is determined in (2).
ACM can be used as a permutation method for any image. In this technique, permutation process focuses on the position of B. GRP Method GRP method has two inputs named as data and control bits. In this technique, input data is swapped according to the control bit. Here, input data values are placed in two groups as a left group and a right group. According to the control bit, if bit i of the control bit is 0, then the value of i in data goes to the left group, otherwise it goes to the right group. This process is performed in sequential until all the control bits is checked and relative positions of the input data within the same group do not change. Figure 1 shows as an example of how the GRP instruction works on 8-bit systems.

C. Logistic Map
Logistic map is a simple non-linear discrete system [16]. It consists of an iterative equation as defined in (3).
Here, r is the control parameter and chosen as 0 < ≤ 4; is state variable of the map. For any initial value under 0 ∈ (0, 1), the map generates sequence of values in the range of (0,1). Logistic map has very rich dynamic behaviors such as stationary, periodic and chaotic depending on control parameter. When ∈ [3.57, 4], then the generated sequence is aperiodic, non-convergent and very sensitive to initial value which leads to chaos and resulting very complicated and unpredictable behavior. Bifurcation diagram of the Logistic map is shown in Figure 2.

D. AMDS Test
In image processing, main purpose of a permutation is to change pixel positions of an image through a specific algorithm so original pixel positions need to be moved to another positions. If a pixel has been moved farther away comparing to its original location, then the degree of permutation is higher [17]. This process can change the visuality of an image although it does not affect pixel values. The average moving distance of scrambling is defined as in (4).
In (4), ( , ) represents original pixel coordinate in an image with a size of ( × ) and ( , ) represents permutated pixel coordinate. In ACM method, pixel positions change in diagonal direction so AMDS test can be used to calculate the displacement of pixel positions for this method. On the other hand, in GRP method, pixel positions change in one direction only. Therefore, for each line of the permutated image, position change of the pixels is calculated separately then average distance value is calculated as in (5).
For instance, means coordinate changes for the pixel address of (1,1∶M) between original and permutated image. The larger value of AMDS or average distance of scrambling (ADS) means that less relation between the original image and permutated image and also higher efficiency of the permutation method. For a square image with 256 size, universal mean of the average moving distance for random permutation is 256/3=85.3 [17]. This value can be used as a criterion to compare the efficiency of the permutation for both methods.

E. NEPR Test
NEPR is related to number of the same pixel values found in specific coordinates between the original image and permutated image. It is measured in percent and defined in (6).
NEPR shows the rate of identical pixel values at the same position between original and permutated images. If NEPR value is high, then efficiency of the scrambling is lower. If NEPR is zero, then no pixel values are equal at the same coordinate.

F. CCAP Test
In an ordinary image, an arbitrarily chosen pixel is strongly correlated with its adjacent pixels either they are vertically, horizontally or diagonally oriented.
This correlation needs to be broken after permutation process. Consequently, in the case of high-performance permutation methods, correlation coefficients of adjacent pixels are expected to be close to zero. The formula of the correlation coefficient is defined in (7).
The formula given in (7) returns a value between -1 and 1. Correlation coefficient of 1 means a strong positive relationship between two variables. Correlation coefficient of -1 indicates that for every positive increase in one variable, there is a negative decrease of proportion in the other. 0 means no relationship between two variables.

G. Generating Control Bit
GRP method uses a sequential control bit for data replacement. In this study, chaotic Logistic map is used to generate control bit for GRP method. In order to get a sequential bit, a map equation in (8) is utilized.
Using (8), a control bit value of '1' or '0' is generated for each which is the output of Logistic map. For instance, generated bit values are listed in Table 1, when the system parameters are selected as 0 =0.1234 and =4.

III. EXPERIMENTAL RESULTS
In this section, test image of 'Peppers' with different size is used for the performance evaluation of both permutation methods. Since both permutation methods depend on pixel positions rather than pixel values, the meaning of the test image does not have much importance. However, the size of the test images may affect results of the performance analysis for both methods. In some analysis, test images with different size are taken into consideration for the performance comparison. The performances of the both methods are also compared with different iterations of permutation operation.

A. Visual Analysis
'Peppers' test image with 256x256 size is used for visual analysis. Figure 3 shows the results of ACM method applied on the test image for different number of iteration (n) with randomly selected parameters of p=5 and q=4.  According to the results of Figure 3, in ACM method the test image becomes meaningless after the first iteration. This provides sufficient and effective permutation with only one iteration of the test image. On the other hand, GRP-256 bit method makes the test image meaningless completely at the end of the 3th iteration, so in GRP method, iterations must be done several times for enough complexity. It is concluded that for visual analyses, ACM shows better performance than the GRP-256 bit method.

B. AMDS Analysis
Test images with different size are used to determine AMDS values for ACM and GRP methods. AMDS values are calculated for different number of iterations for ACM and the results are listed in Table 2.  Table 3.
According to the Table 2 results, AMDS values decrease slightly as the number of iterations increases in ACM method. However, the calculated values (written in bold) are significantly higher than the critical level. This indicates a sufficient permutation of the ACM method. On the other hand, according to the Table 3, the values obtained from GRP are much lower than the ACM values for all iterations. Furthermore, if the number of iteration increases, then ADS value also increases significantly. Hence, enough number of iterations is needed for effective permutation in GRP method. For instance, an image with a size of 256x256 requires 5 iterations for ADS to be greater than the critical value of 85.3. In addition, as the size of the test images increases, both AMDS and ADS values also increase proportionally. As a result, in ACM method, the degree of displacement of pixel positions is much better than the GRP method.

C. NEPR Test
After an effective permutation process, number of equal pixels for the same pixel coordinates between original and permutated images should be very low. NEPR test is applied for ACM method for different iterations of the permutated version of the image and results are listed in Table 4.  Table 5.
According to the NEPR results for both methods, the overall performance of ACM is better than the GRP. For ACM method, the minimum NEPR value occurs in the first iteration of a 128x128 image, while in GRP method, the minimum NEPR value occurs in the third iteration of the 512x512 test image. This confirms that ACM method has a great permutation effect on the test image for small number of iterations. In addition, GRP requires several times of iteration for sufficient permutation of the test image. All NEPR results in GRP are significantly bigger than the results of ACM for all sizes and number of iterations.

D. CCAP Test
In a good permutated image, an arbitrarily chosen pixel is weakly correlated with its adjacent pixel. Correlation coefficient value between original and permutated images should be small in an effective permutation. ACM and GRP methods are applied to the test image of 'Peppers' and then CCAP test is performed in vertical (V), horizontal (H) and diagonal (D) directions to compare the performance of both methods. The average results are listed in Table 6 and Table 7. Minimum values of CCAP are written in bold. According to the CCAP test results, ACM method shows better performance than GRP method. If all numerical and visual analyses are considered for both methods, ACM is a better choice against GRP in order to break correlation of adjacent pixels in an image.

IV. CONCLUSIONS
In this paper, performance evaluation of two important permutation methods used in image processing are concerned in order to compare their performances through visual and numerical analyses. In both visual and numerical analyses, ACM method shows better performance than the GRP method. AMDS and NEPR test results are critical points under the numerical analyses for the performance evaluation of the both methods. These results demonstrate that ACM changes pixel positions more effective as well as bigger in size with respect to the GRP method for all iterations. Although the total displacement of pixels is smaller in the GRP method, the average pixel distance between the previous and next iteration of the permutation are bigger than the ACM method.