Before presenting the technical details of each operation, we introduce a piece of knowledge—the control variable—that supports the functionality of the encryption round operations.
3.1.1. The Control Variable
The control variable is a sequence of
bits. The value
p is the maximum number of bits required for representing the used symbols (e.g.,
p = 8 if the used symbols are integers within the range 0…255) and
k is the total number of
p-bit subsequences required for supporting the functionality of the initial encryption operations. The process of initializing and updating the control variable
is illustrated in
Figure 3. The process consists of initializing the control variable
and an update process called the update loop. The control variable
is initialized with
k chaotic values
(
p bits each) by an XOR operation and left shifting by “(
)*
p” positions.
The update loop consists of the updater and the pollinator operations and is repeatedly invoked every time the initial encryption round processes an input symbol. When invoked, the updater manipulates the control variable using three steps (i–iii), which are the steps used in the XorShift random generator. In addition, the updater maintains three variables that support the functionality of the pollinator. The updater refreshes the values of by adding three values extracted from the control variable. The rightmost 9 bits of the control variable are used to form as follows: is the decimal value of the rightmost three bits, is the decimal value of the next three bits, and is the decimal value of the last three bits.
The pollinator updates the control variable by including the impact of the input symbols in it (the control variable). Unlike the updater, which is repeatedly invoked, the pollinator is invoked using a logic that is based on the input symbols. To implement this invocation logic, the pollinator maintains three layers of data, where each layer has
entries (see
Figure 3). Layer
(the innermost circle) is populated by replicating 8 direction flags that determine the 8 possible move directions starting from a cell in the substitution space
(We call the cell that we start the move from a
reference cell). These flags are either unidirectional or bidirectional. The unidirectional flags allow the move to be along the row or the column of the reference point. We define four unidirectional flags: two flags allow the move along the row either to the left (
L) or to the right (
R) of the reference point, and two flags allow the move along the column either to the top (
T) or to the bottom (
B) of the reference point. The bidirectional flags allow the move to be along the four diagonals of the reference point. We define four bidirectional flags: two flags allow the move along the top right diagonal (
TRC) or the top left diagonal (
TLC), and two flags allow the move to the bottom right diagonal (
BRC) or the bottom left diagonal (
BLC).
is populated with the integers
. The entries of
determine the amount of the move (within the substitution space) starting from the reference cell. The outer layer
contains equal replications of two values “U” (execute pollinator) and “N” (do not execute). The
entries of each layer
are randomly shuffled using a sequence of
chaotic numbers obtained from the chaotic system.
Accordingly, the update loop refreshes the value of the control variable as follows. The pollinator checks the possibility of including the impact of the input symbol
(assuming the currently considered symbol is
) by accessing
. The access takes the general format:
[
], where
is a plaintext symbol and
is one of the variables maintained by the updater. If the outcome of the access is “U” (i.e.,
[
] = “U”) the pollinator is triggered and updates the control variable using the values
[
] and
[
]. If the content of
[
] is a unidirectional flag (
R,
L,
T, or
B), the pollinator moves (starting from the reference point) along the direction flag a number of positions equal to the decimal value of the right
bits of the distance value
[
] (The input plaintext
designates the reference point within the substitution space. The left half bits of
designate the row of the reference point, and the right half bits of
designate its columns). If the content of
[
] is a bidirectional flag (
TRC,
TLC,
BLC, or
BRC), the pollinator moves (starting from the reference point) along the direction flag a number of positions on both the rows and columns of the substitution space. The amount of the move on the rows and the columns equals, respectively, the decimal value of the left
bits and the right
bits of the distance value
[
]. In either case, the content of the reached cell, say
, is used to pollinate the control variable. The pollinator determines the bits of the control variable that should be pollinated using the variable
z, where
z is the decimal value of the right three bits of the input plaintext
. The actual pollination is achieved (see
Figure 3) by left-shifting
a number of positions equal to “
” and XOR’ing the outcome with the control variable
.
We use a simple example to demonstrate the move within the substitution space starting from a reference point. Suppose that the direction flag is the unidirectional T and the amount of the move is 151 “1001 0111”. Based on this configuration, the pollinator moves 7 cells (the value of the right half bits of 151) up the reference cell designated by (wrap if necessary) and retrieves the value . Suppose now that the direction flag is and the amount of the move is 28 “0001 1100”. Based on this configuration, the pollinator moves 1 row (the value of the left half bits) and 12 columns (the value of the right half bits) along the top right diagonal (wrap is necessary). The content of the reached cell is the value .
The initial encryption process needs
bits to support its operations. Therefore, the control variable length is 8
p bits (i.e.,
k = 8). These bits are consumed by the initial encryption process operations as specified by
Figure 4. As
Figure 4 shows, the rightmost
p bits are used to support the functionality of the encoder. The left 7
p bits are used as follows: the rightmost of the 3
p bits are used for triggering the distortion process, the next
p bits (toward the left) are used for selecting a specific distortion operation, the next
p bits are used as a flipping pattern, and the leftmost 2
p bits are used for reordering the distortion operations list.
3.1.2. Encoder Operation
The encryption technique uses a sliding-point encoder to encode plaintext input symbols . To encode an input symbol ’, the encoder creates a sliding point (, ) using the rightmost p bits of the control variable, where and are, respectively, the decimal values of the left/right p/2 bits. It also creates a reference point (, ) within the substitution space by splitting the bits of the input symbol , where and are, respectively, the left/right half bits of . The encoder uses (, ) to slide from the reference point (, ) to a new point within the substitution space. The sliding is a non-linear transformation, which is performed by left-shift “” and “⊕” (, ). The encoder uses the content of the accessed cell as the code for the input symbol .
The encoder operation has the following decoder that restores the original symbols. Let (, ) be the sliding point that was used to encode the input symbol , and (, ) is the cell from which the code of was retrieved. The following two steps restore the original symbol: and , where is the division remainder and is the number of w’s bits. The decimal value of the concatenation of, respectively, the bits of and is the original symbol .
3.1.3. Distortion Operation
The distortion operation sharply manipulates the bits of the input symbols using the operations defined in
Table 1.
Chaotic-Mutate (
y,
v) mutates bits of the input symbol
y by XOR’ing it with the chaotic value
v. The chaotic value
v is computed by XOR’ing a chaotic value
(obtained from the chaotic system) and the
p bits of the control variable dedicated for chaotic mutation operation (see
Figure 4).
Shift-Left (
y,
s) circularly left shifts the bits of the input
y by
s positions (
s = 1…
).
LRHi-Flip (
y,
f) interleaves the left half bits of the input symbol
y between the right half bits (either in the even or odd positions) based on the argument
f. The argument
f has eight possible states described in the table. These operations are initially ordered in a list as follows:
Shift-Left (
y, 1), …,
Shift-Left (
y,
),
LRHi-Flip (
y, 0),
LRHi-Flip (
y, 1), …,
LRHi-Flip (
y, 7),
Chaotic-Mutate (
y,
v). The order, however, changes as we describe next.
The distortion operation is stochastically triggered. Let U be the integer value of the bits of the control variable dedicated for the distortion process, and V be the maximum number that can be created from bits (when all bits are ones). The ratio A = is a value in [0, 1]. The distortion process is triggered if , where . The threshold q determines the intensity of the stochastic triggering. For instance, no distortion occurs when q = 1, while statistically 75% of the symbols are distorted when q = 0.25. When the distortion process is triggered, it selects a distortion operation using the p bits of the control variable (dedicated for selecting a distortion operation) and uses the chosen operation to distort the input symbol (The selection of a distortion operation is achieved by simple model, such as Mod (D, L), where D is the decimal value of the p bits of the control variable, L is the length of the distortion operations list, and Mod is the division remainder).
After processing an input symbol, the distortion process updates the order of the operations list using the designated 2p bits of the control variable. The left p bits are used to circularly left shift the content of the list and the right p bits are used to swap the operation at the index created from the p bits with the operation at the index zero.
The distortion operation has the following distortion operation inverse. The impact of the operation Chaotic-Mutate (y, v) is straightforwardly reversed by regenerating the same chaotic value v and XOR’ing it with the input symbol y. The impact of the left shift operation Shift-Left (y, s) is easily reversed by right shifting the symbol s positions. Finally, the impact of the operation LRHi-Flip (y, f) is reversed by collecting the bits from either odd or even positions depending on f, handling these bits (if needed), and appending them as a prefix for the remaining bits.
3.1.4. Diffuser Operation
A secure encryption technique must have a high avalanche effect [
43]. The computational model uses a lookback technique to detect the variations in the previously processed input symbols and propagate these variations to impact all the subsequent symbols.
Figure 5 defines the algorithmic steps for embedding the effect of the previous symbols
in the outcome of processing the current
. The XOR+Shift operation accumulates the effect of the previously processed symbols (
) as follows. The input to the XOR+Shift operation is the values
X and
L. The value
X receives the input symbol
when the diffuser considers the symbols
(
) (The value
X is zero when the diffuser considers the first input symbol
). The value
L is initially zero. The output of the XOR+Shift operation is the value
B. The decimal value of the rightmost
p bits of
B is used as a diffusion value
R, which is XOR’ed with the current input symbol. The decimal value of the remaining bits of
B are assigned to
L, which serves as a “memory” that accumulates the impact of the previously processed symbols. It is worth noting that by splitting
B, the manipulation of the current input
is independent of the manipulation of the next input symbol
.
The diffuser operation has the following diffuser operation inverse that restores the original symbols. The symbol is obtained from by XOR’ing with R, where R is computed from the initial values of L and X (zeros). Once is restored from , the diffuser inverse restores the symbol from using the previously restored original symbol as a value for X and the new value of L.