A new method for decoding an encrypted text by genetic algorithms and its comparison with tabu search and simulated annealing

Article history: Received June 28, 2013 Received in revised format 19 October 2013 Accepted 20 December 2013 Available online December 31 2013 Genetic Algorithm is an algorithm based on population and many optimization problems are solved with this method, successfully. With increasing demand for computer attacks, security, efficient and reliable Internet has increased. Cryptographic systems have studied the science of communication is hidden, and includes two case categories including encryption, password and analysis. In this paper, several code analyses based on genetic algorithms, tabu search and simulated annealing for a permutation of encrypted text are investigated. The study also attempts to provide and to compare the performance in terms of the amount of check and control algorithms and the results are compared. © 2014 Growing Science Ltd. All rights reserved.


Introduction
During the past few years, there has been growing demand for efficient and effective internet security and even some small changes may destroy the information and make it impossible to retrieve the source, properly.Therefore, we need to make necessary action to protect data against their attacker and guarantee to delivery of information through different procedures such as Cryptography (William & Stallings, 2006).Knowledge creation, analysis of cryptographic encryption and decryption methods includes two categories including encryption, password and analysis, which is associated with creation, efficient and effective encryption of data.The primary objective of cryptography is to allow the applicant authority to receive messages to prevent any possible message eavesdropping.In other words, the process is to search for gaps or inaccuracies in the encryption data (Albassall & Wahdan, 2004;Spillman et al., 1993).There are different types of classical ciphers but most fall into one of two broad categories: substitution ciphers and transposition ciphers.In the former one, every plaintext character is substituted by a cipher character, using a substitution alphabet, and in the latter one, plaintext characters are permuted based on a predetermined permutation technique.Now new encryption systems have replaced the classic system, but searches for innovative analysis of classical codes are more common.
A permutation technique moves a password or breaks a block with fixed size and then works the characters in each block based on a particular permutation P such that permutations are accomplished.A simple transposition or permutation cipher works by breaking a message into fixed size blocks, and then permuting the characters within each block based on a fixed permutation, say P.
The key to the transposition cipher is simply the permutation P. Therefore, the transposition cipher has the property that the encrypted message contains all the characters that were in the plaintext message.In other words, the unigram statistics for the message are unchanged by the encryption process.Let's consider an example of a transposition cipher with a period of ten 10, and a key P={7, 10, 4, 2, 8, 1, 5, 9, 6, 3}.In this case, the message is broken into blocks of ten characters, and after encryption, the seventh character in the block are moved to position 1, the tenth moved character in the block is moved to the second position, the forth is moved to position 3, the second to position 4, the eighth to position 5, the first to position 6, the fifth to the position 7, the ninth to the position 8, the sixth to the position 9 and the third is moved to position 10.
Table 1 shows the key and the encryption process of the previously described transposition cipher.It can be noticed that the random string "X" was appended to the end of the message to enforce a message length, which is a multiple of the block size.It is also clear that the decryption can be achieved by following the same process as encryption using the "inverse" of the encryption permutation.In this case the decryption key, P-1 is equal to {6, 4, 10, 3, 7, 9, 1, 5, 8, 2}.

Methodology
In this section, we present details of the implementation of genetic algorithm, tabu search and simulated annealing to attack the password handling.Fitness functions or evaluates function in this article is as follows, Here, Ã indicates where the alphabet is the language (e.g.English language {A... Z, _} _ indicated that the gap is the distance), K and D, respectively represent language characters and text characters are encrypted.In addition, b, u, t represent the single-syllable words, two-syllable, and are trigram, respectively.α and β, and γ represent the different weights assigned to each letter with α + β + γ = 1.When words are used trigram function complexity is O (N3) and the alphabet size is N.
Table 2 contains weights used for two-syllable and three-syllable words.

Genetic algorithm
Genetic Algorithms (GA) by John Holland and students at the University of Michigan, was introduced in early 1970 (Holland, 1975;Spears et al., 1993;Kolodziejczyk, 1997;Yaseen & Sahasrabuddhe, 1999;Grundlingh & Van Vuuren, 2003).This is a kind of method to solve complicated problems using the laws in nature.GA is a population of potential solutions, which must be maintained based on different rules such as selection and genetic composition of this multioperator and mutation are developed (Matthews, 1993).Individuals in this population using a fitting function that mimics the environment are assessed.Fitness value of individuals with higher chances of survival structures to move to the next generations is formed.A quasi-public code in the form of a genetic algorithm is shown in Fig. 1.

Fig1. Simple genetic algorithm cycle
In this section, a GA method with assault with a password handling is expressed.Intercourse used to create two children is expressed as follows, 1 -Note: p1 and p2 are the parents, c1 and c2 are children, pi (j) j element defines the parent i, ci (j) specifies the elements of the child i is j {C ij , k} specifies collection of child elements in j where i have to bet with N.
k=k-1 Random mutations percent certain bits in the list and can change chromosomes.This can introduce features that should not related to original population and the genetic algorithm converges very fast before the full sampling procedure keeps costs.In this paper, the mutation operator randomly selects a position of genes and gene value in the range of gene changes.Note that the mutation operator may lead to an unauthorized person.Password displacement under attack by genetic algorithms is described as follows, 1 -Will receive the required algorithms: encrypted text (and its length), the words in English alphabet (one syllable, two syllables and polysyllabic.) 2 -Initialize the algorithm parameters.Population and maximum number of occurrences of M MAX. 3 -Create the initial population of random solutions and calculated P CURR cost solutions within each population based on Formula 1. 4 -For i = 1... MAX, do a.Select the number of M / 2 pairs of keys P (CURR) for the generation of new parents have.b.Combination of operator for each pair of selected parents to create a new population of solutions P (NEW).c.For each mutation operator M use child thing, d.For each child within P (NEW) using Formula 1, calculate the fitted rate, e. Assign P (NEW) fitted to the highest (least cost) to the least fit (most expensive) and order them, f.Arrange P (CURR) and P (NEW) to get a sorted list of solutions and merge with (duplicate is ignored), the list size is between M and 2M.Select the number of M best solutions from the list merged to form P (CURR) new.5-Output the best result from P (CURR).

Tabu search
The basic concept of Tabu Search is described by Glover (Glover, 1990;Glover & Laguna, 1993, 1997) for solving combinatorial optimization problem.It is a kind of iterative search and is characterized by the use of a flexible memory.It is able to eliminate local minima and to search beyond the local minimum.Therefore, it has the ability to find the global minimum multimodal search space.Tabu search by the memory structure, such as genetic algorithms are also used.The targeted use of funds has more memory.Tabu search by the memory uses more goals, including preventing solutions back to the search area.Keeping the list of possible solutions, which involves exposure, is achieved by the previous.Tabu search also is a mechanism to control the search.Tabu list makes us confident that some solutions are unacceptable.However, limitations created by tabu list can be limited in some cases the algorithm and a local optimal solution to restrict.Tabu search criteria can also expect a concept (aspiration) to overcome this issue provides.Alternative measures instead of waiting restrictions will create tabu possibility that the search for global optimization we generalize.Password displacement can also be attacked by the tabu search.General this algorithm is expressed in the following: 1. Input: Intercepted ciphertext, and the language statistics.2. Initialize the algorithm parameters: the solution pool size M and the maximum number of iterations MAX. 3. Randomly generate an initial pool of solutions PCURR, and calculate the cost of each of the solutions in the pool using equation (1).4. For I =1,… , MAX do: a. Find the best key in the tabu list which has the lowest cost associated with it.Call this key KBEST.b.For j=1,…, SPOSS do: i. apply the perturbation mechanism described in the simulated annealing attack to produce a new key KNEW, ii.Check if KNEW is already in the list of possibilities generated for this iteration or the tabu list.If so, return to step 4(b) I, iii.Add KNEW to the list of possibilities for this iteration.c.From the list of possibilities for this iteration, find the key with the lowest cost, PBEST, d.From the tabu list, find the key with the highest cost, TWORST, e.While the cost of PBEST is less than the cost of TWORST: i. Replace TWORST with PBEST, ii.Find the new PBEST, iii.Find the new TWORST.
5. Output the best solution from the tabu list, KBEST (the one with the least cost).Kirkpatrick (1984) presented an algorithm based on the agreement between solids simulated annealing and problem solving hybrid optimization problems.Simulated annealing process cooling and heating of solids is slow to achieve the lowest energy state.Thinking of imitating the attitude of the fusion process was sufficient.Algorithm with random values of the solution is initialized to the start at the beginning of problem solving and temperature T (0).Temperature is slowly reduced and at any temperature in a number of solutions now tries to create confusion.Disturbed at any temperature changes in the cost function, ΔE determines the changes of energy.If ΔE <0 the chaos is accepted, otherwise the potential Metropolis by equation is defined as the following are accepted.

Simulated annealing
Here E1 and E2 are the cost functions, ΔE changes in the cost function and T is the current temperature.If the proposed changes were accepted, then the current solution would subject to change.Password attacks by moving simulated annealing algorithm are expressed in the following: 1. Set the initial temperature, T (0), 2. Generate an initial solution -arbitrarily set to the identity transformation (could be randomly generated or otherwise), 3. Evaluate the cost function for the initial solution.Call this C(0), 4. For temperate T do many (e.g., 100 ×M) times: • Generate a new solution by modifying the current one in some manner, • Evaluate the cost function for the newly proposed solution, • Consult the Metropolis function to decide whether or not the newly proposed solution is accepted, • If accepted, update the current solution and its associated cost, • If the number of accepted transitions for temperature T exceeds some limit (e.g.10×M) then jump to Step 5, 5.If the number of accepted transitions for temperature T was zero then stop (return the current solution as the best), otherwise reduce the temperature (e.g.T (i+1) =T i × 0.95 and return to step 4).

The results
All three methods have been implemented in Matlab 7.1 software in system with Microsoft Windows XP Professional Version 2002 Service Pack 2, Intel(R) processor with Celeron processor with CPU 2.40GHz.Table 5 demonstrates the summary of our computations.In Table 5, average production right on key elements for the expression levels are 15 permutations.Note that because of the encryption permutations used in a piece, the size of permutations can be done by a long text to decode correctly and the correct key is called the neighborhood when all the elements are identical (except for last place).The text is readable, especially when the size is large permutations.Fig. 2 demonstrates the results of three algorithms.When the e algorithms deviation of Table 7 show Fig. 2. N

Table 5
Number of keys obtained against different password text size

Table 7
The average