Sunteți pe pagina 1din 7

International Journal of Trend in Scientific Research and Development, Volume 1(4), ISSN: 2456-6470

www.ijtsrd.com

Symmetric Key Generation Algorithm in Linear Block Cipher Over


LU Decomposition Method
P.Sundarayya M.G.Vara Prasad
Department of Mathematics, Department of Mathematics,
GITAM University, Visakhapatnam, NSRIT, Visakhapatnam,
Andhra Pradesh, India Andhra Pradesh, India

ABSTRACT private key to decrypt it .Symmetric encryption is


described to as conventional encryption or single key
In symmetric key algorithm in linear block cipher to encryption. Conventional encryption can be divided
encrypt and decrypt the messages using matrix and into two categories.
inverse matrix. In this proposed technique generate
lower and upper triangular matrices from square Classical techniques
Modern techniques
matrix using decomposition. In encryption process,
the key is lower triangular matrix and decryption
process, the key is upper triangular matrix under The hallmark of Symmetric key encryption is that the
modulation of prime number. We illustrate the cipher or key to the algorithm is shared. Linear block
proposed technique with help of examples. Cipher is one of the basic components of classical
ciphers. A Liner block cipher is a method of
Keywords: liner block cipher, symmetric matrix key,
encryption by which units of plaintext are substituted
encryption, and decryption, lower and upper
with cipher text according to a regular system; the
triangular decomposition
units maybe pairs
1. INTRODUCTION of letters, triplets of letters, poly of letters and
mixtures of the above. The receiver deciphers the text
Cryptography is the science of making messages in by performing an inverse function [2]. Hill cipher is a
secret code and having lived art. Cipher is block cipher that has several advantages such as
mathematical function which is used in encryption disguising
and decryption process. Cryptography systems can be
divided into two cryptosystems. letter frequencies of the plaintext, its simplicity
because of using matrix multiplication for enciphering
Symmetric and deciphering, its high speed, and high throughput
Asymmetric. [4].In this proposed work, Instead of matrix and
Symmetric key cryptography is classical cryptography inverse matrix, idea of generate the symmetric key
is divided into four parts. generation can be decomposed matrix into lower and
The encryption algorithm upper triangular matrices. In encryption process using
lower triangular matrix and decryption process the
The encryption key
cipher text convert into plain text using upper
The decryption algorithm
triangular matrix under modulation of prime number.
The decryption key
In this proposed technique overcome of known plain
Symmetric cryptosystems use the secret keyto encrypt
text attack when the order of the key matrix known.
and decrypt message, and asymmetric cryptosystems
use the public key to encrypt a message and the
68
IJTSRD | May-Jun 2017
Available Online @www.ijtsrd.com
International Journal of Trend in Scientific Research and Development, Volume 1(4), ISSN: 2456-6470
www.ijtsrd.com
that an opponent able to obtain mplaintext/cipher text
character pairs has a high probability of completely
2. The Hill cipher breaking the system, i.e., he/she can obtain the matrix
The Hill cipher algorithm takes m successive plaintext K by solving the linear system of equations.
letters and substitutes m cipher text letters for them.
The substitution is determined by m where m is a
positive integer, the idea is to take m linear 3. Cryptanalysis of known plain-text attack when
combinationsof the m alphabetic characters in one m is known of Hillcipher
plaintext elementand produce m alphabetic characters
in onecipher text element. Then, an mmmatrix K is Despite Hill cipher being difficult to break with a
used asa key of the system such that K is invertible cipher text-only attack, it succumbs to a known
modulo n (Peterson, 2000; Lerma, 2005) andg.c.d((det plaintext attack assuming that the opponent has
K)mod n, n)=1. Let kijbe the entryof K. For the determined the value of the m being used. Let mbe
plaintext block R=(x1, x2,..,xm) (thenumerical distinct plaintext-cipher text pairs, say, xj=(x1j, x2j,
equivalents of m letters) and a key matrix K,the ,xmj) and yj=(y1j, y2j, , ymj), 1jm, such that
corresponding cipher text block S=(y1, y2, , ym) yj=ek(xj),Define two m m matrices R=(xij) and
S=(yij).Whenever K is invertible in the encryption
Encryption: The cipher text is obtained from the equation S=RK, the opponent can compute the
plaintext by means of a linear transformation. unknown key of ciphering as K=R1S and thereby
break the cipher (Barr, 2002). If R is not invertible,
then it will be necessary to try other sets of m
plaintext-cipher text pairs. When m is unknown,
assuming that m is not too large, the opponent could
S= (mod n)
simply try m=2, 3, , until the key is found. If the
guessed value of m was incorrect, the obtained key
matrix would be not agree with further plaintext-
cipher text pairs (Stinson,2002).[1]
Decryption: The reverse process, deciphering, is
computed by
4. The Proposed Technique

R= ( mod n) The proposed technique takes m successive plaintext

letters and substitutes m cipher text letters for them.

The substitution is determined by m where m is a
There might be some complications with the positive integer, the idea is to take m linear
procedure outlined above due to the fact that not all combinationsof the m alphabetic characters in one
the matrices K have an inverse K1 over Zn. In fact, plaintext elementand produce m constant matrix
those matrices K with determinant 0, or with a B. In this proposed technique has generation of key
determinant that has common factors with the matrices using LU Decomposition method, i.e A=LU
modulus n, will be singular over Zn, and therefore and g.c.d((det A)mod q, q)=1 . Now constant matrix
they will not be eligible as key matrices in the Hill B=AP = . In encryption process LC=B
cipher scheme (Overbeyet al., 2005)[1]. Furthermore, C=L B and decryption process UP=C P=U-1B
-1

due to its linear nature, the basic Hill cipher succumbs where P is plain text and C is cipher text.
to known-plaintext attacks. Indeed, it is easy to show

69
IJTSRD | May-Jun 2017
Available Online @www.ijtsrd.com
International Journal of Trend in Scientific Research and Development, Volume 1(4), ISSN: 2456-6470
www.ijtsrd.com
4.1. Generating lower and upper triangle matrices 1 0 0
using LU decomposition method WhereL= 1 0 and

Theorem: Every m-square matrix A can be expressed 1

as product of two triangular matrices, one lower 0
triangular and another upper triangular thus A=LU, U=
where q is prime number and A 0 0

If m=2 order of matrix then A=LU


1 0
= becomes = 0
1

0 0
0 0
Multiplying the matrices L and U and equating
0 0 corresponding elements from both sides

= , =
= =
0 0
0 = + =
Where L= and

Example 4.1.1
0
U= 4 1
0 0 ConsiderA=
2 3
4 1
A= can be decomposed into L and
2 3
To simplify calculations we may choose 4 2 1 0
U.A=LU = 0
( , ,.. )= 6 3 1

(1,1, . . ,1) ( )

4 1
= + , = 4, =
2 3
1, =2 =
=

+ =3 =
1 0 0
1 0 0
1 0 1 0 4 1 4 1
0 0 L= = 1 mod 29, U= = 0
1 15 1 0 17

mod 29, Therefore L, U

If m=3 order of matrix then A=LU becomes

70
IJTSRD | May-Jun 2017
Available Online @www.ijtsrd.com
International Journal of Trend in Scientific Research and Development, Volume 1(4), ISSN: 2456-6470
www.ijtsrd.com

=

1 0 0
=
1 0 0
1 0 0


(
Multiplying the matrices L and U and equating
corresponding elements from both sides mod q)

4.3. Encryption
u11=all, u12=a12, u13=a13. Let C be a block of cipher text and B is constant
l21u11=a21 l21= matrix then encryption can be defined as AC=B and
LC=B C=L-1B
l31u11=a31l31=
l21u21+u22=a22u22=a22-( )

l21u13+u23=a23u23= ( ) C= be a block of cipher
( )

l31u13+l32u22=a32 l32= text
( )

l31u13+l33u23=a33u33= -
( )
1 0 0
( )
( ) 1 0

1
4.2. Calculation of constant matrix
=
Let P is block of given plain text. In that block P
assigns labels fromtable -1according to given plain
text. Let be constant matrix and A is generator key
matrix then B=AP mod q, where q is prime number.


=

1 0
A= is matrix of order m, 0
1 0

1

P= and

4.3.1. Encryption algorithm

B=
Step1: Calculate B=AC (mod q)

71
IJTSRD | May-Jun 2017
Available Online @www.ijtsrd.com
International Journal of Trend in Scientific Research and Development, Volume 1(4), ISSN: 2456-6470
www.ijtsrd.com
Step2: Select Key L as square matrix order m from 4 1
A= can be decomposed into L and
A=LU. 2 3
4 1 1 0 4 1
U.A=LU =
Step3: Calculate C=L-1B 2 3 15 1 0 17

Step4:Calculate C= C (mod q) Encryption:

4.4. Decryption B= AP mod 29

4 1 6 14 11
Let P be a block of plain text and C be a block of B= (mod 29)
2 3 14 6 4
cipher text thenUP=C P=U-1C
9 4 19
B= (mod 29)
25 17 5
0
Let C= be a block of cipher text.
0 0
1 0
Encryption key L=
15 1
=

LC=B C=L-1B mod 29

=

1 0 9 4 19
0 C= ( mod 29)
15 1 25 17 5

0 0

9 4 19
C= =
4.4.1. Decryption algorithm 14 15 10

Step1: Select Key U as square matrix order m from


A=LU.
This gives Cipher text C=JOEPTK
-1
Step2: Calculate P= U C
Decryption:
Step3: Calculate P= P (mod q)
4 1
Decryption key U=
5. Example of proposed technique 0 17
UP=C P=U-1C mod 29
Consider the plain text P=GOOGLE, is
4 1 9 4 19
block of plain text. P= (mod 29)
0 17 14 15 10
In the 29-letter alphabet in which A-Z have numerical 6 14 11
equivalent 1-26,?=27,space=28 P=
14 6 4
6 14 11 Which gives Plain text =GOOGLE
P= is block of plain text
14 6 4
TakingFrom Example4.1.1

72
IJTSRD | May-Jun 2017
Available Online @www.ijtsrd.com
International Journal of Trend in Scientific Research and Development, Volume 1(4), ISSN: 2456-6470
www.ijtsrd.com
6. Cryptanalysis of proposed technique Conclusion

The block cipher can be difficult to break with a In the proposed work the symmetric key matrix of
cipher text only attack. In this section, we discuss classical Hill cipher is to make changes in order to
Cryptanalysis of known plain-text attack. We make greatest security of communication text. In this

assumed that K is key matrix is an element of paper symmetric key generation is more secure due to
the decomposition of the matrix into lower and upper
triangle matrices to encrypt and decrypt the messages
.The Proposed Cryptosystem to get better the plaintext
6.1.Algorithm for known plain-text attack when m
attack and also to get better cipher text attack, since
is known
the lower triangle matrix is using for encryption
Step1: Let P= (P1,P2,,Pn) be a block of plain text. process and upper triangle matrix is using for
decryption process over residue modulo prime
Where Pi= Let C= (C1,C2,,Cn) be a number

References
block of cipher text. Where
[1] Douglas R. Stinson,Cryptography Theory and
Ci= and select randomly pairs of plaintext and practice ,third edition (2006)by chapman & Hall/CRC

Taylor &Francis Group.
corresponding cipher text are
[2] Koblitz, N. A Course in Number Theory and
(Pi,Ci)for i=1,2,3.n.
Cryptography, 2nd ed. New York: Springer-Verlag,
Step2: The known plaintext cipher text pairs 1994.
gives us a system of equations of the form
[3]A. Menezes, P. van Oorschot, and S. Vanstone,
[Ci- Cj]=K[Pi- Pj] for 1 ijm , we Handbook of Applied Cryptography, CRC Press,
get general equation C=KP 1996
Step 3: Determine K=P-1C mod q
[4]G.R. Blakley, Twenty years of cryptography in the
6.2. Example for cryptanalysis of proposed open literature, Security and Privacy 1999
technique when m=2 is known Proceedings of the IEEE Symposium, 9-12 May1999

Taking from 6.Example we get plaintext blocks


[5]J. Overbey, W. Traves, J. Wojdylo, On the key
6 14 11
P1= , P2= ,P3= , cipher text space of the Hill cipher. Cryptologia, 29(1), 2005, 59-
14 6 4
9 4 19 72
blocksC1= , C2= ,C3=
6 15 10
then( ) = K( ) [6]Introduction to Analytic Number Theory, fifth
edition. T. Apostol .Undergraduate Texts in
5 15 8 3
=K K= Mathematics, Springer-Verlag, New York, 1995
9 5 8 2
5 15 8 3 4 1
= (mod 29) [7]Higher engineering mathematics khanna publishers
9 5 8 2 0 17
by Dr. B.S. Grewal 40th edition

73
IJTSRD | May-Jun 2017
Available Online @www.ijtsrd.com
International Journal of Trend in Scientific Research and Development, Volume 1(4), ISSN: 2456-6470
www.ijtsrd.com
[8]P.B. Bhattachary SK Jain S.R. Nagpaul First
course in Linear Algebra 1983
[9] W. H.; Flannery, B. P.; Teukolsky, S. A.; and
Vetterling, W. T. "LU Decomposition and Its
Applications." 2.3 in Numerical Recipes in
FORTRAN: The Art of Scientific Computing, 2nd ed.
Cambridge, England: Cambridge University Press, pp.
34-42, 1992.

[10] Bunch, James R.; Hopcroft, John (1974),


"Triangular factorization and inversion by fast matrix
multiplication", Mathematics of Computation, 28
(125): 231236

[11]Cormen, Thomas H.; Leiserson, Charles E.;


Rivest, Ronald L.; Stein, Clifford (2001), Introduction
to Algorithms, MIT Press and McGraw-Hill,

[12]Okunev, Pavel; Johnson, Charles R. (1997),


Necessary And Sufficient Conditions For Existence of
the LU Factorization of an Arbitrary Matrix,

[13]ress, WH; Teukolsky, SA; Vetterling, WT;


Flannery, BP (2007), "Section 2.3", Numerical
Recipes: The Art of Scientific Computing (3rd ed.),
New York: Cambridge University Press, ISBN 978-0-
521-88068-8.

[14] SurajoAbubakarWadaInt. Journal of Engineering


Research and Applications Vol. 6, Issue 2, February
2016

74
IJTSRD | May-Jun 2017
Available Online @www.ijtsrd.com

S-ar putea să vă placă și