X. Chai et al. / Signal Processing 155 (2019) 44–62 47
Fig. 2. The grouping of the secret key K .
3. The proposed encryption scheme
3.1. Generating initial values of hyperchaotic system and intermittent
parameters
In the proposed encryption scheme, a 384-bit external secret
key is employed, which is generated by SHA 384 hash function
of the plain image. The 384-bit secret key K is divided into 8-
bit blocks, so it can be expressed as: K = k
1
, k
2
, . . . , k
48
, subject to:
k
i
= { k
i, 0
, k
i, 1
, . . . , k
i, 7
} , where in k
i, j
, i denotes the character num-
ber and j is the bit number in k
i
.
And then the initial values of the chaotic system and four inter-
mittent parameters are computed by secret key K . In order to un-
derstand easily, K is divided into many groups as shown in Fig. 2 .
As shown in Fig. 2 , the intermittent parameters h
1
, h
2
, h
3
, h
4
,
index
1
, index
2
, index
3
, index
4
are respectively generated by these
groups.
The initial values of the chaotic system are also gotten from
them. The detailed process is as below. Firstly, parameter h
1
, h
2
,
h
3
, h
4
are computed by,
⎧
⎪
⎪
⎪
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎪
⎪
⎪
⎩
h
1
= c
1
+
1
7 × 256
( k
1
+ k
2
+ ... + k
7
)
h
2
= c
2
+
1
256
( k
8
k
9
... k
14
)
h
3
= c
3
+
1
2 × 256
(( k
15
k
16
k
17
) + ( k
18
... k
21
))
h
4
= c
4
+
1
256
( k
22
k
23
... k
28
)
(2)
where c
1
, c
2
, c
3
, c
4
are external keys, and x y denotes the XOR
operation.
Next, initial values x
0
, y
0
, z
0
, w
0
of the chaotic system may be
acquired by
⎧
⎪
⎨
⎪
⎩
x
0
= mod (( h
1
+ h
2
) × 10
14
, 256) / 255
y
0
= mod (( h
2
+ h
3
) × 10
14
, 256) / 255
z
0
= mod (( h
3
+ h
4
) × 10
14
, 256) / 255
w
0
= mod (( h
1
+ h
2
+ h
3
+ h
4
) × 10
14
, 256) / 255
(3)
where mod( a, b ) represents the modular operation of a for b .
Finally, intermittent parameters of index
1
, index
2
, index
3
, index
4
are obtained by
inde x
1
= mod ( k
29
+ ... + k
35
, 6) + 1 (4)
inde x
2
= mod ( k
36
+ ... + k
42
, 6) + 1 (5)
inde x
3
= mod ( k
43
... k
48
, 6) + 1 (6)
inde x
4
= mod ( k
29
+ ... + k
48
, 6) + 1 (7)
According to Eqs. (3) –( 7 ), the initial values of the chaotic sys-
tem and four intermittent parameters depend on the hash value of
the original image. If there is one bit difference between two im-
ages, their hash values will be completely different. Therefore, our
algorithm has high sensitivity to the plain image.
3.2. Simultaneous intra-inter-component permutation mechanism
dependent on the plaintext (SCPMDP)
Simultaneous intra-inter-component permutation mechanism
dependent on the plaintext (SCPMDP) is proposed to scramble the
red, green, blue components of the color plain image, and denoted
as
[
R
0
, G
0
, B
0
]
= SC
(
R, G, B, W
1
, W
2
, W
3
)
(8)
where W
1
, W
2
, W
3
are three chaotic sequences, matrices R, G, B
are red, green, blue components of the color plain image, R
0
, G
0
, B
0
are their respective confused components, and SC(.) is the SCPMDP
function.
Assume the size of the color plain image is M × N , decompose it
into its red, green, blue components and name them as matrices R,
G, B , and W
1
, W
2
, W
3
are all sequences with the length of 1 × MN .
The detailed confusion steps are illustrated in Fig. 3 and described
as
Step 1 : Transform W
1
, W
2
, W
3
in column wise into matrices
WZ
1
, WZ
2
and WZ
3
with the size of M × N .
Step 2: Matrices WZ
1
, WZ
2
and WZ
3
are produced through
modifying the elements of WZ
1
, WZ
2
and WZ
3
by
W Z
1
(
i, j
)
= mod
abs
(
W Z
1
(
i, j
) )
× 10
10
, 3
+ 1 (9)
W Z
2
(
i, j
)
= mod
abs
(
W Z
2
(
i, j
) )
× 10
10
, 3
+ 1 (10)
W Z
3
(
i, j
)
= mod
abs
(
W Z
3
(
i, j
) )
× 10
10
, 3
+ 1 (11)
where, abs( x ) is the absolute value of x , WZ
1
( i, j ), WZ
2
( i, j ), WZ
3
( i,
j ), WZ
1
( i, j ), WZ
2
( i, j ), WZ
3
( i, j ) are the elements located at i th
row and j th column of matrices WZ
1
, WZ
2
, WZ
3
, WZ
1
, WZ
2
and
WZ
3
, and 1 ≤ i ≤ M , 1 ≤ j ≤ N .
To facilitate the description of the following scrambling process,
the positions of the image pixel are ( i, j ) and ( i’, j’ ) before and after
the permutation operation, respectively, and i, i
∈ [1, M ], j, j
∈ [1,
N ]
Step 3: The row position i’ and column position j’ of the image
pixel may be computed by
i
= 1 + mod
(
abs
(
W Z
1
(
i, j
) ) )
× 10
10
, M
(12)
j
= 1 + mod
(
abs
(
W Z
1
(
i, j
)
+ W Z
2
(
i, j
) ) )
× 10
10
, N
(13)
Case 1: when WZ
1
( i, j ) = 1, the matrix R is shuffled and the po-
sitions of R ( i, j ) and R ( i’, j’ ) are exchanged.
Case 2: when WZ
1
( i, j ) = 2, the elements of matrices R and
G are permutated and the positions of R ( i, j ) and G ( i’, j’ ) are ex-
changed.
Case 3: when WZ
1
( i, j ) = 3, the elements of matrices R and B
are confused and the positions of R ( i, j ) and B ( i’, j’ ) are swapped.
When all the elements are confused, the matrices R, G and B
are respectively changed to matrices RA, GA and BA .