New Image Encryption Method Based on two Stage Scrambling

The purpose of digital image scrambling technology is to put a meaningful image into a disordered one to enhance the resistance ability against illegal attacks. This paper proposed an image scrambling algorithm based on idea of movement of elephant in the chess board the system consist of two main steps the first one rotate each diagonal by key generated from computing the standard deviation the second step include exchange the upper half of image with the lower half of image the proposed system shows a good result and we reach 100 percent accuracy in decryption thus the proposed system can be used by any application for secure transmitting.


1-Introduction
The advent of personal computers and the Internet has made it possible for anyone to distribute worldwide digital information easily and economically.
Many applications like military image databases confidential video conferencing, medical imaging system ,cable TV, online personal photograph album, etc. require reliable, fast and robust security system to store and transmit digital images [1]. In this environment, there are several security problems associated with the processing and transmission of digital images over an open network it is necessary to assure the confidentiality, the integrity and the authenticity of the digital image transmitted [2]. Also Encryption of images is different from that of text due to some intrinsic features of images such as redundancy of data, strong correlation among adjacent pixels, being less sensitive as compared to the text data i.e. a tiny change in the attribute of any pixel of the image does not drastically degrade the quality of the image and bulk capacity of data. To meet these challenges, a wide variety of cryptographic protocols have been appeared in the scientific literature [3]. In recent years, amount of research in the field of image encryption system is increasing day by day due to technological progress [4]. Image based cryptosystems are different from textual cryptosystems because of large amount of correlation observed between adjacent pixels in an image. Currently, greater part of the research based on image encryption is performed using chaotic map [5]. Image scrambling disarranges the position or color of pixel in image and the original image cannot be recognized. But the operator can rebuild the original image from the disordered image by some algorithms [6] 2-Related work Image scrambling technology includes methods based on Arnold transform, affine transform, magic square transform ,bakers transform, Graycode, generalized Graycode; based on fractal IFS model, Hilbert curve, FASS curve, Tangram algorithm, conway'sgameand knight's touretc. Among these methods, the same characteristic of above Arnold transformation and Fibonacci transform is module operation .These methods spend much time when scrambled[7].

3-Proposed System
The proposed system for image scramble consist of two main stages

A-Stage one
This first stage of scrambling the image which includesthecomputing of standard deviation for each diagonal in the image separately (white and black diagonal as movement of elephant in the chess board)as shown in the figure(1)

Figure(1)
After computing the standard deviation a key is generated to rotate each diagonal this key is generated using Key=(standard deviation) mod( number of pixels in the diagonal) This generated key used to rotate the diagonal after rotating the diagonal it put in the same diagonal that for each diagonal there is a unique key generated from the image itself and there is one key to the rotation of diagonal. The following example shows how to implement the first stage of scrambling. Applying standard deviation to the above diagonal 8 3 9 12 SD=Round((12-8) 2 +(9-8) 2 +(3-8) 2 +(8-8) 2 )/4 =(16+1+25)/4=round(10.5)=11 Key=SD mod n= 11 mod 4=3 this key represent the number of rotations to the diagonal the above array will be as follows 3 9 12 8 We apply mod function to get key for rotation less than the length of diagonal sometimes the mod be zero that do not allow rotation to the diagonal in this case the key is computed as follows Key=(length of diagonal) div 2 The following

B .Stage two
In this stag which represent a second phase of scrambling the image where the triangle which is above the main diagonal exchange with triangle under the main diagonal each one with it's similar diagonal that for this technique the image must be equal in width and height to implement this stage this process increase the complexity of encryption the image the above table will be as follows after applying the second stage Table (4) This represent the end of the new proposed system. The following flowchart illustrate the main steps of the proposed system.

Figure(2)
To retrieve the original image the two stage applied in reverse order when first stage two applied then be exchange the upper and lower of the diagonal then stage one applied by computing the mean ,standard deviation and generate the key as described previously the same key number will generated because the mean and standard deviation for the diagonal remain same but the order of diagonal change after generating a key a rotation to diagonal will done in reverse order this procedure allowed to retrieve the original image without any change.

Experimental Results
The image used in the proposed system are colored image

Original Image
Encrypted image 5.Conclusion 1-Applyin the proposed system showed that the original image retrieved without any change because there is no change in the pixels value but only change it's positions in the image. 2-There is a few computation time for scrambling and descrambling the image only required compute mean, standard deviation and rotation of each diagonal. 3-The proposed system gave a good encrypted image which is difficult to be retrieved by any attack. 4-Another statistical computation such variance and skewness may be used toGenerate the key. 5-Generating more than one key from the image itself make it difficult to be discovered 780 6-The proposed system reach 100 percent in decryption because there is no change in pixel value but only in position 7-One limitation in the proposed system that the image must be of equal in height and width a modification to proposed system can lead to overcome this limitation.