Novel Models of Image Permutation and Diffusion Based on Perturbed Digital Chaos

Most of chaos-based cryptosystems utilize stationary dynamics of chaos for the permutation and diffusion, and many of those are successfully attacked. In this paper, novel models of the image permutation and diffusion are proposed, in which chaotic map is perturbed at bit level on state variables, on control parameters or on both. Amounts of perturbation are initially the coordinate of pixels in the permutation, the value of ciphered word in the diffusion, and then a value extracted from state variables in every iteration. Under the persistent perturbation, dynamics of chaotic map is nonstationary and dependent on the image content. The simulation results and analyses demonstrate the effectiveness of the proposed models by means of the good statistical properties of transformed image obtained after just only a single round.


Introduction
For recent decades, chaos has been discovered in natural, human, and engineering models [1]. It has been also generated by human for pragmatic applications. Two of prominent applications are chaotic communications [2] and chaos-based cryptography [3]. Recently, chaos-based image encryption has attracted increasing interest [4][5][6][7]. That is due to the good cryptographic properties of chaotic sequences [8][9][10][11]] and a chaotic system can be implemented on digital hardware [12][13][14][15]. In digital hardware, dynamics of any chaotic system is degraded to periodic orbits due to the round-off errors by the limited number of bits represented for values of state variables and control parameters [16][17][18]. The larger the number of bits representing for chaotic state variable and control parameters is, the longer the length of period is obtained. Beside that, the period of orbits produced by a chaotic map can be lengthened by several methods as suggested in Reference [19]. Two of such methods are perturbation on chaotic states by another chaotic map [20,21] and by using linear feedback shift register (LFSR) [22].
For chaos-based cryptography, at least one of encryption processes is involved by chaos. Along with the Feistel structure, the substitution-permutation network (SPN) structure attains the properties of confusion and diffusion [23], which are widely employed in both conventional block ciphers [24,25] and chaotic ones [26][27][28][29]. Typically, the SPN structure can be realized in chaotic ciphers by means of the combination of permutation and diffusion processes, for example, References [30,31]. The advantage of the SPN structure is that the cryptographic statistics can be increased by means of increasing the number of rounds in each of permutation and diffusion processes and/or in a whole.
For most of chaos-based image cryptosystems, a chaotic system is used for generating chaotic sequences for the permutation and diffusion processes. Firstly, the chaotic permutation is implemented with the involvement of at least one chaotic system to shuffle pixels or bits of pixels within the image. The permutation rule can be static in the form of table or dynamic by inducing from chaotic values. Secondly, the chaotic diffusion is usually realized by a mixture between chaotic values and values of plain pixels. In literature, most of successful attacks on chaotic ciphers are based on weaknesses in algorithms of permutation and diffusion processes, for example, References [32][33][34][35][36][37]. Besides, the works [38,39] points out the criteria and assessment to a chaotic cryptosystem.
Under a cryptographic point of view, it is obviously that the more complicated dynamics of chaos allows the stronger chaos-based cryptosystem. Recently, many chaos-based cryptosystems were proposed with the use of more complicated chaos. Along with the use of hyperchaotic, time-delay, fractional order, and spatiotemporal chaotic systems, complicated dynamics can be obtained by mixed of various chaotic systems such as References [40][41][42][43][44][45]. In such the chaos-based cryptosystems, chaotic systems work with fixed values of control parameters and with non-disturbed chaotic orbits. In other words, dynamics of chaotic maps is stationary in generating encryption keys for the permutation and diffusion.
It is also well-known that analysis of chaotic dynamics can be performed by the observation and measurement of dynamics like trace formulas [46][47][48][49] or inference of control parameters [50][51][52], and so forth. Many analysis methods success with additive perturbation [46][47][48]. With the development of analysis methods, analysis of chaotic dynamics can used as a powerful tool to attack chaos-based cryptosystems [53]. However, to date, there has not been any report about a successful attack to a chaotic block cipher by means of analysis of chaotic dynamics. By applying analysis of chaotic dynamics, chaotic cryptosystems based on stationary dynamics will become possibly insecure in the future. Therefore, one of potential approaches of chaotic image encryption is based on perturbed chaos.
Definitely, a chaos-based cryptosystem becomes much stronger if its encryption keys are dependent on the image content. The involvement of image content in chaotic dynamics is created by an external perturbation. In fact, there are two approaches to create the connection between the image content and encryption keys, dependent on whether the image content involves in chaotic dynamics or not. Firstly, the connection between the image content and encryption keys is established by means of state perturbation, for example, References [9,42,[54][55][56][57][58]. References [9,54] present the a selection mechanism in which the image content is used for selecting one of chaotic sequences to generate keystreams. The initial values of chaotic system are fixed, and neither state variables nor control parameters of chaotic system is disturbed during generation of chaotic sequences. As presented in Reference [42], the initial value and the value of parameter of chaotic system are generated with the use of image content for whole encryption, but the parameter of chaotic map deciding the manner of the permutation and diffusion is dependent on the image content of blocks. The advantage is that the value of parameter of chaotic system is updated after every block of image. As presented in Reference [55], the initial value of chaotic map in the diffusion process is calculated by the value of pixels, and the output of chaotic map is used to compute the ciphertext. The important point is that the image content involves in the diffusion by means of its initial value of chaotic map. Whereas, the value of control parameters is kept constant. The same approach as given in References [55,59] is used in the work by G. Ye et al. [56], in which the initial value of chaotic map is computed by information entropy of plain image. In Reference [59], the diffusion process utilizes one of state variables of hyper-chaotic Chen's system, in which only initial value of chaotic map is being updated after every pixel. In the work of H. Li et al. [58], the orbit of two-dimensional logistic-adjusted-sine map (2D-LASM) is disturbed by the coordinate and the value of pixels during the generation of the keystreams for the permutation and diffusion, while the value of control parameters of (2D-LASM) is kept constant. In another way, the initial value of chaotic map is the output of authentication by SHA-256 as in Reference [57], or the value of control parameter of chaotic map is calculated by the image content as in Reference [60] for generation of finite state machines for the diffusion. As reported in Reference [61], the value of control parameter of Logistic map is calculated by the image content, and it is kept constant in the encryption process. The common point in those works is that control parameters of chaotic maps are unperturbed, so dynamics of chaotic maps is stationary.
Secondly, the dependence of encryption keys on the image content can be created by perturbing on control parameters of chaotic systems. To the best of our knowledge, there are a limited number of published works in this way as in References [62,63]. Specifically, in the work proposed by J. Chen et al. [62], the control parameter of Logistic map is perturbed in the pixel swapping confusion and diffusion processes. In the work by T. Song [63], the control parameter of Logistic map is computed by using the value of pixels, and updated in the diffusion process. In fact, the disadvantage is that the value range of control parameter must be always monitored and adjusted under a condition. Moreover, a number of additional arithmetic operations along with those of chaotic map requires higher computational complexity and resource.
In addition to two main approaches as above described, some other works presents the utilization of perturbed chaos for cryptosystems, for example, References [21,62,64,65]. In References [21,64,65], the chaotic maps are perturbed by additional transformations of state variables or by some conditions, rather than by information of pixels. In fact, additional equations and conditions make chaotic maps more mathematically complicated, but not really perturbed by any external force. Thus, dynamics of chaotic maps is stationary, and the vulnerability still exists [66].
Overall, perturbed dynamics of chaos with the dependence on the image content offers the cryptographic properties better than those with stationary dynamics in terms of statistics and it can resist from the type of chosen plaintext attack. However, reported image cryptosystems based on perturbed chaos have the proprietary structures with the use of specific chaotic systems, and perturbation is realized in arithmetic operations. Under the viewpoint of hardware, more arithmetic operations will require more resource and may reduce the speed of the encryption. In other words, there is a lack of models with a simpler perturbation than those in previous works, utilization of various chaotic maps, and suitability for hardware implementation.
In this paper, novel models of perturbed digital chaos are proposed for the image permutation and diffusion. Perturbation on chaotic dynamics is carried out at bit level by three schemes, that is, perturbation on state variables, on control parameters and on both state variables and control parameters ("on both" for short). Amounts of perturbation can be either the coordinate of pixels in the permutation and the value of pixels in the diffusion or the value extracted from state variables. Chaotic dynamics becomes nonstationary and it provides cryptographic advantages for the image permutation and diffusion. The example and simulation results demonstrate the effectiveness of the proposed models with the use of Logistic map. It is noted that this work will not go into analysis of dynamic properties of chaotic systems under perturbation, and ones can find that in other works, for example, References [19,46,67,68], and so forth.
The main contributions of the work are as follows: The structures of chaotic perturbation with an external force are generalized, in which three schemes of perturbation are clearly expressed. The models of the permutation and diffusion for the chaotic image encryption are proposed by means of utilizing the corresponding schemes of perturbation. The perturbation is the coordinate of pixels in the permutation and the value of pixels in the diffusion. The statistical and security analyses are carried out for the example using the generic Logistic map as a proof of effectiveness of the proposed models.
The rest of the paper is organized as follows-Section 2 presents some basic preliminaries. The general structures of perturbed chaotic map are given in Section 3. Next, the proposed models of permutation and diffusion for chaotic image encryption are detailed in Section 4. Section 5 shows the example and the simulation results for the permutation and diffusion with various schemes of perturbation using the Logistic map. Finally, Section 6 gives some concluding remarks of the work.

Representation of Images
Let us consider the raster format of a grayscale image is represented as a 2-dimensional matrix I with the size M × N. The element of I at the location (x, y) is called a pixel P(x, y) in binary of k bits as P XY = b k−1 b k−2 ...b 1 b 0 . The image can be considered as a collection of pixels represented by where M and N are the number of rows and columns of pixels, respectively. In the following text, an entity formed by a collection of elements is denoted by with an associated index. In the case of RGB image, each of three color layers can be considered as a grayscale image.

Bit Representation for Real Numbers
Let us consider that a chaotic map in Equation (6) is implemented in a digital platform. So, the value of state variables and that of control parameters are represented in one of two formats, that is, fixed-point or floating-point number. Fixed-point representation is suitable for most chaotic maps because the value of state variables and of control parameters are in the narrow ranges. Signed and unsigned fixed-point numbers are illustrated in Figure 1. For example, the Logistic map has the range of (0,1) for chaotic state variable, and that of [3.57, 4.0] for the control parameter, thus, the format of unsigned fixed-point is suitable. The number of bits required for the integer part in the value of chaotic state and of control parameter are 1 and 3, respectively. For a signed fixed-point representation, a real number is represented one bit for the sign S, m (int) bits for the integer part and m ( f rac) bits for the fractional part; or m = 1 + m (int) + m ( f rac) . The fixed-point number can be written in sequence of bits as (S)b m (int) −1 ...b 0 (.)b −1 ...b −m ( f rac) . Note that the binary point is in the parentheses, '(' and ')'. The value is

Integer Fraction
For a unsigned fixed-point representation, there is no sign bit. Thus, the number of bits is ; and the value is As a real number is represented as a bit sequence, bitwise operations can be applied to change the state of bits.

Representation of Bit Sequence and Bit Arrangement
Here, the bit arrangement is to permute bits, but the term "bit arrangement" is used to avoid confusing the "permutation" of pixels in the later part of the paper. Let us consider two arrays of bit sequences A = (A i ) 1≤i≤I A and B = (B i ) 1≤i≤I B . Bit sequences of A and B are A i = J A j=1 a i,j and B i = J B j=1 b i,j , respectively. There, a i,j and b i,j are j th bits of i th sequences, and J A and J B are the lengths of bit sequences A i and B i , respectively. In order to simplify for the representation, the size of A and B is denoted by I A × J A and I B × J B , respectively.
Let us define a bit arrangement for a general case of I A = I B and J A = J B . Bit sequences of A are constructed by bits from sequences of B. The rule of bit arrangement is encoded by a matrix Y, and the arrangement operator is denoted by •, such that A = Y • B. For the matrix Y = y i,j 1≤i≤I A , 1≤j≤J A , y i,j is the combination of indexes indicating a bit of B. Each row of Y, Y i = y i,j 1≤j≤J A , is used for constructing a bit sequence A i , in other words, bit sequences of A are A i = Y i • B. It is noted that a bit b i,j of B can be used multiple times in A.
For example, the array of bit sequences B has the size of (I B , J B ) = (5, 4) as The array A is constructed from bits of B. A is with three bit sequences, and each sequence has six bits; or the size of A is ( So, the array A is as where, three bit sequences are If a certain bit of A i is fixed with a predefined state '0' or '1', the terms BIT 0 and BIT 1 are used to indicate the states '0' and '1' in Y i , respectively. For instance, the value of bits in A is fixed such as Moreover, except for a number of bits with fixed values, let us define H Y to be the number of bits in A taken from B as These will be used in the proposed models of permutation and diffusion in the later part of the paper.

Perturbed Digital Chaotic Map
It is definitely that dynamics of a chaotic system becomes nonstationary if the chaotic system is perturbed by an external force. In this section, a chaotic map with perturbation at bit level is described in two primitive schemes, that is, perturbation on state variables and on control parameters of chaotic map. The third scheme is the combination of two mentioned ones, in which both state variables and control parameters of chaotic map are perturbed. In any scheme, dynamics of chaotic system becomes complicated and that brings advantages in terms of cryptographic properties.
Let us consider a chaotic map defined by where X n and Γ n are vectors of chaotic state variables and of control parameters, respectively; D is the number of dimensions, and G is the number of control parameters; D = ||X n || and G = ||Γ n ||. The perturbation on state variables is on control parameters is and on the both of state variables and control parameters is There,X n andΓ n are the perturbed variables and control parameters, respectively described as and There,X n andΓ n areX n = [x n ], respectively; ∆ X and ∆ Γ are instant amounts of perturbation; Ψ X and Ψ Γ define the operations of .., G}} are sets of functions to produce amounts of perturbation; E X and E Γ are vectors of external forces. Note that, the subscripts X and Γ denote for the notations belonging to state variables and control parameters, respectively.
In hardware perspective, values of state variables and control parameters are represented in a format of real number. Thus, all of functions, that is, Ω X , Ω Γ , Ψ X , and Ψ Γ , operate at bit level. Specifically, at bit level, each bit of operands in such the functions can be manipulated by basic logic gates AND, OR, NOR, NAND, NOT, XOR, XNOR or their combination. Figure 2 illustrates the proposed schemes of perturbation. The perturbation can be on chaotic state variables, control parameters, or both. IV is a vector of initial condition.
In any scheme, perturbation must ensure that chaos exhibits and values of X n and Γ n must be within valid ranges. As given in Equations (10) and (11), the value ranges of X n and Γ n are dependent on both amounts and functions of perturbation. At bit level, values of X n and Γ n are represented in the format of fixed point as shown in Section 2.2. Therefore, ∆ X and ∆ Γ define the perturbation to X n and Γ n , respectively. The disturbance level on a chaotic map is really dependent on the position of perturbed bits in the representation.
Also, values ofX n andΓ n are represented by a number of bits, and specific position of perturbed bits is pointed out by perturbation functions Ψ X (.) and Ψ Γ (.). Let us Θ X and Θ Γ respectively be vectors of value tolerances of state variables and control parameters, Θ X = |X n − X n | and Θ Γ = |Γ n − Γ n |. Equivalently, at each time of perturbation,X n andΓ n in Equations (7)-(9) arê and,Γ where, Θ X = {θ Γ can be figured out when the positions of perturbed bits are known in a specific scheme of perturbation. In general, this can be defined by ones, and the larger amounts of perturbation will make the more complexity in chaotic dynamics. This suggests that the higher significant bits of X n and Γ n should be perturbed.
As shown in Equations (10) and (11), the amounts of perturbation, ∆ X and ∆ Γ , are dependent on pairs of values (X n ,E X ) and (X n ,E Γ ), respectively. At bit level, all functions of Ω X and Ω Γ are bitwise operations, thus basic logic gates and their combination can be used for bit manipulation.

Proposed Models of Permutation and Diffusion
In this section, the models of permutation and diffusion are proposed those are based on the proposed schemes of perturbation as described in the previous Section. It is noted that the XOR operation is chosen as the function of perturbation. The superscripts (p) and (d) are associated on the notations to indicate the permutation and diffusion.

Proposed Chaotic Pixel Permutation (CPP) with Perturbation
Pixel permutation shuffles pixels within the space of image using chaos. The idea of bit-level perturbation to chaotic map as illustrated in Section 3 is employed to propose three configurations of CPP as illustrated in Figure 3. The perturbation to a chaotic system is carried out on state variables (CPP-1), on control parameters (CPP-2), and on both (CPP-3) as in Figure 3a   are to arrange the size of arrays of bit sequences as described Section 2.3. The size of inputs and outputs is given in Table 1.  In chaotic behavior, there are constraints in the value ranges of chaotic state variables and control parameters. Specifically, the constraints are met by fixing a number of bits in chaotic state variables and in control parameters, while the rest number of bits can be changeable by the perturbation.
So, the number of bits Q × m (p) 1 representing for the coordinate of pixels XY present and XY new must be less than the number of changeable bits in all the schemes of perturbation. For simplest case, the coordinate of pixels is encoded by a sequence of k 1 bits, in which row and column numbers of pixels are respectively represented by k (x) 1 and k (y) The XOR operation is chosen as the perturbation functions Ψ X and Ψ Γ in Equations (10) and (11). In this paper, bit arrangements play a role of the sets of functions Ω X (.) and Ω Γ (.) generating amounts of perturbation ∆ (p) X and ∆ (p) Γ , respectively. For the CPP-1, the chaotic map is perturbed by means of modification of bits in chaotic state variables X n with bits in an amount of perturbation ∆ (p) X after every iteration n (1 ≤ n ≤ R (p) ), while the value of control parameters Γ (p) is kept constant. Therefore, the deterministic orbit of chaotic map is destroyed by such the perturbation amount ∆ (p) X . Similarly, the value of control parameters of chaotic map Γ (p) are changed after every iteration in the CPP-2. Under the perturbation on control parameters, dynamics of chaotic map becomes nonstationary. The CPP-3 is the combination of the CPP-1 and CPP-2 that both state variables and control parameters are updated after every iteration.

Bit Arrangements Size of Inputs Size of Outputs
Respectively, the state variables of chaotic map with the perturbation as given in Figure 3a-c are The perturbed state variables and control parameters are aŝ Amounts of perturbation are represented in arrays of bit sequences ∆ and After R (p) iterations, the value of X R (p) is used to obtain the new coordinate of pixels as It is noted that • is the bit arrangement as given in Section 2.3.

Inverse Chaotic Pixel Permutation
Let us consider Inverse Chaotic Pixel Permutation (iCPP) as shown in Figure 3. The present coordinate of pixels is converted into bits sequence XY present , and the XOR operation is used to produce new position, XY new , at the last iteration. Therefore, corresponding to CPP in Figure 3, there are three structures of iCPP which are denoted iCPP-1, iCPP-2, and iCPP-3, dependent on the way of perturbation to the chaotic map. The structure of iCPP-1, iCPP-2, and iCPP-3 is identical to that of CPP-1, CPP-2, and CPP-3, respectively, as illustrated in Figure 3. The equations describing for iCPPs are the same those for CPPs as in Equations (14)- (20). The value of all parameters in iCPPs must be set the same as that in the corresponding CPPs to recover the original position of pixels as explained in Section 4.1. The main difference between iCPPs and CPPs is that pixels of image in iCPPs are permuted in a reverse direction in compared with that in CPPs of the encryptor, for example, from the pixel at position (M − 1, N − 1) backward to (0, 0).

Chaotic Diffusion with Perturbation
The idea of bit-level perturbation to chaotic map as illustrated in Section 3 is again employed to propose three configurations of chaotic diffusion (CD) in Figure 4. The chaotic system is perturbed on state variables, control parameters and on both as illustrated in Figure 4a, Figure 4b, and Figure 4c, respectively. Here, the difference in these structures in compared with those of CPPs is the feedback of C XY . Pixels are diffused sequentially. Array of bit sequences C 0 with the size of Z × k 2 as an initial ciphertext is used for the first pixel of diffusion. P XY and C XY with the size of Z × k 2 are arrays of bit sequences of plaintext and ciphertext, respectively. The bit arrangements in the diffusion Y (d) 5 and iY (d) 5 , are with the size of inputs and outputs as shown in Table 2. Notably, the constraint is that Z × k 2 must be less than the number of changeable bits of state variables and control parameters in all schemes of perturbation. As a simplest application, the value of pixels is represented by a sequence of k 2 bits.

Bit Arrangements Size of Inputs Size of Outputs
Respectively, three equations describing the diffusion as displayed in Figure 4a, Figure 4b, and Figure 4c are

The perturbed state variables and control parameters in Equations (21)-(23) arê
There, R (d) is the number of iterations for each pixel in the diffusion. It is assumed that the encryption starts with the pixel at (x, y) = (0, 0) toward to the last one at (x, y) = (M − 1, N − 1), so the arrays of bit sequences ∆ (d) Figure 4 are and It is noted that C XY is shared between the encryptor and decryptor in the diffusion. After R (d) iterations, the array of bit sequences of ciphered pixels is

Inverse Chaotic Diffusion
Similarly, three configurations of Inverse Chaotic Diffusion (iCDs) in the decryptor are illustrated in Figure 5. These are almost identical to those of CDs in Figure 4, except for the additional block Z −1 and the ciphertext C XY being interchanged with the plaintext P XY at the output. The block Z −1 is to make the cipher data C XY delayed to become C −1 XY in the feedback. The equations for ∆ (d) and The recovered plain pixels in the form of array of bit sequences after inverse diffusion are The value of parameters and the operation of iCD are the same as those of CD as described in Section 4.3.

Space of Secret Keys
It is assumed that the number of bits representing for the value of X n and for that of Γ n in 2 , respectively. The secret keys of the proposed permutation and diffusion are the value sets of initial vectors of state variables and initial values of control parameters. It is noted that bit arrangements are considered as structural parameters rather than secret keys.
Let us define s param be the number of bits representing for param. Table 3 shows the number of bits encoding for values of initial vectors and control parameters for the permutation and diffusion. In fact, the number of bits representing for the secret keys is dependent on the number of perturbed bits in state variables and control parameters. Specifically, the initial value of IV (p) , is represented in the format of fixed point and its values are varying in specific ranges. In the scheme of perturbation on control parameters, the state of some bits in the value of control parameters is fixed to ensure that chaos exhibits while that of the other bits are changeable by perturbation. Similarly in the scheme of perturbation on state variables, some selected bits of state variables are with fixed states while the others are changeable. In other words, a number of bits with fixed states do not contribute to the key space of the permutation and diffusion. Table 3. The maximum number of bits representing for the initial values.

Parameter Maximum Number of Bits
However, the number of changeable bits is as large as possible and must be larger than the number of bits encoding for the coordinate and the value of pixels in the appropriate scheme of perturbation.

Computational Complexity and Resource Analysis
It is emphasized that the cryptosystems working at bit level are designed with the aim to implement on hardware platforms such as Field Programmable Gate Arrays (FPGAs). Here, the computational complexity is considered in the context of using FPGAs, rather than on PC where the basic data unit is byte. In addition, the example will be given to illustrate the computational complexity.
In fact, the computational complexity and resource required for the proposed models are dependent on equations of chaotic maps and a number of bits are used for representing values of state variables and control parameters. The advantage of cryptosystems implemented on the customized hardware is that a number of bits representing for the format of fixed point can be tailored for the requirement of security and application.
The requirement of computational resource is as follows. The chaotic map requires a number of arithmetic operations and logic gates, that is, multipliers, divisors, adders, and subtractors. A number of XOR gates are used for the perturbation. A number of registers are needed to store arithmetic operands and the result. A memory space is necessary to store the plain image, and the permutation and diffusion are performed on this memory. Moreover, as it is implemented on customized hardware, all the blocks of bit arrangement in the proposed models are interconnection wires.
One of advantages in using chaotic maps for image encryption is the low computational complexity. The speed of hardware implementation is dependent mainly on the speed of arithmetic operations of chaotic map, the read/write cycles of memory during the permutation and diffusion.
For example, the Logistic map in Equation (31) is chosen for the scheme of perturbation on state variable. The hardware resource for the Logistic map is as shown in Table 4. Accordingly, it requires four registers, two multipliers, and one substractor. In addition, a number of XOR gates are necessary to implement the perturbation. In fact, it is small necessary resource to implement when it is compared with the available resource of typical FPGA devices. Table 4. Hardware components to implement the Logistic map.

Term
Register (Buffer) Multiplier Substractor x n a T 1 = a * x n

Example and Simulation
It is noted that this work is to propose the design of permutation and diffusion with different schemes of perturbation, rather than a cryptosystem. In addition, due to the limit of the space, the example is mainly to demonstrate the feasibility of the approach, and only representative samples of simulation results are illustrated in case that other ones are the same. The more detail on the specific application using this approach to design a cryptosystem will be found in other papers published somewhere later.
In this example, the generic 1D Logistic map, is employed for both the permutation and diffusion.

Percentage of Bits Generated by Logistic Map
The Logistic map in Equation (31) is simulated, in which values of x n and a are represented in the format of fixed point as 1.32 and 2.32, respectively. Different values of a are as given in Table 5. It is noted that a = 3.9999 is written with 4 digits after fraction point, but in fact the exactly value is 4.0 − 2 −32 . The initial value of x is 0.1234567890. For each value of a, the Logistic map is iterated 196,608 times to produce chaotic sequences. Due to the value range of x n ∈ (0, 1), so the bit b 0 representing for its integer part is always '0'. The percentage of bits (PoB) for bits b −1 to b −32 and distribution of values (DoV) of chaotic sequences generated by the Logistic map with different values of a are displayed in Figure 6.
It is clear from Figure 6 that the lower significant bits, that is, from bits b −9 to b −32 , have PoBs of '0' roughly equal to those of bits '1' for every chosen value of a; whereas the PoBs of b −1 to b −8 are biased to either '0' or '1'. Besides, DoVs of chaotic sequences are uneven for every value of a. The best DoV is obtained with a = 3.9999 as shown in Figure 6q. Intuitively, there is a correlation between PoBs and DoVs. The better DoV is, the better PoBs of higher significant bits are obtained. In addition, PoBs for lower significant bits are independent from DoVs. It suggests that lower significant bits should be utilized for the bit-level encryption, and the value of a should be chosen as close to 4.0 as possible.
Percent of bits bit number Percent of bits bit number (m) PoB with a = 3.9688 (n) DoV with a = 3.9688 Percent of bits bit number Percent of bits bit number (q) PoB with a = 3.9999 (r) DoV with a = 3.9999

Permutation and Diffusion with Logistic Map
The 1D Logistic map in Equation (31) is employed for the permutation and diffusion, so D = 1, and G = 1. The notations for state variable and control parameter are X n = [x n ], Γ n = [a n ], ∆ X = [δ x ] and ∆ Γ = [δ a ]. The superscripts (p) and (d) associate with the notations to mention the permutation and diffusion, respectively. It is noted that Logistic map exhibits chaos with 3.56995 ≤ a ≤ 4.0, and the value range of x n is (0, 1).

Chosen Value of Parameters
Values of x n and a n in the permutation and diffusion are represented in the format of fixed point as given in Table 6. The format of fixed point for the control parameters a  Table 7, in which some bits are with fixed states '0' and '1', and bits denoted by 'x' are perturbed. The bit patterns of state variables and control parameters in Table 7 indicate that the state of bits b 0 of both x (p) n is always '1'. The XOR operation is used as the perturbation operator. Therefore, the state of bits in perturbation amounts δ a must be '0' at positions corresponding to bits with fixed states in x  Table 8. If the perturbation is applied to, values of state variables and control parameters and amounts of perturbation will vary in the specific ranges as given in Table 9.  Table 8. Initial values of cryptosystem's parameters.

Parameter Initial and Adopted Values
0.9876543210 C 0 123 For simplest assumption, let us represent the coordinate and the value of pixels by a 1D sequence of bits, or Q = 1 and Z = 1. The 8-bit grayscale images with the size of 256 × 256 are encrypted, so the row and column numbers are encoded by 8 bits. In other words, XY present is represented by a bit sequence of  Table 10 that the bits with poor PoBs in x n as displayed in Figure 6 are deliberately used in the permutation and diffusion to consolidate the suggestion to utilize lower significant bits in the encryption. In this example, the four 8-bit grayscale images [69] and two special ones with the size of 256 × 256 are used for the simulation, that is, Lena, Cameraman, House, and Peppers, Black and White. The simulation is carried out for the permutation and diffusion separately, and the input of the permutation and diffusion processes are the original images. The value of other parameters is chosen as: the number of iterations for each data unit in the permutation and diffusion is R (p) = 10 and R (d) = 10, respectively; and the number of permutation and diffusion rounds is N (p) = 3 and N (d) = 3.
Next, the simulation results is to show to effectiveness of the proposed schemes by means of the PoBs and DoVs of perturbed state variables and control parameters.

Simulation Result of Permutation with Perturbation
The PoB and DoV are measured for values of state variables, control parameters as well as amounts of perturbation in the permutation and diffusion processes. It is noted that only significant samples of results are illustrated representatively to save the space.
Permuted images with the perturbation on the state variable, control parameter, and on both are illustrated in Figures 7-9. The first column displays the original images, and the second, third and fourth columns are permuted images with different number of permutation rounds N (p) = 1, 2, and 3, respectively. It is clear that the visual structure of the original images are completely removed in the permuted images, even after the first round of permutation.
Let us analyze the DoV for state variable and control parameter, and amounts of perturbation for each scheme of perturbation. Specifically, the analysis is carried out with the chaotic sequencê  Table 7 shows the chosen pattern of bit representation for a (p) n to explain the bias of bits in PoBs. There are some bits with the fixed state of '1' and some perturbed bits with 'x'. Due to the fixed state of bits, the value range of control parameter is broken apart to separate portions as given in Table 9, and it can be seen in Figures 11b,c and 12e,f in presenting the DoVs of control parameters and amounts of perturbation. Figures 10-12 illustrate for the PoBs and DoVs in the perturbation on state variable, control parameter, and on both, respectively. The PoBs are displayed in the first column, and the DoVs are in the second and third columns. Notably, the permutation process uses the coordinates of pixels (x, y) as the input. In addition, for any image with the same size, the permutation rule is the same in every permutation round for any image with the same size, or it is independent from the pixel values. Thus, for each of images, the PoBs and DoVs of the first round of permutation are shown.        It is clear from the first column of Figures 10-12 that the PoBs of amounts of perturbation are even for most significant bits, and it is biased for a few lower significant bits in every scheme of perturbation.
That is because the higher significant bits of x  Table 10. This is agreed with the PoBs of x n as shown in Figure 6. In other words, the lower significant bits of x (p) n should be employed to generate amounts of perturbation.
The DoVs of amounts of perturbation δ (p) x are spread over the range of (0,1) for the perturbation on state variable and on both as depicted in Figures 10b and 12b. In contrast, the DoVs of perturbed state variablex (p) n cover the lower range of (0,1) for the perturbation on state variable in Figure 10c and the full range of (0,1) for the perturbation on both in Figure 12c. In addition, the DoVs of δ  Table 9. In general, there are 2 n b separate portions of value ranges for n b perturbed bits in-between fixed bits.

Simulation Result of Diffusion with Perturbation
Figures 13-15 illustrate the original images and its corresponding diffused ones in the second, third, and fourth columns with different number of diffusion rounds, that is, N (d) = 1, 2, and 3. Note that each pixel is iterated ten times (R (d) = 10). It is clear that the visual structure of the original images is completely destroyed in the diffused images, even after the first round of diffusion.
To save the space, the PoBs and DoVs in the diffusion of only Cameraman image are illustrated in Figures 16-19. The result shows almost the same to those in the permutation as described above. in Table 10, the bias is caused by higher significant bits ofx

Space of Secret Keys
The secret keys in the proposed permutation and diffusion are the initial values of state variables and control parameters. In fact, values of state variables and control parameters are changed during perturbation. The Logistic map in chaotic behavior requires the control parameter and the state variable varying in defined ranges. That is, the integer portions of values of state variables and control parameters must be '0' and '11', respectively. In addition, there are some bits in the fractional portions of control parameters must be kept constant at the state of '1', for example, bit b −1 , to ensure that the value range of control parameters in (3.56995,4.0). Therefore, the constraints make the initial values of state variables and parameters contribute the number of bits to the secret keys less than its definition.
According to the adopted values of parameters for the permutation and diffusion in this example, the number of bits represents for the secret keys is dependent on not only that of perturbed bits,

Space of Secret Keys
The secret keys in the proposed permutation and diffusion are the initial values of state variables and control parameters. In fact, values of state variables and control parameters are changed during perturbation. The Logistic map in chaotic behavior requires the control parameter and the state variable varying in defined ranges. That is, the integer portions of values of state variables and control parameters must be '0' and '11', respectively. In addition, there are some bits in the fractional portions of control parameters must be kept constant at the state of '1', for example, bit b −1 , to ensure that the value range of control parameters in (3.56995,4.0). Therefore, the constraints make the initial values of state variables and parameters contribute the number of bits to the secret keys less than its definition.
According to the adopted values of parameters for the permutation and diffusion in this example, the number of bits represents for the secret keys is dependent on not only that of perturbed bits, but also the constraints in the value ranges of state variables and control parameters of chaotic map. Table 11 Table 7. In other words, the number of bits in the secret keys can be at least 64 and 72 for the permutation and diffusion, respectively.
It is assumed that the cryptosystem consists of the permutation and diffusion with the perturbation of Logistic map as described above. Therefore, the secret key of a cryptosystem is at least 136 bits in length. That is long enough to resist from the brute force attack running on nowadays computers.

Statistical Analyses
Here, some appropriate statistical analyses related to the content of images are carried out for the exemplar structures of permutation and diffusion. That is, the histogram, information entropy, correlation coefficients, sensitivity of secret keys, measurement of quality, and chosen-plaintext attack as well as chosen-ciphertext one are computed for this example. In the presentation of results in the tables, bad results and the best one are in italic and in bold, respectively.
It is noted that it is unbiased to compare the statistical measures for the permutation and diffusion processes in this work with those obtained by a whole cryptosystem. The simulation result is compared with that in recent works to show the advantages. However, the statistical measures for each of the permutation and diffusion show the separate contribution, if these are employed to construct a cryptosystem.

1.
Histogram analysis Histogram reflects the distribution of pixel values of an image. Histogram analysis of an image is considered by means of statistical histogram. The χ 2 is measured for statistical histogram. It is defined by where K is the number of grey level (K = 256 for 8-bit grayscale images), and O i and E i are respectively observed and expected occurrence frequencies of gray level i, with 0 ≤ i ≤ K − 1.
Expected occurrence frequencies of 8-bit grayscale images is E i = M×N K ; M and N are the number of rows and columns of images. The unilateral hypothesis test is to consider the significance of the histogram conforming a uniform distribution. The hypothesis test is accepted (or the histogram is uniformly distributed) if χ 2 ≤ χ 2 α (K − 1). In this example, the significance level α = 0.05 is considered and χ 2 0.05 (255) = 293.247. It is noted that the analysis of histogram is only applied to the diffusion. Four original images and two special images (Black and White images) are employed in the simulation for the histogram analysis. Table 12 shows values of χ 2 which are computed for original and diffused images for different rounds of diffusion. The χ 2 values of original images are quite large in compared with those of diffused ones. It means that the histograms of original images have clear structures. Specifically, the χ 2 values of most diffused images are less then χ 2 0.05 (255) after the first round of diffusion, or the histograms of diffused images have uniform distributions. The diffused images of Black and White have uniform histograms from the third round of iteration. However, histogram structures still exist in the first-round diffused Black and White images. It seems that there is not much difference in χ 2 -test result in different schemes of perturbation. The test results show that the diffusion process provides the histogram statistics equivalent to those produced by a whole cryptosystem for example, Reference [58]. 2.

Information entropy
The information entropy IE(V) is used for measuring the probability of appearance of symbol v i in the message source V [70]. Here, the message source is the encrypted images and symbols are pixels. Calculation of IE(V) for an image is where p(v i ) is the probability in finding pixels with value of v i in an image. IE(V) is in bit. In the case of 8-bit grayscale image, the maximum of IE(v i ) is 8 as the ideal value. Here, the entropy is only considered for diffused images only, because the permutation does not change values of pixels. Under a cryptographic point of view, the better the statistical property in a diffused image, the closer the value of IE(V) to the ideal one. Table 13 presents the information entropy of diffused images obtained by different schemes of perturbation. For four test images, the entropy of original images is much less than the ideal one, while that of most diffused images is very close to the ideal one, that is, larger than 7.99 regardless to the scheme of perturbation and the number of diffusion rounds as well. However, the diffused images of Black and White have low entropy at the first round of diffusion and it increases to the ideal one at the second and third round of diffusion. The result shows that the information entropy of diffused images are equivalent to that in most previous works, for example, References [27,29,58,62].

Sensitivity of secret keys
The sensitivity of secret key is considered by means of ciphertext difference rate (CDR) as proposed in Reference [71]. The CDR is computed by where M and N are the size of images; C is the ciphertext using the secret key K; C 1 and C 2 are ciphertexts using the secret keys K + ∆K and K − ∆K, respectively; the function Di f f (A, B) returns the difference in the number of pixels between images A and B.
It is clear that the value difference in pairs of pixels is considered for the CDR. Thus, this can be used for analyzing the sensitivity of secret keys in both the permutation and diffusion for four test images, and only in the diffusion for two special images, Black and White.
Here, the secret keys are initial values of (IV (p) , a  Table 20.  The simulation is carried out with four test images and two special ones, Black and White and the results are shown in Tables 21-26 for the example that Cdr_IV, Cdr_a and Cdr_C 0 are the ciphertext difference rates with a tolerance in three initial values, IV, a, and C 0 , respectively. Overall, Cdr_IV, Cdr_a and Cdr_C 0 are very close to unity with smallest tolerances in each component of the secret keys for any round of diffusion and for every scheme of perturbation. Specifically, for all images, the diffusion produces very good sensitivity to secret key with Cdr larger than 0.994 for every scheme of perturbation. However, for four test images, for the perturbation on state variable, the sensitivity to Cdr_IV is worse at the first round of permutation than that in larger number of permutation rounds. For every scheme of perturbation, sensitivity to Cdr_a is worse at the first round of permutation than that in larger number of permutation rounds. The result is obtained with the bit arrangements as given in Table 10, and it can be improved if higher significant bits of x (p) n and x (d) n are avoided to generate amounts of perturbation. Here, the result of CDRs is comparable to that in Reference [27].
In addition, the sensitivity to the secret keys can be considered by means of number of pixels change rate (NPCR) and unified average changing intensity (U ACI) [72,73]. These are as and U ACI = 1 where D(x, y) = 1 if C 1 (x, y) = C 2 (x, y), and D(x, y) = 0 if C 1 (x, y) = C 2 (x, y); C 1 and C 2 are described in Equation (34). The tolerance in the secret keys is as shown in Table 20. The simulation for six test images with the permutation and diffusion using the secret keys with and without the tolerance. The resultant images are used to compute for NPCR and U ACI. It is noted that only these are inappropriate for permuted images of Black and White.     Tables 27-32 demonstrated NPCR and U ACI for the permuted and diffused images with various schemes of perturbation. Generally, for every scheme of perturbation and for test images except two special content ones (Black and White), NPCR of permutation is increased with the increase of number of rounds, and it is lower than that of diffusion for every component of secret keys. NPCR of diffusion is saturated and fluctuated in the range of 99.4% to 99.7% regardless of number of diffusion rounds, schemes of perturbation, and components of secret keys.
Similarity, for test images except for Black and White and for every scheme of permutation, U ACI of permutation is increased with the increase of number of permutation rounds, and it is lower than that of diffusion. U ACI of diffusion is fluctuated within the range of 31.7% to 34.7% for every scheme of perturbation and for every component of secret keys. However, U ACI of permutation is different for different test images, and it is better sensitivity to ∆ IV than to ∆ a .
The values of NPCR and U ACI of diffusion in this work are equivalent to those of encrypted images by a whole cryptosystem in most of previous works, for example, References [27,29,58,62].

Measurement of permutation and diffusion quality
Here, the quality of permutation and diffusion of three schemes of perturbation in the example is measured using the test images by the Mean-Squared-Error (MSE) and Peak Signal-to-Noise Ratio (PSNR). Those are performed to compare the plain images P and permuted ones C as where, P(x, y) and C(x, y) are values of pixels at (x, y) in P and C, respectively, and PSNR = 20 × log 10 255 sqrt(MSE) .
The larger value of MSE is, the higher quality of permutation is obtained. In contrast, the value of PSNR is expected as small as possible. Table 33 shows the quality of permutation by means of MSE and PSNR for four images excepted for Black and White. Values of MSE for the images are large, and those of PSNR are small correspondingly. It means that most pixels of the plain image P are with values different from those in permuted one C, or high quality of permutation is obtained. However, the result shows that values of MSE and PSNR are only unequal for different plain images, but independent from the schemes of perturbation and the number of permutation rounds. Besides, both MSE and PSNR are also used for measuring the quality of diffusion. In addition, the sensitivity to the plain images and diffused ones is characterized the quality of diffusion by means of NPCR and U ACI. These are considered as follows. A pair of plain images, P and P 1 are diffused, in which P 1 is a modified version of P with a small change by the state of the least significant bit (LSB). The corresponding pair of diffused images C and C 1 are obtained for analyzing the sensitivity to the plaintext. Similarly, the image C is achieved by modifying the diffused image C, and then inversely diffused to obtain the recovered plain image P .
Here, the diffusion and inverse diffusion processes are carried out on sequential pixels, therefore, the modification is made to the first pixels of P and C . Here, the NPCR and U ACI are given in Equations (37) and (38), and computed on the pairs of (C, C 1 ) and (P, P ) for analyzing the sensitivity to plaintext and ciphertext. Tables 34 and 35 display the MSE, PSNR, NPCR and U ACI calculated for six pairs of test images, that is, (C, C 1 ) and (P, P ), to measure the quality of diffusion and inverse diffusion. Clearly, large values of MSE, NPCR and U ACI, and small values of PSNR are obtained. It means that with small tolerances in P and C generate huge difference in C 1 and P , respectively; or high quality of diffusion is achieved. Overall, all of measures are independent from the schemes of perturbation and the number of diffusion rounds.
In detail, values of MSE and PSNR of diffusion in Table 34 are dependent on the content of plain images, while those of NPCR and U ACI are not. Values of MSE and PSNR of Cameraman, Black and White images in the diffusion is better than those of Lena, House and Peppers images.
As given in Table 35 for the inverse diffusion, values of not only MSE, PSNR, but also U ACI are dependent on the content of plain images, and those measures of Cameraman, Black and White images are larger than those of Lena, House and Peppers. Values of U ACI of Black and White images are extremely good, while those of House are worse.
The quality for each of permutation and diffusion processes in this example is better than those in recent works, for example, Reference [74,75].  6.

Chosen-plaintext and chosen-ciphertext attacks
In this work, the permutation and diffusion processes are considered separately. According to the structure of perturbation as given in Section 4.1 and the figures therein, the permuted image in does not depends on the content of plain image. In other words, the permutation algorithms can not resist again chosen-plaintext and chosen-ciphertext attacks. However, the permutation process usually combines with a diffusion one in construction of cryptosystem.
Here, the diffusion algorithms as described in in Sections 4.3 and 4.4 have image-content sensitivity. The value of pixels are perturbed on the state variables and control parameters of chaotic map. This is similar to the case of authentication as given in References [57,76,77], where the hashed keys with limited lengths (e.g., 256 bits) are computed using the content of image. However, the better advantage in the proposed models in compared with previous works is that the the diffused image is dependent on every value of pixels, or it means that the length of hashed keys is equal to that of image in bits, that is, M × N × k 2 bits. Consequently, the diffusion algorithms strongly resist from the types of chosen-plaintext and chosen-ciphertext attacks.
The simulation result in this example in Tables 34 and 35 shows the image-content sensitivity by means of MSE, PSNR, NPCR and U ACI as the evidence of the image-content sensitivity and resistance from chosen-plaintext and chosen-ciphertext attacks.

Concluding Remarks
The present work has proposed the structural models of image permutation and diffusion based on perturbed digital chaos. Dynamics of chaotic map is nonstationary during encryption. This introduces a class of chaotic ciphers utilizing the perturbation. To demonstrate the feasibility of the proposed models, the example employed the simplest chaotic map, that is, Logistic map. The simulation results of permutation and diffusion have been analyzed separately. Overall, the best result is obtained in the case of perturbation on both state variable and control parameter. The results are comparable to those reported in recent works, for example, References [27,55] and References [27,29,58,62]. There are some remarks in the proposed models of permutation and diffusion with the perturbed chaos.
Due to the dependency of image content, it should be ensured in any specific design that dynamics of chaos has good statistical properties and the cryptographic performance is obtained for special image contents. In fact, any chaotic map can be employed for the proposed models. A requirement for implementation is that the total number of perturbed bits in state variables or control parameters in a specific scheme of perturbation must be equal or larger than that representing for the coordinates and values of pixels. In addition, the key space of the proposed schemes is dependent on the number of perturbed bits. This can be expanded with the increase in the number of bits represented for state variables and control parameters in appropriate scheme of perturbation. It also means that the period of dynamics is lengthened. Besides, bits with fixed states in the value of state variables and control parameters will make value ranges of state variables and control parameters valid in separate intervals. The number of bits representing for chaotic variables and control parameters should be chosen to keep balanced between the expected size of key space and the resource available in the implementation platform.
Moreover, the structure of permutation is almost similar to that of diffusion in the same scheme of perturbation. The main difference in the structures is the way that the coordinate and the value of pixels are perturbed on state variables and control parameters, and in their recovery processes from the state variables. In the proposed structures, the rule of perturbation by means of controlling the switching is defined by Equations (19) and (18) for the permutation and by Equations (26) and (25) for diffusion. This can be changed to have better security performance. For specific sizes of images, the modulo operation can be used to figure out new coordinate of pixels in the case that the size of images along any axis is unequal to 2 n ; n is an integer.
Lastly, the required resource for hardware implementation is quite low in compared with typical FPGAs. In addition, there is no operation of comparison in the hardware, thus these models can have high speed operation. Further speed can be improved by combining more than one coordinate or value of pixels perturbing on chaotic dynamics at a time. This is allowed in the case the number of perturbed bits is large enough to attain that of bits of coordinates or values of pixels. The models can be simply realized in hardware with the use of multipliers, adders, XOR gates and switches. Hardware design will be implemented on FPGAs as the future work of the proposed models.