[IEEE 2012 IEEE International Carnahan Conference on Security Technology (ICCST) - Newton, MA, USA...

7
978-1-4673-2451-9/12/$31.00 ©2012 IEEE 140

Transcript of [IEEE 2012 IEEE International Carnahan Conference on Security Technology (ICCST) - Newton, MA, USA...

New evolutionary tools for a new Ciphering System SEC version Mohammed Bougrine, Fouzia.Omary, Salima Trichni and Bouchra Boulahiat Computer Science Department. University Mohammed V Agdal – Faculty of Science Networks & Data Mining Laboratory Rabat, Morocco [email protected], [email protected], [email protected], [email protected]

Abstract—This paper suggests a new cryptographic system based on evolutionary algorithms. The system is inspired from the symmetric encryption SEC. First, it transforms the problem of encryption to a combinatorial optimization problem. Second, it introduces a new evaluation function which allows the appearance frequencies to be equal .As a consequence; the system will end the frequency analysis attack. Furthermore, the system uses a new mechanism of mutation in the context of genetic operators. The fact that this mechanism is based on the partition problem makes the attack against our system a difficult problem. During the ciphering, our system generates two keys, the first one is generated at the end of the algorithm and the second one is generated when the mutation operator is applied. Both of them are session keys which might be beneficial for the security. Keywords-component; evolutionary algorithms, symmetric encryption, optimisation problem, partition problem, frequency analysis. I. INTRODUCTION Nowadays with the discovery of the World Wide Web (WWW), cryptography has become a fundamental tool for protecting information in computer systems. Cryptography is only in its early stages, and ciphering algorithms are minority. They can be either symmetric or asymmetric. The symmetric encryption is the oldest cryptographic technique; it used a single key in both encryption of plaintext and decryption of cipher text. The asymmetric encryption consists of two keys: one private and the other public. The private key is exclusively known by the sender and the public key is published widely but still associated only with the designated receiver. Among the symmetric encryption systems: - Data Encryption Standard (DES) - Advanced Encryption Standard (AES) - International Data Encryption Algorithm (IDEA), etc And the most reputed asymmetric algorithm is RSA, PGP is a combination of the asymmetric and symmetric cryptography [4].

Our new encryption system is symmetric. It is presented as a combinatorial optimization problem, and solving this problem with evolutionary algorithms (EA) is the best way to find a reasonable solution. Genetic algorithms, or more generally, evolutionary algorithms are one of the best ways to solve a problem for which little is known. They are a very general algorithm and so will work well in any search space. All you need to know is what you need the solution to be able to do well, and a genetic algorithm will be able to create a high quality solution. Genetic algorithms use the principles of selection and evolution to produce several solutions to a given problem [5]. Nearly, everyone can gain benefits from Genetic Algorithms, once he can encode solutions of a given problem to chromosomes in GA, and compare the relative performance (fitness) of solutions. An effective GA representation and meaningful fitness evaluation are the keys of the success in GA applications. The appeal of GAs comes from their simplicity and elegance as robust search algorithms as well as from their power to discover good solutions rapidly for difficult high-dimensional problems. GAs are useful and efficient when: 1. The search space is large, complex or poorly understood. 2. Domain knowledge is scarce or expert knowledge is difficult to encode to narrow the search space. 3. No mathematical analysis is available. 4. Traditional search methods fail. The advantage of the GA approach is the ease with which it can handle arbitrary kinds of constraints and objectives; all such things can be handled as weighted components of the fitness function, making it easy to adapt the GA scheduler to the particular requirements of a very wide range of possible overall objectives. GAs have been used for problem-solving and for modeling [7]. GAs are applied to many scientific, engineering problems, in business and entertainment but few are the works in the field of cryptography. In this paper we present a new application of EAs to the cryptography that benefits from all its qualities like: simplicity, performance and efficiency. To present this work, the paper will be organized as follow: First, we will make an overview of genetic algorithms.

978-1-4673-2451-9/12/$31.00 ©2012 IEEE 140

Then, we will describe our new encryption system using EA and Mutation with Partition MWP in operator of mutation that was published in ICCIT 2011 conference. The third section presents the decoding process of our contribution. Finally, experimental results and evaluative discussion will be given in section 4. II. REVIEW OF EVOLUTIONARY ALGORITHM

A. Definition Many human inventions were inspired by nature. Artificial neural networks are one example. Another example is Genetic Algorithms (GAs). The process of genetic algorithm operate on chromosomes (organic devices for encoding the structure of living being); it searches among a population of points, and works with a coding of parameter set, rather than the parameter values themselves. It also uses objective function information without any gradient information [1]. B. Algorithm The most common type of genetic algorithm works like this: Step 0: set an encoding of the problem Step 1: create an initial population P0 of q individuals {X1, X2,…,Xq}i:=0 ; repeatStep 2: evaluation of individuals. Let F be the evaluation function. Calculate F (Xi) for each individual Xi of PiStep 3: selection Select the best individuals (as defined in F) and group them in pairs. Step 4: Application of genetic operators 1-Crossover: Apply crossover operation to selected pairs 2-Mutation: Apply the mutation to individuals from the cross. Store the new individuals obtained from 1 and 2 in a new generation Pi+1 to obtaining the desired level of performance. Repeat steps 2, 3 and 4 until the desired level of performance.Figure 1. Evolutionary Algorithm

III. DESCRIPTION OF OUR ENCRYPTION SYSTEM A. Problem Definition As in the encryption system SEC [3]; the message to be encrypted by our system is represented by a set of disjoint lists. Each list is composed by the different positions of character’s message. The main objective is to change the frequencies and the positions of the character’s message at a maximum level. Note that the system starts with randomly generated potential solutions using the processes of classical cryptography. Let M be the message to be encrypted. M is a sequence of ‘n’ characters. This message can be formed only by

numbers, such as bank codes or a mixture of numbers and literary phrases including punctuation. Let c1, c2, … , cm be the different characters of M. Denote by Li(1 i m) the list of different positions of the character ciin M before encryption and card(Li) the number of occurrences of ci in M. Note: Li ! Lj = ø if i " j, ∀ i, j {1, 2, …, m}. L1, L2,…, Lm is the initial partition of the set {1, 2, …, n}. The message M can be represented by the vector below: (c1,L1) (c2,L2) …… (cm,Lm)The aim of this work goes beyond disturbing the appearance frequencies of plaintext; in fact, at the end of the algorithm we obtain a ciphering where all characters will have the same chance of appearance. To attend this goal; the system uses a new form of evaluation function which allows to calculate for every generation coming from the crossover operation, the individuals have the best partition where all the elements might have approximately the same cardinal. Otherwise, the system would apply a genetic operator to modify the appearance frequencies. The genetic operator would have a very important role during all the algorithm. In fact, from the crossover the system looks for a new permutation # of {1, 2, …, m} to establish the maximum disorders over positions of the characters of the clear text, and to complicate the encryption we adopted a new approach of mutation named MWP – MUTATION With PARTITION. Indeed, it consists of exploring a new “search space” by changing the contents of the original message’s lists and creating a new basis of the lists for the same characters. Furthermore, the modifications introduced in the content of these lists leads to the creation of a new partition for all positions of the plain text.

B. Algorithm 1) Coding Use an individual (or chromosome) as a vector of size m. Genes are the lists Lpi (1 i m). Lpi is the ith gene which contains the new positions that will take the character ci.2) Initialization Creation of the initial population P0 that contains q individuals: X1, X2, … , Xq.Original-Ch means the chromosome whose genes are the lists L1,L2,…,Lm (placed in this order) that represent the message before the application of the algorithm. Simple transformation are applied to Original-Ch and are able to change the frequency of appearance of the characters, for example, we take randomly q permutations of {1, 2, ..., m} to obtain an initial population of q potential solutions.

141

i=1 m

3) Evaluation of individuals • Let Xj be an individual of Pi whose genes are: Lj1,Lj2,…,Ljm.• We construct a random partition Ej from Xj such as: Ej ={ej1 , ej2 , … , ejm}. This partition must respect the two following conditions: o Every element of the partition must be sorted. o The number of elements in the new partition is exactly the number of initial lists. • A better partition is the one which is composed of genes having the same cardinal:

|Card(eji) - [n / m] |= $ with $ tends to 0. • So we define the evaluation function F for the group of individuals Xj as:

F(Xj) = % |Card(eji) - [n / m] | • We select the partition having a less value of fitness function then we compared it with the best partition in the previous population. The best of them will be stored in the “Evaluation Memory” as following : Evaluation Memory Permutation Partition Value of the fitness function

And from the evolutionist algorithm; we look for minimizing this evaluation function. In this case, we are confronted with a combinatorial optimization problem. 4) Selection of the best individuals The conventional method of the roulette wheel retain the strongest individuals. A Control function is introduced to eliminate the individuals for whom the values of only a minority of genes have changed in comparison with the initial chromosome: Original-Ch [2]. Since this problem is reduced to a problem of permutations with constraints, the genetic operators adapted to this kind of problem are applied. 5) Crossover MPX(Maximal Preservative X) This cross is applied to selected individuals with specific rates. Generally; the best rate is about 60% to 100%. After this step we place the new offspring in a new population Pi+1.We repeat steps 3, 4 and 5 until obtaining the best partition. Then we applied the Mutation operator. 6) Mutation operator MWP In [6], the old algorithm of mutation operator is given as following:

Step 1: Select randomly a child F from the crossover process.Step 2: List the positions as they are defined in the permutation of the selected child: Let F be the selected child: F & (Lp1, Lp2,…..,Lpn) with Lpi is the list of the list of character positions ci.

So F is the concatenation of the positions of all lists Lpi.Step 3: Redefine the lists so that each list is classified:In this step, we try to divide the contents of F in parts of the overall position in the following conditions:

• The number of new lists (parties) is the same as the chosen child. • Every part of the positions must be classified following an increasing order. Step 4:

Specify the order of every list in the new basis of SEC once we have the new lists. So, we proceed to a step of encryption using the permutation lists developed in step 3. To apply MWP mutation we went beyond steps 1, 2 and 3 described in the algorithm below and which consists of selecting randomly an individual; then, we create a partition from this individual. However, the new approach of mutation orientates the choice of the child to mutate and select the one that gave birth to a better partition. This partition must be taken from the evaluation memory (that we have seen previously). In this way, the change made by the mutation will be very effective and apply the best disturbance of the appearance frequencies of the characters. The elements of the selected partition will be the new lists of positions of the original characters. So, the rest of the mutation algorithm consists of defining the association between characters and new lists in order to find the new lists’ order based on the order of the characters of the original text. As a result, the new population will contain the same individuals’ permutations of the last population with the new lists. The remained part of the system will be based on the new partition until another mutation occurs. The individual who the partition is based on and the cardinal of the original lists will be added to the key of our system. Place new offspring in a new population Pi+1.Repeat steps 2, 3, 4, 5 and 6 until a stopping condition. 7) Stopping condition The function F is bounded because 0 F(X) n*m, for each individual X. In fact, the function F admits a minimum since it is bounded.

142

Our system stops when one of the following conditions is achieved: • the fitness function converges to a minimum value determined by experiments. • population is stabilized. 8) Key of the system From our system, we generate two keys:

The first one is called the genetic key and is generated from Original-Ch and Final-Ch. The second one is generated when the mutation operator is applied. This one is composed of the three essential elements to find the initial partition : • The elected child to create the new partition. • Cardinals of the elected child’s lists. • The permutation which represents the equivalence of the selected child in the new distribution of lists. It is called: Mutation_Ch. 9) Example :

Let the message to be encrypted is: HELLO HOW ARE YOU Encoding phase:

• H! L1={1,6} • E! L2={2,11} • L! L3={3,4} • O! L4={5,7,13} • W ! L5={8} • A! L6={9} • R! L7={10} • Y! L8={12} • U! L9={14} After n iterations of evaluation-selection-crossover, the child having the best partition is: F= {L4, L9, L6, L8, L3, L1, L5, L7, L2}

{5, 7, 13, 14, 9, 12, 3, 4, 1, 6, 8, 10, 2, 11} The new partition is: {5, 7}{13, 14} {9, 12} {3} {4} {1} {6, 8} {10} {2, 11} To define the association between initial characters and these new lists, we need to set the characters according to this new distribution. The result text is : AUOWHRHRLYULEE

Then we applied the encoding process to obtain the order of the new lists and their characters. • A! L’1={1} • U! L’2={2,11} • O! L’3={3} • W ! L’4={4} • H! L’5={5,7} • R! L’6={6,8} • L! L’7={9,12} • Y! L’8={10} • E! L’9={13,14} So, the permutation of the selected partition following the new lists is: {5, 7}{13, 14} {9, 12} {3} {4} {1} {6, 8} {10} {2, 11}

Mutation_Ch ={L’5, L’9, L’7, L’3, L’4, L’1, L’6, L’8, L’2 } We continue the processing until the stop condition. Then we take a random child of the final population as a Final-CH. We assume that the Final-CH is : Final-CH ={L’9, L’1, L’5, L’3, L’8, L’2, L’7, L’4, L’6 } At the end; the cipher text is: URWYOEOELHRLAA The Key of this example includes the following elements: [Final-CH | F | lists’ cardinals of F | Mutation_Ch]. C. Decryption Decrypting the cipher text M' is based on two main steps:

- First, finding the initial partition of the positions of characters in plain text through the key mutation. - Second, looking for the permutation of L1, L2 , …., Ln from the key. The following figure illustrates the decryption process:

143

Figure 2: The decryption process IV. EXPERIMENTAL RESULTSWe apply our system on texts of different sizes and for each of them; we attempt to find the best parameters that can give an optimal solution.

A. Model of Messages 1) The clear text

Figure 3: example of a plaintext

2) The cipher text :

Figure 4 : The cipher text 3) The symmetric key:

Figure 5: The generated key

144

B. Configuration 1) Population size The results are mentioned in Table 1. Table 1: Summary results of the population size

The best values of the optimum (convergence value) are achieved for a population size of 16. In some cases, the sizes 30 and 32 also gave good results, but the number of generations in this cases was increased which is costly in terms of time. Therefore, we recommend to take 16 as population size. 2) Rate of the genetic operators Usually, the mutation operator is applied to individuals from crossing with an appropriate rate, preferably from 0.1% to 5%. However; in our system the application of this operator increases the key length. Then we recommend to use it only one time in all iterations. Therefore, the crossover operator will be applied 99%. 3) Key Length The table below (Table 2) shows that the length of our key depends mainly on the number of different characters in the clear text. Indeed, we can find a large text with the same number of characters comparing with a smaller text. We can deduce that the length key varies between 900 bits and 1700 bits. This result is reasonable for a symmetric system. Table 2: comparison of the key length between different messages

4) Comparison of the analysis frequencies The comparison of the analysis frequencies is the main indicator of new system’s performance. The following two graphs show that the application of our ciphering system change the appearance frequency of the text’s characters to be encrypted and it make the sizes of the evolutionary system genes SEC reach an equilibrium. a) The appearance frequency of the text’s characters before the application of the new system:

Figure 6: Appearance frequency in the clear message

b) The appearance frequency of the text’s characters after the application of the new system:

Figure 7:Appearance frequency in the cipher message

145

CONCLUSIONThe success of genetic algorithms is not always satisfied because it is conditioned by the choice of its parameters. This work represents a successful case of GA’s application in symmetric cryptography. Indeed, the genetic operators used in our system have introduced two difficult problems: Permutation problem during the crossover operation and Partition problem in the step of Mutation. This has strengthened the system's resistance and made it more secure. Also, following the above experiments, the fitness function achieved gave very good results by guiding the choice of the best permutation and the best partition. The latter, ensure an equilibrium between the appearance frequencies of the majority of the text’s characters. Therefore, the system increases the resistance against cryptanalysis by the analysis of the characters’ appearance frequency.Research works will be carried out by our team to find appropriate techniques that reduce the key length and achieve a new asymmetric system based on the same principle.

REFERENCES

[1] Archana Mantri, Suman Nandi, Gaurav Kumar. “High Performance Architecture and Grid Computing”: International Conference, HPAGC 2011, Chandigarh, India, July 19-20, 2011. Proceedings (Communications in Computer and Information Science). [2] Florin G. et Natkin S.les techniques de la cryptographie.CNAM 2002. [3] F.OMARY, A.Tragha, A.Lbekkouri, A.Bellaachia, A.Mouloudi / An Evolutionist Algorithm to Cryptography- Brill Academic Publishers – Lecture Series And Computational Sciences Volume 4, 2005, pp.1749-1752. [4] F.Omary, A.Mouloudi, A.Tragha, A.Bellaachia. “A New Ciphering System Method associated with Evolutionary Algorithm” – Lecture Notes in Computer Science – Publisher : Springer Berlin / Heidelberg –ISSN: 0302-9743 –Subject :Computer Science-Volume 3984/ 2006. [5] Ms. Monica Sehrawat; Mr. Sukhvir Singh ; “Modified Order Crossover (OX) Operator” International Journal on Computer Science and Engineering (IJCSE). [6] S.Trichni,F.Omary,B.Boulahiat,M.Bougrine,"A new approach of mutation’s operator applied to the ciphering system SEC", 6th ICCIT: International Conference on Computer Sciences and Convergence Information Technology (ICCIT 2011), Jeju,Corea,pages:680-685,Novembre 2011.http://www.aicit.org/iccit " [7] Tom V. Mathew , “Genetic Algorithm”, Department of Civil Engineering, Indian Institute of Technology Bombay, Mumbai-400076.

146