An Analysis On Fundamentals of Information Technology

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

(IJACSA) International Journal of Advanced Computer Science and Applications,

Vol. 11, No. 10, 2020

A Novel Chaotic System for Text Encryption


Optimized with Genetic Algorithm
Unnikrishnan Menon1, Atharva Hudlikar3 Anirudh Rajiv Menon2
School of Electrical and Electronics Engineering School of Electronics Engineering
Vellore Institute of Technology Vellore Institute of Technology
Vellore, India Vellore, India

Abstract—With meteoric developments in communication some drawbacks such as, long encryption and decryption time,
systems and data storage technologies, the need for secure data and patterns appearance in the ciphered image [5].
transmission is more crucial than ever. The level of security
provided by any cryptosystem relies on the sensitivity of the The theory of dynamical systems and chaos have shown
private key, size of the key space as well as the trapdoor function significant scope for research and applications in the field of
being used. In order to satisfy the aforementioned constraints, cryptography [6]. The property of high sensitivity exhibited by
there has been a growing interest over the past few years, in a chaotic system with respect to its initial conditions and
studying the behavior of chaotic systems and their applications in parameters implies strong cryptographic qualities, and its
various fields such as data encryption due to characteristics like random-like behavior and unstable orbits with long periods,
randomness, unpredictability and sensitivity of the generated are quite beneficial to cryptosystems making them resilient to
sequence to the initial value and its parameters. This paper brute force attacks.
utilizes a novel 2D chaotic function that displays a uniform
bifurcation over a large range of parameters and exhibits high Chaos-based ciphers have shown exceptional properties in
levels of chaotic behavior to generate a random sequence that is aspects of security, complexity, speed, and computing power.
used to encrypt the input data. The proposed method uses a This is because chaotic maps have many attributes that
genetic algorithm to optimize the parameters of the map to translate to an efficient cryptographic property. They display
enhance security for any given textual data. Various analyses an ergodic nature, which means that these systems cannot be
demonstrate an adequately large key space and the existence of broken down to a simplified expression. This adds to the
multiple global optima indicating the necessity of the proposed confusion factor of the encryption system. They are also
system and the security provided by it. sensitive to initial control parameters. This ensures that the
plaintext and/or secret key cannot be obtained easily. A small
Keywords—Chaotic map; genetic algorithm; encryption; deviation in the input can cause a large change in the output.
bifurcation diagram; Lyapunov exponent Chaotic maps exhibit structure complexity and deterministic
I. INTRODUCTION dynamics, which allows the cryptographic process to be
simple, yet allow for a highly complex encryption and a
The Internet is utilized primarily for transmission of data. pseudo-random behavior, respectively [7].
However, while we take advantage of the Internet’s
capabilities, unauthorized individuals have the chance to This paper utilizes and proposes a hybrid chaotic map
intercept our information and then visit, copy, and destroy it. with desirable properties, such as those mentioned above, to
Therefore, the security and protection of data and information generate pseudo-random sequences for text encryption
becomes a hot problem studied by experts and enthusiasts purposes. The proposed map is extremely sensitive to the
alike. values of the parameters (taken as the key for encryption) and
will therefore return vastly different sequences for minutely
Many encryption systems have gained popularity and dissimilar keys. Hence there arises a need to find optimal key
momentum over time that have proven to be effective for values for a given plaintext.
secure transmission of data. Around , an IBM team
developed the Data Encryption Standard (DES) and it was This problem can be tackled using Genetic Algorithms. As
adopted as a national standard in [1]. Since that time, compared to the traditional optimization methods, Genetic
many cryptanalysts have attempted to find shortcuts for Algorithms are robust, global and can be applied generally
breaking the system. [2]. In , as the outcome of a public without making any domain-specific changes. It can be used
competition, Rijndael was announced as the Advanced not only for general, but also for indifferent and
Encryption Standard (AES) by the US National Institute of unconventional optimization problems [8, 9].
Standards and Technology (NIST). Today, the AES is one of Many genetic algorithm models have been introduced by
the most widely used encryption primitives [3]. Many such researchers largely working from an experimental perspective.
algorithms have been used in the past few decades. However, Most of these studies are application oriented and are typically
when these algorithms were utilized years ago, the digital interested in using them as optimization tools. Researchers
technologies were quite different from now and the magnitude have also been improving systems by hybridizing them with
of the challenges was lower [4]. For instance, AES suffer from genetic algorithms. For instance, a heuristic modified method

34 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 11, No. 10, 2020

based on the genetic algorithm for solving constrained A. Evaluation of Fitness


optimization problems was introduced in [10]. This is done using an objective function that summarizes,
In its most generic usage, Genetic Algorithms work by as a single figure of merit, how close a given design solution
creating a population of agents at every iteration with is to achieving the set target. This figure directly indicates
randomly assigned parameters. These agents are then how well an individual has performed in the current
evaluated based on their performance in the given generation with respect to other individuals belonging to the
environment and the best performing agents are carried same generation. The individuals are evolved till a point
forward to the next generation of agents. These algorithms where certain desirable threshold conditions pertaining to
encode a potential solution to a specific problem on a simple fitness are met.
chromosome-like data structure and apply recombination B. Selection
operators to these structures to preserve critical information.
Genetic algorithms are often viewed as function optimizers, Fitness Proportionate Selection is applied to the parent
although the range of problems to which they have been generation. Every individual can become a parent with a
applied is quite broad [11,12]. probability which is proportional to its fitness. This implies
that individuals with larger fitness values have a higher chance
This paper explores how genetic algorithms can optimize of mating and propagating their superior features to the next
the key that is used by the proposed chaotic map to generate a generation. This strategy applies a selection pressure to the
pseudo random sequence, favorable for the encryption of a more fit individuals in the population, evolving better off
given plaintext. spring over time. The proposed algorithm considers only the
top of the individuals in a generation and rejects the rest.
II. OPTIMIZATION USING GENETIC ALGORITHM
C. Crossover
Genetic algorithms are random heuristic search operations
that are developed to imitate the mechanics of natural This step is analogous to biological reproduction. Parts of
selection and genetics. the selected parents’ chromosomes are copied and pasted to
generate one or more offspring. A random crossover point is
These are population-based search algorithms in which the selected and sections of the two parents from left and right of
individuals in the population represent samples from the set of the crossover point are swapped to get new off-springs.
all possibilities.
D. Mutation
Genetic algorithms operate on string structures, analogous
to biological systems, which are evolving in time according to The mutation operation in a genetic algorithm is mainly
the rule of survival of the fittest by using a randomized yet responsible for exploration of search space. Certain
structured information exchange. The success of the winning chromosomes in the offspring’s DNA are chosen and
individuals is normally dependent on their genes and is randomly replaced with variations. This ensures that the new
calculated using a fitness function that determines how well an offspring produced are not simply a mere reflection of their
individual performed from the moment it spawned, till previous generation but rather have their own unique features
termination. A percentage of the best individuals are then that could potentially lead to better fitness values. In this case,
chosen which show the most promising fitness values. These mutation operation is carried out by tweaking the values of the
individuals are then made to reproduce with each other to coefficients and using a relatively small step value
spread their genes in the subsequent generations of offspring. which may be either positive or negative.
The individuals evolve over time to form even better gene The evolutionary process terminates when a generation of
variants by sharing and mixing their information about the individuals carries majority of genomes satisfying the desired
domain of operation. The genetic algorithm simulates this threshold.
process and calculates the optimum of objective functions
[13]. III. ASSOCIATED CHAOTIC FUNCTIONS
This paper presents a new functional genetic algorithm The following maps have played a key role in the
optimization methodology that is applied to find out the best conceptualization of the proposed chaotic system:
set of parameters for the proposed chaotic map during the A. Circle Map
encryption process. This optimization technique ensures that,
given the plaintext, the secret key generated will be the one This is a one-dimensional chaotic map that, for certain
that always ensures maximum confusion and diffusion values of and , behaves in a chaotic manner [14]. This can
attributes in the ciphertext thereby enhancing the security of mathematically be expressed as:
confidential data. In the proposed chaotic map, the coefficients
( ( )) (1)
and need to be fine-tuned dynamically depending on the
plaintext. Thus, these coefficients of the chaotic map serve The circle map is an integral part of the proposed chaotic
as chromosomes in the genetic algorithm. system whose initial conditions and parameter ranges have
The genetic algorithm implemented mainly involves the been defined in Section ( ).
following 4 major steps:

35 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 11, No. 10, 2020

B. Hénon Map dimensions, respectively. A system is chaotic if at least one of


In , Hénon published literature detailing a chaotic the Lyapunov exponents remains positive.
map which could be used as a reduced approach to study the For the proposed map, both dimensions exhibit positive
dynamics of the Lorenz system [15, 16]. The Hénon map is Lyapunov exponents across iterations with values
mathematically defined by equations ( ) and ( ): around for both dimensions implying that both dimensions
(2) of the map are chaotic in nature as shown in Fig. 3. The first
iterations have been ignored to avoid the influence of
(3) initial state.
IV. PROPOSED CHAOTIC MAP
The proposed hybrid chaotic map is a map which
combines different chaotic maps non-linearly. The maps
used are Circle Map and Hénon Map. Equations ( ) and ( )
define this system as given below:
( ) ( ( )) (4)
( ) ( ( )) (5)
where ( ( )) is the Circle Map as a function of
and (the two parameters of the map), ( ( )) is the
chaotic dimension of the Hénon Map as a function of . The
system equation hence becomes:
( ) () ( ( ( ))) (6)
( ) () () (7)
Fig. 1. Bifurcation Diagram of Dimension vs. Coefficient .
A. Bifurcation Diagram
A bifurcation diagram depicts the values approached
asymptotically by a system with respect to its parameters [17].
The map shows the distribution of values taken by the system
over a range of the parameters across numerous iterations.
The bifurcation diagram for the proposed system between
dimension and parameter is shown:
Additionally, a bifurcation diagram was generated between
dimension and the second parameter .
Fig. and show that for all depicted points of and ,
the map approaches almost all values in the normalized range,
resulting in densely populated bifurcation diagrams. Thus, for
and values taken over a large range, a uniform chaos is
exhibited by the map. From the bifurcation diagrams, the
ranges of and useful for the purpose of this paper are ( )
and ( ) respectively.
Fig. 2. Bifurcation Diagram of Dimension vs. Coefficient .
B. Lyapunov Exponent
Lyapunov exponents are used to check whether a system
exhibits chaotic behavior. Equation ( ) defines a
mathematical expression for Lyapunov Exponent and is used
to visualize the rate of divergence of a pair of orbits that were
initially infinitesimally close [18]. It also infers a sensitivity to
a variation in the initial conditions.

( ( )) ( )∑ ( ) (8)

where ( ) is the derivative of the iterate ( ).


A constantly positive value of Lyapunov exponent implies
an unstable or chaotic orbit. For the proposed chaotic Fig. 3. Lyapunov Exponents for and Dimensions.
system, and are the Lyapunov exponents for the and

36 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 11, No. 10, 2020

C. Selecting Initial Value of Chaotic Map where the a and b values of both parents are used to form
The initial and dimension values and different combinations of possible key values resulting in the
respectively, of the chaotic map have been set as follows: formation of offsprings.
6) The selected parents and offspring are then made to
(9) undergo mutation where their ( ) are modified in small
random steps with a probability of
(10) 7) The mutated set now becomes the next generation.
where the average and sum of ASCII values of plaintext 8) The process is repeated for every subsequent
are represented by and . generation till a desired fitness value of at least is
observed for more than of the individuals belonging to
This allows for a different initial value for the and
dimensions and hence a completely different pseudo random that generation.
sequence for every plaintext. 9) The optimal key is the genome with the best fitness
function once the threshold conditions have been met.
V. PROPOSED ALGORITHM 10) The final encryption is done with the optimised ( )
A. Key Generation values.
The key to be generated is the set of parameters (a and b) B. Encryption
required by the chaotic map. The key is optimized for the 1) The initial values of the and dimensions are taken
given confidential data using a genetic algorithm Fig. 4. as shown in section ( ).
1) An initial population of ( ) pairs is generated with 2) For a given ( ) pair, pseudorandom sequences of
each pair having random a and b values selected from the floating point values, for each dimension of the map i.e. and
ranges defined in Section . , of length equal to size of plaintext are obtained by iterating
2) Encryption of plaintext is done with each of these pairs the chaotic map.
(encryption procedure explained in section ( )). 3) The arrays of floating point values are each sorted in
3) The fitness function for each (a,b) pair is calculated decreasing order.
using the Jaccard index of similarity [19]. It is a statistic used 4) Each element in the original arrays is replaced with the
for gauging the similarity between sets and is defined as the index at which that floating point element appears in the
size of the intersection divided by the size of the union of the corresponding sorted arrays. This gives rise to two pseudo
sample sets as shown in equation ( ): random arrays of integer values, and .
5) The final key array will contain values picked from
( ) (11) occurring at the indices represented by the values of .
6) The ciphertext is obtained by performing bitwise-XOR
The above equation returns a score from . Where
means no similarity at all and implies that both sets are operation between the pseudorandom sequence and the
the same. The fitness function taken for the proposed plaintext.
algorithm is: C. Decryption
( ) ( ) (12) 1) The key required for decryption consists of the
optimized ( ) along with the initial and values used in
where F is the fitness function of the particular genome, P
is the set of ascii values of the plain text and E is the ascii set the encryption phase.
of the encrypted cipher text obtained on encrypting the 2) The final pseudorandom array is generated using the
original text with the a and b values of that genome. same procedure followed in the encryption step using the
aforementioned key.
4) Once the fitness of each key pair in the population is 3) The plaintext is retrieved by performing bitwise-XOR
calculated, the top of the population are promoted operation between the pseudorandom sequence obtained in the
(selection). previous step and the ciphertext.
5) A pair of offsprings are generated for every set of
parents randomly selected from the promoted/selected set,

37 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 11, No. 10, 2020

Fig. 4. Flow Diagram of Proposed Algorithm.

axes, respectively. The fitness scores of every agent have been


VI. EXPERIMENTAL ANALYSIS graphed as a color scale plot.
The proposed algorithm was evolved and tested upon Fig. 5 shows that there exist a variety of ( ) pairs with
multiple plaintext data samples of varying lengths. differing fitness values. While the average fitness
The genetic algorithm was deployed for each sample demonstrated by an ( ) pair increases with the length of the
plaintext. The different possibilities of the coefficients ( ) plaintext, there clearly exists a set of ( ) pairs which show
along with their corresponding fitness values for every maximum fitness scores. This implies that for smaller
genome spawning across all generations were recorded. plaintexts, an extremely minute alteration from the optimum
in the values of ( ) can lead to subpar encryption, thus
For visualization, plots of the data were prepared, reinforcing the proposed approach.
where the coefficients and were plotted on the and

38 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 11, No. 10, 2020

Fig. 5. Variation of Fitness Values for Individuals with different Coefficients for Fixed Plaintext Size.

Additionally, a secondary analysis was performed to study


how changing the length of plaintext affects the number of VII. KEY SPACE ANALYSIS
generations till termination as well as the maximum fitness The key space of any cryptosystem should be very large to
scores achieved. Table depicts these variations. The provide an extremely vast range of possible key combinations
population size for each generation was fixed to be for an attacker to access the plaintext. For the proposed
individuals. Note that upon increasing the population system, the keys being used for decryption are the and
parameter, the range of variations covered by individuals in parameters along with the and initial values with
each generation increases significantly, thereby reducing the selected ranges ( ) ( ) ( ) and ( ) respectively.
number of generations required and hence converging to the Both and show a precision of , i.e. a variation in
optimum set of parameters in a shorter runtime. All codes their values by an amount as small as will not allow
relevant to the analysis presented in this paper have been decryption to occur, while the precisions shown by both
compiled into a GitHub repository [20]. and are . Thus, the size of the entire possible key
space is:
TABLE I. EFFECT OF PLAINTEXT LENGTH ON EVOLUTION ATTRIBUTES

S.No. Length of Plaintext No. of Generations Max Fitness


1. 10 234 92.8571
As a result, the key space provided by the proposed
2. 50 4 94.5946
algorithm is large enough to resist brute force attacks.
3. 100 6 97.2603
VIII. FUTURE SCOPE
4. 300 5 98.9744
5. 700 2 99.3658
This paper presents the idea of using genetic algorithms to
obtain optimized values of the parameters that are used in the
6. 1000 4 99.7037 chaotic function. As a proof of concept, we have used a basic
XOR trapdoor. The proposed system can be further upgraded

39 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 11, No. 10, 2020

by implementing a more complex trapdoor or by using this In 2010 Sixth International Conference on Information Assurance and
algorithm as an optimizing precursor to existing algorithms Security (pp. 28-31). IEEE.
such as AES, DES, 3DES, RSA, etc. Further work can be [6] Schmitz, R. (2001). Use of chaotic dynamical systems in cryptography.
Journal of the Franklin Institute, 338(4), 429-441.
done in selecting an improved class of genetic algorithms that
[7] Kocarev, L. (2001). Chaos-based cryptography: a brief overview. IEEE
can produce better results. Circuits and Systems Magazine, 1(3), 6-21.
IX. CONCLUSION [8] D’addona, D. M., & Teti, R. (2013). Genetic algorithm-based
optimization of cutting parameters in turning processes. Procedia Cirp,
This paper inspects a method that makes use of concepts 7, 323-328.
stemming from genetic algorithms to optimize a novel [9] Hui, W. J., & Xi, Y. G. (1996). Operation mechanism analysis of genetic
hybrid chaotic map. The proposed map demonstrates uniform algorithm. Control Theory Appl, 13(3), 297-303.
chaotic behavior for a wide range of key parameters thereby [10] Tsoulos, I. G. (2009). Solving constrained optimization problems using
allowing the genetic algorithm to explore various key a novel genetic algorithm. Applied Mathematics and Computation,
208(1), 273-283.
possibilities resulting in optimal encryption for every
[11] Whitley, D. (1994). A genetic algorithm tutorial. Statistics and
plaintext. This technique can be used to generate keys for computing, 4(2), 65-85.
other established encryption schemes as well that use bit
[12] Michalewicz, Z. (2013). Genetic algorithms+ data structures= evolution
operations in the trapdoor function. The key generation system programs. Springer Science & Business Media.
proposed in this paper is also resistant to brute force attacks [13] Haldurai, L., Madhubala, T., & Rajalakshmi, R. (2016). A study on
thereby ensuring that it takes an infeasible amount of time and genetic algorithm and its applications. International Journal of Computer
key permutations for an unauthorized interceptor to gain Sciences and Engineering, 4(10), 2347-2693.
access owing to the large key space. The method introduced in [14] Khan, M., & Masood, F. (2019). A novel chaotic image encryption
this paper enhances the security by increasing the entropy in technique based on multiple discrete dynamical maps. Multimedia Tools
the key using algorithms that are analogous to evolutionary and Applications, 78(18), 26203-26222.
trends observed in nature. [15] Hénon, M. (1976). A two-dimensional mapping with a strange attractor.
In The Theory of Chaotic Attractors (pp. 94-102). Springer, New York,
REFERENCES NY.
[1] Coppersmith, D. (1994). The Data Encryption Standard (DES) and its [16] Wen, H. (2014). A review of the Hénon map and its physical
strength against attacks. IBM journal of research and development, interpretations. School of Physics Georgia Institute of Technology,
38(3), 243-250. Atlanta, GA, 30332-0430.
[2] Biham, E., & Shamir, A. (1991). Differential cryptanalysis of DES-like [17] Hale, J. K., & Koçak, H. (2012). Dynamics and bifurcations (Vol. 3).
cryptosystems. Journal of CRYPTOLOGY, 4(1), 3-72. Springer Science & Business Media.
[3] Osvik, D. A., Bos, J. W., Stefan, D., & Canright, D. (2010, February). [18] Wolf, A., Swift, J. B., Swinney, H. L., & Vastano, J. A. (1985).
Fast software AES encryption. In International Workshop on Fast Determining Lyapunov exponents from a time series. Physica D:
Software Encryption (pp. 75-93). Springer, Berlin, Heidelberg. Nonlinear Phenomena, 16(3), 285-317.
[4] Dawood, O., & Hammadi, O. (2017). An Analytical Study for Some [19] Ivchenko, G. I., & Honov, S. A. (1998). On the jaccard similarity test.
Drawbacks and Weakness Points of the AES Cipher (Rijndael Journal of Mathematical Sciences, 88(6), 789-794.
Algorithm). Qalaai Zanist Journal, 2(2), 111-118. [20] Menon, A., Menon, U., & Hudlikar, A. (2020, August). Chaotic
[5] Huang, C. W., Yen, C. L., Chiang, C. H., Chang, K. H., & Chang, C. J. Genesis. Retrieved from https://github.com/axe76/Chaotic_Genesis.
(2010, August). The five modes AES applications in sounds and images.

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

You might also like