[IEEE 2009 International Conference on Information and Communication Technologies (ICICT) - Karachi,...

5
Development of Symmetric Cryptosystem using Matrices with Less Overhead on Communication Channel Abstract--Many systems have been developed by mathematicians using symmetric and Asymmetric Cryptography e.g. Ceaser Cipher, Stream Ciphers, RSA, DES, IDEA, RC-4, ElGamal signatures, LFSR, Ext. Euclidean Algorithm, Lamport Signatures, Merkle Hellman Knapsack. Etc [1]. Some of them are very strong to be broken by cryptanalysts. Some are very easy and even can be broken by the measuring the frequency of alphabets in a specific cipher text. All these system carries some overhead of key with which a plain text is encrypted, for the communication channel .I thought of an idea in which product component which will be 5*1 matrix will be carried on the communication channel rather than 5*5. This 5*5 will be obtained on the receiver side inversing and producting the received matrix with symmetric key which will be known to both sender and receiver. This idea is achieved by peeping into the systems of CDMA (Code Division Multiple Access) [6] in which Walsh tables are minimized by multiplying and less overhead is achieved by communication channel. I am applying that idea in the context of cryptosystems. My Cryptosystem is that much strong enough to be broken by cryptanalyst but fewer loads for communication channel especially for Wireless Networks, Ad- Hoc Networks and Sensor Networks in minimum energy and less memory usage is main goal. The name suggested for this cryptosystem is as BasitMaxCryptoSystem. I. INTRODUCTION My designed cryptosystem is based on the methods of Linear Algebra and Numerical Analysis methods. There are a class of algorithms for cryptography that use trivially related, often identical, cryptographic keys for both decryption and encryption. The encryption key is trivially related to the decryption key, in that they may be identical or there is a simple transform to go between the two keys. The keys, in practice, represent a Shared Secrets between two or more parties that can be used to maintain a private information link. [8].Let A is 5*5 matrix which is our plain text to be transferred. Jalal F. Al-Muhtadi, A.Basit and M. Mahmud are with College of Computer & Info. Sciences [email protected]., [email protected], [email protected]. The numbers in matrix A will represent corresponding ASCII values for a chosen text. e.g. 65 =A, 66=B, 67=C and so on. And X is the cipher text matrix Where B is 5*1 matrix and will be considered as symmetric key [4],[5].The equation can be written as : AX=B (1) Or X=A -1 B (2) (This can be found out by many methods e.g. Gaus Elimination, LU Decomposition, SOR, Dolittle, and Deflation). While X is cipher text to be transmitted on communication channel. The decryption process is the reverse of the above process i.e. on receiver we get X matrix i.e. cipher text and B matrix i.e. Symmetric key [4], [5] is already present .So we need to find out the plain text that is X. Since AX=B, A=X-1B (This can be found out by many methods e.g. Gaus Elimination, LU Decomposition, SOR, Dolittle, and Deflation) Where A is the plain text which the sender intend to send in cipher form. II. EXPERIMENTAL RESULTS The encryption of the matrix above is explained by following examples in MATLAB program and results bellow. A. Selection of Matrices The two matrices that I selected for encryption process are [7.10] Plain Text (P.T) P1= U V W X Y P Q R S T K L M N O F G H I J A B C D E Jalal F. Al-Muhtadi, Abdul Basit, Maqsood Mahmud 978-1-4244-4609-4/09/$25.00 ©2009 IEEE

Transcript of [IEEE 2009 International Conference on Information and Communication Technologies (ICICT) - Karachi,...

Page 1: [IEEE 2009 International Conference on Information and Communication Technologies (ICICT) - Karachi, Pakistan (2009.08.15-2009.08.16)] 2009 International Conference on Information

Development of Symmetric Cryptosystem using Matrices with Less Overhead on Communication Channel

Abstract--Many systems have been developed by mathematicians using symmetric and Asymmetric Cryptography e.g. Ceaser Cipher, Stream Ciphers, RSA, DES, IDEA, RC-4, ElGamal signatures, LFSR, Ext. Euclidean Algorithm, Lamport Signatures, Merkle Hellman Knapsack. Etc [1]. Some of them are very strong to be broken by cryptanalysts. Some are very easy and even can be broken by the measuring the frequency of alphabets in a specific cipher text. All these system carries some overhead of key with which a plain text is encrypted, for the communication channel .I thought of an idea in which product component which will be 5*1 matrix will be carried on the communication channel rather than 5*5. This 5*5 will be obtained on the receiver side inversing and producting the received matrix with symmetric key which will be known to both sender and receiver. This idea is achieved by peeping into the systems of CDMA (Code Division Multiple Access) [6] in which Walsh tables are minimized by multiplying and less overhead is achieved by communication channel. I am applying that idea in the context of cryptosystems. My Cryptosystem is that much strong enough to be broken by cryptanalyst but fewer loads for communication channel especially for Wireless Networks, Ad-Hoc Networks and Sensor Networks in minimum energy and less memory usage is main goal. The name suggested for this cryptosystem is as BasitMaxCryptoSystem.

I. INTRODUCTION

My designed cryptosystem is based on the methods of Linear Algebra and Numerical Analysis methods. There are a class of algorithms for cryptography that use trivially related, often identical, cryptographic keys for both decryption and encryption. The encryption key is trivially related to the decryption key, in that they may be identical or there is a simple transform to go between the two keys. The keys, in practice, represent a Shared Secrets between two or more parties that can be used to maintain a private information link. [8].Let A is 5*5 matrix which is our plain text to be transferred.

Jalal F. Al-Muhtadi, A.Basit and M. Mahmud are with College of Computer & Info. Sciences [email protected]., [email protected], [email protected].

The numbers in matrix A will represent corresponding ASCII values for a chosen text. e.g. 65 =A, 66=B, 67=C and so on. And X is the cipher text matrix Where B is 5*1 matrix and will be considered as symmetric key [4],[5].The equation can be written as :

AX=B (1) Or

X=A-1B (2)

(This can be found out by many methods e.g. Gaus

Elimination, LU Decomposition, SOR, Dolittle, and Deflation). While X is cipher text to be transmitted on communication channel. The decryption process is the reverse of the above process i.e. on receiver we get X matrix i.e. cipher text and B matrix i.e. Symmetric key [4], [5] is already present .So we need to find out the plain text that is X. Since AX=B, A=X-1B (This can be found out by many methods e.g. Gaus Elimination, LU Decomposition, SOR, Dolittle, and Deflation) Where A is the plain text which the sender intend to send in cipher form.

II. EXPERIMENTAL RESULTS The encryption of the matrix above is explained by

following examples in MATLAB program and results bellow. A. Selection of Matrices

The two matrices that I selected for encryption process are [7.10] Plain Text (P.T) P1= U V W X Y P Q R S T K L M N O F G H I J A B C D E

Jalal F. Al-Muhtadi, Abdul Basit, Maqsood Mahmud

978-1-4244-4609-4/09/$25.00 ©2009 IEEE

Page 2: [IEEE 2009 International Conference on Information and Communication Technologies (ICICT) - Karachi, Pakistan (2009.08.15-2009.08.16)] 2009 International Conference on Information

ASCII Equivalent Plain Text (P.T) P1= 85 86 87 88 89 80 81 82 83 84 75 76 77 78 79 70 71 72 73 74 65 66 67 68 69 Plain Text (P.T) P2= E I L N O D H K M N C G J K L B F G H I A B C D E ASCII Equivalent Plain Text (P.T) P2= 69 73 76 78 79 68 72 75 77 78 67 71 74 75 76 66 70 71 72 73 65 66 67 68 69

Note: P2 For Jacobi Method especially.P1 is a non-symmetric matrix with ASCII values [7] and will be used for these methods i.e. Simple Gauss Elimination, Gauss Jordan, LU Decomposition (Doolittle and Croute), Iterative methods (SOR), eigenvalues and eigenvectors Method (Power method, Inverse Power Method, Shift Inverse Power Method),Deflated Method. P2 is used for eigenvalues extraction by Jacobi Method because it is mandatory to have asymmetric method for Jacobi Methods for our encryption process.

III. ENCRYPTION BY DIRECT METHOD

A. Method 1: Simple Gauss Elimination Method

% Enter Plain Text A and symmetric key b to generate cipher x matrix % Function to find The Simple Gaussian elimination Method function x = WP(B) [n,t]= size(B); U = B; for k=1:n-1; for i = k:n-1; m=U(i+1,k)/U(k,k); for j = 1:t; U(i+1,j)=U(i+1,j)-m*U(k,j); end; end; end; i=n; x(i,1)= U(i,t)/U(i,i); for i = n-1:-1:1; s=0; for k=n:-1:i+1; s=s+U(i,k)*x(k,1);

end x(i,1)= (U(i,t)-s)/U(i,i); end; B; U; x; end % B=[1 2 0 3;-1 0 -2 -5;-3 -5 1 -4] % x=WP(B) % disp(x) B. Simple Gaussian Elimination By MATLAB

Enter Plain Text (P.T) Matrix [65 66 67 68 69; 70 71 72 73 74; 75 76 77 78 79; 80 81 82 83 84; 85 86 87 88 89 ] A = 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 Input the Sending Data Matrix[1;2;3;4;5] X =1, 2, 3, 4, 5 B = 65 66 67 68 69 1 70 71 72 73 74 2 75 76 77 78 79 3 80 81 82 83 84 4 85 86 87 88 89 5 Cipher Text (C.T) =ans = -0.0286 0.0776 0.1212 -0.1989 0.0649

IV. ITERATIVE METHOD A. Method 6: SOR Method

% Enter Plain Text A and symmetric key b to generate cipher x matrix function sor(A, b, N) n = size(A,1); %splitting matrix A into the three matrices L, U and D D = diag(diag(A)); L = tril(-A,-1); U = triu(-A,1); Tj = inv(D)*(L+U); %Jacobi iteration matrix rho_Tj = max(abs(eig(Tj))); %spectral radius of Tj % w = 2./(1+sqrt(1-rho_Tj^2)); %optimal overrelaxation parameter w=1.27; disp('w =');disp(w);

Page 3: [IEEE 2009 International Conference on Information and Communication Technologies (ICICT) - Karachi, Pakistan (2009.08.15-2009.08.16)] 2009 International Conference on Information

Tw = inv(D-w*L)*((1-w)*D+w*U);%SOR iteration matrix cw = w*inv(D-w*L)*b; %constant vector needed for iterations tol = 1e-05; k = 1; x = zeros(n,1); %starting vector while k <= N x(:,k+1) = Tw*x(:,k) + cw; if norm(x(:,k+1)-x(:,k)) < tol disp('The procedure was successful') disp('Condition ||x^(k+1) - x^(k)|| < tol was met after k iterations') disp(k); disp('x = ');disp(x(:,k+1)); break end k = k+1; end if norm(x(:,k+1)- x(:,k)) > tol || k > N disp('Maximum number of iterations reached without satisfying condition:') disp('||x^(k+1) - x^(k)|| < tol'); disp(tol); disp('Please, examine the sequence of iterates') disp('In case you observe convergence, then increase the maximum number of iterations') disp('In case of divergence, the matrix may not be diagonally dominant') disp(x'); end B. SOR Method in MATLAB

Enter the Plain Text (P.T) in ASCII Matrix [65 66 67 68

69; 70 71 72 73 74; 75 76 77 78 79; 80 81 82 83 84; 85 86 87 88 89 ] A = 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 Input the initial Approximation Matrix [1;2;3;4;5] X = 1 2 3 4 5 B = 65 66 67 68 69 1 70 71 72 73 74 2 75 76 77 78 79 3 80 81 82 83 84 4 85 86 87 88 89 5 x =

0 0 0 0 0 Cipher Text (C.T) =x = 0 0 0 0 0 0 1.0000 0.0231 0.0023 0.0207 0.0072 0.0131 2.0000 -0.0633 0.0602 0.0291 0.0032 0.0022 3.0000 -0.0963 0.0925 0.0484 -0.0050 -0.0173 4.0000 -0.1088 0.1142 0.0642 -0.0023 -0.0463 5.0000 -0.1120 0.1311 0.0718 0.0197 -0.0872 6.0000 -0.1129 0.1481 0.0689 0.0678 -0.1442 7.0000 -0.1163 0.1690 0.0541 0.1497 -0.2245 8.0000 -0.1251 0.1976 0.0257 0.2759 -0.3376 9.0000 -0.1422 0.2383 -0.0191 0.4616 -0.4974 10.0000 -0.1709 0.2966 -0.0850 0.7288 -0.7233 11.0000 -0.2152 0.3800 -0.1791 1.1092 -1.0426 12.0000 -0.2809 0.4987 -0.3120 1.6481 -1.4939 13.0000 -0.3761 0.6673 -0.4990 2.4097 -2.1314 14.0000 -0.5124 0.9060 -0.7622 3.4851 -3.0316 15.0000 -0.7064 1.2437 -1.1327 5.0028 -4.3027 16.0000 -0.9813 1.7209 -1.6546 7.1448 -6.0970 17.0000 -1.3701 2.3949 -2.3903 10.1677 -8.6297 18.0000 -1.9196 3.3465 -3.4277 14.4337 -12.2046 19.0000 -2.6957 4.6899 -4.8911 20.4542 -17.2503 20.0000 -3.7913 6.5861 -6.9558 28.9510 -24.3716 21.0000 -5.3380 9.2625 -9.8693 40.9425 -34.4225 22.0000 -7.5210 13.0399 -13.9808 57.8664 -48.6077 23.0000 -10.6022 18.3712 -19.7831 81.7516 -68.6281 24.0000 -14.9510 25.8957 -27.9717 115.4615 -96.8836 25.0000 -21.0887 36.5153 -39.5285 163.0374 -136.7618 26.0000 -29.7511 51.5032 -55.8387 230.1829 -193.0434 27.0000 -41.9768 72.6562 -78.8578 324.9478 -272.4758 28.0000 -59.2314 102.5103 -111.3454 458.6930 -384.5817

V. ENCRYPTION BY EIGEN VALUES METHOD

A. Method 7: Power Method for Encryption of Matrix

%MATLAB m-file for Power method function sol=POWERM1 (A, X, maxI) [n, n]= size (A); for k = 1: maxI; X=A*X; m=abs(X (1,1)); for i = 1:n; if abs(m) < abs(X(i,1)); m=X(i,1); end; end k mX =X/m End B. MATLAB, Power Method for Calculating Eigenvalues

and Eigenvectors

Page 4: [IEEE 2009 International Conference on Information and Communication Technologies (ICICT) - Karachi, Pakistan (2009.08.15-2009.08.16)] 2009 International Conference on Information

Input the Channel Matrix [65 66 67 68 69;70 71 72 73 73;74 75 76 77 78;79 80 81 82 83;84 85 86 87 88] A = 65 66 67 68 69 70 71 72 73 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 Input the initial Approximation Matrix[1;0;1;0;1] b = 1 0 1 0 1 Input the number of Iteration7 I = 7 k = 1 m = 258 X = 0.7791 0.8333 0.8837 0.9419 1.0000 k = 2 m = 382.2171 X = 0.7794 0.8348 0.8839 0.9419 1.0000 k = 3 m = 382.3925 X = 0.7794 0.8348 0.8839 0.9419 1.0000 k = 4 m = 382.3923

X = 0.7794 0.8348 0.8839 0.9419 1.0000 k = 5 m = 382.3923 X = 0.7794 0.8348 0.8839 0.9419 1.0000 k = 6 m = 382.3923 X = 0.7794 0.8348 0.8839 0.9419 1.0000 k = 7 m = 382.3923 X = 0.7794 0.8348 0.8839 0.9419 1.0000

VI. DECRYPTION PROCESS

Decryption of the cipher text can be performed in same manner just by replacing A with X-1 in the above MATLAB programs.

VII. ACKNOWLEDGMENT

We are cordially thankful to Rector of “Knowledge Exchange Transfer Technology (KETT)” for financially and morally supporting our research work .We also thank to Dean of College of Computer & Information Sciences for providing research environment.

VIII. FUTURE WORK

Page 5: [IEEE 2009 International Conference on Information and Communication Technologies (ICICT) - Karachi, Pakistan (2009.08.15-2009.08.16)] 2009 International Conference on Information

This work can be extended by introducing the variants of Direct and Iterative methods. The Eigen value method can also be extended with its variants. For example Gauss Jordan, LU Decomposition (Doolittle and Croute), eigenvalues and eigenvectors Method (Inverse Power Method, Shift Inverse Power Method), Deflated Method etc.

IX. CONCLUSION

The basic advantage of the using above algorithms is to provide encryption by not sending the original 5*5 matrix over the communication channel. This means if we send 5*1 matrix over communication channel this mean less overhead with added security .This system can be proved more beneficial in Wireless networks and specially Secure Sensor Networks where energy consumption and less memory is a problem. This report can be formulated to a conference paper in information security if extended with references to other existing cryptosystems. Since we are using Symmetric key for my cryptosystem, so it can be easily broken by cryptanalyst because symmetric cryptography is weaker with respective of asymmetric. The strength of this cipher can be calculated by finding its Avalanche effect.

X. REFERENCES [1] William Stallings, (Feb, 2007), Third Edition Book on Cryptography and Network Security [2] Richard L. Burden, J. Douglas Faires, (Dec 10, 2004), Book of Numerical Analysis [3] Rizwan Butt (2008), Introduction to Applied Linear Algebra with MATLAB, King Saud University http://www.mathworks.com/support/books/book18175.html Date Accessed 20 Jan 2009. [4] Symmetric Key Cryptography Definition and Explanation, Date Accessed: 22 Jan 2009 http://en.wikipedia.org/wiki/Symmetric-key_algorithm [5] Symmetric Key Cryptography in detail ; Date Accessed : 24 Jan 2009 http://www.handybackup.net/backup_terms/symmetric_key_cryptography.shtml [6] Andrew S. Tanenbaum, Third Edition, Chapter 2, CDMA, Book of Computer Networks [7] ASCII values and Description http://www.asciitable.com/ Dated Accessed 31 Jan 2009 [8] Symmetric Key Algorithms for Encryption process ; Date Accessed 31 Jan 2009 http://en.wikipedia.org/wiki/Symmetric-key_algorithm [9] – Vulnerabilities in Cryptography; Date accessed ; 31 Jan 2009 http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4655317

[10] - Natural Language Cryptography Date Accessed: 31 Jan 2009 http://www.actapress.com/PaperInfo.aspx? PaperID=33412&reason=500