GENETIC ALGORITHMS, TABU SEARCH AND SIMULATED ANNEALING: A COMPARISON BETWEEN THREE APPROACHES FOR THE CRYPTANALYSIS OF TRANSPOSITION CIPHER

Similar documents
Evolutionary Computation Algorithms for Cryptanalysis: A Study

A COMPARISON OF MEMETIC & TABU SEARCH FOR THE CRYPTANALYSIS OF SIMPLIFIED DATA ENCRYPTION STANDARD ALGORITHM

PARTICLES SWARM OPTIMIZATION FOR THE CRYPTANALYSIS OF TRANSPOSITION CIPHER

Deciphering of Transposition Ciphers using Genetic Algorithm

Experiments on Cryptanalysing Block Ciphers via Evolutionary Computation Paradigms

Using Genetic Algorithm to Break Super-Pascal Knapsack Cipher

CHAPTER 2 LITERATURE SURVEY

Attacking Transposition Cipher Using Improved Cuckoo Search Ahmed Tariq Sadiq 1,a,Laith Ali 2,b Hashim Kareem 3,c

USING GENETIC ALGORITHMS TO BREAK A SIMPLE TRANSPOSITION CIPHER

Breaking of Simplified Data Encryption Standard Using Binary Particle Swarm Optimization

A CRITICAL REASSESSMENT OF EVOLUTIONARY ALGORITHMS ON THE CRYPTANALYSIS OF THE SIMPLIFIED DATA ENCRYPTION STANDARD ALGORITHM

CHAPTER 4 GENETIC ALGORITHM

Cryptanalysis of Homophonic Substitution- Transposition Cipher

International Journal for Research in Applied Science & Engineering Technology (IJRASET) Performance Comparison of Cryptanalysis Techniques over DES

Advanced Cryptographic Technique Using Double Point Crossover

Comparative Cryptanalysis of Simplified-Data Encryption Standard Using Tabu Search and Simulated Annealing Methods

A Chosen-Plaintext Linear Attack on DES

MINIMAL EDGE-ORDERED SPANNING TREES USING A SELF-ADAPTING GENETIC ALGORITHM WITH MULTIPLE GENOMIC REPRESENTATIONS

Keywords Poly-alphabetic cipher; Vigenere cipher Particle swarm optimization; Simulated Annealing; genetic algorithm; Tabu search; firefly algorithm.

A Real Coded Genetic Algorithm for Data Partitioning and Scheduling in Networks with Arbitrary Processor Release Time

L2. An Introduction to Classical Cryptosystems. Rocky K. C. Chang, 23 January 2015

Chapter 3 Traditional Symmetric-Key Ciphers 3.1

Introduction to Cryptography CS 136 Computer Security Peter Reiher October 9, 2014

A GENETIC ALGORITHM APPROACH TO OPTIMAL TOPOLOGICAL DESIGN OF ALL TERMINAL NETWORKS

CRYPTOLOGY KEY MANAGEMENT CRYPTOGRAPHY CRYPTANALYSIS. Cryptanalytic. Brute-Force. Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext

Classical Encryption Techniques. CSS 322 Security and Cryptography

A Modified Playfair Encryption Using Fibonacci Numbers

Lecture 4: Symmetric Key Encryption

2/7/2013. CS 472 Network and System Security. Mohammad Almalag Lecture 2 January 22, Introduction To Cryptography

A New Symmetric Key Algorithm for Modern Cryptography Rupesh Kumar 1 Sanjay Patel 2 Purushottam Patel 3 Rakesh Patel 4

Lecture 3: Symmetric Key Encryption

Secret Key Algorithms (DES)

Cryptography and Network Security 2. Symmetric Ciphers. Lectured by Nguyễn Đức Thái

CSCE 813 Internet Security Symmetric Cryptography

March 19, Heuristics for Optimization. Outline. Problem formulation. Genetic algorithms

Secret Key Algorithms (DES) Foundations of Cryptography - Secret Key pp. 1 / 34

Network Routing Protocol using Genetic Algorithms

1-7 Attacks on Cryptosystems

Cryptography ThreeB. Ed Crowley. Fall 08

Four Methods for Maintenance Scheduling

Classical Encryption Techniques

Introduction to Cryptology. Lecture 2

Hybrid Bees Algorithm With Simulated Annealing for Cryptanalysis of Simple Substitution Cipher

Computational Security, Stream and Block Cipher Functions

SPATIAL OPTIMIZATION METHODS

Hill Cipher with Parallel Processing Involving Column, Row Shuffling, Permutation and Iteration on Plaintext and Key

Module 1: Classical Symmetric Ciphers

Using Genetic Algorithms to optimize ACS-TSP

A Hybrid Genetic Algorithm for the Distributed Permutation Flowshop Scheduling Problem Yan Li 1, a*, Zhigang Chen 2, b

Computer Security CS 526

Cryptography and Network Security Block Ciphers + DES. Lectured by Nguyễn Đức Thái

Cryptanalysis. Ed Crowley

IMPROVING A GREEDY DNA MOTIF SEARCH USING A MULTIPLE GENOMIC SELF-ADAPTATING GENETIC ALGORITHM

New algorithm for analyzing performance of neighborhood strategies in solving job shop scheduling problems

Graph Coloring Algorithms for Assignment Problems in Radio Networks

Linear Cryptanalysis. Objectives

OVE EDFORS ELECTRICAL AND INFORMATION TECHNOLOGY

Computational Intelligence Applied on Cryptology: a Brief Review

Cryptographic Techniques. Information Technologies for IPR Protections 2003/11/12 R107, CSIE Building

The Genetic Algorithm for finding the maxima of single-variable functions

ISSN: [Keswani* et al., 7(1): January, 2018] Impact Factor: 4.116

Applying Evolutionary Algorithms and the No Fit Polygon to the Nesting Problem

Traditional Symmetric-Key Ciphers. A Biswas, IT, BESU Shibpur

Information Systems Security

Cryptography Math/CprE/InfAs 533

Genetic Algorithms in Cryptography

Gray Level Image Encryption

Symmetric Key Algorithms. Definition. A symmetric key algorithm is an encryption algorithm where the same key is used for encrypting and decrypting.

Outline Basics of Data Encryption CS 239 Computer Security January 24, 2005

Keywords :Avalanche effect,hamming distance, Polynomial for S-box, Symmetric encryption,swapping words in S-box

CSCI3381-Cryptography

Non-deterministic Search techniques. Emma Hart

B) Symmetric Ciphers. B.a) Fundamentals B.b) Block Ciphers B.c) Stream Ciphers

International Journal of Digital Application & Contemporary research Website: (Volume 1, Issue 7, February 2013)

A SIMPLIFIED IDEA ALGORITHM

Exploring Cryptography Using CrypTool

HEURISTICS FOR THE NETWORK DESIGN PROBLEM

Research Incubator: Combinatorial Optimization. Dr. Lixin Tao December 9, 2003

Ciphertext Cryptanalysis Using DES Functionality In Spartan3Upto 4 Round.

Adaptive Crossover in Genetic Algorithms Using Statistics Mechanism

Assignment 3: Block Ciphers

Differential Cryptanalysis

Timing Attack Prospect for RSA Cryptanalysts Using Genetic Algorithm Technique

Multi-Level Encryption using SDES Key Generation Technique with Genetic Algorithm

2

Improved Truncated Differential Attacks on SAFER

Module 13 Network Security. Version 1 ECE, IIT Kharagpur

Replace AES Key Expansion Algorithm. By Modified Genetic Algorithm

Block Ciphers Tutorial. c Eli Biham - May 3, Block Ciphers Tutorial (5)

Algorithm Design (4) Metaheuristics

RECTIFIED DIFFERENTIAL CRYPTANALYSIS OF 16 ROUND PRESENT

A LOCAL SEARCH GENETIC ALGORITHM FOR THE JOB SHOP SCHEDULING PROBLEM

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

CSC 580 Cryptography and Computer Security

DETERMINING MAXIMUM/MINIMUM VALUES FOR TWO- DIMENTIONAL MATHMATICLE FUNCTIONS USING RANDOM CREOSSOVER TECHNIQUES

Metaheuristics: a quick overview

Ref:

CSCE 715: Network Systems Security

Chapter 2: Classical Encryption Techniques

1 One-Time Pad. 1.1 One-Time Pad Definition

Transcription:

GENETIC ALGORITHMS, TABU SEARCH AND SIMULATED ANNEALING: A COMPARISON BETWEEN THREE APPROACHES FOR THE CRYPTANALYSIS OF TRANSPOSITION CIPHER POONAM GARG Institute of Management Technology, INDIA E-mail: pgarg@imt.edu ABSTRACT: Due to increasing incidents of cyber attacks, the demand for effective internet security is increasing. Cryptology is the science and study of systems for secret communication. It consists of two complementary fields of study: cryptography and cryptanalysis. In this paper, we propose a cryptanalysis method based on genetic algorithm, tabu search & simulated annealing to break a transposition cipher. We will also compare and analyze the performance of these algorithms in automated attacks on a transposition cipher. A generalized version of these algorithms can be used for attacking other cipher as well. Keywords: Transposition Cipher, Genetic Algorithm, Tabu Search, Simulated Annealing, Key search. 1. INTRODUCTION The demand for effective internet security is increasing exponentially day by day. Businesses have an obligation to protect sensitive data from loss or theft. Such sensitive data can be potentially damaging if it is altered, destroyed, or if it falls into the wrong hands. So they need to develop a scheme that guarantees to protect the information from the attacker. Cryptology is at the heart of providing such guarantee. Cryptology is the science of building and analyzing different encryption and decryption methods. Cryptology consists of two subfields; Cryptography & Cryptanalysis. Cryptography is the science of building new powerful and efficient encryption and decryption methods. It deals with the techniques for conveying information securely. The basic aim of cryptography is to allow the intended recipients of a message to receive the message properly while preventing eavesdroppers from understanding the message. Cryptanalysis is the science and study of method of breaking cryptographic techniques i.e. ciphers. In other words it can be described as the process of searching for flaws or oversights in the design of ciphers. Classical ciphers fall into one of the two broad categories: substitution cipher & transposition cipher. Modern crypto-systems have now supplanted the classical ciphers but cryptanalysis of classical ciphers is most popular crypto logical application for meta-heuristic search research. The basic concepts of substitution and transposition are still widely used today in the Advanced Encryption Standard(AES). Advanced Encryption Standards(AES) & International Data Encryption Algorithm (IDEA) are widely used encryption algorithm which use only three very simple operators, namely substitution, permutation(transposition) and bit-wise exclusive- OR operator. Since the operations of the classical cipher are the building blocks of modern ciphers, so the classical ciphers are usually the first ones considered when researching new attacks. Transposition cipher simply performs some permutation over the plain text alphabet. Transposition cipher works by breaking a message into fixed size blocks, and then permuting the characters within each block according to a fixed permutation; say the key to the transposition cipher is simply the permutation. The transposition cipher has the property that the encrypted message (i.e., the ciphertext) contains all the characters that were in the plaintext message, albeit in a different (and hopefully meaningless) order. Example of the transposition cipher is presented in Table 1. 387

The size of the permutation is known as the period. In this example a transposition cipher with a period of six is used. Let = {4, 2, 1, 5, 6, 3}. Then the message is broken into blocks of six characters. Upon encryption the fourth character in the block will be moved to position 1, the second remains in position 2, the first is moved to position 3, the fifth to position 4, the sixth to position 5 and the third to position 6. The message used in the previous two examples is now used to illustrate this process on a number of blocks. KEY: Plaintext : 123456 Ciphertext : 421563 ENCRYPTION: Position: 123456 123456 123456 Plaintext: HELP_I_AM_LOST_SIR Ciphertext: PEH_IL_A_LOMSTSIR_ Table 1 : Example transposition cipher key and encryption. Giddy and Safavi-Naini[12] have published an attack on the transposition cipher using simulated annealing and Methew[8] presented an attack on transposition cipher using genetic algorithm. Werner R. Grundlingh[14] presented an attack on the simple cryptographic cipher using genetic algorithm. Russell [11] presented a attack on transposition cipher using ant colony. R. Toemeh[13] presented an attack on transposition cipher using genetic algorithm. This paper introduces an attack on the transposition cipher using genetic algorithm, tabu search & simulated annealing. The previously published attacks were enhanced and modified in order that an accurate comparison of three techniques could be obtained. All experiments presented in this paper were performed on text using 27 character alphabet, i.e A-Z, and the _ character. All punctuation and structure (sentences/paragraphs) has been removed from the text before encryption. 2. METHODOLOGY: GENETIC ALGORITHM, TABU SEARCH & SIMULATED ANNEALING ATTACK ON TRANSPOSITION CIPHER The technique used to compare candidate key is to compare n-gram statistics of the decrypted message with those of the language (which are assumed known). Equation 1 is a general formula used to determine the suitability of a proposed key(k), here,k is known as language Statistics i.e for English, [A,.,Z_], D is the decrypted message statistics, and u/b/t are the unigram, bigram and trigram statistics. The values of α, β and γ allow assigning of different weights to each of the three n-gram types k i A C α. K γ u u b b t ( i) D( i) + β. K( j) D( j) +. K( j, k) j A j, k A (1) Since the unigram frequencies for a message are unchanged during the encryption process of a transposition cipher and so, they are ignored when evaluating a key. And it is also an expensive task to calculate the trigram statistics. Hence we will use assessment function based on bigram statistics only. In the process of determining the cost associated with a transposition cipher key the proposed key is used to decrypt the ciphertext and then the statistics of the decrypted message are then compared with statistics of the language. 2.1 Genetic algorithm attack The genetic algorithm is based upon Darwinian evolution theory. The genetic algorithm is modeled on a relatively simple interpretation of the evolutionary process, however, it has proven to a reliable and powerful optimization technique in a wide variety of applications [2]. Holland [7] in 1975, was first proposed the use of genetic algorithms for problem solving. Goldberg and Dejong[1] were also pioneers in the area of applying genetic processes to optimization. Over the past twenty years numerous application and adaptation of genetic algorithms have appeared in the literature. An attack on the transposition cipher using Genetic Algorithm is presented here. The mating i.e. reproduction technique used here for creating the two children is given in Figure 1. 1. Notation: p1 and p2 are parents, c1 and c2 are the children, p i (j) denotes the element j in parent c i (j) denotes element j in child j k C, i { } denotes the set of elements in child i from position j to k with the limitation that if j k k =0 or j = P+1 then { C, i }={φ }, 2. Child 1 : t D ( j, k) 388

a) Choose a random number r [1,P] b) c i (j)= p i (j) for j=1,,r c) for i=1...p-r and k=1,...,p l, 1 if p 2 (k) { C i+r } then c i (i+r)=p 2 (k) else k=k+1 2. Child 2 : a) Choose a random number r [1,P] b) C 2 (j)= p i (j) for j=p,,r c) for i=1...r and k=p,.,1 if p 2 (k) { C r i+1, P }then c 2 (r-i)=p 2 (k) else k=k-1 Figure 1 : A mating process A mutation operation randomly selects two elements in the child and swaps those elements. Figure 2 describes the attack on Transposition cipher using genetic algorithm. 1. Input to the algorithm given : The ciphertext (and its length), the statistics of the language (unigrams, bigrams and trigrams). 2. Initialize the algorithm parameters. The solution pool size M, and the maximum number of iterations MAX. 3. Generate an initial pool of solutions randomly P CURR, and calculate the cost of each of the solutions in the pool using Equation 1 4. For i = 1,..., MAX, do (a) Select M/2 pairs of keys from P (CURR) to be the parents of the new generation. (b) Perform the mating operation described in Figure 1 on each of the pairs of parents to produce a new pool of solution P (NEW). (c) For each of the M children perform a mutation operation described above. (d) Calculate the suitability of each of the children in P (NEW) using Equation 1 (e) Sort P (NEW) from most suitable (least cost) to lease suitable (most cost). (f) Merge P (CURR) with P (NEW) to give a list of sorted solutions (discard duplicates) the size of this list will be between M and 2M. Choose the M best solutions from the merged list to become the new P (CURR). 5. Output the best solution from P (CURR). Figure 2: A genetic algorithm attack on transposition cipher 2.2 Tabu search attack The basic concept of Tabu Search is described by Glover [ 5-6] in 1989 for solving combinatorial optimization problem. It is 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. Transposition cipher can also be attacked using a tabu search. The overall algorithm is described in Figure 3. 1. The inputs to the algorithm are the known (intercepted) ciphertext, key size, P. 2. Set maximum number of iterations MAX, the size of the tabu list S_TABU, and S_POSS, the size of the possibilities list. Initialize the tabu list with a list of random and distinct keys and calculate the cost associated with each of the keys in the tabu list. 3. For iteration i =1. MAX, do (a) Find the best key in the tabu list which has the lowest cost associated with it. Call this key K BEST. (b) For j = 1, S_POSS, do i. Choose n1, n2 [1,N] n1 n2. ii. Create a possible new key K NEW by swapping the elements n1 and n2 in K BEST. iii. Check that K NEW is not already in the list of possibilities for this iteration or the tabu list. If it is return to Step 3(b)i. iv. Add K NEW to the list of possibilities for this iteration and determine its cost. (c) From the list of possibilities for this iteration find the key with the lowest cost call this key P BEST. (d) From the tabu list find the key with the highest cost call this key T WORST. (e) While the cost of PBEST is less than the cost of T WORST i. Replace T WORST with P BEST. ii. Find the new P BEST. iii. Find the new T WORST. 389

4. Output the best solution (i.e., the one with the least cost) from the tabu list. Figure 3 : A tabu search attack on transposition cipher 2.3 Simulated annealing attack In 1983 Kirkpatrick [3] proposed an algorithm which is based on the analogy between the annealing of solids and the problem of solving combinatorial optimization problems. An attack on the transposition cipher using simulated annealing is described in Figure 4. (0) 1. Set the initial temperature, T. 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 (0) solution. Call thisc. 4. For temperate T do many (eg., 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 will be accepted. If accepted, update the current solution and its associated cost. If the number of accepted transitions for temperature T exceeds some limit (eg. 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 (eg. ( 1) T i+ = T i 0.95 and return to step 4 Figure 4 : A tabu search attack on transposition cipher 3. RESULTS AND DISCUSSIONS Experimental results for the three techniques were generated with 100 runs per data point using C language. 10 different messages were created for each run and each attack run 10 times per message. The best result for each message was averaged to produce the data point. We are comparing each of the three techniques on the basis of two criteria. The first criterion is made upon the amount of ciphertext provided to attack. These results are presented in Table 1. Here each algorithm was run on different amount of ciphertext. Table 1 represents the average number of key elements correctly recovered for a transposition size 15. Note that because a transposition cipher key, which is rotated by one place, will still properly decrypt a large amount of the message, a key element is said to be correctly placed if its neighbors are the same as the neighbors for the correct key(except for end position). In that case, the message will almost readable, especially if the period of the transposition cipher is large. It can be seen from figure 5 the result that each of the three algorithms performed roughly equally well when the comparison is made based upon the amount of known ciphertext available to the attack. Amount of GA TS SA Ciphertext 200 7.5 6.75 7 400 12.5 9.25 10.5 600 13.5 11.6 12 800 14 12.25 13.25 1000 14.25 14 14.1 Table 1: The amount of keys recovered versus available ciphertext, key size is 27 390

Number of key correct max(27) 27 24 21 18 15 12 9 6 3 0 200 400 600 800 1000 GA TS SA Amount of ciphertext Figure 5: The amount of keys recovered versus available ciphertext, key size is 27 The second criterion is made upon the period of transposition cipher. It should be noted from Table 2 that for the period less than fifteen, with one thousand available ciphertext characters, each of the algorithm could successfully recover the key all the time. Transposition GA TS SA Size 15 14.25 14 14.1 20 16.50 16.75 16.25 25 20.75 21.5 20.75 30 25.25 26 25.5 Table 2: The amount of keys recovered versus transposition size, 1000 known ciphertext character Amount of key recovered (max :27) 27 24 21 18 15 12 9 6 3 0 15 20 25 30 Transposition Size ga ts sa Figure 6: The amount of keys recovered versus transposition size, 1000 known ciphertext character The Figure 6 shows that the tabu search attack is most powerful. For a transposition cipher of period 30 the tabu search attack is able to correctly place 26 of the key element, on an average. 4. CONCLUSION The paper explains genetic algorithm, tabu search & simulated annealing attack on the transposition cipher. This paper has developed the theory and presented a number of automated attacks against transposition ciphers. The principles used in transposition ciphers form the foundation for many of the modern cryptosystems. The first performance comparison was made on the average number of key elements (out of 27) correctly recorded versus the amount of ciphertext which is assumed to known in the attack for a transposition size 15. It was found that for the transposition cipher all the three algorithms performed equally 391

w.r.t amount of known cipher text available to attack. The second comparison was made upon the period of transposition cipher. It was found that the tabu search is most powerful to find the correct solution. Result indicates that tabu search is extremely powerful technique for attack on transposition cipher. REFERENCES [1] Goldberg, D.E., Genetic Algorithms in Search, Optimization and Machine Learning, Addison-Wesley, Reading, 1989. [2] Davis, L., Handbook of Genetic Algorithms, Van Nostrand Reinhold, New York,1991. [3] Kirkpatrick S., Gelatt C. D., Jr., and Vecchi M. P., Optimization by simulated annealing, Science, 220(4598):671 680, 1983. [4] Fred Glover, Tabu search: A tutorial. Interfaces, 20(4): 74-94, July 1990. [5] Glover Fred. Tabu search part II, ORSA Journal on computing, Vol 2.,pp. 14-32,1990 [6] Glover F., Taillard E., and Werra D.D., A user s guide to tabu search, Annals of Operations Research, 41:3 28, 1993. [7] Holland, J., Adaptation in Natural and Artificial Systems, University of Michigan Press, Ann Arbor, 1975. [8] Methew, R.A.J. (1993, April), The use of genetic algorithms in cryptanalysis, Cryptologia, 7(4), 187-201. [9] Poonam Garg, Genetic Algorithm & Tabu Search attack on monoalphabetic cipher, BIMC proceeding of Business Information Management Conference - 2005, 322-328 [10] Richard Spillman et. al., Use of a genetic algorithm in the cryptanalysis of simple substitution ciphers, Cryptologia, 17(1):187-201, April 1993. [11] Russell, M.D.; Clark, J.A.; Stepney, S. Making the most of two heuristics: breaking transposition ciphers with ants Evolutionary Computation, 2003. CEC '03. The 2003 Congress on Volume 4, 8-12,Page(s):2653-2658 Vol.4, Dec. 2003 [12] Giddy J. P and Safavi-Naini R., Automated cryptanalysis of transposition ciphers, The Computer Journal, Vol 37, No. 5, 1994. [13] R. Toemeh, S. Arumugam. Breaking Transposition Cipher with Genetic Algorithm // Electronics and Electrical Engineering. Kaunas: Technologija, 2007. No. 7(79). P. 75 78 [14] Werner R. Grundlingh and Jan H Van Vuuren, Using Genetic Algorithm to Break a Simple Cryptographic Cipher, Article, http://www.apprendreen-ligne.net/crypto/bibliotheque/ 392