7 Vol 19 No 2
7 Vol 19 No 2
www.jatit.org
ABSTRACT
In this paper, a novel image encryption scheme is proposed based on combination of pixel shuffling and
W7. Due to sensitivity to initial conditions, chaotic maps have a good potential for designing dynamic
permutation map. So a chaotic Henon map is used to generate permutation matrix. An external secret key is
used to derive the initial conditions for the chaotic map and W7 secret key. Pixel shuffling is performed via
vertical and horizontal permutation. Shuffling is used to expand diffusion in the image and dissipate the
high correlation among image pixels. In order to evaluate performance, the proposed algorithm was
measured through a series of tests. Experimental results illustrate that the scheme is highly key sensitive
and shows a good resistance against brute-force and statistical attacks.
Keywords: Shuffling, W7, Henon Map, Permutation Matrix, Test.
117
Journal of Theoretical and Applied Information Technology
www.jatit.org
random in attackers' view, while in receiver's view, The Henon map possesses a strange attractor. For
the system can be defined and decryption is any values of (xi, yi) in S, the sequence of points
possible. Many cryptographic algorithms based on quickly converges to this attractor and remains on it
chaos theory are presented till now [5, 6, 7] and during the iterations that follow.
some of them are somehow employed in way that
3.2. Stream Cipher
are capable of image encryption addition to text
encryption. Image encryption must have special In cryptography, Stream ciphers are an important
features such as suitable speed for image massive class of symmetric encryption algorithms [10].
data ciphering. Text encryption methods are not They encrypt binary digits of a plain-image one at a
suitable for implementation on the image. time, using an encryption transformation which
Practically, we need to transmit a reasonable varies with time. A stream cipher is a symmetric
amount of information, which requires a large key cipher where plain-image bits are combined
sample space and that in turn implies a large with a keystream, typically by XOR operation.
number of keys. The distribution of a large number
of keys is liable to cause horrendous management 3.2.1. W7 Stream Cipher
problems. So, one of the main advantages of The W7 stream cipher is a synchronous
chaotic system's realization is facilitated key symmetric encryption designed for efficient
management approach because this method only hardware implementation at very high data rates
needs to protect and secure transmission of secret [11]. This cipher has been proposed in order to
key (parameters and initial values of chaotic replace A5/1 in GSM security scheme, due to the
system), which has a little volume and therefore not security problems of A5/1 [12]. W7 algorithm
only a little memory is needed to maintain it but supports key lengths of 128-bit and consists of a
also there is more confidence during its transfer. control and a function unit. The function unit is
The unauthorized access to short length keys is responsible for the keystream generation and
significantly less possible than the large length keys contains eight similar cells. Each cell contains three
during data transmission through the insecure LFSRs and one majority function. Fig. 1 shows W7
channel. key stream generator and the detailed design of the
block C2 is shown in Fig. 2. Compared with A5/1,
3. METHODS the key size is increased from 64 bits to 128 bits;
each LFSR sequence is filtered by a cubic Boolean
We used Henon map and W7 stream cipher for
function, 8 parallel identical structures for
constructing our new approach that are described as
outputting one byte instead of one bit. W7 is fast
follows:
and has a cheap and efficient hardware
3.1. Henon Map implementation, so the idea to use W7 for image
encryption purposes might be tempting. This is
The Henon map is a prototypical two-
additionally motivated by the fact that using
dimensional invertible iterated map represented by
existing and tested ciphers instead of designing new
the state equations with a chaotic attractor and is a
ones is advised from a security’s viewpoint.
simplified model of the Poincare map for the
Lorenz equation proposed by Henon in 1976 [8]. 4. THE PROPOSED ALGORITHM
The chaotic Henon mapping has been proposed as a
method of generating pseudo-random sequences In this section, we propose a new image
[9]. The two-dimensional Henon map is defined as encryption scheme that consists of a pixel shuffler
follows: unit and a stream cipher unit. Fig. 3 demonstrates
the block diagram of the proposed algorithm. So
⎧⎪x 2
n +1 = 1 + y n − α x n far, many researchers suggested using combination
⎨ (1) of Pixel scrambling and symmetric encryption [2, 3,
⎪⎩ y n +1 = β x n ,
13, 14]. Pixel scrambling has two important issues
with initial point (x0, y0). The pair (x, y) is the two- that are useful for image ciphering. It not only
dimensional state of the system. When α = 1.4 rearranges the pixel location (diffusion), but also
and β = 0.3 , the system is in chaotic state. Henon changes the value of each pixel (confusion).
Creating confusion in the image before applying the
showed that if the initial point lies in the area S
stream cipher is redundant and not only adds no
defined by the four points (-1.33, 0.42), (1.32,
enhancing property to the system but also increases
0.133), (1.245, -0.14) and (-1.06, -0.5), then the
the computational complexity. Confusion is
subsequent points, (xi, yi) for i ≥ 1 , also lie in S [8].
118
Journal of Theoretical and Applied Information Technology
www.jatit.org
performed by stream cipher itself through nonlinear image histogram. This means that the
function operation. Pixel location displacement is corresponding statistical information in shuffled
appropriate before applying encryption, because image is as same as the plain-image.
unlike the text data has only two neighbours, each
According to Shannon information theory, secure
pixel in the image is in neighbourhood with eight
encryption systems provide some circumstances on
adjacent pixels. For this reason, each pixel has a lot
information entropy [15]. So that:
of correlation with its adjacent neighbours.
However, it is very important to disturb the high H (P | C ) = H (P ), (2)
correlation among image pixels to increase the
security level of the encrypted images. In order to where C is cipher-image and P is plain-image. In
dissipate the high correlation among pixels, we order to satisfy equation (2), C should not give any
proposed shuffling operation. Pixel shuffler unit information about P. To fulfil this desire cipher-
consists of a permutation map that is applied in two image must be as random as possible. Since a plain-
different directions: vertical and horizontal, to image that has history of uncertainty is distributed
decrease adjacent pixels correlation. A permutation non-uniformly, an ideal cipher-image histogram has
matrix is an identity matrix with the rows and to approximate the uniform balanced distribution.
columns interchanged. It has a single 1 in each row Also each two adjacent pixels should be statistically
and column; all the other elements are 0. The non-correlated. This purpose cannot be achieved
inverse of a permutation matrix is the same as its under a limited number of permutations. Permuted
image cannot resist against statistical and known
transpose, P −1 = PT . So, no extra calculation is
plaintext attacks [16, 17]. So after pixel permutation
needed to compute the reciprocal matrix for
in two directions, the W7 algorithm is deployed. In
decryption. This is a valuable property for
gray scale image, each pixel has a value between 0-
cryptographic purposes that increases algorithm
speed and decreases memory usage. 255. P = {P (i , j ) : i , j = 0,1, 2,..., 255} , where P is
set of pixels and (i , j ) denotes pixel location.
According to shuffling algorithm, a two-
dimensional Henon map is employed as a pseudo- Hence, each pixel's length is 8 bits in GF (2) . Thus,
random number generator to build permutation image matrix is a binary sequence of 8×H×W
matrix. Let's suppose that the plain-image is an length, where H is number of rows and W is number
N×N matrix. The shuffling algorithm is described as of columns. W7 algorithm generates a
follows: pseudorandom cipher bit stream known as
keystream, equal length to shuffled image binary
NoIt ← N sequence. Then these two bit streams are XOR-ed.
For it = 1: NoIt
Shuffled − image ⊕ Keystream = Cipher− image . (3)
(xn+1, yn+1) ← Henon (xn, yn)
V (it) ← xn+iyn For decryption, cipher-image is XOR-ed with
keystream then reverse shuffling operation is
performed via inverse permutation map, i.e.
D (it) ← x n2 + y n2
P −1 = PT .
End For
5. VISUAL TESTING
Pmap ← Permutation map that is generated from D,
Pmap elements ∈ {0, 1}. The algorithm is applied with a 256-level gray
scale TIF image that has the size of 256×256 and
P ← Plain-image visual test is performed. Plain-image is encrypted
For it = 1: NoIt by using the W7 secret key '00001000000008000
100002000010000' (in hexadecimal) and (x0, y0) =
Vertical permutation ← Pmap × P (:, it) (0.4, 0.3) as the initial point of chaotic map. Fig. 5
Horizontal permutation ← P (it, :) × Pmap demonstrates encryption result. By comparing the
plain and cipher-image in Fig. 5, there is no visual
End For information observed in the encrypted image.
Fig.4 shows Shuffling in two directions with
(x0, y0) = (0.4, 0.3) as seed point. It is seen that, as
we expected, the shuffling doesn’t affect the plain-
119
Journal of Theoretical and Applied Information Technology
www.jatit.org
120
Journal of Theoretical and Applied Information Technology
www.jatit.org
adjacent pixels are selected randomly from image to Another measure, UACI, is defined by the
test correlation. Correlation test image is depicted following formula:
in Fig. 5(a). Fig. 6 shows the correlation 1 | C1 (i , j ) − C 2 (i , j ) |
distribution of two adjacent pixels in the plain- UACI =
W ×H
× ∑i , j [ 255
] × 100%. (11)
image and cipher-image. It is observed that
neighbouring pixels in the plain-image are Tests have been performed on the proposed
correlated too much, while there is a little scheme on a 256-level gray scale image of size
correlation between neighbouring pixels in the 256×256 shown in Fig. 5(a). The MAE experiment
encrypted image. Results for correlation result is shown in table 2. It is illustrated that there
coefficients are shown in table 1. is a fluctuation between MAE of row and column-
row permuted image. The MAE of Column-row
6.5. Differential analysis permuted image is about 9 percent more than MAE
In general, a desirable property for an encrypted of row permuted image while the MAE of
image is being sensitive to the small changes in encrypted image is 21 percent more than MAE of
plain-image (e.g., modifying only one pixel). shuffled image. The larger the MAE value, the
Opponent can create a small change in the input better the encryption security. The NPCR and
image to observe changes in the result. By this UACI test results are shown in table 3. Results
method, the meaningful relationship between obtained from NPCR show that the encryption
original image and encrypted image can be found. scheme's sensitivity to small changes in the input
If one small change in the plain-image can cause a image is under 0.01%. The UACI estimation result
significant change in the cipher-image, with respect shows that the rate influence due to one pixel
to diffusion and confusion, then the differential change is very low. The results demonstrate that a
attack actually loses its efficiency and becomes swiftly change in the original image will result in a
practically useless. Three common measures were negligible change in the ciphered image. The reason
used for differential analysis: MAE, NPCR and lies in the mode of operation. The function of
UACI [22, 23]. MAE is mean absolute error. NPCR shuffler and W7 operates in counter mode and does
means the number of pixels change rate of ciphered not mangle plaintext in a complicated way.
image while one pixel of plain-image is changed. 6.6. Sensitivity analysis
UACI which is the unified average changing
intensity, measures the average intensity of the An ideal image encryption procedure should be
differences between the plain-image and ciphered sensitive with the secret key. It means that the
image. change of a single bit in the secret key should
produce a completely different cipher-image. Fig. 7
Let C (i, j) and P (i, j) be the gray level of the shows key sensitivity test result. It can be observed
pixels at the ith row and jth column of a W×H that the decryption with a slightly different key
cipher and plain-image, respectively. The MAE (different secret key or initial values) fails
between these two images is defined in completely. Therefore, the proposed image
W H encryption scheme is highly key sensitive.
1
MAE =
W ×H ∑∑ | C (i , j ) − P (i , j ) |. (8)
6.7. Image Sequence Randomness Test
j =1 i =1
To ensure the security of a cryptosystem the
Consider two cipher-images, C1 and C2, whose cipher must have some properties such as good
corresponding plain-images have only one pixel distribution, long period, high complexity and
difference. The NPCR of these two images is efficiency. In particular, the outputs of a
defined in cryptosystem must be unpredictable in the absence
NPCR =
∑ i , j D (i , j ) ×100%, (9)
of knowledge of the inputs. Recently, the NIST
designed a set of different statistical tests to justify
W ×H randomness of binary sequences produced by either
hardware or software based cryptographic random
where D (i , j ) is defined as or pseudorandom number generators. These tests
focus on a variety of different types of non-
⎧0, if C1 (i , j ) = C 2 (i , j ),
⎪ randomness that could exist in a sequence. The
D (i , j ) = ⎨ (10)
mathematical description of each test can be found
⎪⎩1, if C1 (i , j ) ≠ C 2 (i , j ).
at [24]. So, we used the NIST test suite in order to
test the randomness of the surveyed algorithms. In
121
Journal of Theoretical and Applied Information Technology
www.jatit.org
122
Journal of Theoretical and Applied Information Technology
www.jatit.org
123
Journal of Theoretical and Applied Information Technology
www.jatit.org
(e) (f)
Figure 1. W7 key stream generator. Figure 4. Shuffling using Henon map: (a) plain-
image, (b) plain-image histogram, (c) horizontal
permutation, (d) vertical and horizontal
permutation, (e) horizontal permutated image
histogram, (d) histogram of permuted image in
vertical and horizontal directions.
(c) (d)
Figure 5. Visual test result: (a) plain-image, (b)
encrypted image, (c) plain-image histogram, (d)
Figure 3. Block diagram of the proposed scheme. cipher-image histogram.
(a) (b)
(a) (b)
(c) (d)
(c) (d)
124
Journal of Theoretical and Applied Information Technology
www.jatit.org
(a) (b)
(c) (d)
Figure 7. Key sensitivity test: (a) plain-image, (b)
plain-image histogram, (c) Decrypted image
125