 Open Access
 Total Downloads : 6
 Authors : Sagar Suryavanshi, Jasmin Patil, Deepali Pawaskar, Asmita Deshmukh
 Paper ID : IJERTCONV2IS04076
 Volume & Issue : ICONET – 2014 (Volume 2 – Issue 04)
 Published (First Online): 30072018
 ISSN (Online) : 22780181
 Publisher Name : IJERT
 License: This work is licensed under a Creative Commons Attribution 4.0 International License
ENCRYPTION BASED ON MATRIX TRANSFORMATION TECHNIQUE
ENCRYPTION BASED ON MATRIX TRANSFORMATION TECHNIQUE
Sagar Suryavanshi1, Jasmin Patil2,Deepali Pawaskar3, Prof. Asmita Deshmukh4
1,2,3B.E Student ,4 Assistant Professor , Computer Engineering Department, KCCEMSR,
Thane, India
1suryavanshisagar19@gmail.com,2deepalipawaskar123@gmail.com3jasminishwarpatil@gmail.com, 4
asmitadeshmukh7@gmail.com

INTRODUCTION
Due to rapid growth of Internet, information tide brings about great economic and social benefit along with which the use of this technology has increased. However, Internet confronts many safety problems. The problems include network attack, hacking, interception of important information and tampering it which is a threat to Internet. Information security is a major concern of our society. The solution for secure transmission of data over network is cryptography. Cryptography is used to convert the plain text to encode or make unreadable form of text. The sensitive data is encrypted on the sender side using an encryption key then it is sent to the destination, At the receiver side, the data is decrypted using an algorithm and decryption key as shown in Figure 1. After the decryption process the message is converted back to original format from encrypted format. There are some standard methods which are used with cryptography such as privatekey encryption, publickey encryption, digital signature, and hash
new technique on matrix scrambling which will be based on random function, shifting and reversing techniques of circular queue. It will be able to resist all kinds of cryptanalytic, statistical attacks.

RELATED WORK
The queue transformation based digital image encryption algorithm proposed by F.Y. LI Min[1], which works efficiently with low time complexity compared to Yongwei et al[2]. However, it still has some shortcomings. Firstly, the algorithm signifies some certain regularity. In this algorithm one random element (i,j) is selected from the matrix and cyclic shifted leftwards and rightwards based on the position in the matrix. This makes encryption output periodic which makes the algorithm vulnerable to attacks.
Singh and Gilhorta[3] proposed encrypting a word of text to a floating point number that lies in the range of 0 and 1. The floating point number is then converted into a binary number and after that one time key is used to encrypt the binary number.

PROPOSED TECHNIQUE
In this paper, we propose an efficient digital encryption algorithm based on matrix scrambling technique which is based on random function, shifting and reversing techniques of circular queue, with efficient time complexity.

Encryption Algorithm
The plaintext chosen is arranged into a Bidirectional circular Queue data structure .In the matrix A of order
m Ã— n. Input an integer parameter, w, as the count of operations, say, the time of transformation we made to
Figure 1: Encryption and Decryption methods with a secure channel for key exchange
functions. This paper will put forward a safe method of data transmission to tackle the security problem. It proposes a
matrix. To some certain degree, this parameter represents the intensity of the encryption.
However, this does not necessarily mean that the greater w is, the more intensive the encryption is. Random() function is used to generate random positive integer, this integer value has to be converted into a binary equivalent. Depending on the binary bit from least significant bit to most significant bit, the choice to select rows or columns is made.
In case of row, two rows r1 and r2 are selected randomly from the matrix similarly two random values of columns c1, c2 are chosen to determine the range of rows on which transformation has to be performed. To perform transformation operations, a value is calculated from Random( ) mod3, circular left shift, circular right shift and reverse operations on the selected rows is performed depending on the value which may be 0,1 or 2 In case of column, two columns c1 and c2 are selected randomly from the matrix, two random values of rows r1,r2 are chosen to determine the range of columns on which transformation has to be performed.
Then to perform transformation operations similar to rows, a value is calculated from Random( ) mod 3, based on it circular upward shift, circular downward shift and reverse operations are performed similar as rows.
The entire process is repeated w number of times; if
w length (binary sequence) then the process is performed only w number of times from LSB to MSB else the binary sequence is repeated from LSB to MSB until the w operations.
In this manner, the entire matrix elements are transposed. For each operation performed, the operation should be recorded as a sub~key in a file, which becomes the key file. The key file should be maintained secret. The algorithms for row and column transformation are shown in Figure 3 and Figure 4 respectively.
The subkey is 6tuple and is given as follows, sub key=(T,op,1,2,1,2) where,
T= Transformation applied either row or column i.e. R or
C
Op= 0 or 1 or 2 (These values changes for row and column transformations)
1,2= Two random rows or columns selected depending on the transformation
1,2= min and max values of range for two selected 1,2
Figure 2: Encryption Algorithm
Row Transfromation
Figure 3: Row Transformation Process
Column Transformation
Figure 4: Column Transformation Process

Example of Encryption Process
In this section, we show the detailed process of our encryption algorithm by an example. Let the data to be encrypted is taken as follows 1,2,3,4,5,6,7,8,9,10,11,12,13,14.15.16,17,18,19,20.
Let us set m = 4. n = 5. w = 7 i = 14, b = 01110. In vector b only 5 digits of the binary sequence is considered in the example. It depends on the user to consider how many bits to use without changing the actual bits of the value z. This provides irregularity and is used to increase the intensity of encryption. After the plain text is set into A, the layout of the matrix is shown in figure 4. After w operations and based on binary values in b, subkeys recorded in the keyfile is given in limit 5.
R 1/2/1/2/4, C 0/4/1/0/3 C 1/3/0/0/3, C 2/1/2/1/2 R 1/1/2/0/4, R 2/3/1/0/2 C 1/2/0/0/1
The process of disordering or scrambling the matrix elements based on subkeys is explained as follows.
The cipher text obtained after the entire process is given as 17,7,14,19,9,16,1,3,15,4,20,6,12,10,8,18,2,11,13,5

Decryption Process
The proposed algorithm is a kind of symmetric encryption algorithm, with decryption process is done by reversing the operations done in the encryption process. The cipher text is arranged into a matrix of the same order in the encryption as in and n.
The key file is partitioned by the R (row) operations & C (col) operations. A sub key starts from R or C operation, ends at the start of another R or C operation or the end of the key file.The sub keys are decrypted one by one from the last sub key to the first sub key.
For each sub key T. op, l, 2, 1,2 values are obtained whose terms are already explained in the encryption algorithm. Based on T value either R or C operation is decoded which are given as A = InverseRowTrans(A) and A
= InverseColTrans(A).
In InverseRowTrans(A) depending on the value of 'op' transpositions are performed. For 0 right shifts, for I left shift and for 2 reverseoperation is performed on the columns.
In InverseColTrans(A) depending, on the value of 'op' transpositions are performed. For 0 downward shift, for 1
Figure 5: Decryption Process
upward shift and for 2 reverse operation is performed on the rows.
The process is done until the key file is completed and at the end of process matrix A contains the required original message i.e. plain text.

Example of Decryption Process
In this section, we show the detailed process of our decryption algorithm with an example. Consider the cipher text obtained after encryption as
17, 7, 14, 19, 9, 16, 1, 3, 15, 4, 20, 6, 12, 10, 8, 18, 2, 11, 13, 5.
C 1/2/0/0/1, R 2/3/1/0/2 R 1/1/2/0/4, C 2/1/2/1/2 C 1/3/0/0/3, C 0/4/1/0/3 R 1/2/1/2/4
After performing transformations from subkey files in reverse order we will get original matrix.


OUTPUT
We have partially completed the implementation of the project. We have managed to convert the message into an image. The message is taken as a input from the user.
Figure 6: Original Message
Each character in the message is assigned a random RGB value which forms a single pixel in the image. The image size is determined from the length of the message i.e. no. of characters. The encrypted image is shown in Figure 7.
Figure 7: An Encrypted Image
The transformation algorithm will be applied on the image pixels matrix.
The reverse process is followed at the time of decrypting the message from an image.

CONCLUSION AND FUTURE WORK
In this approach the usage of random number selection firstly for generating binary sequence and, secondly for row (column) and column (row) selections, thirdly for selecting the operations for scrambling, avoids the regularity in the resultant cipher text which is transformed from plain text matrix; and hence improves the difficulty for decrypting. The algorithm can be applied to text encryption, image encryption, and multimedia encryption and so on.
REFERENCES

F. Y. LI Min, (2005) "A new class of digital image scrambling algorithm based on the method of queue transformation", Computer Engineering. 01(31):148149.

W. Y. YE Yongwei and YANG Qinghua. (2003) "Magic cube encryption for digital image using chaotic sequence". Journal of Zhejiang University of Technology, 31(2):173176.

Singh, A., Gilhorta, R. (2011) Data security using private key encryption system based on arithmetic coding .International Journal of Network Security and its Applications (IJNSA), 3(3).

KuiHeYang and ShiJin Niu. Data Safe Transmission Mechanism Based on Integrated Encryption Algorithm",Staffordshire University.

G. J. HUANG Xiaosheng, (2007) "Image encryption algorithm based on compound chaotic sequence and wavelet transform". Computer Engineering, 14.