Electronics 11 00613 v2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

electronics

Article
Cryptographic Services Based on Elementary and Chaotic
Cellular Automata
Erendira Corona-Bermúdez , Juan Carlos Chimal-Eguía * and Germán Téllez-Castillo

Centro de Investigación en Computación del Instituto Politécnico Nacional, Ciudad de Mexico 07738, Mexico;
[email protected] (E.C.-B.); [email protected] (G.T.-C.)
* Correspondence: [email protected]; Tel.: +52-5515-068-828

Abstract: In this paper, a security framework based on cellular automata is proposed, which is
composed of three parts: entity authentication, data encryption, and decryption. Authentication
is based on a zero-knowledge protocol, and its robustness is supported by the fact that the shared
secret is not only an NP-complete problem but also dynamically transformed by a two-dimensional
cellular automaton into a more complex secret. Thus, the authentication’s output is the key to data
encryption/decryption in the following steps. One more strength of this system is the sensibility of
the cellular automata to initial conditions—which is why we must know the initial configuration in
order to obtain the key and the times that cellular automata evolved. All those characteristics give
the system both robustness and security.

Keywords: zero knowledge protocol; cellular automata; cryptography; symmetric cipher; stream cipher


1. Introduction

Cryptography is an ancient discipline. It is concerned with constructing robust
Citation: Corona-Bermúdez, E.; schemes against malicious attempts to make these schemes deviate from their prescribed
Chimal-Eguía, J.C.; Téllez-Castillo, G. functionality [1]. For a long time, in order to preserve our information, cryptographic
Cryptographic Services Based on
protocols, schemes and mechanisms have been created. Nowadays, it is necessary to pre-
Elementary and Chaotic Cellular
vent the information disclosure and ensure that an unauthorized entity cannot access the
Automata. Electronics 2022, 11, 613.
transmitted messages. Due to the development of cryptography and cryptanalysis at the
https://doi.org/10.3390/
same time, there is a need to create robust methods as preventive measures. The protection
electronics11040613
of data is essential, not only with cryptographic schemes but also with authentication
Academic Editor: Nurul I. Sarkar methods. The objective of this paper was to design a security framework based on cellular
automata. First, an authentication test was developed based on zero-knowledge interactive
Received: 21 December 2021
Accepted: 10 February 2022
proofs using an NP-complete problem as a shared secret due to the naturalness of these
Published: 16 February 2022
problems. Then, these are connected with a stream cipher using a 2-D cellular automaton.
These tools were selected due their mathematical and computational properties.
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in 2. Related Work
published maps and institutional affil-
There are several methods to develop cryptography such as elliptic curves [2–4],
iations.
genetic algorithms [5–7], chaotic maps [8–10] and cellular automaton. The last mentioned
is the method proposed in this paper, which is a subset of dynamic systems that have
been effectively and chiefly used to construct strong cryptosystems by taking advantage
Copyright: © 2022 by the authors.
of not only their randomness but also their dynamical properties [11]. There are some
Licensee MDPI, Basel, Switzerland. cryptography applications with cellular automata: an evolutionary computation approach
This article is an open access article was proposed [12] to design a fast and secure block cipher using non-uniform second-order
distributed under the terms and cellular automata. Image encryption techniques aim to protect the image’s content with
conditions of the Creative Commons higher efficiency and security than conventional cryptographic methods using an image’s
Attribution (CC BY) license (https:// unique properties. An image encryption model based on two-dimensional partitioned
creativecommons.org/licenses/by/ cellular automaton was proposed [13]. This model has the same topology as a digital image
4.0/). and is flexible to images with different color depths.

Electronics 2022, 11, 613. https://doi.org/10.3390/electronics11040613 https://www.mdpi.com/journal/electronics


Electronics 2022, 11, 613 2 of 13

Image encryption is an efficient and vital way to protect classified and secret images.
With the advancement of the computer’s processing power, AES, DES, or chaotic series type,
just like image encryption schemes are not as secure as before [14]. For that reason, those
authors [14] presented a new hybrid image encryption method for protecting secret and
imperative images by employing logistic sine system (LSS) together with two-dimensional
cellular automata and finite-state machine-based DNA rule generator, other authors [15]
presented an authenticated image encryption algorithm based on cellular automata.
In the same fashion, a novel image encryption scheme was proposed based on permu-
tation–diffusion architecture using cellular automata [16]. Similarly, Xingyuan Wang and
Dapeng Luan [17] proposed a novel image encryption scheme based on reversible cellular
automaton (RCA) combining chaos. An intertwining logistic map with complex behavior
and periodic boundary reversible cellular automata was used in that algorithm.
There was another image encryption algorithm proposed in [18], in which a special
kind of periodic boundary cellular automata with unity attractors was used. Furthermore,
there are other applications such as a chaotic encryption algorithm based on the “Life-
like” cellular automata [19], which act as a pseudo-random generator (PRNG). In [20], a
non-uniform cellular automata framework is proposed.
The aim of this work was to design a cellular automata security framework. As the
first step, an authentication test was developed based on zero-knowledge interactive proofs,
using as a shared secret an NP-complete problem. Then, a stream cipher developed with
cellular automata (CA) must be joined to it because both constitute simple formal models
for complex and chaotic systems; also, all the cells synchronously update their states by
applying a local rule [21,22]. In contrast to some encryption techniques such as DES, AES,
RC4 and VEST [23,24], our algorithm offers an authentication service, which must be
approved in order to obtain a key and the access to encrypt or decrypt a file.

3. Materials and Methods


This section is devoted to introducing the preliminaries related to information security
systems and a discrete model of computation to be discussed in this paper. We explicitly
define the basics of cryptography, cellular automaton, complexity, and a well-knowing
np-problem called three graph coloring.

3.1. Preliminary
3.1.1. Cellular Automata
One of our model’s parts are cellular automata (CA), which are defined by four
characteristics [25]. The first is a discrete cellular state space ` which is the discrete lattice
of cells or sites upon which CAs “live” and their dynamics unfold; the second element is
the local space value Σ, each cell of ` indexed by the elements of the `’s symmetry group.
Although CAs are assumed to live on infinitely large lattices, computer simulations must
necessarily be run on finite sets; for this reason, boundary conditions are important. Finally,
there is a dynamical rule φ; state transitions are therefore local in both space and time,
individual cells evolve iteratively according to a fixed and usually deterministic function of
the current state of that cell and its neighboring cells.

3.1.2. Cellular Automata in Cryptography


The use of cellular automata in cryptography is done to best confront the ability of
dynamical systems to generate complexity with the cryptanalyst’s tools for cutting through
such complexity [26]. Moreover, they are attractive candidates for cryptosystems since
they are naturally adapted to massively parallel computation. The approach to using CA
in cryptography involves applying both reversible and irreversible rules. Using that tool
to build cryptosystems is flexible and powerful; it can be used to solve a wide variety of
practical cryptographic problems. These applications motivate the careful investigation of
the security properties of such systems.
Electronics 2022, 11, 613 3 of 13

3.1.3. Some Features of Cryptography


Let A be a finite set, which we will call alphabet, and let m be the message (a text
from A∗ ) that Alice wants to transmit in secrecy to Bob; it is usually called the plaintext.
Alice will first transform the plaintext into C = E(m), the so-called ciphertext. It will be
the ciphertext that she will transmit to Bob. Let A and B be two finite alphabets. Any
one-to-one mapping E of A∗ to B∗ is called a cryptographic transformation [27].
Cryptography itself splits into three main branches: symmetric algorithms, asymmetric
algorithms and cryptographic protocols. We will focus on symmetric cryptography, which
is divided into block ciphers and stream ciphers.

3.1.4. Perfectly Secret Encryption


We imagine that an adversary who knows the probability distribution over m also
knows the likelihood of sending different messages. Subsequently, he observes some
ciphertext being sent by one entity to another. Ideally, keeping this ciphertext should not
affect the knowledge of the adversary; in other words, the a posteriori likelihood that some
message m was sent should be no different from the a priori probability that m would be sent.

3.1.5. Zero-Knowledge Proofs


Zero-knowledge proofs are interactive protocols that enable one entity (called the
prover) to convince another entity (called the verifier) of the validity of a mathematical
statement without revealing anything beyond the statement’s assertion [28]; that is to say, is
a pair of interactive Turing machines, which satisfy two properties—namely completeness
and soundness [29].
• Completeness can be expressed as
Prob[( P, V )( x ) = 1| x ∈ L] ≥ 1 − | x |−c (c > 0)
• Soundness can be expressed for every interactive Turing machine P∗ as
Prob[( P∗ , V )( x ) = 0| x ∈
/ L ] ≥ 1 − | x | − c ( c > 0)

In the first place, completeness means that the verifier (V) accepts the proof if the
statement is true. In the second place, soundness implies that V rejecting the proof of the
fact is false. A cheating prover can convince an honest verifier that some false statement is
true with only a very small probability [30].

3.1.6. NP Complexity
The class NP consists of all sets S: where a verifier exists, there is ordinarily a Turing
machine V such that x ∈ S if and only if there exists a string y of polynomial length in the
size of x, such that V ( x, y) accepts in polynomial time the span of x [31].

3.1.7. Graph Coloring


The graph coloring problem is a NP-hard problem and can be defined as follows: given
an undirected graph G = (V, E) with V = v1 , ..., vn being the set of nodes and E = ei,j : any
edge between vi and v j is the set of edges. The graph coloring problem is: to determine a
partition of V in a minimum number (the chromatic number) of color classes c1 , c2 , ..., cn
such that for each edge, ei,j ∈ E, vi and v j are not in the same color class [32].

3.2. Cryptography with Cellular Automata and Zero Knowledge Model


This project was divided into two parts, each part refers to different pillars of informa-
tion assurance, the first one describe the authentication and the second one describing the
confidentiality and integrity.

3.2.1. Authentication
For the authentication system, a zero-knowledge interactive proof (ZKIP) is proposed,
which has two graphs three-coloring G1 = (V1 , E1 ) and G2 = (V2 , E2 ) as a shared secret.
This means the graphs are only known by the prover (P) and the verifier (V). Firstly, P
Electronics 2022, 11, 613 4 of 13

generates a commit message indicating that it knows about the shared graphs. Secondly,
V returns a challenge; in this case, it asks P for an edge of the chosen graph in a pseudo-
random way, and P returns an answer to V. Finally, the process can be repeated several
times to ensure verification. Two graphs were used: to make the authentication process
difficult for a eavesdropper; so if this entity wants to obtain information, it would need to
know both graphs and the way both graphs are colored.
A prover (P) chooses one graph, then changes the value of the vertexes’ color. During
a loop, a pseudo-string is created and is processed with the new value of the graph; the
result is sent to the verifier (V), who computes the vertexes’ value as well as choose an
edge in the graph. If the edge is in the graph, the prove continues—and if the test does
not fail in m2 iterations, then it finishes correctly. This algorithm’s output will be a vector,
which will be used as a key for the encryption–decryption of files.
P and V have access to the cipher function F : (C, R) → C ξ ; C ⊕ R → T and AC : T → C ξ ,
where the variables are represented by:
R—binary vectors set of cardinality 8;
C—colors set;
C ξ —cipher colors set;
⊕—operator XOR;
AC—one-dimensional cellular automata defined as a 4-tuple (S,N,f,d);
S—{0, 1};
N—it is considered radius one;
f : Sn → S—rule 30;
d ∈ Z+ —one dimensional;


ri , −

r j ∈ R—binary vectors of cardinality 8;
The steps in the Algorithm 1 are executed m2 times where m = | E| and E = E1 if
E1 > E2 , else E = E2 , the aim is to enable one entity to convince another entity of the
validity of the mathematical statement without revealing anything beyond the assertion of
the statement.

3.2.2. Encryption/Decryption
In the data encryption and decryption, a matrix has as data the value of the vector
obtained in the authentication repeated n-times, one cellular automaton of 2-D, and the file
to be encrypted–decrypted. The output of the Algorithms 2 and 3 will be the encrypted–
decrypted file, respectively. The headers of the files are encrypted which provokes the loss
of the original file.
The output of the authentication process is called δ, where: δ = r−i−·→
r j and δ Vector of
cardinality 16.
The cipher will be an cellular automaton P, defined as a 4-tuple (S,N,f,d) where:
 S—{0, 1}
 N—Moore neighborhood, it is considered radius one.
 d ∈ Z+ —two dimensional.
 f : Sn → S—variant of Conway’s life:
• Any live cell with one, three, five or eight live neighbors survives;
• Any dead cell with three, five or seven live neighbors becomes a live cell;
• All other live cells die in the next generation. Similarly, all other dead cells stay dead.
The frontier states of the cellular automaton P will be toroidal. For the extremes, the
neighbors will be taken from the upper, lower or extreme sides, respectively, to shape a
neighborhood of the adjacent cells. Moreover, the lattice of this one will be represented as
eight times the file’s size to encrypt (D); it is multiplied by eight because a flow cipher will
be performed and it is necessary to represent the data in bytes.
Electronics 2022, 11, 613 5 of 13

Algorithm 1: Authentication test using interactive zero-knowledge.


input : 3-colorable graph G of n g vertex and m g edges, 3-colorable graph H of nh
vertex and mh edges.
output : true,false, r−i−·→ rj.
Step 1: P chooses one of the two graphs on a pseudo-random way.
P makes a pseudo-random permutation β to the colors: each vertex i has one color
β ( c i ).
for i ← 1 to n do
Create pseudo-random binary strings ri ∈ R and compute: ciα = f ( β(ci ), ri ).
The encrypted vertex color ciα is sent to V.
end
V saves c1α , ..., cαn and chooses randomly two vertex x, y and send them to P.
P checks if the edge ( x, y) exists.
if ( x, y) is a valid edge then
return β(c x ) and β(cy ) and the values of the vector r x and ry to V.
V compute c0x = F ( β(c x ), r x ) and c0y = F ( β(cy ), ry ) and verifies that an
inconsistency does not exist. It checks c0x = c x and c0y = cy .
ξ ξ

V looks for a violation in the 3- colorability, It checks that β(c x ), β(cy ) ∈ C and
β ( c x ) 6 = β ( c y ).
if no state fails then
while counter ≤ m2 do
counter = counter + 1;
P and V start from the step 1.
end
V stops and accepts.
else
V stops the process and rejects.
end
else
The test finishes and the entry to the system is denied due a sham who does
not know the protocol exists.
end

In order to correctly decode the files, it is necessary for both the cellular automaton
encoder and decoder to have the same input and the same configuration. This is the key δ,
which is an essential part because this one contains the number of times that the automaton
will evolve. Moreover, it contains the data which will be replicated in a matrix; this matrix
will be the input of the decoder CA.

Algorithm 2: Files encoder using cellular automaton.


input : δ,P,D.
output : Encrypted file E.
The vector δ is taken and replicated A time. This matrix will the lattice of P.
P evolves n-times, where n is represented with the first four digits of δ converted
from binary to decimal.
A vector V is created and transformation of the output from P to V is performed.
D is read as a bits array.
for i ← 1 to A do
An operation is made such that:
Ei = Di ⊕ Vi .
end
A conversion to bytes is made and saved in a file. The file will be our encrypted
text.
Electronics 2022, 11, 613 6 of 13

Algorithm 3: Files decoder using cellular automaton.


input : Encrypted file E,δ.
output : Decrypted file D.
The key δ is taken and replicated A times, this matrix will be the lattice of P.
P evolves n-times, where n is represented with the first four digits of δ converted
from binary to decimal.
A vector V is created and transformation of the output from P to V is performed.
E is read as a bits array.
for i ← 1 to A do
An operation is made such that
Di = Ei ⊕ Vi
end
for Di ← 1 to A do
A conversion to bytes is made and saved in a file. The file will be our
decrypted text.
end

4. Results
On top of that, the implementation of the algorithm and different types of analysis were
performed using Python 3 on a computer with Intel CORE i5 processor having 4 GB RAM.
First of all, we simulated the authentication algorithm and after the encryption/decryption
algorithm, the Appendix A shows the app developed. Figure 1 shows us the software design.

Figure 1. Block diagram of Algorithms 1–3. It shows the security framework’s flow.

In the second place, a general diagram to represent the functional mechanism of the
proposed method is presented in Figure 2. Moreover, the diagram is divided into authenti-
cation, encryption, and decryption mechanisms. In Figure 3, the ZKIP authentication is
shown and it explains how the communication is between the entities. Secondly, Figure 4
represents the block diagram of the encryption part; it is essential that the user approves
the first step in order to obtain a key, whereas in the decryption part, the user must have
the correct one to obtain the plaintext as shown in Figure 5.

Figure 2. The functional mechanism of the general proposed method.


Electronics 2022, 11, 613 7 of 13

Figure 3. The functional mechanism of the ZKIP authentication proposed method.

Figure 4. The functional mechanism of the encryption proposed method.

Figure 5. The functional mechanism of the decryption proposed method.

4.1. Authentication
The ZKP algorithm satisfies three properties.:
• Completeness—if the graph is three colorable, then any pair of edges (u, v) will
undoubtedly be differently colored. Therefore, an honest verifier will complete all m2
iterations and accept with a probability of 1;
• Soundness—if the graph is not three colorable and the verifier follows the protocol,
then no matter how the prover plays and at each round, the verifier will reject with a
probability of at least m1 ;
• Zero-knowledge—the only information received by the verifier at each round is a pair
of randomly selected elements, and the prover only answers cipher colors.
Isomorphic graphs are used when the algorithm does a nodes permutation before
encrypting them to display the information at the verifier.

4.2. Encryption and Decryption


This section presents the results for the files of different categories, namely .JPG, .PDF,
.MP3, .ZIP, .XLS, and .DOC. Files were chosen at random, comprising various file sizes
and file types. Here, we present an analysis of 12 files, varying file sizes from 330 bytes to
8,649,167 bytes. The analysis compares encryption and decryption times, chi-square values,
entropy, and avalanche achieved (%). The algorithm works for any file because conversion
to byte-map is performed. In the encryption process, the header file is also modified to the
cipher file which does not exhibit information about the plain file.
Table 1 shows the file’s size, type, as well as the time of encryption and decryption for
each one.
Electronics 2022, 11, 613 8 of 13

Table 1. File size, decryption, and encryption time.

Source File File Type Encryption Decryption


Size (Byte) Time (S) Time (S)
1 159,726 .jpg 59.79029 43.2303643
2 526,241 .pdf 78.91665 78.500065
3 21,945 .jpg 6.10928 5.281383
4 42,127 .jpg 18.80239 18.437193
5 29,649 .xls 5.85605 5.5168359
6 113,630 .pdf 17.83326 18.91148
7 41,610 .doc 9.619935 10.464609
8 47,408 .jpg 14.97656 16.781949
9 8,649,167 .pdf 375.14071 364.25678
10 185,574 .mp3 12.85867 13.499593
11 757 .ZIP 0.095961 0.1871705
12 565,898 .ZIP 36.53161 35.850028

The entropy is described as the measurement of the unpredictability of data in the


information source. In other words, this means the measurement of randomness in data
which is calculated through Equation (1):
n
H ( X ) = − ∑ P( xi )logP( xi ) (1)
i =0

where:
x: discrete random variable;
P(x): probability density function of x.
A completely random stream would thus have high entropy. For a stream with a
highly random distribution of characters, the entropy should be close to 8 [33].
Another commonly used test to check for randomness in a stream of data is the chi-
square test which calculates the degree to which two given samples of data differ from
each other. The test tells the degree of confidence with which one can reject or accept a
hypothesis: 255
(Oi − Ei )2
X2 = ∑ (2)
i =0
Ei
where:
Ei : the frequency of a character in the encrypted file;
Oi : the frequency of a character in a uniform distribution.
The chi-2 test in this paper is used to measure the histogram uniformity. Furthermore,
the avalanche effect is measured using a statistical analysis of data. When an input is
slightly changed, the output changes drastically. If a bit in the plain text is flipped or
changed, then for an evident avalanche effect, almost half of the ciphertext bits are changed
in the ciphertext. A good encryption algorithm should always satisfy the following relation:

Avalanche effect > 50%

Table 2 shows the results obtained by using our system and RC4 algorithm. Most of
the entropy values are close to 8 and this means that, even if the previous symbols are
known, it is still impossible to predict the next character in the sequence. However, the
entropy decreases if the number of bytes to be encrypted is small. The avalanche values
obtained were greater than 0.5, which indicates that the output has drastic changes when
the input is slightly changed. Finally, the execution time is high when there is an extensive
input file or a big amount of evolution times of the CA.
Electronics 2022, 11, 613 9 of 13

Table 2. Entropy, chi-square value, and avalanche achieved.

Chi-Square Avalanche
Entropy
Value Achieved (%)
Proposed RC4 Proposed RC4 Proposed RC4
Algorithm Algorithm Algorithm Algorithm Algorithm Algorithm
1 7.98975191 7.9989 284.13432 240.19504 0.9959 0.9962
2 7.969346 7.99964 2664.0657 256.7372 0.996579 0.99613
3 7.8431466 7.9898 1670.2065 305.894 0.9951658 0.9965
4 7.9851687 7.9956 111.0691367 258.230 0.9958783 0.99582
5 7.9852211 7.99301 77.9890465 278.5256 0.99503 0.99568
6 7.9765496 7.9985 496.9716 225.897 0.9960992 0.995819
7 7.98867428 7.99846 85.1835 241.59396 0.99655 0.99582
8 7.927068 7.9963 858.9643723 238.8663 0.996365 0.99603
9 7.998741 7.990145 1930.6058 242.231 0.996062 0.99521
10 7.9934784 7.99905 216.205678 241.885 0.996068 0.99609
11 7.576585 7.9902 61.680728 236.2147 1.0 0.99761
12 7.9985631 7.996 140.576965 251.6407 0.9962466 0.99619

Decrypt
As a consequence of encrypting, we obtain a key file and an encrypted file. However,
if we want to decrypt, it is necessary to solve the authentication process, and subsequently,
with the key and the encrypted file, we can obtain the plain text. In Figure 6, a decrypt
diagram is shown.

Figure 6. Decryption diagram which shows the visual flow of the process.

5. Discussion
In this paper, a security system with good cryptographic properties because of the tools
used was developed. The amount of computer time it takes to run this algorithm is O(m2 n);
this makes it computationally efficient. It has a high-security level because the authentication
problems are NP-complete (in this case, graph 3 coloring); it is, we can verify the solution in
polynomial time, while for finding a solution an exponential time is necessary.
All the algorithms are linked; if an eavesdropper wanted to obtain the plain text,
they would need to have the ciphertext, the key, and pass the zero-knowledge proof.
Moreover, they would need to know the evolution rules and the number of times that
the cellular automata evolve; for this reason, the algorithm is better than some stream
algorithms [34–36].
Some applications for this work can be as a captcha; in another case, it can be used
when someone forgets their password and the person needs to prove that whoever is not
an impostor. In addition, if we wanted to send a private message, we only cipher the text,
and a correct entity could obtain the decrypted text; also, it can be a secure channel for
sharing information.
The algorithm works for any file because conversion to byte-map is performed. In the
encryption process, the header file is also modified to the cipher file which does not exhibit
information about the plain file; should we want to decrypt it, it is also necessary to solve
the authentication process, and subsequently, with the key and the encrypted file, we can
obtain the plain text.
Electronics 2022, 11, 613 10 of 13

6. Conclusions
In this paper, a novel framework was presented, in which the key to solving an NP-
complete problem is obtained; this provides not only authentication but also confidentiality
in security services. Another point is that, as shown in Table 1, the framework encrypts
different types of files, unlike in [13,37], but similarly, it works with cellular automata.
Moreover, the encryption time depends on the file size; in comparison with, [38] is faster
and has better avalanche achieved percentages (Table 2), so it is better because of the
efficiency of the diffusion mechanism. In other words, the encryption algorithm possesses
good diffusion characteristics. In the future, this concept may be extended to introduce
other services such as integrity and non-repudiation to build a complete network security
software service that helps provide absolute security for data transmission.
Compared to the RC4 algorithm (Table 2), we obtained better results in avalanche
values; i.e., diffusion efficiency is better. The proposed system has better results in chi-
square values when the file size is small because the bytes are more uniformly distributed
by the CA. The advantage of this framework is that the user must authenticate with a secret,
and the key is dynamically created for all files. If someone obtains the key of a previous
cipher file, they will only be able to decrypt the file if they pass the authentication test, and
the key will only work for that file. Entities that want to encrypt/decrypt similar files must
know the secret in order to be authenticated. In the case that multiple entities are required
to be present to perform the encryption process, the secret can be shared; each user has a
part necessary to do this.

Author Contributions: Conceptualization, E.C.-B.; methodology, G.T.-C.; software, E.C.-B.; valida-


tion, J.C.C.-E. and G.T.-C.; formal analysis, J.C.C.-E. and G.T.-C.; investigation, E.C.-B.; writing—
original draft preparation, E.C.-B.; writing—review and editing, G.T.-C. and J.C.C.-E. All authors
have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.
Acknowledgments: We gratefully thank CONACyT for financial support, and we also thank the simula-
tion and modeling laboratory for providing the equipment and knowledge for developing this research.
Conflicts of Interest: The authors declare no conflict of interest.

Appendix A
This section shows the steps with the images of the algorithms developed into an app.
First of all, the instructions are given to the user at the beginning. The user can perform
the authentication process or exit. This step is shown in Figure A1.

Figure A1. Starting application.

After the authentication process begins, the encrypted values of the vertex are shown
to the user. The user must give an existing edge of the graph as an answer. If the edge is
not in the graph, the system rejects the process and it finishes as shown in Figure A2.
Electronics 2022, 11, 613 11 of 13

Figure A2. Incorrect authentication.

If the user’s answer is correct (the edge is in the graph), the vector values which were
encrypted in the vertex are shown and the user must decide whether the values are correct
or not. This step is implemented in order to verify whether somebody has modified the
app to obtain some information from the user. It is shown in Figure A3.
Figure A4 shows the next step: if the test is approved, the encryption/decryption
process continues. The user selects the file and the action to perform. To decrypt, the user
needs to give the key to the process; otherwise, the key is obtained from the authentica-
tion process.
Finally, the encrypted or decrypted file is obtained and the user selects the directory to
save it. Some samples are obtained and saved, and the result is shown in Figures A5 and A6.

Figure A3. Authentication process.


Electronics 2022, 11, 613 12 of 13

Figure A4. Encryption/decryption process.

Figure A5. Results obtained during the encryption process of the .mp3 file.

Figure A6. Results obtained during the encryption process of the .jpg file.

References
1. Goldreich, O. Modern Cryptography, Probabilistic Proofs and Pseudorandomness; Springer Science & Business Media: New York, NY,
USA, 1998; pp. 154–196.
2. Miller, V.S. Use of Elliptic Curves in Cryptography; Conference on the theory and application of cryptographic techniques, Springer:
Berlin/Heidelberg, Germany, 1985; pp. 154–196.
3. Hankerson, D.; Menezes, A.; Vanstone, S. Guide to Elliptic Curve Cryptography; Springer Science & Business Media: New York, NY,
USA, 2006.
4. Jurišic, A.; Menezes, A. Elliptic curves and cryptography. Dr. Dobb’s J. 1997, 265, 26–36.
5. Delman, B. Genetic Algorithms in Cryptography; RIT’s Digital Media Library: Rochester, NY, USA, 2004.
6. Khan, F.; Bhatia, S. A novel approach to genetic algorithm based cryptography. Int. J. Res. Comput. Sci. 2012, 2, 7–10. [CrossRef]
7. Mishra, S.; Bali, S. Public key cryptography using genetic algorithm. Int. J. Recent Technol. Eng. 2013, 2, 150–154.
8. Pareek, N.K.; Patidar, V.; Sud, K.K. Cryptography using multiple one-dimensional chaotic maps. Commun. Nonlinear Sci. Numer.
Simul. 2005, 10, 715–723. [CrossRef]
9. Pisarchik, A.; Zanin, M. Chaotic map cryptography and security. Encryption Methods Softw. Secur. 2010, 19, 1–28.
10. Mazloom, S.; Eftekhari-Moghadam, A. Color image encryption based on coupled nonlinear chaotic map. Chaos Solitons Fractals
2009, 42, 1745–1754. [CrossRef]
11. Hamed, Y.; Ali, N. Enhanced RC5 Key Schedule Using One-Dimensional Cellular Automata for Audio File Encryption. Iraqi J. Sci.
2019, 60, 388–401.
12. Kamel, M. A genetic strategy to design cellular automata based block ciphers. Expert Syst. Appl. 2014, 17, 7958–7967.
13. Yong, W.; Yi, Z.; Qing, Z.; Zehui, L. Image encryption using partitioned cellular automata. Neurocomputing 2018, 275, 1318–1332.
14. Khan, S.; Han, L.; Lu, H.; Butt, K.; Bachira, G.; Khan, N. A New Hybrid Image Encryption Algorithm Based on 2D-CA, FSM-DNA
Rule Generator, and FSBI. IEEE Access 2019, 7, 81333–81350. [CrossRef]
15. Eslami, Z.; Kabirirad, S. A Block-Based Image Encryption Scheme Using Cellular Automata with Authentication Capability; AIP
Conference Proceedings; AIP Publishing LLC: Melville, NY, USA, 2019.
16. Jeyaram, B.; Radha, R.; Raghavan, R. New cellular automata-based image cryptosystem and a novel non-parametric pixel
randomness test: New cellular automata-based image cryptosystem and a novel non-parametric pixel randomness test. Secur.
Commun. Netw. 2016, 9, 3365–3377. [CrossRef]
17. Xingyuan, W.; Dapeng, L. A novel image encryption algorithm using chaos and reversible cellular automata. Commun. Nonlinear
Sci. Numer. Simul. 2013, 18, 3075–3085.
18. Abdo, A.; Shiguo, L.; Ismail, I.A.; Amin, M.; Diab, H. A cryptosystem based on elementary cellular automata. Commun. Nonlinear
Sci. Numer. Simul. 2013, 18, 136–147. [CrossRef]
19. Jeaneth, M.; Anderson, G.; Odemir, B. Chaotic encryption method based on life-like cellular automata. Expert Syst. Appl. 2012, 39,
12626–12635.
20. Abolfazl, Y.; Mohammad, H.; Masood, N. Color image encryption based on hybrid hyper-chaotic system and cellular automata.
Opt. Lasers Eng. 2017, 90, 225–237.
Electronics 2022, 11, 613 13 of 13

21. Ulam, S. Random Processes and Transformations. Proc. Int. Congr. Math. 1952, 2, 264–275.
22. Von Neumann, J. Theory of Self-Reproducing Automata; University of Illinois Press: Champaign, IL, USA, 1966.
23. Thambiraja, E.; Ramesh, G.; Umarani, D.R. A survey on various most common encryption techniques. Int. J. Adv. Res. Comput.
Sci. Softw. Eng. 2012, 2, 226–233.
24. Agrawal, M.; Mishra, P. A comparative survey on symmetric key encryption techniques. Int. J. Comput. Sci. Eng. 2012, 5, 877.
25. Ilachinski, A. Cellular Automata a Discrete Universe, 1st ed.; World Scientific: New York, NY, USA, 2001.
26. Gutowitz, H. Cryptography with Dynamical Systems. In Laboratoire d’Electronique; Springer: Dordrecht, The Netherlands, 1996.
27. Henk C.A. Fundamentals of Cryptology, 1st ed.; Kluwer Academic Publishers: New York, NY, USA, 2002; pp.2–25.
28. Pass, R. Alternative Variants of Zero-Knowledge Proofs. Ph.D. Thesis, Universitets Service US AB: Stockholm, Sweden, 2004.
https://www.diva-portal.org/smash/get/diva2:9472/FULLTEXT01.pdf (accessed on 20 December 2021).
29. Feng, L.; McMillin, B. A Survey on Zero-Knowledge Proofs. Adv. Comput. 2014, 94, 25–69.
30. Goldreich, O. Zero-Knowledge twenty years after its invention. IACR Cryptol. ePrint Arch. 2002, 2002, 186.
31. Steven, R.; Avi, W. Computational Complexity Theory; American Mathematical Society: Providence, RI, USA, 2004.
32. Dorne, R.; Hao, J. A new genetic local search algorithm for graph coloring. In International Conference on Parallel Problem Solving
from Nature; Springer: New York, NY, USA, 1998; p. 754.
33. Malhotra, P. Detection of Encrypted Streams for Egress Monitoring; Iowa State University: Ames, IA, USA, 2007.
34. Klein, A. Attacks on the RC4 stream cipher. Des. Codes Cryptogr. 2008, 48, 142–149. [CrossRef]
35. Akhyar, F.; Nasution, S.; Surya, M.; Purboyo, T. Rabbit algorithm for video on demand. In Proceedings of the 2015 IEEE Asia
Pacific Conference on Wireless and Mobile (APWiMob), Bandung, Indonesia, 27–29 August 2015; pp. 208–213.
36. De Canniere, C.; Preneel, B. New Stream Cipher Designs; Springer: Berlin, Germany, 2008; pp. 244–266.
37. Contreras, J.; Ramírez, M.; Aboytes, M. Image Encryption System Based on Cellular Automata and S-Box. Res. Comput. Sci. 2019,
10, 153–161. [CrossRef]
38. Manna, S.; Dutta, S. A Stream Cipher based Bit-Level Symmetric Key Cryptographic Technique using Chen Prime Number. Int. J.
Comput. Appl. 2014, 12, 975–8887. [CrossRef]

You might also like