A Block Cipher Using Linear Congruences

Similar documents
7. Modern Techniques. Data Encryption Standard (DES)

End-of-Year Contest. ERHS Math Club. May 5, 2009

Inverse Matrix. A meaning that matrix B is an inverse of matrix A.

Principle Of Superposition

Simon Blackburn. Sean Murphy. Jacques Stern. Laboratoire d'informatique, Ecole Normale Superieure, Abstract

Proof of Goldbach s Conjecture. Reza Javaherdashti

SOME TRIBONACCI IDENTITIES

ORTHOGONAL MATRIX IN CRYPTOGRAPHY

CHAPTER 10 INFINITE SEQUENCES AND SERIES

Algorithm of Superposition of Boolean Functions Given with Truth Vectors

Practical Spectral Anaysis (continue) (from Boaz Porat s book) Frequency Measurement

The Riemann Zeta Function

Proof of Fermat s Last Theorem by Algebra Identities and Linear Algebra

Oblivious Transfer using Elliptic Curves

SNAP Centre Workshop. Basic Algebraic Manipulation

Infinite Sequences and Series

The "Last Riddle" of Pierre de Fermat, II

A Large Block Cipher using an Iterative Method and the Modular Arithmetic Inverse of a key Matrix

PROBLEM SET 5 SOLUTIONS 126 = , 37 = , 15 = , 7 = 7 1.

Section 5.1 The Basics of Counting

Volume 3, Number 2, 2017 Pages Jordan Journal of Electrical Engineering ISSN (Print): , ISSN (Online):

Properties and Tests of Zeros of Polynomial Functions

Similarity Solutions to Unsteady Pseudoplastic. Flow Near a Moving Wall

Chapter 4. Fourier Series

Recurrence Relations

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

COMPARISON OF FPGA IMPLEMENTATION OF THE MOD M REDUCTION

CS284A: Representations and Algorithms in Molecular Biology

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

Subject: Differential Equations & Mathematical Modeling-III

Chapter 9 - CD companion 1. A Generic Implementation; The Common-Merge Amplifier. 1 τ is. ω ch. τ io

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Solution of Differential Equation from the Transform Technique

PAijpam.eu ON DERIVATION OF RATIONAL SOLUTIONS OF BABBAGE S FUNCTIONAL EQUATION

Algebra II Notes Unit Seven: Powers, Roots, and Radicals

Stochastic Matrices in a Finite Field

On Some Properties of Digital Roots

CALCULATING FIBONACCI VECTORS

ON SOME DIOPHANTINE EQUATIONS RELATED TO SQUARE TRIANGULAR AND BALANCING NUMBERS

CALCULATION OF FIBONACCI VECTORS

~W I F

6.3 Testing Series With Positive Terms

A NEW CLASS OF 2-STEP RATIONAL MULTISTEP METHODS

U8L1: Sec Equations of Lines in R 2

International Journal of Engineering Science Invention Research & Development; Vol. II Issue VIII February e-issn:

4 A Survey of Congruent Results 1

Math 609/597: Cryptography 1

TEACHER CERTIFICATION STUDY GUIDE

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS

Seed and Sieve of Odd Composite Numbers with Applications in Factorization of Integers

subject to A 1 x + A 2 y b x j 0, j = 1,,n 1 y j = 0 or 1, j = 1,,n 2

Chapter Vectors

DIFFERENTIAL CRYPTANALYSIS FOR A 3-ROUND SPN

PAijpam.eu ON TENSOR PRODUCT DECOMPOSITION

Some Basic Diophantine Equations

Some Explicit Formulae of NAF and its Left-to-Right. Analogue Based on Booth Encoding

Decoupling Zeros of Positive Discrete-Time Linear Systems*

Zeros of Polynomials

The Local Harmonious Chromatic Problem

Review of Elementary Cryptography. For more material, see my notes of CSE 5351, available on my webpage

The Random Walk For Dummies

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations

A NEW APPROACH TO SOLVE AN UNBALANCED ASSIGNMENT PROBLEM

MAT1026 Calculus II Basic Convergence Tests for Series

Binary codes from graphs on triples and permutation decoding

Linear Regression Demystified

GUIDELINES ON REPRESENTATIVE SAMPLING

PROPOSING INPUT-DEPENDENT MODE CONTRIBUTION FACTORS FOR SIMPLIFIED SEISMIC RESPONSE ANALYSIS OF BUILDING SYSTEMS

Probability, Expectation Value and Uncertainty

Parallel Vector Algorithms David A. Padua

Theorem: Let A n n. In this case that A does reduce to I, we search for A 1 as the solution matrix X to the matrix equation A X = I i.e.

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

Fuzzy Shortest Path with α- Cuts

1 6 = 1 6 = + Factorials and Euler s Gamma function

Fortgeschrittene Datenstrukturen Vorlesung 11

A GENERALIZATION OF THE SYMMETRY BETWEEN COMPLETE AND ELEMENTARY SYMMETRIC FUNCTIONS. Mircea Merca

( ) (( ) ) ANSWERS TO EXERCISES IN APPENDIX B. Section B.1 VECTORS AND SETS. Exercise B.1-1: Convex sets. are convex, , hence. and. (a) Let.

Matrices and vectors

Complex Analysis Spring 2001 Homework I Solution

Roger Apéry's proof that zeta(3) is irrational

Holistic Approach to the Periodic System of Elements

Product measures, Tonelli s and Fubini s theorems For use in MAT3400/4400, autumn 2014 Nadia S. Larsen. Version of 13 October 2014.

Polynomials with Rational Roots that Differ by a Non-zero Constant. Generalities

11. FINITE FIELDS. Example 1: The following tables define addition and multiplication for a field of order 4.

Using An Accelerating Method With The Trapezoidal And Mid-Point Rules To Evaluate The Double Integrals With Continuous Integrands Numerically

Problem Set 2 Solutions

Section 4.3. Boolean functions

New Version of the Rayleigh Schrödinger Perturbation Theory: Examples

Resistance matrix and q-laplacian of a unicyclic graph

4.3 Growth Rates of Solutions to Recurrences

DETERMINATION OF MECHANICAL PROPERTIES OF A NON- UNIFORM BEAM USING THE MEASUREMENT OF THE EXCITED LONGITUDINAL ELASTIC VIBRATIONS.

MAXIMALLY FLAT FIR FILTERS

Lecture 3 The Lebesgue Integral

Sigma notation. 2.1 Introduction

Mathematical Modeling of Optimum 3 Step Stress Accelerated Life Testing for Generalized Pareto Distribution

C. Complex Numbers. x 6x + 2 = 0. This equation was known to have three real roots, given by simple combinations of the expressions

Correlation Regression

Bertrand s Postulate

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

Some examples of vector spaces

Transcription:

Joural of Computer Sciece 3 (7): 556-560, 2007 ISSN 1549-3636 2007 Sciece Publicatios A Block Cipher Usig Liear Cogrueces 1 V.U.K. Sastry ad 2 V. Jaaki 1 Academic Affairs, Sreeidhi Istitute of Sciece & Techology, Ghatkesar, Hyderabad 2 Kakatiya Istitute of Techology & Sciece, Waragal, Idia Abstract: We have developed a block cipher by usig modular arithmetic iverse ad liear cogrueces. The cipher cotais a key matrix called the outer key. It also icludes aother key, which cotais a set of costats ivolved i the liear cogrueces. This key is called as ier key. The cryptaalysis carried out i this paper idicates that the cipher caot be broke by ay cryptaalytic attack. This cipher is exteded to the case of a larger block wherei iterlacig ad iteratio also play a vital role. Keywords: modular arithmetic iverse, ier key, outer key, liear cogrueces. INTRODUCTION I the literature of cryptography Hill cipher [1] has bee a promiet block cipher. Cosiderig oly 26 alphabetic ters a to z, Hill developed a block cipher whose ecryptio ca be described by the equatio C=KP mod 26, (1.1) where K is a key matrix of size x, P is a plaitext vector, ad C is the ciphertext vector both havig compoets. The decryptio of the cipher is carried out by usig the relatio P=K -1 C mod 26 (1.2) where K -1 is the modular arithmetic iverse [2] of the key matrix K. From the cryptaalysis of the cipher it is see that it caot be broke by bruteforce attack whe the size of the matrix is large. However, i the case of the kow plaitext attack, it is clearly established that the cipher ca be broke by takig appropriately colum vectors of plaitext ad ciphertext. I the preset paper our objective is to modify the Hill cipher by itroducig a additioal key. To this ed, we use liear cogrueces, i the colum vector of the plaitext, wherei the cogrueces cotai the umbers correspodig to the plaitext ters. Here, we cosider a plaitext, which icludes ters that ca be represeted by ASCII code. Thus, we use mod 128 istead of mod 26 used i the Hill cipher. From the cryptaalysis developed i this paper, we fid that the cipher caot be broke by ay cryptaalytic attack. I sectio 2 of this paper, we have discussed the developmet of the cipher. I sectio 3, we have described the algorithms for ecryptio, decryptio ad preseted a procedure for the modular arithmetic iverse of a matrix. I sectio 4, we have illustrated the cipher by cosiderig a example. The cryptaalysis for this cipher has bee carried out i sectio 5.I sectio 6, we have exteded the aalysis to a larger block by iterlacig ad iteratio. The, i sectio 7, we have examied the avalache effect. Fially i sectio 8, we have preseted the computatios ad coclusios. DEVELOPMENT OF THE CIPHER Cosider a plaitext vector, which ca be represeted i the form p = (p 1, p 2, p 3, p ) T. (2.1) Let us suppose that we choose a key matrix K give by K=[K ij ], i=1 to, j=1 to, (2.2) where the matrix K is o sigular, ad its determiat is relatively prime to 128. Correspodig Author: V. Jaaki, Kakatiya Istitute of Techology ad Sciece, Waragal, Idia 556

The aforemetioed coditios are to be satisfied for the existece of the modular arithmetic iverse of K with respect to mod 128. Let C = (C 1,C 2,C 3.C ) T be the ciphertext vector. (2.3) Let us ow itroduce liear cogrueces give by P = K -1 C mod 128 (2.9) where K -1 is the modular arithmetic iverse of K. O usig (2.9) ad (2.8) we get p i, the compoets of the plaitext as we have idicated i the aforemetioed discussio. The problem of the ecryptio, give by the equatio (2.5) ca be writte i the form P i = (a i p i + b i ) mod 128, i=1 to, (2.4) where a i ad b i are costats, chose appropriately, as metioed below. I the process of ecryptio, the ciphertext C ca be writte as C=KP mod 128, (2.5) where P=(P 1,P 2,P 3 P ) T. C 1 C 2 C 3... C k 11 k 12. k 1 k 21 k 22...k 2 k 31 k 32 k 3 = P 3 mod 128....... k 1 k 2 k P 1 P 2.. P (2.10) Here the compoets of the plaitext vector p i ( i =1 to ) are obtaied from the cosecutive ters of the give plaitext. Here i (2.4), we choose each oe of the a i s as a odd iteger, which lies betwee 0 ad 127, ad each oe of the b i s as ay iteger lyig betwee 0 ad 127.The reaso for this choice of the values of a i ad b i, will be clear very soo. Whe a i, b i ad p i are kow to us we ca readily calculate P i by usig (2.4). O the other had, whe the P i is kow to us, p i ca be determied by solvig (2.4). As we have assumed that b i is a iteger which lies betwee 0 ad 127, we ca write (2.4) i the form P i - b i = a i p i mod 128. (2.6) Here firstly we have to obtai P i where P i =(a i p i +b i ) mod 128.For this we require the values of a i, ad b i (i=1 to ).To this ed we itroduce a key comprisig the umbers a 1,a 2. a ad b 1,b 2...b ad call this as the ier key. Subsequetly we have to apply the key matrix K for obtaiig C. Thus we cosider this key as the outer key. Here it is to be oted that i the process of decryptio firstly the outer key is to be applied ad the the ier key is to be used. Thus both the keys are to be supplied by the seder i a secret maer to the receiver. I what follows we desig the algorithms for the ecryptio, the decryptio, ad the modular arithmetic iverse of the key matrix. As a i is a odd iteger, which lies betwee 0 ad 127, it is relatively prime to 128. Thus we obtai d i, the multiplicative iverse if a i, such that a i d i mod 128=1 (2.7) where d i is the multiplicative iverse of a i. From (2.6) ad (2.7), we get p i = (P i - b i ) d i mod 128. (2.8) Now let us cosider the process of decryptio. From the equatio (2.5) we get 557 ALGORITHMS 3.1 Algorithm for ecryptio 1. for i=1 to 2. read p i, a i, b i. 3. P i =( p i a i + b i ) mod 128. 4. read the key matrix K. 5. C=KP mod 128. 6. write C.

3.2 Algorithm for decryptio. 1. for i=1 to read a i, b i. 2. read K,C. 3. Fid K -1. 4. P= K -1 C mod 128. 5. for i=1 to Fid d i such that a i d i mod 128=1. 6. p i =( P i - b i ) d i mod 128 7. write p i 3.3 Algorithm for modular arithmetic iverse // A is a x matrix. N is a positive iteger with which //modular arithmetic iverse is carried out. Here N=128. 1. Fid the determiat of A. Let it be deoted by, where 0. 2. Fid the iverse of A. The iverse is give by [A ji ]/. 3. for i = 1 to N if ( (i) mod N = 1 ) d = i; // is relatively prime to N. break; 4. B=(d[A ji ] ) mod N // B is the modular arithmetic iverse of A ILLUSTRATION OF THE CIPHER Let us cosider the plaitext Bur the forest as soo as the thieves eter ito it. Let the key matrix K be take i the form K = 99 4 12 9 5 12 13 125 18 26 6 14 30 10 124 24 26 87 28 29 30 98 50 44 63 45 78 89 120 56 127 45 59 110 53 111 p = (66 117 114 110 32 116 ) T. (4.2) Let us choose the ier key i the form (a 1 a 2 a 3 a 4 a 5 a 6 b 1 b 2 b 3 b 4 b 5 b 6 ) = (45 23 11 21 33 55 42 78 12 110 45 24) (4.3) O usig (4.2) ad (4.3), ad the ecryptio algorithm 3.1, we get ( P 1 P 2 P 3 P 4 P 5 P 6 ) = ( 68 81 114 116 77 4 ) (4.4) ad C = ( 45 83 104 27 1 68 ) T. (4.5) The o usig the algorithm 3.3, the modular arithmetic iverse of the matrix K, deoted by K -1,is obtaied as K -1 = 108 97 38 75 76 12 88 68 98 57 114 66 21 85 9 83 21 61 6 95 54 68 13 28 23 74 112 111 95 76 26 110 91 46 118 96 It ca be readily verified that K -1 K mod 128 = K K -1 mod 128 = I. The o usig the algorithm 3.2, we get P= (68 81 114 116 77 4) T (4.7) ad (p 1 p 2 p 3 p 4 p 5 p 6 ) = ( 66 117 114 110 32 116 ). (4.8) The values of p 1.p 6 give by (4.2) ad (4.8) are the same. Thus we get back the plaitext. CRYPTANALYSIS (4.6) I the process of ecryptio we have Here =6. (4.1) C=KP mod 128, (5.1) Now let us focus our attetio o the first six ters of the plaitext uder cosideratio. The first six where P i = (a i p i + b i ) mod 128, i=1 to. (5.2) ters are Bur t. Here whe the ciphertext C is kow to us, the Cosiderig the correspodig ASCII codes, the plaitext vector p ca be obtaied as plaitext p ca be foud if the matrix K, ad the a i ad 558

the b i are kow to us, i.e if the outer key ad the ier key are kow to us. The key matrix is of size. The a i s are i umber ad the b i s are also i umber. The umber of combiatios of the secret key, icludig the outer key K ad the ier key comprisig a i ad b i, ca be determied as follows. The outer key K cotais 2 umbers wherei each oe ca be represeted i terms of 7 biary. Thus the key space correspodig to this key is give by 2 2. Now let us cosider the key space of the ier key. As the a i s are purely odd umbers, lyig betwee 0 ad 127, they ca be represeted by 7 biary wherei the least sigificat bit all the while remai as 1. As the umber of a i s is, the possible umber of combiatios of the a i s is 2 6. As b i is ay umber that lies betwee 0 ad 127, the possible umber of combiatios of b i s is 2. Thus the total search space for the secret key icludig the outer key K, ad the ier key a 1, a 2. a, b 1,b 2...b ca be obtaied as 2 2 2 6 2 = 2 2 + 13. For every possible key of the key space, the attacker has to fid the plaitext till he gets a meaigful oe. This process is to be carried out at least with half of the possible keys. If a plaitext correspodig to a secret key, ca be obtaied, by the decryptio process i 10-7 sec., the the time T required for computig with half of the possible keys, is give by T=. 2 2 + 13 ceturies, where =10-7 /60 60 24 365 100 = 1.585 10-18 Let us ow cosider the kow plaitext attack. I this case we kow as may pairs of plaitext ad ciphertext as we require. For each plaitext vector p we are to fid P s for all possible combiatios of the values of a i ad b i i.e, for each possible ier key. Thus the umber of P s correspodig to each p is (2 6 ) (2 7 ) =2 13 as a i is a odd iteger lyig betwee 0 ad 127, ad b i is ay iteger lyig betwee 0 ad 127. If we take plaitext vectors ad form a matrix with these vectors, the the umber of matrices cotaiig the correspodig Ps is 2 13 2. I view of the example give i sectio 4,we have =6.I this case the umber of matrices cotaiig P s are 2 13x36. Now, let us suppose that fidig the modular arithmetic iverse of each matrix takes 10-7 sec., the fidig all possible modular arithmetic iverses will take 2 13x36 10-7 10 133 sec 3.17 10 122 ceturies. Thus we coclude that the stregth of the cipher icreases eormously, ad it caot be broke by the kow plaitext attack. A LARGER BLOCK CIPHER USING INTERLACING AND ITERATION I sectio 2, we have developed the cipher for a block of ters. Let us ow exted the aalysis for a block of 2 ters by itroducig the cocepts iterlacig ad iteratio. I this sectio, the procedures used for ecryptio ad decryptio are preseted i Figures 1 ad 2. I the procedure of ecryptio, the block cosistig of 2 ters is divided ito two blocks left half ad right half each cotaiig ters. O these two halves the same procedure, discussed i sectio 2, is applied. The we obtai ters as output o both the sides. The ters o each side are coverted ito biary. 559

Plaitext: 2 Roud 1 Plaitext: 2 chars 392 Roud 16 Iterlace Iterlace Roud 2 P Roud 16 P Decompose Decom pose Decompose Decom pose P bit Roud 2 Roud 1 Iterlace Ciphertext:2 ters Decompose Decom pose Ciphertext:2 ters bit Fig.1: Procedure for Ecryptio i the case of larger block cipher cotaiig 2 ters Fig.2: Procedure for Decryptio i the case of larger block cipher cotaiig 2 ters 560

The process of iterlacig ca be described as follows. The first bit of left side is placed as the first bit of a array. The first bit of the right side is placed as a secod bit i the array. The the secod bit of the left is placed i the third place of the array. This process is cotiued till we exhaust all the o both the sides. The procedure described above costitutes oe roud. This process is repeated for 16 rouds ad the ultimately we get the ciphertext. The process of decryptio is completely a reverse process of ecryptio. The decompose, used i decryptio, is a fuctio i which the 14 of the 2 ters are separated ito o the left side ad o the right side. By usig the process of ecryptio we are able to ecrypt 2 ters ad obtai the correspodig ciphertext. Further, by performig decryptio we are able to obtai the plaitext of legth 2 ters from the ciphertext. I order to illustrate the above procedure, let us cosider the plaitext Bur the for (6.1) which is cosistig of 12 ters. Followig the ecryptio procedure give i Fig.1, the ciphertext correspodig to the plaitext (6.1), is obtaied i terms of biary as follows 100011110010101000110111011100001001010111010 100000011010001111101100101101000011101 (6.2) O applyig the procedure give i Fig.2, the ciphertext (6.2) ca be coverted ito the plaitext give by (6.1). AVALANCHE EFFECT Let us cosider the plaitext give by (6.1). O chagig the first ter B i the plaitext to C, the plaitext assumes the form Cur the for. (6.3) I biary bit represetatio (6.1) ad (6.3) differ oly oe i biary bit as B ad C differ i oe bit. Now o applyig the ecryptio procedure give i Fig.1, o the modified plaitext (6.3), we get the ciphertext i the form 110100010011111111100100010001111001010101011 101111000110010111010011000101101100001 (6.4) Here we otice that (6.2) ad (6.4) differ i 30. This idicates that the avalache effect is ot at all less sigificat. Cosider the effect o accout of a chage i the ier key, which plays a promiet role o the cipher. Let us ow we take the ier key as 45 21 11 21 33 55 42 78 12 110 45 24 (6.5) istead of (4.3). O usig this key ad the ecryptio procedure give i Fig.1, we get the ciphertext i the form 011010011101010101000111111000000101000000001 001101110010010000001010011101011010000 (6.6) O comparig (6.2) ad (6.6) we fid that they differ i 31. This agai shows that the avalache effect is sigificat. COMPUTATIONS AND CONCLUSIONS I this paper we have developed a block cipher by usig liear cogrueces ad modular arithmetic iverse. Firstly the plaitext vector is modified by usig the liear cogrueces. These cogrueces cotai a set of costats, which form a key called the ier key. The modified plaitext is operated by a key matrix called as outer key The ier ad outer keys are used i the process of ecryptio ad i the process of decryptio, ad they form the secret key. This cipher is exteded to the case of larger block (block size is doubled) by itroducig iterlacig ad iteratio. Here all the programs for ecryptio ad decryptio are writte i C laguage. O performig computatios we have obtaied the ciphertext for a give plaitext ad vice-versa. The ciphertext obtaied i the case of the plaitext Bur the forest as soo as the thieves eter ito it. is give by 100011110010101000110111011100001001010111010 100000011010001111101100101101000011101111101 010111101011000010110000000011010111010110001 001011101000110101001101100000100101110000001 001111011011111010011000010011101110000010001 001101001010000001100110101100000001100110110 000100100111011111100011001110110011001100111 000111111100001100100001101101100010110011110 000010100010000011110101111001101101100110101 010000111001010 From the cryptaalysis it is clealy see that the cipher caot be broke by ay cryptaalytic attack. The iterlacig ad the iteratio stregthe the cipher remarkably. From the aalysis preseted i this paper we fid that the outer key ad the ier key both play a vital role i stregtheig the cipher. The stregth is further ehaced i the case of the larger block. REFERENCES 1. Cryptography ad Network Security, William Stalligs, 3 rd Editio, Pearso Educatio 2. O the Modular Arithmetic Iverse i the Cryptology of Hill cipher, 2005. V.U.K.Sastry, V.Jaaki, Proceedigs of North America Techology ad Busiess Coferece, Caada 561