# Color Image Scrambling Technique Based on Transposition of Pixels between RGB Channels Using Knight’s Moving Rules and Digital Chaotic Map

Authors: Adrian-Viorel Diaconu; Alexandru Costea; Marius-Aurel Costea
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

Nowadays, increasingly, it seems that the use of rule sets of the most popular games, particularly in new images’ encryption algorithms designing branch, leads to the crystallization of a new paradigm in the field of cryptography. Thus, motivated by this, the present paper aims to study a newly designed digital image scrambler (as part of the two fundamental techniques used to encrypt a block of pixels, i.e., the permutation stage) that uses knight’s moving rules (i.e., from the game of chess), in conjunction with a chaos-based pseudorandom bit generator, abbreviated PRBG, in order to transpose original image’s pixels between RGB channels. Theoretical and practical arguments, rounded by good numerical results on scrambler’s performances analysis (i.e., under various investigation methods, including visual inspection, adjacent pixels’ correlation coefficients’ computation, key’s space and sensitivity assessment, etc.) confirm viability of the proposed method (i.e., it ensures the coveted confusion factor) recommending its usage within cryptographic applications.


---

## Body

## 1. Introduction

It is well known that, clearly, images are considered to contain a huge amount of information (e.g., a family photos might tell not only who are its members but also their rough ages or physical features, etc.) and thus, as an essential and integrated part of the advanced data protection techniques (i.e., image encryption [1–5] and watermarking [6–12]), digital image scramblers are designed to transform clear images into unintelligible ones (i.e., whose inherent information is protected from any unauthorized use).In recent years, besides classical approaches in the designing of bidimensional bijection based digital image scramblers (e.g., chaos-based [13–17], cellular automata based [18, 19], interpixel displacement or image-blocks transposition based [20–22], spatial transform based [23, 24], and matrix decomposition based [25] scramblers), few new designs based on rule sets of the most popular games (e.g., Sudoku puzzle based [26–28], Chinese chess knight’s tour based [29, 30], Rubik’s cube principle based [31, 32], and Poker shuffling rules based [33]) found their rightful place.This paper aims to contribute to the crystallization of reminded paradigm by presenting a new model of digital image scrambler, based on transposition of pixels between RGB channels using knight’s moving rules (i.e., from the game of chess) in conjunction with a chaos-based PRBG.The rest of this paper is organized as follows. Section2 presents, as comprehensively possible, the design of proposed digital image scrambler. Section 3 showcases scrambler’s performance analysis. Finally, Section 4 concludes the work carried out.


## 2. Algorithm Description/Methodology

This section deals with the presentation, as comprehensively possible, of the designing stages of the proposed digital image scrambler (i.e., use of knight’s moving rules, use of digital chaotic map, and description of the main procedures and algorithms).


### 2.1. Use of Knight’s Moving Rules in Scrambler’s Design

Knight’s moving rules, unlike those of all other pieces, follow an “elbowed” nonlinear shape (i.e., in form of letterL, in other words, a horizontal displacement of two squares, followed by a vertical displacement of one square, or a vertical displacement of two squares, followed by a horizontal displacement of one square, in either direction). Thus, as shown in Figure 1(a), one can define a set of eight possible moves, each of which can be labeled as suggested in Figure 1(b).Knight’s moving rules. (a) Knight’s possible moves, (b) moves’ possible annotations (i.e., as rules), and (c) rules’ associated coordinates.
(a)
(b)
(c)Considering any 24-bit color bitmapI
0, of the size m
×
m
×
k, where k
∈
{
R
,
G
,
B
} represents image’s color channel, as a chessboard with fixed orientation and any pixel I
0
(
i
,
j
,
k
) within this image as knight’s initial position, each moving rule (i.e., pixel’s new destination) can be mathematically expressed, in relative coordinates, as shown in Figure 1(c).Since a digital image scrambler aims, among others, to minimize adjacent pixels’ correlation we have considered the following slightly different approaches:(i)
in order to ensure the fact that moved pixels’ values will be less correlated with those of their new neighboring pixels, any pixelI
0
(
i
,
j
,
k
) will not be moved once but n times, using the same moving rule R
x;
(ii)
reduced susceptibility of correlation between moved pixel’s value and of new neighboring pixels’ (i.e., achieved by applying previous approach) will be strengthened by the fact that once pixel’s new coordinates (i.e.,i and j) have been determined, according to a binary random variable P
y
,
z, its value will be simultaneously transposed between color channels.Obviously a series of further questions arises, for example, “which aren’s limits of variations?” and “what happens if pixel’s new destination’s coordinates exceed image’s limits?” or “in what way the random binary variable P
y
,
z influences pixels’ transposition between image’s color channels?”The answers to these questions (without any restriction, i.e., one can think of other solutions) are as follows:(i)
from a theoretical perspective,n can accommodate any positive integer value; however, in practical terms (related to PRBG’s use, as it will be discussed further within this section), its value will be restricted to an 8-bit maximum value (i.e., 0
≤
n
≤
255);
(ii)
indeed, there is an imminent possibility that pixels’ new destination’s coordinates exceed image’s limits (especially when pixels to be moved are situated at image’s extreme limits or whenn’s value is close to maximum) and therefore, considering the image as being virtually cyclic, i and j coordinates are to be kept within [
1
,
m
] interval (i.e., in a relatively plastic but more proper expression, “exiting” through one side of the image, the pixel will “return” within the image on the other side, completing “in a natural way” motion’s specific shape);
(iii)
when it comes to transpose pixels’ values between image’s color channels, the basic idea is to ensure that all pixels are removed from their initial color plan (e.g., considering any pixelI
0
(
i
,
j
,
R
), i.e., belonging to the red plan, its destination color plane will be forced to green or blue; i.e., k
∈
{
G
,
B
}). This criterion is satisfied by applying, for example (i.e., notwithstanding the fact that other rules may be proposed), transposing rules presented in Figure 2.Correlation between the random binary variableP
y
,
z and pixels’ transposing rules, when working on pixels’ from (a) red color channel, (b) blue color channel, and (c) green color channel.
(a)
(b)
(c)


### 2.2. Use of the Chaotic Map in Scrambler’s Design

Although any PRBG can be used, for example, [34–40], due to its good cryptographic properties and suitability for cryptographic application, that is, large key space and good randomness features, as proven in [41], PRNG model (1) was used, within designing and testing stages of this work. On PRNG’s output sequence of real numbers the multilevel discretization method [42] (e.g., with four thresholds, i.e., 2-bit encoding of each interval) was applied, resulted dibits being spread into two different files (i.e., “Bits_A.txt,” containing dibit’s first bit, and, resp., “Bits_B.txt,” containing dibit’s second bit).Using random sequences of real numbers generated by the orbits off
T (1), designed based on a binary composition (2) of two identical one-dimensional chaotic discrete dynamical systems of form (2.2), in conjunction with the method of discretization previously referenced, m
·
m
·
k
·
8 dibit pairs have been generated (i.e., 6.291.456 bits were written in each file), this number being, as seen, directly proportional to the image dimensions. Consider
(1)
f
T
=
f
1
(
x
i
1
,
r
1
)
*
f
2
(
x
i
2
,
r
2
)
=
f
1
(
x
i
1
,
r
1
)
+
f
2
(
x
i
2
,
r
2
)
1
-
f
1
(
x
i
1
,
r
1
)
·
f
2
(
x
i
2
,
r
2
)
,
where x
0
1, x
0
2 are the initial conditions, r
1, r
2 are the control parameters, and x
i
1, x
i
2 are the two orbits obtained by recurrences x
i
+
1
1
=
f
1
(
x
i
1
,
r
1
) and x
i
+
1
2
=
f
2
(
x
i
2
,
r
2
), for any i
∈
{
0,1
,
2
,
…
}. Consider
(2)
a
*
b
=
a
+
b
1
-
a
·
b
,
(2.2)
f
1
:
[
-
1,1
]
⟶
[
-
1,1
]
,
f
1
(
x
,
r
1
)
=
2
π
arctg
(
ctg
⁡
(
r
1
·
x
)
)
,
r
1
∈
[
1,10
]
f
2
:
[
-
1,1
]
⟶
[
-
1,1
]
,
f
2
(
x
,
r
2
)
=
2
π
arctg
(
ctg
⁡
(
r
2
·
x
)
)
,
r
2
∈
[
1,10
]
.In our scrambler’s design and during subsequent testsf
T’s initial seeding points, respectively, control parameters’ values were chosen as follows: x
0
1
=
0.687754925117 and r
1
=
5.938725025421, respectively, x
0
2
=
-
0.013462335467 and r
2
=
1.237490188615.Under the previous circumstances, two matrices were computed, hereafter referred to as KMR and RNS (i.e., the one associated with knight’s moving rules and, respectively, the one associated with the number of steps to be applied on each rule). Procedure1 describes how KMR and RNS are computed.Procedure 1:Computing KMR and RNS (Bits_A, Bits_B, m, k).
Require:
m, k  % image’s dimensions
Ensure:
c     % a temporary counter, initially set to 0
KMR % a matrix of the size m
·
m
·
k, initially set to 0 (i.e., KMR
=
zeros
(
m
,
m
,
k
))
RNS   % a matrix of the size m
·
m
·
k, initially set to 0 (i.e., RNS
=
zeros
(
m
,
m
,
k
))
for
p
=1 : k
for
q
=1 : m
for  r
= 1 : n
B
y
t
e
A
=
s
t
r
c
a
t  (Bits_A.txt
(
c
+
s
)
),  s
=
1,8
¯
% takes 8 bits from file Bits_A
B
y
t
e
B
=
s
t
r
c
a
t (Bits_B.txt
(
c
+
s
)
),   s
=
1,8
¯
% takes 8 bits from file Bits_B
KMR
(
i
,
j
,
k
)
=
b
i
n
2
d
e
c
(
B
y
t
e
A
)      % update KMR matrix
RNS
(
i
,
j
,
k
)
=
b
i
n
2
d
e
c
(
B
y
t
e
B
)
% update RNS matrix
c
=
c
+
8                % update the temporary counter
end
end
endKMR and RNS matrices are used to establish values ofR
x, P
y
,
z, and n, as Figure 3 suggests. It can be noticed that we are dealing with a two-step algorithm. Thus, according to P
y
,
z’s value, during the first step, pixel I
0
(
i
,
j
,
k
) is moved n
a times using knight’s rule R
a and then transposed to other color planes, while, during the second step, with its new coordinates, the pixel is moved n
b times using knight’s rule R
b and then into the another color plane.Method of determiningR
x, P
y
,
z, and n values: (a) extraction of R
x and P
y
,
z values and (b) establishing the number of steps for each rule.
(a)
(b)Procedure2 shows how P
y
,
z, R
a, n
a, R
b, and n
b are computed, for each image’s pixel.Procedure 2:Extracting features (
KMR
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
,
RNS
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
).
Require:  i
,
j
,
k  % current pixel’s (i.e., the one to be moved) coordinates
K
Rule
=
d
e
c
2
b
i
n
(
KMR(i
,
j
,
k)
R
a
=
K
Rule (1 : 3); R
a
=
b
i
n
2
d
e
c
(
R
a
)      % compute Knight’s rule R
a
R
b
=
K
Rule (5 : 7); R
b
=
b
i
n
2
d
e
c
(
R
b
)       % compute Knight’s rule R
b
P
y
=
K
Rule
(
4
); P
z
=
K
Rule
(
8
)          % compute P
y
,
z binary variable, used to establish transposition rule
n
a
=
RNS
(
i
,
j
,
k
)                % number of steps to be applied using rule R
a
n
b
=
d
e
c
2
b
i
n
(
n
a
)
n
b
=
f
l
i
p
l
r
(
n
b
)
n
b
=
b
i
n
2
d
e
c
(
n
b
)              % number of steps to be applied using rule R
b


### 2.3. Practical Example

In order to facilitate understanding of those previously described, the example shown in Figure4 comes into aid of the reader. For this example, a color bitmap of the size 12
×
12
×
3, a starting pixel I
0
(
3
,
6
,
1
), P
y
,
z
=
{
0,0
}, R
3 as first stage rule, R
5 as second stage rule, usage of R
3 three times, and usage of R
5 five times are considered.Pixel scrambling/transposition example. (a) First stage’s output image, (b) second stage’s output image, and (c) final output image.
(a)
(b)
(c)


### 2.4. Other Useful Procedures

Before starting with the description of Algorithms1 and 2 two more procedures must be properly described, namely, the one which deals with computation of pixels’ new coordinates, both for scrambling and descrambling algorithms.Thus, withI
0 representing the pixels’ values matrix of a 24-bit color bitmap of the size m
×
m and n representing number of steps to be applied with rule R
x, during scrambling process, pixels’ new coordinates can be computed using Procedure 3.Procedure 3:Computing limits on scrambling (
I
0
(
i
,
j
,
:
)
1
≤
i
<
m
1
≤
j
<
m
,
R
x
,
n
).
Require:
i
,
j
% are current pixel’s coordinates, regardless of the color channel in which it lies
Require:
x
% represents the moving rule to be applied, where x
∈
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
}
Require:
n % represents the number of steps (i.e., how many times the rule is applied)
switch
x
case  0
i
=
i
-
2
·
n; j
=
j
+
1
·
n
case  1
i
=
i
-
1
·
n; j
=
j
+
2
·
n
case  2
i
=
i
+
1
·
n; j
=
j
+
2
·
n
case  3
i
=
i
+
2
·
n; j
=
j
+
1
·
n
case  4
i
=
i
+
2
·
n; j
=
j
-
1
·
n
case  5
i
=
i
+
1
·
n; j
=
j
-
2
·
n
case  6
i
=
i
-
1
·
n; j
=
j
-
2
·
n
otherwise
i
=
i
-
2
·
n; j
=
j
-
1
·
n
end
Remark:  i
,
j % represent pixel’s new coordinates
Ensure:
∀
i
,
∀
j
∈
[
1
,
m
]
switch
i
case  i
<
0
i
=
i
+
512
otherwise
i
=
mod
⁡
(
i
,
m
)
+
1  % ensures i
>
0
end
switch
j
case  j
<
0
j
=
j
+
512
otherwise
j
=
mod
⁡
(
j
,
m
)
+
1  % ensures j
>
0
endOn the basis that moving rules are symmetric (e.g., effects of ruleR
3 are reversed by applying rule R
7), during descrambling process, pixels’ new coordinates can be computed using the same procedure but after modifying one of the function call’s parameters, as Procedure 4 suggests.Procedure 4:Computing limits on descrambling (
I
0
(
i
,
j
,
:
)
1
≤
i
<
m
1
≤
j
<
m
,
R
x
,
n
).
Require:
x % represents the moving rule applied on scrambling procedure
x
=
(
mod
⁡
(
x
+
4
)
,
8
)
Remark:
x % represents the symmetric moving rule, which is to be applied on descrambling procedure
Compute_limits_on_scrambling
(
I
0
(
i
,
j
)
1
≤
i
<
m
1
≤
j
<
m
,
R
x
,
n
)


### 2.5. Scrambling and Descrambling Algorithms’ Description

Depending on random binary variableP
y
,
z value, pixels’ color values are transposed between RGB channels using Procedure 5 (i.e., during image’s scrambling process) and, respectively, Procedure 6 (i.e., during image’s descrambling process).Procedure 5:Transposing pixel color values on scrambling (
I
0
(
i
,
j
,
k
)
,
I
0
a
(
i
,
j
,
k
)
,
I
0
b
(
i
,
j
,
k
)
,
P
y
,
P
z
,
k
).
Require:
P
y
,
P
z  % the random binary value which establish the transposing rule
k    % current working color channel
Ensure:    Pixel    % Temporary variable
Pixel
=
I
0
(
i
,
j
,
k
)
switch
(
P
y
,
P
z
,
k
)
case  (
0,0
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
I
0
b
(
i
,
j
,
k
+
2
)
;
I
0
b
(
i
,
j
,
k
+
2
)
=
Pixel
case
(
0,1
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
2
)
;
I
0
b
(
i
,
j
,
k
+
2
)
=
Pixel
case
(
1,0
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
2
)
;
I
0
a
(
i
,
j
,
k
+
2
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
1,1
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
0,0
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
0,1
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
1
)
;
I
0
a
(
i
,
j
,
k
-
1
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
1,0
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
1,1
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
0,0
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
1
)
;
I
0
a
(
i
,
j
,
k
-
1
)
=
I
0
b
(
i
,
j
,
k
-
2
)
;
I
0
b
(
i
,
j
,
k
-
2
)
=
Pixel
case
(
0,1
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
2
)
;
I
0
a
(
i
,
j
,
k
-
2
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
1,0
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
2
)
;
I
0
a
(
i
,
j
,
k
-
2
)
=
Pixel
case
(
1,1
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
endProcedure 6:Transposing pixel color values on descrambling (
I
0
(
i
,
j
,
k
)
,
I
0
a
(
i
,
j
,
k
)
,
I
0
b
(
i
,
j
,
k
)
,
P
y
,
P
z
,
k
).
Require:
P
y
,
P
z  % the random binary value which establish the transposing rule
k    % current working color channel
Ensure:    Pixel    % Temporary variable
Pixel
=
I
0
(
i
,
j
,
k
)
switch
(
P
y
,
P
z
,
k
)
case  (
0,0
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
2
)
;
I
0
b
(
i
,
j
,
k
+
2
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
0,1
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
2
)
;
I
0
b
(
i
,
j
,
k
+
2
)
=
Pixel
case
(
1,0
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
I
0
a
(
i
,
j
,
k
+
2
)
;
I
0
a
(
i
,
j
,
k
+
2
)
=
Pixel
case
(
1,1
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
0,0
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
0,1
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
I
0
a
(
i
,
j
,
k
-
1
)
;
I
0
a
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
1,0
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
1,1
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
0,0
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
2
)
;
I
0
b
(
i
,
j
,
k
-
2
)
=
I
0
a
(
i
,
j
,
k
-
1
)
;
I
0
a
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
0,1
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
I
0
a
(
i
,
j
,
k
-
2
)
;
I
0
a
(
i
,
j
,
k
-
2
)
=
Pixel
case
(
1,0
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
2
)
;
I
0
a
(
i
,
j
,
k
-
2
)
=
Pixel
case
(
1,1
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
endAlgorithm 1:Scrambling image (
I
0
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
).
Require:  Bits_A.txt and  Bits_B.txt         % files containing bitstreams generated by f
T’s trajectories
Compute_KMR_and_RNS(Bits_A, Bits_B, m, k)    % compute KMR and RNS matrices
for
p
= 1 : k
for
q
= 1 : m
for
r
= 1 : m
Extract_features
(
KMR
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
,
RNS
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
)
I
0
a
(
i
,
j
,
k
) =  Compute_limits_on_scrambling
(
I
0
(
i
,
j
,
k
)
1
≤
i
<
m
1
≤
j
<
m
,
R
a
,
n
a
)
I
0
b
(
i
,
j
,
k
) =  Compute_limits_on_scrambling
(
I
0
a
(
i
,
j
,
k
)
1
≤
i
<
m
1
≤
j
<
m
,
R
b
,
n
b
)
Transpose_pixel_color_values_on_scrambling
(
I
0
(
i
,
j
,
k
)
,
I
0
a
(
i
,
j
,
k
)
,
I
0
b
(
i
,
j
,
k
)
,
P
y
,
P
z
,
k
)
end
end
endAlgorithm 2:Descrambling image (
I
0
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
).
Require:  Bits_A.txt and  Bits_B.txt         % files containing bitstreams generated by f
T’s trajectories
Compute_KMR_and_RNS(Bits_A, Bits_B, m, k)    % compute KMR and RNS matrices
for
p
=
k : −1 : 1
for
q
=
m : −1 : 1
for
r
=
m : −1 : 1
Extract_features
(
KMR
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
,
RNS
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
)
I
0
b
(
i
,
j
,
k
) =  Compute_limits_on_descrambling
(
I
0
(
i
,
j
,
k
)
1
≤
i
<
m
1
≤
j
<
m
,
R
b
,
n
b
)
I
0
a
(
i
,
j
,
k
) =  Compute_limits_on_descrambling
(
I
0
b
(
i
,
j
,
k
)
1
≤
i
<
m
1
≤
j
<
m
,
R
a
,
n
a
)
Transpose_pixel_color_values_on_descrambling
(
I
0
(
i
,
j
,
k
)
,
I
0
a
(
i
,
j
,
k
)
,
I
0
b
(
i
,
j
,
k
)
,
P
y
,
P
z
,
k
)
end
end
end


## 2.1. Use of Knight’s Moving Rules in Scrambler’s Design

Knight’s moving rules, unlike those of all other pieces, follow an “elbowed” nonlinear shape (i.e., in form of letterL, in other words, a horizontal displacement of two squares, followed by a vertical displacement of one square, or a vertical displacement of two squares, followed by a horizontal displacement of one square, in either direction). Thus, as shown in Figure 1(a), one can define a set of eight possible moves, each of which can be labeled as suggested in Figure 1(b).Knight’s moving rules. (a) Knight’s possible moves, (b) moves’ possible annotations (i.e., as rules), and (c) rules’ associated coordinates.
(a)
(b)
(c)Considering any 24-bit color bitmapI
0, of the size m
×
m
×
k, where k
∈
{
R
,
G
,
B
} represents image’s color channel, as a chessboard with fixed orientation and any pixel I
0
(
i
,
j
,
k
) within this image as knight’s initial position, each moving rule (i.e., pixel’s new destination) can be mathematically expressed, in relative coordinates, as shown in Figure 1(c).Since a digital image scrambler aims, among others, to minimize adjacent pixels’ correlation we have considered the following slightly different approaches:(i)
in order to ensure the fact that moved pixels’ values will be less correlated with those of their new neighboring pixels, any pixelI
0
(
i
,
j
,
k
) will not be moved once but n times, using the same moving rule R
x;
(ii)
reduced susceptibility of correlation between moved pixel’s value and of new neighboring pixels’ (i.e., achieved by applying previous approach) will be strengthened by the fact that once pixel’s new coordinates (i.e.,i and j) have been determined, according to a binary random variable P
y
,
z, its value will be simultaneously transposed between color channels.Obviously a series of further questions arises, for example, “which aren’s limits of variations?” and “what happens if pixel’s new destination’s coordinates exceed image’s limits?” or “in what way the random binary variable P
y
,
z influences pixels’ transposition between image’s color channels?”The answers to these questions (without any restriction, i.e., one can think of other solutions) are as follows:(i)
from a theoretical perspective,n can accommodate any positive integer value; however, in practical terms (related to PRBG’s use, as it will be discussed further within this section), its value will be restricted to an 8-bit maximum value (i.e., 0
≤
n
≤
255);
(ii)
indeed, there is an imminent possibility that pixels’ new destination’s coordinates exceed image’s limits (especially when pixels to be moved are situated at image’s extreme limits or whenn’s value is close to maximum) and therefore, considering the image as being virtually cyclic, i and j coordinates are to be kept within [
1
,
m
] interval (i.e., in a relatively plastic but more proper expression, “exiting” through one side of the image, the pixel will “return” within the image on the other side, completing “in a natural way” motion’s specific shape);
(iii)
when it comes to transpose pixels’ values between image’s color channels, the basic idea is to ensure that all pixels are removed from their initial color plan (e.g., considering any pixelI
0
(
i
,
j
,
R
), i.e., belonging to the red plan, its destination color plane will be forced to green or blue; i.e., k
∈
{
G
,
B
}). This criterion is satisfied by applying, for example (i.e., notwithstanding the fact that other rules may be proposed), transposing rules presented in Figure 2.Correlation between the random binary variableP
y
,
z and pixels’ transposing rules, when working on pixels’ from (a) red color channel, (b) blue color channel, and (c) green color channel.
(a)
(b)
(c)


## 2.2. Use of the Chaotic Map in Scrambler’s Design

Although any PRBG can be used, for example, [34–40], due to its good cryptographic properties and suitability for cryptographic application, that is, large key space and good randomness features, as proven in [41], PRNG model (1) was used, within designing and testing stages of this work. On PRNG’s output sequence of real numbers the multilevel discretization method [42] (e.g., with four thresholds, i.e., 2-bit encoding of each interval) was applied, resulted dibits being spread into two different files (i.e., “Bits_A.txt,” containing dibit’s first bit, and, resp., “Bits_B.txt,” containing dibit’s second bit).Using random sequences of real numbers generated by the orbits off
T (1), designed based on a binary composition (2) of two identical one-dimensional chaotic discrete dynamical systems of form (2.2), in conjunction with the method of discretization previously referenced, m
·
m
·
k
·
8 dibit pairs have been generated (i.e., 6.291.456 bits were written in each file), this number being, as seen, directly proportional to the image dimensions. Consider
(1)
f
T
=
f
1
(
x
i
1
,
r
1
)
*
f
2
(
x
i
2
,
r
2
)
=
f
1
(
x
i
1
,
r
1
)
+
f
2
(
x
i
2
,
r
2
)
1
-
f
1
(
x
i
1
,
r
1
)
·
f
2
(
x
i
2
,
r
2
)
,
where x
0
1, x
0
2 are the initial conditions, r
1, r
2 are the control parameters, and x
i
1, x
i
2 are the two orbits obtained by recurrences x
i
+
1
1
=
f
1
(
x
i
1
,
r
1
) and x
i
+
1
2
=
f
2
(
x
i
2
,
r
2
), for any i
∈
{
0,1
,
2
,
…
}. Consider
(2)
a
*
b
=
a
+
b
1
-
a
·
b
,
(2.2)
f
1
:
[
-
1,1
]
⟶
[
-
1,1
]
,
f
1
(
x
,
r
1
)
=
2
π
arctg
(
ctg
⁡
(
r
1
·
x
)
)
,
r
1
∈
[
1,10
]
f
2
:
[
-
1,1
]
⟶
[
-
1,1
]
,
f
2
(
x
,
r
2
)
=
2
π
arctg
(
ctg
⁡
(
r
2
·
x
)
)
,
r
2
∈
[
1,10
]
.In our scrambler’s design and during subsequent testsf
T’s initial seeding points, respectively, control parameters’ values were chosen as follows: x
0
1
=
0.687754925117 and r
1
=
5.938725025421, respectively, x
0
2
=
-
0.013462335467 and r
2
=
1.237490188615.Under the previous circumstances, two matrices were computed, hereafter referred to as KMR and RNS (i.e., the one associated with knight’s moving rules and, respectively, the one associated with the number of steps to be applied on each rule). Procedure1 describes how KMR and RNS are computed.Procedure 1:Computing KMR and RNS (Bits_A, Bits_B, m, k).
Require:
m, k  % image’s dimensions
Ensure:
c     % a temporary counter, initially set to 0
KMR % a matrix of the size m
·
m
·
k, initially set to 0 (i.e., KMR
=
zeros
(
m
,
m
,
k
))
RNS   % a matrix of the size m
·
m
·
k, initially set to 0 (i.e., RNS
=
zeros
(
m
,
m
,
k
))
for
p
=1 : k
for
q
=1 : m
for  r
= 1 : n
B
y
t
e
A
=
s
t
r
c
a
t  (Bits_A.txt
(
c
+
s
)
),  s
=
1,8
¯
% takes 8 bits from file Bits_A
B
y
t
e
B
=
s
t
r
c
a
t (Bits_B.txt
(
c
+
s
)
),   s
=
1,8
¯
% takes 8 bits from file Bits_B
KMR
(
i
,
j
,
k
)
=
b
i
n
2
d
e
c
(
B
y
t
e
A
)      % update KMR matrix
RNS
(
i
,
j
,
k
)
=
b
i
n
2
d
e
c
(
B
y
t
e
B
)
% update RNS matrix
c
=
c
+
8                % update the temporary counter
end
end
endKMR and RNS matrices are used to establish values ofR
x, P
y
,
z, and n, as Figure 3 suggests. It can be noticed that we are dealing with a two-step algorithm. Thus, according to P
y
,
z’s value, during the first step, pixel I
0
(
i
,
j
,
k
) is moved n
a times using knight’s rule R
a and then transposed to other color planes, while, during the second step, with its new coordinates, the pixel is moved n
b times using knight’s rule R
b and then into the another color plane.Method of determiningR
x, P
y
,
z, and n values: (a) extraction of R
x and P
y
,
z values and (b) establishing the number of steps for each rule.
(a)
(b)Procedure2 shows how P
y
,
z, R
a, n
a, R
b, and n
b are computed, for each image’s pixel.Procedure 2:Extracting features (
KMR
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
,
RNS
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
).
Require:  i
,
j
,
k  % current pixel’s (i.e., the one to be moved) coordinates
K
Rule
=
d
e
c
2
b
i
n
(
KMR(i
,
j
,
k)
R
a
=
K
Rule (1 : 3); R
a
=
b
i
n
2
d
e
c
(
R
a
)      % compute Knight’s rule R
a
R
b
=
K
Rule (5 : 7); R
b
=
b
i
n
2
d
e
c
(
R
b
)       % compute Knight’s rule R
b
P
y
=
K
Rule
(
4
); P
z
=
K
Rule
(
8
)          % compute P
y
,
z binary variable, used to establish transposition rule
n
a
=
RNS
(
i
,
j
,
k
)                % number of steps to be applied using rule R
a
n
b
=
d
e
c
2
b
i
n
(
n
a
)
n
b
=
f
l
i
p
l
r
(
n
b
)
n
b
=
b
i
n
2
d
e
c
(
n
b
)              % number of steps to be applied using rule R
b


## 2.3. Practical Example

In order to facilitate understanding of those previously described, the example shown in Figure4 comes into aid of the reader. For this example, a color bitmap of the size 12
×
12
×
3, a starting pixel I
0
(
3
,
6
,
1
), P
y
,
z
=
{
0,0
}, R
3 as first stage rule, R
5 as second stage rule, usage of R
3 three times, and usage of R
5 five times are considered.Pixel scrambling/transposition example. (a) First stage’s output image, (b) second stage’s output image, and (c) final output image.
(a)
(b)
(c)


## 2.4. Other Useful Procedures

Before starting with the description of Algorithms1 and 2 two more procedures must be properly described, namely, the one which deals with computation of pixels’ new coordinates, both for scrambling and descrambling algorithms.Thus, withI
0 representing the pixels’ values matrix of a 24-bit color bitmap of the size m
×
m and n representing number of steps to be applied with rule R
x, during scrambling process, pixels’ new coordinates can be computed using Procedure 3.Procedure 3:Computing limits on scrambling (
I
0
(
i
,
j
,
:
)
1
≤
i
<
m
1
≤
j
<
m
,
R
x
,
n
).
Require:
i
,
j
% are current pixel’s coordinates, regardless of the color channel in which it lies
Require:
x
% represents the moving rule to be applied, where x
∈
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
}
Require:
n % represents the number of steps (i.e., how many times the rule is applied)
switch
x
case  0
i
=
i
-
2
·
n; j
=
j
+
1
·
n
case  1
i
=
i
-
1
·
n; j
=
j
+
2
·
n
case  2
i
=
i
+
1
·
n; j
=
j
+
2
·
n
case  3
i
=
i
+
2
·
n; j
=
j
+
1
·
n
case  4
i
=
i
+
2
·
n; j
=
j
-
1
·
n
case  5
i
=
i
+
1
·
n; j
=
j
-
2
·
n
case  6
i
=
i
-
1
·
n; j
=
j
-
2
·
n
otherwise
i
=
i
-
2
·
n; j
=
j
-
1
·
n
end
Remark:  i
,
j % represent pixel’s new coordinates
Ensure:
∀
i
,
∀
j
∈
[
1
,
m
]
switch
i
case  i
<
0
i
=
i
+
512
otherwise
i
=
mod
⁡
(
i
,
m
)
+
1  % ensures i
>
0
end
switch
j
case  j
<
0
j
=
j
+
512
otherwise
j
=
mod
⁡
(
j
,
m
)
+
1  % ensures j
>
0
endOn the basis that moving rules are symmetric (e.g., effects of ruleR
3 are reversed by applying rule R
7), during descrambling process, pixels’ new coordinates can be computed using the same procedure but after modifying one of the function call’s parameters, as Procedure 4 suggests.Procedure 4:Computing limits on descrambling (
I
0
(
i
,
j
,
:
)
1
≤
i
<
m
1
≤
j
<
m
,
R
x
,
n
).
Require:
x % represents the moving rule applied on scrambling procedure
x
=
(
mod
⁡
(
x
+
4
)
,
8
)
Remark:
x % represents the symmetric moving rule, which is to be applied on descrambling procedure
Compute_limits_on_scrambling
(
I
0
(
i
,
j
)
1
≤
i
<
m
1
≤
j
<
m
,
R
x
,
n
)


## 2.5. Scrambling and Descrambling Algorithms’ Description

Depending on random binary variableP
y
,
z value, pixels’ color values are transposed between RGB channels using Procedure 5 (i.e., during image’s scrambling process) and, respectively, Procedure 6 (i.e., during image’s descrambling process).Procedure 5:Transposing pixel color values on scrambling (
I
0
(
i
,
j
,
k
)
,
I
0
a
(
i
,
j
,
k
)
,
I
0
b
(
i
,
j
,
k
)
,
P
y
,
P
z
,
k
).
Require:
P
y
,
P
z  % the random binary value which establish the transposing rule
k    % current working color channel
Ensure:    Pixel    % Temporary variable
Pixel
=
I
0
(
i
,
j
,
k
)
switch
(
P
y
,
P
z
,
k
)
case  (
0,0
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
I
0
b
(
i
,
j
,
k
+
2
)
;
I
0
b
(
i
,
j
,
k
+
2
)
=
Pixel
case
(
0,1
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
2
)
;
I
0
b
(
i
,
j
,
k
+
2
)
=
Pixel
case
(
1,0
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
2
)
;
I
0
a
(
i
,
j
,
k
+
2
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
1,1
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
0,0
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
0,1
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
1
)
;
I
0
a
(
i
,
j
,
k
-
1
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
1,0
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
1,1
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
0,0
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
1
)
;
I
0
a
(
i
,
j
,
k
-
1
)
=
I
0
b
(
i
,
j
,
k
-
2
)
;
I
0
b
(
i
,
j
,
k
-
2
)
=
Pixel
case
(
0,1
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
2
)
;
I
0
a
(
i
,
j
,
k
-
2
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
1,0
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
2
)
;
I
0
a
(
i
,
j
,
k
-
2
)
=
Pixel
case
(
1,1
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
endProcedure 6:Transposing pixel color values on descrambling (
I
0
(
i
,
j
,
k
)
,
I
0
a
(
i
,
j
,
k
)
,
I
0
b
(
i
,
j
,
k
)
,
P
y
,
P
z
,
k
).
Require:
P
y
,
P
z  % the random binary value which establish the transposing rule
k    % current working color channel
Ensure:    Pixel    % Temporary variable
Pixel
=
I
0
(
i
,
j
,
k
)
switch
(
P
y
,
P
z
,
k
)
case  (
0,0
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
2
)
;
I
0
b
(
i
,
j
,
k
+
2
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
0,1
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
2
)
;
I
0
b
(
i
,
j
,
k
+
2
)
=
Pixel
case
(
1,0
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
I
0
a
(
i
,
j
,
k
+
2
)
;
I
0
a
(
i
,
j
,
k
+
2
)
=
Pixel
case
(
1,1
,
1
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
0,0
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
0,1
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
+
1
)
;
I
0
b
(
i
,
j
,
k
+
1
)
=
I
0
a
(
i
,
j
,
k
-
1
)
;
I
0
a
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
1,0
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
1,1
,
2
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
I
0
a
(
i
,
j
,
k
+
1
)
;
I
0
a
(
i
,
j
,
k
+
1
)
=
Pixel
case
(
0,0
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
2
)
;
I
0
b
(
i
,
j
,
k
-
2
)
=
I
0
a
(
i
,
j
,
k
-
1
)
;
I
0
a
(
i
,
j
,
k
-
1
)
=
Pixel
case
(
0,1
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
I
0
a
(
i
,
j
,
k
-
2
)
;
I
0
a
(
i
,
j
,
k
-
2
)
=
Pixel
case
(
1,0
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
a
(
i
,
j
,
k
-
2
)
;
I
0
a
(
i
,
j
,
k
-
2
)
=
Pixel
case
(
1,1
,
3
)
I
0
(
i
,
j
,
k
)
=
I
0
b
(
i
,
j
,
k
-
1
)
;
I
0
b
(
i
,
j
,
k
-
1
)
=
Pixel
endAlgorithm 1:Scrambling image (
I
0
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
).
Require:  Bits_A.txt and  Bits_B.txt         % files containing bitstreams generated by f
T’s trajectories
Compute_KMR_and_RNS(Bits_A, Bits_B, m, k)    % compute KMR and RNS matrices
for
p
= 1 : k
for
q
= 1 : m
for
r
= 1 : m
Extract_features
(
KMR
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
,
RNS
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
)
I
0
a
(
i
,
j
,
k
) =  Compute_limits_on_scrambling
(
I
0
(
i
,
j
,
k
)
1
≤
i
<
m
1
≤
j
<
m
,
R
a
,
n
a
)
I
0
b
(
i
,
j
,
k
) =  Compute_limits_on_scrambling
(
I
0
a
(
i
,
j
,
k
)
1
≤
i
<
m
1
≤
j
<
m
,
R
b
,
n
b
)
Transpose_pixel_color_values_on_scrambling
(
I
0
(
i
,
j
,
k
)
,
I
0
a
(
i
,
j
,
k
)
,
I
0
b
(
i
,
j
,
k
)
,
P
y
,
P
z
,
k
)
end
end
endAlgorithm 2:Descrambling image (
I
0
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
).
Require:  Bits_A.txt and  Bits_B.txt         % files containing bitstreams generated by f
T’s trajectories
Compute_KMR_and_RNS(Bits_A, Bits_B, m, k)    % compute KMR and RNS matrices
for
p
=
k : −1 : 1
for
q
=
m : −1 : 1
for
r
=
m : −1 : 1
Extract_features
(
KMR
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
,
RNS
(
i
,
j
,
k
)
1
≤
i
≤
m
1
≤
j
≤
m
1
≤
k
≤
3
)
I
0
b
(
i
,
j
,
k
) =  Compute_limits_on_descrambling
(
I
0
(
i
,
j
,
k
)
1
≤
i
<
m
1
≤
j
<
m
,
R
b
,
n
b
)
I
0
a
(
i
,
j
,
k
) =  Compute_limits_on_descrambling
(
I
0
b
(
i
,
j
,
k
)
1
≤
i
<
m
1
≤
j
<
m
,
R
a
,
n
a
)
Transpose_pixel_color_values_on_descrambling
(
I
0
(
i
,
j
,
k
)
,
I
0
a
(
i
,
j
,
k
)
,
I
0
b
(
i
,
j
,
k
)
,
P
y
,
P
z
,
k
)
end
end
end


## 3. Analysis and Comparison Results

As a general requirement, for any digital image scrambler, the output image should be greatly different in comparison with its plain version (i.e., from statistical point of view). To quantify this requirement, in addition to visual assessment, few statistical estimators can be used, the most commonly ones being presented in the following subsections and according to an already widely used conventional methodology [43, 44].


### 3.1. Visual Analysis

The purpose of visual testing is to highlight presence of similarities between plain image and its scrambled version (i.e., if the scrambled image does or does not contain any features of the plain image). For the proposed scrambler, same as for all digital image scramblers, expectations are to rearrange plain image’s pixels in a deterministic way but with a random-like appearance.Visual testing was performed on the512
×
512 pixels, 24-bit, Lena, Peppers, and Baboon color bitmaps, from the USC-SIPI miscellaneous image dataset [45]. Figure 5 depicts these test plain images, whereas their scrambled versions are showcased in Figure 6. By comparing them, one can say that there is no perceptual similarity (i.e., no visual information can be observed in the processed versions of plain images).Test plain images used during algorithm’s testing procedures. (a) Lena, (b) Peppers, and (c) Baboon.
(a)
(b)
(c)Image scrambling results. (a) Scrambled version of Lena, (b) scrambled version of Peppers, and (c) scrambled version of Baboon.
(a)
(b)
(c)


### 3.2. Adjacent Pixels’ Correlation Coefficients’ Analysis

It is well known the fact that, generally in plain images, any arbitrarily chosen pixels are strongly correlated with their adjacent ones (either they are diagonally, vertically, or horizontally oriented) [5, 17, 31]. With respect to this idea, an efficient digital image scrambling scheme must minimize this correlation as much as possible.Whilst Figure7 showcases the correlation distributions of horizontally (a), vertically (b), and diagonally (c) adjacent pixels for the Baboon plain image, Figure 8 showcases the correlation distributions (i.e., for the same pixels’ adjacency cases) for the Baboon scrambled image.Correlation distributions of adjacent pixels in Baboon plain image. (a) Horizontally adjacent pixels, (b) vertically adjacent pixels, and (c) diagonally adjacent pixels.
(a)
(b)
(c)Correlation distribution of adjacent pixels in Baboon scrambled image. (a) Horizontally adjacent pixels, (b) vertically adjacent pixels, and (c) diagonally adjacent pixels.
(a)
(b)
(c)At the same time, all APCCs (computed over 10.000 pairs of adjacent pixels, randomly selected, for each of the testing directions and for each of the color channels) are summarized in Table1, for each of the test images.Table 1
Adjacent pixels’ correlation coefficients’ analysis.
Pixels’ adjacency
Image status
Color channel
Test images
Lena
Peppers
Baboon
Horizontally
Original
R
0.9785
0.9677
0.8722
G
0.9747
0.9815
0.7743
B
0.9695
0.9661
0.8857
Scrambled
R
0.0063
0.0009
0.0011
G
0.0110
0.0044
−0.0009
B
0.0104
0.0012
0.0015
Vertically
Original
R
0.9899
0.9695
0.9241
G
0.9877
0.9831
0.8680
B
0.9842
0.9696
0.9088
Scrambled
R
0.0004
−0.0017
0.0002
G
−0.0064
−0.0022
0.0032
B
0.0003
−0.0020
0.0004
Diagonally
Original
R
0.9685
0.9565
0.8624
G
0.9622
0.9719
0.7441
B
0.9533
0.9527
0.8420
Scrambled
R
−0.0020
0.0071
−0.0013
G
0.0166
0.0007
0.0016
B
0.0049
0.0035
−0.0007It can be easily noticed that neighboring pixels in the plain images are highly correlated; that is, APCCs’ values are too high, very close to one. On the contrary, in cases of scrambled images, those values are close to zero, meaning that all neighboring pixels considered in tests are weakly correlated, which is the expected result [5, 46, 47].


### 3.3. Other Qualitative Measurements’ Analysis

Whereas through the visual assessment and APCCs’ analysis good scrambling effects are highlighted, based on MSE (mean squared error), NPCR (number of pixel change rate), and UACI (unified average changing intensity) measures, a better and more objective assessment of the proposed scrambler can be accomplished.MSE is used to evaluate the amount of differences between plain image and its corresponding scrambled one [48]. MSE can be numerically evaluated using (4), with the expected result being a value as high as possible thus denoting nonidentical images (i.e., the higher the value of the MSE is, the greater the differences between the two images are). Consider
(4)
MSE
C
(
I
P
,
I
S
,
C
)
=
1
W
×
H
∑
i
=
1
W
∑
j
=
1
H
[
I
P
(
i
,
j
,
C
)
-
I
S
(
i
,
j
,
C
)
]
2
,
where I
P represents plain image’s associated matrix, I
S represents scrambled image’s associated matrix, W and H represent the image dimensions (i.e., width and height), and C is the color channel (i.e., C
∈
{
R
,
G
,
B
}
≡
{
1
,
2
,
3
}).First shown in [49] and [50] and afterwards extensively studied [51] and presented in transposed fashion (more suitable for usage within scrambled images’ assessment) [17], NPCR and UACI measures are designed to estimate the mean number of distinct pixels having the same position in the plain image as in corresponding scrambled one, respectively, to estimate the average intensity differences of distinct pixels having the same position in the plain image as in the corresponding scrambled one.Defined for each of image’s color channels [49–51], NPCR indicator can be numerically evaluated using (5) and considering two random images (i.e., the plain image is completely different in comparison with its scrambled version) its maximum expected value [17] is found to be ε
[
NPCR
C
]
=
99.6093
%. Consider
(5)
NPCR
C
(
I
P
,
I
S
,
C
)
=
(
1
W
×
H
∑
i
=
1
W
∑
j
=
1
H
D
(
i
,
j
,
C
)
)
×
100
%
,
where D
(
i
,
j
,
C
) represents the matrix associated with the differences between I
P’s and I
S’s color channels, with its structure being computed according to the following relationship:
(6)
D
(
i
,
j
,
C
)
=
{
0
,
if
I
P
(
i
,
j
,
C
)
=
I
S
(
i
,
j
,
C
)
,
1
,
if
I
P
(
i
,
j
,
C
)
≠
I
S
(
i
,
j
,
C
)
.Defined for each of image’s color channels [49–51], UACI indicator can be numerically evaluated using (7) and considering two random images (i.e., the plain image is completely different in comparison with its scrambled version) its maximum expected value [17] is found to be ε
[
UACI
C
]
=
33.4635
%. Consider
(7)
UACI
C
(
I
P
,
I
S
,
C
)
=
(
1
W
×
H
∑
i
=
1
W
∑
j
=
1
H
|
I
P
(
i
,
j
,
C
)
-
I
S
(
i
,
j
,
C
)
|
255
)
×
100
%
.Analyzing NPCR, UACI, and MSE indicators’ values, for each of the test images, as they are summarized in Table2, one can say that the proposed scrambling scheme approaches the performance of an ideal digital image scrambler. However, the attention is drawn to UACI indicator’s values, not very close to the maximum expected value. Reasoning for this is the fact that the proposed digital image scrambler keeps the same set of possible values of pixels in the scrambled image as in the plain image. Obviously, this limits the maximum difference values that could be achieved between plain image’s pixels and scrambled image’s corresponding ones [17]. For example, in case of the Peppers plain image, maximum differences that could be achieved on each color channel are upper bounded by pixels maximum values (i.e., 231 for R channel, 239 for G channel, and 229 for B channel), instead of the theoretical one of 255.Table 2
Difference measures between original and scrambled images.
Image
Color channel
Measures
NPCR (%)
UACI (%)
MSE
Lena
R
99.6059
32.9915
3.7081 · 103
G
99.6013
30.7161
3.0761 · 10
3
B
99.5735
30.2703
3.0090 · 103
Peppers
R
99.5174
28.5412
2.6343 · 103
G
99.3126
31.9327
3.3309 · 10
3
B
99.2966
28.9468
2.7533 · 103
Baboon
R
99.5007
25.2236
2.1084 · 103
G
99.4621
24.5648
1.8140 · 10
3
B
99.5296
26.8748
2.3806 · 103


### 3.4. Key Space and Key Sensitivity Analysis

A good digital image scrambler should have a sufficiently large key space to resist brute-force attacks, mostly if its usage as part of images’ encryption schemes is desired (i.e., as part of the two fundamental techniques used to encrypt a block of pixels, i.e., permutation stage, which aims to ensure the coveted confusion properties).As previously shown, the proposed digital image scrambler operates based on values of the bitstreams generated by a multithresholded digital chaotic map. Thus, taking into consideration the two seeding points, respectively, the two control parameters of the digital chaotic generator (namely,x
0
1
,
x
0
2
,
r
1
,
r
2), with a precision of up to 10
-
15, and the key space of a possible encryption scheme (which uses proposed digital image scrambler scheme within permutation stage) is significantly improved by the key space of the proposed scrambler, namely, by a factor of 1060 (hereafter referred to as improvement factor and abbreviated as IF).On its turn, this key space improvement factor can be raised if some artifacts are considered, such as (but not limited to) the following:(i)
if knight’s moving rules are to be permuted on user choice (e.g., any of the three more cases, out of 8!, listed in Figure9 may be used) then IF increases with 104.6055;
(ii)
if features extraction vector’s elements are to be permuted on user choice (e.g., any of the two more cases, out of 4! (i.e., if bits defining each rule are taken grouped) or out of 8! (i.e., if bits defining each rule are taken random), listed in Figure10) and may be used then IF increases with another 101.3802 or 104.6055;
(iii)
if color channels interchanging rules are to be permuted on user choice, considering that there are(
C
3
!
4
)
3
=
3375 possible ways to do it, then IF increases with 103.5283.Three more cases, out of 8!, of possible knight’s moving rules annotations.
(a)
(b)
(c)Two more cases, out of 8!, of possible feature extraction vector’s elements configuration.
(a)
(b)Thereby, proposed scrambler’s key space can achieve a value of 1069.5140 (for the first case mentioned in (ii)) or of 1072.7393 (for the second case mentioned in (ii)), which is sufficiently large to recommend usage of the proposed scrambler within any image encryption scheme.In addition, in order to approach the performance of an ideal image encryption algorithm, the proposed digital image scrambler should have high sensitivity to scrambling key (i.e., a slight key change should lead to significant changes in the scrambled images during scrambling procedure, respectively, significant changes in the descrambled images during descrambling procedure).Figure11 shows the key sensitivity of the proposed digital image scrambler, when operating over Baboon plain image with two different scrambling keys (differentiated from each other by the LSB of initial seeding points, i.e., by ±
1
·
10
-
15 variations of x
0
1 and x
0
2). As can be seen, one bit change in the scrambling key leads to two different scrambled images, whose difference is also random-like. When image is descrambled using an incorrect key (e.g., with same variation conditions of x
0
1 and x
0
2) the result is also a random-like image, as shown in Figure 12.Key sensitivity of the proposed digital image scrambler. (a) Scrambled image usingK
S, (b) scrambled image using K
D, and (c) image representing differences between (a) and (b).
(a)
(b)
(c)Key sensitivity of the proposed digital image scrambler. (a) Scrambled image usingK
S, (b) descrambled image using K
S, and (c) descrambled image using K
D.
(a)
(b)
(c)The two keys used for key sensitivity analysis of the proposed digital image scrambler are(8)
K
S
=
{
x
0
1
=
0.687754925117
,
r
1
=
5.93872502542
,
i
i
i
i
x
0
2
=
-
0.013462335467
,
r
1
=
1.237490188615
x
0
1
}
,
K
D
=
{
x
0
1
=
0.687754925118
,
r
1
=
5.93872502542
,
i
i
i
i
x
0
2
=
-
0.013462335466
,
r
1
=
1.237490188615
x
0
1
}
.


### 3.5. Performances’ Comparison with Other Digital Image Scrambling Schemes

Performances’ comparison was done taking into consideration some of the most recent works [17, 19, 27, 52]. Table 3 summarizes NPCR’s, UACI’s, APCCs’, and speeds’ measure mean values, computed over the 512
×
512 pixels, 24-bit, and color bitmaps, for all subjected scrambling algorithms.Table 3
Mean values of NPCR, UACI, APCCs, and speed measures.
Measure
Digital image scrambling algorithm
Dăscălescu and Boriga [17]
Dalhoum et al. [19]
Wu et al. [27]
Ye [52]
Ours
NPCR
99.431
90.126
94.163
93.676
99.489
UACI
25.032
NaN
NaN
NaN
29.006
APCC
Horizontal
0.0398
0.0767
0.0020
0.1059
0.0049
Vertical
0.0448
0.1007
0.0022
0.1094
0.0018
Speed (KB/s)
12.5 · 103
NaN
193.502
NaN
117.028Whilst the proposed digital image scrambler presents similar or better results, in comparison with other proposed ones, when it comes to general qualitative measures (i.e., NPCR, UACI, and APCCs) it seems to lack speed (i.e., from processing time point of view), a fact which can be upheld to MATLAB’s very slow for-loop execution. But using parallel computations or (and) other programming languages the processing speed can be largely enhanced.All the above results (i.e., numerical results presented in the entire Section3) were generated with the proposed scrambling scripts for (de)shuffling written on MATLAB 7.3.0 and run on an Intel Pentium Dual CPU T3200 at 2.00 GHz personal computer.


## 3.1. Visual Analysis

The purpose of visual testing is to highlight presence of similarities between plain image and its scrambled version (i.e., if the scrambled image does or does not contain any features of the plain image). For the proposed scrambler, same as for all digital image scramblers, expectations are to rearrange plain image’s pixels in a deterministic way but with a random-like appearance.Visual testing was performed on the512
×
512 pixels, 24-bit, Lena, Peppers, and Baboon color bitmaps, from the USC-SIPI miscellaneous image dataset [45]. Figure 5 depicts these test plain images, whereas their scrambled versions are showcased in Figure 6. By comparing them, one can say that there is no perceptual similarity (i.e., no visual information can be observed in the processed versions of plain images).Test plain images used during algorithm’s testing procedures. (a) Lena, (b) Peppers, and (c) Baboon.
(a)
(b)
(c)Image scrambling results. (a) Scrambled version of Lena, (b) scrambled version of Peppers, and (c) scrambled version of Baboon.
(a)
(b)
(c)


## 3.2. Adjacent Pixels’ Correlation Coefficients’ Analysis

It is well known the fact that, generally in plain images, any arbitrarily chosen pixels are strongly correlated with their adjacent ones (either they are diagonally, vertically, or horizontally oriented) [5, 17, 31]. With respect to this idea, an efficient digital image scrambling scheme must minimize this correlation as much as possible.Whilst Figure7 showcases the correlation distributions of horizontally (a), vertically (b), and diagonally (c) adjacent pixels for the Baboon plain image, Figure 8 showcases the correlation distributions (i.e., for the same pixels’ adjacency cases) for the Baboon scrambled image.Correlation distributions of adjacent pixels in Baboon plain image. (a) Horizontally adjacent pixels, (b) vertically adjacent pixels, and (c) diagonally adjacent pixels.
(a)
(b)
(c)Correlation distribution of adjacent pixels in Baboon scrambled image. (a) Horizontally adjacent pixels, (b) vertically adjacent pixels, and (c) diagonally adjacent pixels.
(a)
(b)
(c)At the same time, all APCCs (computed over 10.000 pairs of adjacent pixels, randomly selected, for each of the testing directions and for each of the color channels) are summarized in Table1, for each of the test images.Table 1
Adjacent pixels’ correlation coefficients’ analysis.
Pixels’ adjacency
Image status
Color channel
Test images
Lena
Peppers
Baboon
Horizontally
Original
R
0.9785
0.9677
0.8722
G
0.9747
0.9815
0.7743
B
0.9695
0.9661
0.8857
Scrambled
R
0.0063
0.0009
0.0011
G
0.0110
0.0044
−0.0009
B
0.0104
0.0012
0.0015
Vertically
Original
R
0.9899
0.9695
0.9241
G
0.9877
0.9831
0.8680
B
0.9842
0.9696
0.9088
Scrambled
R
0.0004
−0.0017
0.0002
G
−0.0064
−0.0022
0.0032
B
0.0003
−0.0020
0.0004
Diagonally
Original
R
0.9685
0.9565
0.8624
G
0.9622
0.9719
0.7441
B
0.9533
0.9527
0.8420
Scrambled
R
−0.0020
0.0071
−0.0013
G
0.0166
0.0007
0.0016
B
0.0049
0.0035
−0.0007It can be easily noticed that neighboring pixels in the plain images are highly correlated; that is, APCCs’ values are too high, very close to one. On the contrary, in cases of scrambled images, those values are close to zero, meaning that all neighboring pixels considered in tests are weakly correlated, which is the expected result [5, 46, 47].


## 3.3. Other Qualitative Measurements’ Analysis

Whereas through the visual assessment and APCCs’ analysis good scrambling effects are highlighted, based on MSE (mean squared error), NPCR (number of pixel change rate), and UACI (unified average changing intensity) measures, a better and more objective assessment of the proposed scrambler can be accomplished.MSE is used to evaluate the amount of differences between plain image and its corresponding scrambled one [48]. MSE can be numerically evaluated using (4), with the expected result being a value as high as possible thus denoting nonidentical images (i.e., the higher the value of the MSE is, the greater the differences between the two images are). Consider
(4)
MSE
C
(
I
P
,
I
S
,
C
)
=
1
W
×
H
∑
i
=
1
W
∑
j
=
1
H
[
I
P
(
i
,
j
,
C
)
-
I
S
(
i
,
j
,
C
)
]
2
,
where I
P represents plain image’s associated matrix, I
S represents scrambled image’s associated matrix, W and H represent the image dimensions (i.e., width and height), and C is the color channel (i.e., C
∈
{
R
,
G
,
B
}
≡
{
1
,
2
,
3
}).First shown in [49] and [50] and afterwards extensively studied [51] and presented in transposed fashion (more suitable for usage within scrambled images’ assessment) [17], NPCR and UACI measures are designed to estimate the mean number of distinct pixels having the same position in the plain image as in corresponding scrambled one, respectively, to estimate the average intensity differences of distinct pixels having the same position in the plain image as in the corresponding scrambled one.Defined for each of image’s color channels [49–51], NPCR indicator can be numerically evaluated using (5) and considering two random images (i.e., the plain image is completely different in comparison with its scrambled version) its maximum expected value [17] is found to be ε
[
NPCR
C
]
=
99.6093
%. Consider
(5)
NPCR
C
(
I
P
,
I
S
,
C
)
=
(
1
W
×
H
∑
i
=
1
W
∑
j
=
1
H
D
(
i
,
j
,
C
)
)
×
100
%
,
where D
(
i
,
j
,
C
) represents the matrix associated with the differences between I
P’s and I
S’s color channels, with its structure being computed according to the following relationship:
(6)
D
(
i
,
j
,
C
)
=
{
0
,
if
I
P
(
i
,
j
,
C
)
=
I
S
(
i
,
j
,
C
)
,
1
,
if
I
P
(
i
,
j
,
C
)
≠
I
S
(
i
,
j
,
C
)
.Defined for each of image’s color channels [49–51], UACI indicator can be numerically evaluated using (7) and considering two random images (i.e., the plain image is completely different in comparison with its scrambled version) its maximum expected value [17] is found to be ε
[
UACI
C
]
=
33.4635
%. Consider
(7)
UACI
C
(
I
P
,
I
S
,
C
)
=
(
1
W
×
H
∑
i
=
1
W
∑
j
=
1
H
|
I
P
(
i
,
j
,
C
)
-
I
S
(
i
,
j
,
C
)
|
255
)
×
100
%
.Analyzing NPCR, UACI, and MSE indicators’ values, for each of the test images, as they are summarized in Table2, one can say that the proposed scrambling scheme approaches the performance of an ideal digital image scrambler. However, the attention is drawn to UACI indicator’s values, not very close to the maximum expected value. Reasoning for this is the fact that the proposed digital image scrambler keeps the same set of possible values of pixels in the scrambled image as in the plain image. Obviously, this limits the maximum difference values that could be achieved between plain image’s pixels and scrambled image’s corresponding ones [17]. For example, in case of the Peppers plain image, maximum differences that could be achieved on each color channel are upper bounded by pixels maximum values (i.e., 231 for R channel, 239 for G channel, and 229 for B channel), instead of the theoretical one of 255.Table 2
Difference measures between original and scrambled images.
Image
Color channel
Measures
NPCR (%)
UACI (%)
MSE
Lena
R
99.6059
32.9915
3.7081 · 103
G
99.6013
30.7161
3.0761 · 10
3
B
99.5735
30.2703
3.0090 · 103
Peppers
R
99.5174
28.5412
2.6343 · 103
G
99.3126
31.9327
3.3309 · 10
3
B
99.2966
28.9468
2.7533 · 103
Baboon
R
99.5007
25.2236
2.1084 · 103
G
99.4621
24.5648
1.8140 · 10
3
B
99.5296
26.8748
2.3806 · 103


## 3.4. Key Space and Key Sensitivity Analysis

A good digital image scrambler should have a sufficiently large key space to resist brute-force attacks, mostly if its usage as part of images’ encryption schemes is desired (i.e., as part of the two fundamental techniques used to encrypt a block of pixels, i.e., permutation stage, which aims to ensure the coveted confusion properties).As previously shown, the proposed digital image scrambler operates based on values of the bitstreams generated by a multithresholded digital chaotic map. Thus, taking into consideration the two seeding points, respectively, the two control parameters of the digital chaotic generator (namely,x
0
1
,
x
0
2
,
r
1
,
r
2), with a precision of up to 10
-
15, and the key space of a possible encryption scheme (which uses proposed digital image scrambler scheme within permutation stage) is significantly improved by the key space of the proposed scrambler, namely, by a factor of 1060 (hereafter referred to as improvement factor and abbreviated as IF).On its turn, this key space improvement factor can be raised if some artifacts are considered, such as (but not limited to) the following:(i)
if knight’s moving rules are to be permuted on user choice (e.g., any of the three more cases, out of 8!, listed in Figure9 may be used) then IF increases with 104.6055;
(ii)
if features extraction vector’s elements are to be permuted on user choice (e.g., any of the two more cases, out of 4! (i.e., if bits defining each rule are taken grouped) or out of 8! (i.e., if bits defining each rule are taken random), listed in Figure10) and may be used then IF increases with another 101.3802 or 104.6055;
(iii)
if color channels interchanging rules are to be permuted on user choice, considering that there are(
C
3
!
4
)
3
=
3375 possible ways to do it, then IF increases with 103.5283.Three more cases, out of 8!, of possible knight’s moving rules annotations.
(a)
(b)
(c)Two more cases, out of 8!, of possible feature extraction vector’s elements configuration.
(a)
(b)Thereby, proposed scrambler’s key space can achieve a value of 1069.5140 (for the first case mentioned in (ii)) or of 1072.7393 (for the second case mentioned in (ii)), which is sufficiently large to recommend usage of the proposed scrambler within any image encryption scheme.In addition, in order to approach the performance of an ideal image encryption algorithm, the proposed digital image scrambler should have high sensitivity to scrambling key (i.e., a slight key change should lead to significant changes in the scrambled images during scrambling procedure, respectively, significant changes in the descrambled images during descrambling procedure).Figure11 shows the key sensitivity of the proposed digital image scrambler, when operating over Baboon plain image with two different scrambling keys (differentiated from each other by the LSB of initial seeding points, i.e., by ±
1
·
10
-
15 variations of x
0
1 and x
0
2). As can be seen, one bit change in the scrambling key leads to two different scrambled images, whose difference is also random-like. When image is descrambled using an incorrect key (e.g., with same variation conditions of x
0
1 and x
0
2) the result is also a random-like image, as shown in Figure 12.Key sensitivity of the proposed digital image scrambler. (a) Scrambled image usingK
S, (b) scrambled image using K
D, and (c) image representing differences between (a) and (b).
(a)
(b)
(c)Key sensitivity of the proposed digital image scrambler. (a) Scrambled image usingK
S, (b) descrambled image using K
S, and (c) descrambled image using K
D.
(a)
(b)
(c)The two keys used for key sensitivity analysis of the proposed digital image scrambler are(8)
K
S
=
{
x
0
1
=
0.687754925117
,
r
1
=
5.93872502542
,
i
i
i
i
x
0
2
=
-
0.013462335467
,
r
1
=
1.237490188615
x
0
1
}
,
K
D
=
{
x
0
1
=
0.687754925118
,
r
1
=
5.93872502542
,
i
i
i
i
x
0
2
=
-
0.013462335466
,
r
1
=
1.237490188615
x
0
1
}
.


## 3.5. Performances’ Comparison with Other Digital Image Scrambling Schemes

Performances’ comparison was done taking into consideration some of the most recent works [17, 19, 27, 52]. Table 3 summarizes NPCR’s, UACI’s, APCCs’, and speeds’ measure mean values, computed over the 512
×
512 pixels, 24-bit, and color bitmaps, for all subjected scrambling algorithms.Table 3
Mean values of NPCR, UACI, APCCs, and speed measures.
Measure
Digital image scrambling algorithm
Dăscălescu and Boriga [17]
Dalhoum et al. [19]
Wu et al. [27]
Ye [52]
Ours
NPCR
99.431
90.126
94.163
93.676
99.489
UACI
25.032
NaN
NaN
NaN
29.006
APCC
Horizontal
0.0398
0.0767
0.0020
0.1059
0.0049
Vertical
0.0448
0.1007
0.0022
0.1094
0.0018
Speed (KB/s)
12.5 · 103
NaN
193.502
NaN
117.028Whilst the proposed digital image scrambler presents similar or better results, in comparison with other proposed ones, when it comes to general qualitative measures (i.e., NPCR, UACI, and APCCs) it seems to lack speed (i.e., from processing time point of view), a fact which can be upheld to MATLAB’s very slow for-loop execution. But using parallel computations or (and) other programming languages the processing speed can be largely enhanced.All the above results (i.e., numerical results presented in the entire Section3) were generated with the proposed scrambling scripts for (de)shuffling written on MATLAB 7.3.0 and run on an Intel Pentium Dual CPU T3200 at 2.00 GHz personal computer.


## 4. Conclusions

In the present paper, the study of a newly designed digital image scrambler (as part of the two fundamental techniques used to encrypt a block of pixels, i.e., the permutation stage) that uses knight’s moving rules (i.e., from the game of chess), in conjunction with a chaos-based PRBG, in order to transpose original image’s pixels between RGB channels, was presented.Theoretical and practical arguments, rounded by very good numerical results on scrambler’s performance analysis (i.e., under various investigation methods, including visual inspection, adjacent pixels’ correlation coefficients’ computation, key’s space, sensitivity assessment, etc.), confirm viability of the proposed scrambling method (i.e., it ensures the coveted confusion factor) recommending its usage within cryptographic applications, thus contributing to the crystallization of reminded new paradigm (i.e., in the field of images’ encryption algorithms designing branch, namely, designing of new digital image scramblers based on rule sets of the most popular games).As future work, actual implementation on FPGA (focused on the optimization of proposed algorithm, for parallel computing) is concerned.



---

*Source: 932875-2014-04-24.xml*