0% found this document useful (0 votes)
36 views10 pages

M3notes For Cse

m3 notes

Uploaded by

MVJCE IDCARD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views10 pages

M3notes For Cse

m3 notes

Uploaded by

MVJCE IDCARD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/355084570

Data Security: A New Symmetric Cryptosystem based on Graph Theory

Article in International Journal of Advanced Computer Science and Applications · January 2021
DOI: 10.14569/IJACSA.2021.0120982

CITATION READS
1 394

3 authors, including:

Soumia Ziti Fouzia Omary


Mohammed V University in Rabat Mohammed V University
138 PUBLICATIONS 1,487 CITATIONS 61 PUBLICATIONS 304 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Soumia Ziti on 25 October 2021.

The user has requested enhancement of the downloaded file.


(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

Data Security: A New Symmetric Cryptosystem


based on Graph Theory

Khalid Bekkaoui, Soumia Ziti, Fouzia Omary


Intelligent Processing and Security of Systems(IPSS)
Faculty of Sciences, Mohammed V University
in Rabat, Morocco

Abstract—Sharing private data in an unsecured channel is Over the years, cryptography has continued to be improved
extremely critical, as unauthorized entities can intercept it and and has progressively became an indispensable part for pri-
could break its privacy. The design of a cryptosystem that fulfills vate data sharing. All contributions dedicated to this field of
the security requirements in terms of confidentiality, integrity research have aroused great interest. In the literature, cryptog-
and authenticity of transmitted data has therefore become an raphy can be classified into three categories: Symmetric Key
unavoidable imperative. Indeed, a lot of work has been carried
out in this regard. Although many cryptosystems have been
Cryptography, which is an encryption system where both the
proposed in the published literature, it has been found that transmitter and the recipient of the message use one common
their robustness and performance vary relatively from one to key such as DES [2], AES [3], or IDEA [4], to encrypt and
another. Adopting this reflection, we address in this paper the decrypt the messages. The second category is Asymmetric
concept of block cipher, which is a major cryptographic solution Key Cryptography. In this system, a couple of keys(private
to guarantee confidentiality, by involving the properties of graph and public keys) are used in order to encrypt and decrypt
theory to represent the plaintext message. Our proposal is in the messages such as RSA [5], ElGamal [6], Diffie-Hellman
fact a new symmetric encryption block cipher that proceeds [7], etc. The last category is Hybrid key Crypthography,
by representing plaintext messages using disjoint Hamiltonian Which consist of using an encryption mode that utilizes both
circuits and then dealing with them as an adjacency matrix in a symmetric and asymmetric public key encryption. This method
pre-encryption phase. The proposed system relies on a particular
sub-key generator that has been carefully designed to produce
benefits from public key cryptography for key sharing and from
the encryption keys according to the specifications of the system. the speed of symmetric encryption for message encryption.
The obtained experimental results demonstrate that our proposed Nowadays, cryptology is able to handle a substantial set of
cryptosystem is robust against statistical attacks, particularly mathematical tools, that allowed for improvements in terms
the DIEHARD test, and presents both good confusion and good of efficiency and performance. In particular, graph theory is a
diffusion. field that is considered very promising in this regard, since it
provides concepts that could be useful in solving problems in
Keywords—Cryptosystem; graph theory; hamiltonian circuits;
every network related areas.
adjacency matrix; block cipher; encryption
Graph theory in mathematics refers to the study of graphs,
which are a major object of discrete mathematics. Generally,
I. I NTRODUCTION a graph is represented as a set of vertices linked by edges.
Cryptography is a component of cryptology that is based on They are thus mathematical structures used for modelling
a number of methods and principles for converting a readable pair-wise relationships between objects. It can be found in
message to a totally unreadable one. This field is dealing with road networks, electrical circuits, constellations, etc. Graphs
many security problems such as the confidentiality of commu- provide a way of thinking that can be used for modeling a
nications via non-secure channels, the privacy of individuals, vast range of problems. They are the foundation of numerous
the data storing on unsecured mediums, and so on. Cryptogra- computer programs that allow communication and advanced
phy refers to the study and analysis of data encryption systems technological processes. The seven bridges of Konigsberg
intended to reduce the impact of hackers and to prevent, as (1736) [8] is a mathematical problem well known for having
best as possible, any unauthorized attempts to gain access to established the foundations of the theory of graphs. Graph
these confidential data. The main principles of information theory is a relatively new concept that has been successfully
security, notably confidentiality, integrity, authentication, and incorporated and has enabled the development of stronger
non-repudiation [1]. encryption algorithms that have proven to be difficult to break,
even for the latest software solutions. In fact, it consists of
Confidentiality is a crucial part of security. It can be modeling encryption problems by graph representation, so
ensured by an encryption process, whereby the data becomes that they eventually become problems in graph theory where
non-intelligible to any non-authorized parties trying to gain the solutions are usually well-known. Although solutions to
access to it. The idea behind of encryption process is to graph problems can be fairly easy and efficient (with respect
transform a plaintext into a ciphertext, so only authorized to the time required for computational processing which is
parties can obtain the message in its original format by revers- reasonable), they can also be rather difficult (relative to the
ing the encryption process, known as decryption. Technically, processing time increases exponentially). This resulted in the
decryption should be extremely difficult for any unauthorized application of concepts introduced in graph theory to large-
and unqualified parties attempting to perform it. scale cryptography, since many NP-hard problems are derived
www.ijacsa.thesai.org 742 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

from this theory. III. R ELATED W ORK


Considering the above mentioned points, the design of The application of graph theory in cryptography has be-
cryptosystems based on the concepts of graph theory is of come more emergent. However various encryption techniques
utmost importance. In this work, we present a new cryptosys- have been proposed in this context.
tem that takes advantage of the principles of graph theory, A technique has been proposed by Amudha et al [10] that
which enable a high degree of security while maintaining the encodes clear messages through the Euler graph, the key used
performance of data processing. The main idea of our approach to protect the data in this approach is a kind of Hamilton
is to represent the plaintext with all disjoint Hamiltonian circle. The authors in [11] sequentially construct three different
circuits as a pre-encryption phase, then using our own sub- graphs on the basis of an unconventional mapping, conjectured
keys generator following the cipher block chaining mode of to be a one-way trapdoor function and designed specifically
operation to encrypt the plaintext. for graph structures. Some work focuses on the application of
The rest of the paper is structured as follows. Section 2 graph theory principles in computer networks and its poten-
presents preliminary knowledge. Section 3 presents a literature tial to tackle the challenges of provisioning in secure cloud
review of related work. Section 4 details the proposed scheme. computing environments [12]. Two graph based public key
Security analysis and experimental results are elaborated in cryptosystems have been suggested to secure sensitive Data in
Section 5, and lastly, the conclusion and future works is given the work of Sensarma et al [13], where one is based purely on
in Section 6. the properties of matrices, while the other is based on graph
codes. In the work described in [14], the authors proposed a
II. P RELIMINARY K NOWLEDGE hybrid Cipher Block Chaining encryption system for e-mail
protection. The suggestion was predicated on the integration
• Graph: A graph G is a set of points called vertices V of encryption technologies. Yousif et al [15], introduced a
and a set of lines called edges E that connect some process to produce a new key on the basis of chaotic maps
vertices together. The graph is defined as a set of that are utilized to encode images. Within the work in [16], the
vertices and edges that form a pair G = (V, E). emphasis is on the possibility of employing the Euler graph as
• Simple graph: A graph in which each pair of vertices a method object used in the remote method invocation (RMI)
is linked by at the very most one edge and where no technique.
vertex has a loop. Among the most recent works, we mention the work
• Undirected Graph: An undirected graph G is a pair presented in [17], where a block cipher system has been
(V, A) where V is a finite set of vertices and A is a proposed using disjoint Hamiltonian circuits to present the
set of unordered pairs of vertices. Also, loops are not data as a graph. Also in [18], a double vertex graph has been
allowed in undirected graphs. suggested to encrypt a word. At first, the given message was
encrypted using the encryption table. The plaintext was then
• Cycle: A chain whose start and end nodes are the
converted into a path graph. From the latter, a double vertex
same and which does not use the same link more than
graph is constructed. We also mention the work [19], in which
once.
the original message is converted into several graphs. The
• Hamiltonian Path: A path that passes once and only ciphertext is obtained from the projection of the adjacency
once through each of the vertices of an undirected matrices representing the graphs into the secret key. A number
graph. of other proposals were suggested in the same thematic area
• Hamiltonian Circuit: simple cycle passing through [20], [21].
all the vertices of a graph one and only once. The originality of our work lies in the fact that our proposed
• Adjacency Matrix: Let G be an undirected graph with system was able to blend both the concept of block ciphers,
m vertices from 1 to m. We call the adjacency matrix which is a major category of symmetric cryptography, and
of graph the matrix A = (ajk ) where ajk is the total graph theory properties for representing plaintext, in particular
number of edges joining vertex j to vertex k: Hamiltonian circuits, unlike the majority of works from the
 literature that rely only on graph theory properties to conceive
ajk = w if and only if j and k are adjacent. their encryption systems.
ajk = 0 if not.
(1) IV. P ROPOSED A PPROACH
with w is the weight of the edge (j, k).
The primary aim that drives the system put forward in
this paper, is to propose a robust variant of the encryption
• Blum Blum Shub (BBS): is a pseudo-random number scheme proposed in [17] while maintaining the performance
generator first proposed in [9] levels. The main concept on which our approach is based
xn+1 = x2n mod M (2) is inspired by the divide-and-conquer design method, which
consists in dividing an initial problem into sub-problems
With M = pq the product of two large primes p and and then addressing every component of the resulting subset
q. independently. The final solution of the initial problem is then
The complexity of the factorization of M is the deduced from the solutions found to the sub-problems.
main basis for the security of this generator, which
means that the two primes must be carefully chosen The system described in this work has been designed
to guarantee robustness. in such a way that it takes into account the complexity of
www.ijacsa.thesai.org 743 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

n=78
the processing that the plaintext messages are subjected to Plainntext
during their encryption process. Indeed, this is the objective
of the contribution in this paper, which is to improve the
processing of the plaintext by making it more difficult and Block0 Block1 Block2 Block3
more complex than [17], using mainly all the Hamiltonian
circuits that represent the plaintext.
The scheme proposed in [17] used a block of 25-characters
length, which can be represented by 2 disjoint Hamiltonian G0= G2= G3=
G1=
circuits in a graph of order 13, given that a graph of order
13 contains 6 disjoint Hamiltonian circuits (Theorem 1). In
contrast to [17], which used only 2 of the 6 circuits, the M0= M1= M2= M3=
concept put forward in this approach makes use of all the
disjoint Hamiltonian circuits of the graph (6 circuits), which
IM = M’0 = M’1 = M’2= M’3=
allows the representation of blocks with 78-characters length
in a single graph.
C0= M’0K0 C1= M’1K1 C2= M’2K2 C3= M’3K3

Theorem 1: In a complete graph with n vertices there are


(n − 1)/2 edge-disjoint Hamiltonian circuits, if n is an odd
Cipher text
number strictly greater than 3 [22]. 132 (4)

Considering a message which consist of 78 characters, n=78


the formula for splitting into blocks in [17] would be as Plainntext
follows: 78 = 25 × 3 + 3. This means that four blocks will
Block0
be transformed into four adjacency matrices. The formula used
in the proposed algorithm is limited to a single block, which
in turn will be partitioned into six sub-blocks to form a single
graph with six disjoint Hamiltonian circuits, thus forming
a single adjacency matrix (F IG . 1 illustrates the difference
between both systems).
G0=
Generally, the pre-encryption process of the plaintext mes-
sage involves several steps: First the plaintext is converted
into ASCII values and then divides into several blocks of size
78 (referring by Blocki ). This operation uses the following
formula: n = 78k +r, where n is the size of the plaintext, r ( r
M0=
∈ [0,77)] the remainder of the division of n over 78) represents
the remainder of the plaintext after block partitioning, and k
is the number of blocks (refers to the quotient). MI= M’0 =

k′ = k C0= M’0K0

If the division is exact.
(3)
k′ = k + 1 otherwise.
Cipher text
′ 132
Where k represents the total number of blocks resulting
from the division. Each Blocki is partitioned into 6 sub-blocks Fig. 1. Comparaison between the Encryption Process in [17] and the
of size 13(each sub-block is represented by subBlockij ), Proposed One.
which are then converted into Hamiltonian circuits where the
weights of the edges of the graph Gi are represented by the
ASCII values of the characters that compose them. Finally, the
resulting graph is converted into an adjacency matrix Mi .
in the process allows the generation of a vector Si of size
The main process involving in our proposed system are 13 from N using BBS generator. The fourth and final step
presented in the following: uses the resulting Si to generate the sub-keys Ki as a square
matrix of order 13. The all sub-keys Ki (i = 0,. . ., k’-1) that are
A. Key Generation / Re-Generation Algorithms generated constitute the set SKk′ . This process is illustrated
The generation of the sub-key Ki occurs in four steps. The in F IG . 2.
first involves the random selection of a character Char from
the Blocki . The second step consists in using the position The regeneration of Ki during the decryption process
corresponding to the ASCII value of Char in two ways, to begins with the use of V P to recreate a key Key of size
construct the vector of positions V P that is necessary for the 132 k ′ from KEK. Key is then divided into sub-vectors Si of
decryption, as well as to recover the value N located in the size 13 which are subsequently used to generate the sub-keys
same position in the master key KEK (of size 256), which Ki as square matrices of order 13. This process is described
will be used as the seed of the BBS generator. The third step in F IG . 3.
www.ijacsa.thesai.org 744 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

Blocki Algorithm 1: Sub-keys generator in encryption


process (GenerateSubKeys)
addToVP
Char Vector of Positions VP input : Clear message of n characters CM Cn ,
getNbrFromKEK master key KEK, k’ number of blocks
KEK
Key Encryption Key output: sub-keys SKk′ , the vector V P
1 begin
N /* Converts each character of the message
into its ASCII value. */
Pseudo-random generator BBS 2 CM An ← convertMessage(CM Cn , n);
/* Splits the message into k’ Blocki
Si forming the set BlockSetk′ , where
BlockSetk′ = {Block0 ,. . .,Blockk′ −1 }. */
Pseudo-random generator BBS 3 BlockSetk′ ← parseMessage(CM An , k ′ );
4 for element Blocki of the set BlockSetk′ do
/* Randomly selects a character Char
Ki = from Blocki . */
5 Char ← getCharFromBlock(Blocki );
/* Feeds the vector V P with the ASCII
value of the character Char. */
Fig. 2. Sub-keys Generator in Encryption Process.
6 V P ← addToVP(Char);
/* Returns the content in the position
p of the master key KEK, where p
generatKey
represents the ASCI code of the
character concerned. */
VP Key Encryption Key 7 N ← getNbrFromKEK(KEK, Char);
/* Generates from the seed N a vector
BBS Si of size 13. */
8 Si ← generateSeed(N, BBS);
13(K’)
/* Takes as input the vector Si and
Key returns the sub-key Ki as a square
matrix of order 13. */
S0 S1 S2 … Sk’-3 Sk’-2 Sk’-1
9 Ki ← generateSubKey(Si , BBS);
/* Feeds the set SKk′ with the
BBS BBS BBS
… BBS BBS BBS
sub-key Ki . */
10 SKi ← putSubKey(Ki );
11 end
… 12 end

K0 K1 K2 … Kk’-3 Kk’-2 Kk’-1

pseudorandom generator to compute the cipher Ci of the


Fig. 3. Sub-keys Generator in Decryption Process. current block:

Ci = Mi′ ⊕ Ki (5)
B. Encryption Process
The encryption process begins with the pre-encryption step Since the first block does not have an antecedent. We gen-
described above. Cipher block chaining (CBC) is used as mode erate an random matrix referring to IM (initialization matrix)
of operation in our approach. The chaining uses a feedback which allows to perform the XOR operation with M0 . Each
method, in the sense that the result of the encryption of the encrypted block consequently depends not only on the corre-
previous block Ci−1 is reused for the purpose of encrypting sponding plaintext block, but also on all the encrypted blocks
the current block Mi . More specifically, an exclusive or (XOR) that precede it. The rows of the matrix Ci are concatenated to
operation is applied between the current block Mi and the form a vector eBlocki of size 132 , representing each encrypted
previous block of ciphertext Ci−1 as shown below: block.
The resulting vectors eBlocki (i = 0,. . ., k’-1) generated
from all blocks are then concatenated to form a single vector
Mi′ = Ci−1 ⊕ Mi (4)
EM of size 132 k ′ . The encryption process, as shown in F IG . 4,
ends with the transmission of the encrypted message EM in
A second XOR operation is then performed between the addition to the vector V P that is related to the decryption
result of operation (3) and the sub-key Ki generated by the process.
www.ijacsa.thesai.org 745 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

Algorithm 2: Sub-keys generator in decryption Algorithm 3: Encryption Algorithm Using Disjoint


process (GenerateSubKeys) Hamiltonian Circuits
input : master key KEK, the vector of positions input : Clear message of n characters CM Cn ,
VP master key KEK, Initialization Matrix IM
output: sub-keys SKk′ of size 13
output: Encrypted message EM
1 begin
/* Generates a key Key of size 13k’ from 1 begin
the vector of positions V P and the 2 SKk′ ← GenerateSubKeys(CM Cn , KEK, k ′ );
master key KEK. */ 3 (IV-A).
2 Key ← generateKey(KEK, V P ); /* Converts each character of the message
/* Divides the key Key into k’ vectors Si into its ASCII value. */
(i = 0,. . ., k’-1). */ 4 CM An ← convertMessage(CM Cn );
3 Sk′ ← parseKey(Key); /* Splits the message into k’ Blocki forming
4 for element Si of the set Sk′ do the set BlockSetk′ , where
/* Takes as input the vector Si and BlockSetk′ = {Block0 ,. . .,Blockk′ −1 }. */
returns the sub-key Ki as a square 5 BlockSetk′ ← parseMessage(CM Cn );
matrix of order 13. */ 6 for element Blocki of the set BlockSetk′ do
5 Ki ← generateSubKey(Si ); /* Divides each block Blocki into six
/* Feeds the set SKk′ with the sub-blocks subBlockij (j = 0,. . .,5) of
sub-key Ki . */ size 13, all forming the set
6 SKi ← putSubKey(Ki ); subBlockSeti , where
7 end subBlockSeti = {subBlocki0 ,. . .,subBlocki5 }.
8 end */
7 subBlockSeti ← parseBlock(Blocki );
/* Converts the sub-blocks into disjoint
n
Plainntext hamiltonian circuits in a graph G.
*/
Block0 Blockk’-1
8 Gi ← blockToGraph(subBlockSeti , 13);
… /* Transforms the graph Gi into an
adjacency matrix Mi of order 13. */
… 9 Mi ← graphToMatrix(Gi );
10 if i=0 then
G0=

Gk’-1=
11 M0′ ← IM ⊕ M0 ;
12 else
13 Mi′ ← Ci−1 ⊕ Mi ;
14 end
M 0= Mk’-2= Mk’-1= 15 Ci ← Mi′ ⊕ SKi ;
/* Concatenates the rows of the matrix
IM = M’0 = M’k’-2= M’k’-1= Ci to form the vector eBlocki of size
132 . */
C0= M’0K0 Ck’-2= M’k’-2Kk’-2 Ck’-1= M’k’Kk’-1 16 eBlocki ← transformMatixToVector(Ci );
17 end
/* Forms a single vector EM of size 132 k′
Cipher text
132 (k’)
by concatenating the resulting vectors
eBlocki (i = 0,. . ., k’-1). */
Fig. 4. Encryption Scheme.
18 EM ← concatenateEncryptionBlock(eBlockk′ );
19 end

C. Decryption Process
with m is the size of the ciphertext.
In general, the process of decryption corresponds to the
The sub-key generation algorithm presented in A LGO -
process of encryption performed in reverse order (A LGO -
RITHM 2 makes use of the provided vector V P to produce
RITHM 4). In the decryption process described in this paper,
a key of size 132 k ′ from the master key KEK. Each block
the ciphertext EM refers to the input of the algorithm. EM
Ci (i = 0,. . ., k’-1) is decrypted using its own sub-key Ki using
is decomposed into k ′ vectors (eBlocki ) and then gathered to
the following formula:
constitute the set eBlockSetk . The eBlocki (i = 0,. . ., k’-1)
are subsequently transformed into a matrix Ci . The number of
blocks k ′ is calculated as follows: Mi = Ci−1 ⊕ Mi′ (7)

k ′ = m ÷ 132 (6) Where


www.ijacsa.thesai.org 746 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

Algorithm 4: Decryption Algorithm Using Disjoint


Mi′ = Ci ⊕ Ki (8) Hamiltonian Circuits
input : Encrypted message EM , master key KEK,
and the vector of positions V P
output: Clear message of n characters CM Cn

M0 = IM ⊕ M0′ (9) 1 begin


2 SKk′ ← GenerateSubKeys(KEK, V P );
3 (IV-A).
At this stage, the decrypted blocks Mi are transformed into /* Divides the encrypted message into
a graph Gi and then into Blocki . Finally, the plaintext message k’eBlocki wich are then concatenate to
is formed by concatenating the Blocki (i = 0,. . ., k’-1) as shown form a set eBlockSetk′ . */
in F IG . 5. 4 eBlockSetk′ ← parseEncryptedMessage(EM );
5 for element eBlocki of the set eBlockSetk′ do
/* Form the matrix Ci of order 13 from
Cipher text
the vector eBlocki . */
6 Ci ← transformVectorToMatrix(eBlocki )
IM= C0= C1= … Ck’-2= Ck’-1= 7 Mi′ ← Ci ⊕ Ki ;
8 if i = 0 then
9 M0 ← IM ⊕ M0′ ;
M’0 = C0K0 M’1 = C1K1 … M’k’-2 = Ck’-2Kk’-2 M’k’-1 = Ck’-1Kk’-1
10 else
11 Mi ← Ci−1 ⊕ Mi′ ;
M’0 = M’1 = … M’k’-2 = M’k’-1 =
12 end
/* Transforms the adjacency matrix Mi
into a graph Gi . */
M0= M1= … Mk’-2= Mk’-1= 13 Gi ← matrixToGraph(Mi );
/* Returns the Blocki represented by the
disjoint hamiltonian circuits inside
G0= G1= … Gk’-2 = Gk’-1 = the graph Gi . */
14 Blocki ← graphToBlock(Gi );
15 end
Block0 Block1 … Blockk’-2 Blockk’-1 /* Forms a single block that forms the
plaintext message by concatenating the
resulting blocks Blocki (i = 0,. . ., k’-1).
Plainn text */
16 CM Cn ← concatenateBlock(Blockk′ );
Fig. 5. Decryption Scheme. 17 end

V. S ECURITY A NALYSIS AND E XPERIMENTAL R ESULTS probability of half (this is referred to as the strict avalanche
criterion). Accordingly, the used equation (10) is:
The evaluation of the encryption system addressed the
reliability of the suggested algorithm. For this purpose, we bitsdif f = (1 ÷ (132 × 16) × w(C ⊕ C ′ ) (10)
study the system reaction in terms of performance and security = (1 ÷ (2704) × w(C ⊕ C ′ ) (11)
according to fundamental criteria. For which we also perform
different statistical tests. This evaluation is described in the Where w is the hamming weight, C and C ′ are respectively
following sections. the original and modified inputs, and the value 16 refers to the
number of bits representing each element in the cipher.
A. Confusion and Diffusion Tests
B. Plaintext Sensitivity Test
Diffusion and confusion are very important as aspects
of the functioning of a secure encryption which were first The diffusion property is intended to produce an avalanche
identified in 1949 by Claude Elwood Shannon [23]. In his effect [24] between the plaintext and the encrypted messages.
original definitions: The sensitivity test of the bit change in the plaintext is used
Confusion means making the relationship between key and to verify the diffusion property of a particular algorithm.
ciphertext as complicated and as involved as is feasible, Given pairs of plaintext and secret keys, we generate the
whereas in this case refers to the property that redundancy ciphertext corresponding to each pair (plaintext, secret key)
in the plaintext’s statistics is “dissipated” in the ciphertext’s through our cryptosystem, changing one or more bits (Know-
statistics. ing that a change at character level implies a change of bit)
Diffusion is related to the reliance of the output bits upon in the randomly generated plaintext, and by retaining the key
the input bits. In a cipher with proper diffusion, the changing unchanged.
of an input bit is expected to change every output bit with a Subsequently, we calculate the average of the percentage of
www.ijacsa.thesai.org 747 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

bit difference by the equation (10) as illustrated in the F IG . 6.


52
Over 50% of the bits in the cipher text are changed. We can Our Algorithme
clearly see that the average of the percentages of bit difference 51.5 AES-128

is between 48.16% and 51% for our encryption system and 51


between 47.1% and 50.80% for AES-128. These percentages

Average of bits difference percentage


demonstrate that our encryption system offers a good diffusion 50.5

compared to AES-128. 50

49.5

52
49
Our Algorithme
51.5 AES-128
48.5

51
48
Average of bits difference percentage

50.5
47.5

50
47

49.5
46.5
0 1 2 3 4 5 6 7 8 9 10 11
49 Number of modified bites respect to the original key

48.5
Fig. 7. Number of Modified Bits with respect to the Original Key.
48

47.5

47 DIEHARD tests. The DIEHARD tests check the p-value of


46.5
the values generated randomly, with the p-value in the range
0 1 2 3 4 5 6 7 8 9 10 11 [0.025, 0.975]. The average values found are summed up in
Number of modified bites respect to the original plainblock
TABLE I. The results indicate that the bitstream generated
with our encryption system successfully passed all DIEHARD
Fig. 6. Number of Modified Bits with respect to the Original Plaintext.
tests. Moreover, our encryption system shows a satisfactory
and statistically indistinguishable random behavior.

C. Key Sensitivity Test E. Brute Force Attack


The confusion property establishes a relation between the Brute force attacks are a mean to get all possible key
key and the ciphertext. The key sensitivity test ensures this arrangements with a fast prediction tool. Assuming that a high-
property. Indeed, we consider a set of pairs of plaintext and performance machine that spends 10−10 seconds on testing the
secret keys. Each pair is encrypted by applying the proposed validity of every key is used, and that the numbers entailed in
cryptosystem. Then, we modify one or more bits in the the master key range from 1 to 1000.
different randomly generated keys while the clear text still Given that algorithm has 1000256 potential keys. A brute force
fixed. Afterward we calculate the average of the percentage of attack would require about 10−10 × 1000256 seconds to find
bit difference by applying the equation (10). the appropriate key. Therefore, a brute force attack with an
F IG . 7 represents the results obtained by using our encryp- exhaustive search over the key possibility space is not feasible
tion system and our generator to produce the encryption keys. in a reasonable amount of time.
We can notice that more than 50% of the bits are modified. To find a 78-character message when a single block is
Specifically, the average percentage of bit difference is between used, it normally takes 1000 possibilities to find one of the
49.64% and 50.79% for our encryption system and between master key numbers, which will represent the seed of the BBS
48.25% and 50.73% for AES-128. Thus, according to the generator involved in producing the S0 vector. However, the
experimental results, it can be said that the key generation prime numbers used as the input parameters for the generator
via our algorithm is more robust than AES-128. are not easily determined (due to factorization problems). As
a result, it is nearly impossible to figure out the sub-key if the
D. Statistical Tests pq product is large enough.
In order to study the quality of the random generation of
F. Time Analysis
the suggested encryption block cipher, we apply the well-
known DIEHARD test [25]. The primary objective of this Table II represents the performance test of our cryptosys-
test is to demonstrate whether our cryptosystem is able to tem, compared to other known block ciphers such as triple DES
withstand statistical attacks. In other terms, the output of a [26] and AES [27] in terms of their CPU time consumption.
secure block cipher must be indistinguishable statistically from The computations are run on a computer with on an Intel
a random output using the encryption function. To perform Core i7-6600U processor, 64-bit OS, 2.81 GHz with 20 GB
this test, a randomly generated cipher sequence is initially of RAM. It can be seen from TABLE II that our algorithm
binarized to generate a bitstream of over 10 MB. Thereafter, can achieve good results in terms of run time over the other
the bitstream is analyzed statistically by putting it under the standard encryption systems.
www.ijacsa.thesai.org 748 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

TABLE I. D IEHARD T EST also investigate other properties of graph theory for a more
discriminating and robust representation of the data.
Test Name P-value Interpretation
R EFERENCES
diehard bitstream 0.59537390
diehard squeeze 0.97442749 [1] A. J. Menezes, J. Katz, P. C. Van Oorschot, and S. A. Vanstone,
diehard sums 0.11133210 Handbook of applied cryptography. CRC press, 1996.
diehard count 1s str 0.60934773 [2] P. FIPS, “81, des modes of operation,” Issued December, vol. 2, p. 63,
diehard count 1s byt 0.78478421 1980.
diehard parking lot 0.55915630 [3] V. Rijmen and J. Daemen, “Advanced encryption standard,” Proceedings
diehard birthdays 0.03222200 of Federal Information Processing Standards Publications, National
Institute of Standards and Technology, pp. 19–22, 2001.
diehard operm5 0.75636037
diehard oqso 0.33566335
[4] W. Meier, “On the security of the idea block cipher,” in Workshop on
the Theory and Application of of Cryptographic Techniques. Springer,
diehard dna 0.45051943
1993, pp. 371–385.
diehard 2dsphere 0.53656799
[5] N. P. Smart, “The “naive” rsa algorithm,” in Cryptography Made Simple.
diehard 3dsphere 0.62980562
Springer, 2016, pp. 295–311.
diehard rank 32x32 0.40775458
[6] ——, “Public key encryption and signature algorithms,” in Cryptogra-
diehard rank 6x8 0.45554634 phy Made Simple. Springer, 2016, pp. 313–347.
diehard opso 0.44037399
[7] A. J. Menezes, J. Katz, P. C. Van Oorschot, and S. A. Vanstone,
diehard runs 0.86351847 PASSED Handbook of applied cryptography. CRC press, 1996.
diehard craps 0.15275419
[8] G. Alexanderson, “About the cover: Euler and königsberg’s bridges: A
rgb bitdist 0.69014502 historical view,” Bulletin of the american mathematical society, vol. 43,
rgb minimum distance 0.57113046 no. 4, pp. 567–573, 2006.
rgb permutations 0.60422228 [9] L. Blum, M. Blum, and M. Shub, “A simple unpredictable pseudo-
rgb lagged sum 0.60927830 random number generator,” SIAM Journal on computing, vol. 15, no. 2,
rgb kstest test 0.26054914 pp. 364–383, 1986.
dab bytedistrib 0.68169231 [10] P. Amudha, A. C. Sagayaraj, and A. S. Sheela, “An application of graph
dab dct 0.25149694 theory in cryptography,” International Journal of Pure and Applied
dab filltree 0.88848873 Mathematics, vol. 119, no. 13, pp. 375–383, 2018.
dab filltree2 0.29185197 [11] S. G. Akl, “The graph is the message: design and analysis of an
dab monobit2 0.74899931 unconventional cryptographic function,” in From Parallel to Emergent
sts monobit 0.68441660
Computing. CRC Press, 2019, pp. 425–442.
sts runs 0.37246909 [12] K. D. Rangaswamy and M. Gurusamy, “Application of graph theory
sts serial 0.50145101
concepts in computer networks and its suitability for the resource
provisioning issues in cloud computing-a review.” J. Comput. Sci.,
marsaglia tsang gcd 0.47467308
vol. 14, no. 2, pp. 163–172, 2018.
[13] D. Sensarma and S. S. Sarma, “Application of graphs in security,” Inter-
national Journal of Innovative Technology and Exploring Engineering,
TABLE II. E NCRYPTION T IME C OMPARISON BETWEEN OUR B LOCK vol. 8, no. 10, pp. 2273–2279, 2019.
C IPHER AND OTHERS B LOCK C IPHERS USING D IFFERENT M ESSAGE S IZE [14] S. H. Hashem, “Proposal hybrid cbc encryption system to protect e-
mail messages,” Iraqi Journal of Science, vol. 60, no. 2, pp. 157–170,
AES 3DES 2019.
Message Size (Kilo Byte) Our encryption algorithm
(ms) (ms) [15] A. Yousif and A. H. Kashmar, “Key generator to encryption images
3 248.07 247.47 4.9 based on chaotic maps,” Iraqi Journal of Science, vol. 60, no. 2, pp.
10 951.2 614.9 10.4 362–370, 2019.
20 1972 1096 21.2 [16] T. A. Khaleel and A. A. Al-Shumam, “A study of graph theory
applications in it security,” Iraqi Journal of Science, vol. 61, no. 10,
pp. 2705–2714, 2020.
[17] K. Bekkaoui, S. Ziti, and F. Omary, “A robust scheme to improving
VI. C ONCLUSION AND F UTURE W ORK security of data using graph theory,” International Journal of Advanced
Computer Science and Applications, vol. 11, no. 5, 2020.
The work presents a new cryptosystem that takes advantage
[18] C. Beaula and P. Venugopal, “Cryptosystem using double vertex graph,”
of the principles of graph theory, which enable a high degree of Indian Journal of Science and Technology, vol. 13, no. 44, pp. 4483–
security while maintaining the performance of data processing. 4489, 2020.
Our proposed encryption block cipher using in particular [19] P. Perera and G. Wijesiri, “Encryption and decryption algorithms in
the disjoint Hamiltonian circuits that have been adopted to symmetric key cryptography using graph theory,” Psychology and
represent the plaintext in a pre-encryption phase. the process Education Journal, vol. 58, no. 1, pp. 3420–3427, 2021.
makes use of a specific sub-key generator that has been set up [20] S. G. Akl, “How to encrypt a graph,” International Journal of Parallel,
to generate the encryption keys according to the requirements Emergent and Distributed Systems, vol. 35, no. 6, pp. 668–681, 2020.
of the proposed system. We have performed different statistical [21] P. Venugopal, “Encryption using double vertex graph and matrices,”
Solid State Technology, vol. 64, no. 2, pp. 2486–2493, 2021.
tests, specifically the DIEHARD, confusion and diffusion tests
[22] N. Deo, Graph theory with applications to engineering and computer
to prove the security and performance of our cryptosystem. The science. Courier Dover Publications, 2017.
experiments results proved the good behaviour of our proposed
[23] C. E. Shannon, “Communication theory of secrecy systems,” The Bell
design in terms of robustness and CPU time compared to 3DES system technical journal, vol. 28, no. 4, pp. 656–715, 1949.
and AES. In a future work, we intend to use another pseudo- [24] J. C. H. Castro, J. M. Sierra, A. Seznec, A. Izquierdo, and A. Ribagorda,
random generator, such as the one proposed in [28] known as “The strict avalanche criterion randomness test,” Mathematics and
PSOCA, which is mainly based on cellular automata, and we Computers in Simulation, vol. 68, no. 1, pp. 1–7, 2005.

www.ijacsa.thesai.org 749 | P a g e
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 9, 2021

[25] G. Marsaglia, “Diehard test suite,” Online: http://www. stat. fsu. 2016.
edu/pub/diehard, vol. 8, no. 01, p. 2014, 1998. [28] C. Hanin, F. Omary, B. Boulahiat, and S. Elbernoussi, “Design of
[26] D. Coppersmith, D. B. Johnson, and S. M. Matyas, “A proposed mode new pseudo-random number generator based on non-uniform cellular
for triple-des encryption,” IBM Journal of Research and Development, automata,” International Journal of Security and Its Applications,
vol. 40, no. 2, pp. 253–262, 1996. vol. 10, no. 11, pp. 109–118, 2016.
[27] N. P. Smart and N. P. Smart, Cryptography made simple. Springer,

www.ijacsa.thesai.org 750 | P a g e

View publication stats

You might also like