• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content







Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via SlideShare as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    50120140501009 50120140501009 Document Transcript

    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & 6367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME TECHNOLOGY (IJCET) ISSN 0976 – 6367(Print) ISSN 0976 – 6375(Online) Volume 5, Issue 1, January (2014), pp. 68-84 © IAEME: www.iaeme.com/ijcet.asp Journal Impact Factor (2013): 6.1302 (Calculated by GISI) www.jifactor.com IJCET ©IAEME IMAGE ENCRYPTION AND COMPRESSION BASED ON COMPRESSIVE SENSING AND CHAOS Prof. Maher K. Mahmood(1), 1 Jinan N. Shehab(2) (Electrical Engineering Department/ University of Al – Mustansiriya, Bagdad, Iraq) 2 (Computer and Software Department/ University of Diyala, Baquba, Iraq) ABSTRACT This paper presents image encryption based on Compressive Sensing (CS) and chaos. Image compression and encryption are done based on CS, which is used due to many properties; greatly reduces the signal sampling rate, power consumption, storage volume and computational complexity, in additional to above; CS combined compression and encryption in the same step. Since CS-based encryption method alone fails to resist against the chosen-plaintext attack. Hence, the output of CS is again encrypted based on multi-chaotic system. This is used to enhance the security. Also, multichaotic is used as key will increase key space, since multi-initial conditions and multi-parameters make it very difficult to decrypt without knowing all those values, the structure of this system is more complex than the low-dimensional chaotic systems and it is more difficult to forecast such chaotic. The simulation results show that the cipher image has large key space, low storage and transmitted requirement, high security and low encryption time requirement, incoherence, key sensitivity and good statistical property. Also the recovered image has good quality (to human perception) and preserves both the intelligibility and the characteristics of the image. Keywords: Image Encryption and Compression, Image Encryption Based on Compressive Sensing and Chaos, Multi-Chaotic Based CS, Multi-Chaos Based Image Encryption. I. INTRODUCTION Image encryption; is a technique that provides security to images by converting the original image to another image which is difficult to understand, since billions of information such as image, video,..etc are produced and processed per day and this information either are sent through the channel insecure with limited capacity or are stored. In both cases, this information requires to be minimized in order to get less number of data and contains the largest number of information. Hence, there is an urgent need for compression and encryption at the same time. Unlike text messages, 68
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME image data have special features make text encryption algorithm cannot directly implemented to images because image size is much greater than that of the text, and the other problem is that, decryption text must be equal to the original text however this requirement is not necessary for image data. The traditional encryption algorithms such as DES, AES, IDEA which are used for text or binary data, appear not to be ideal for multimedia applications, the basic reasons; huge in size and bulk capacity, high redundancy and a high correlation between pixels, then traditional encryption methods are difficult to apply and slow to process[1]. In the classical secret communication's approach, the messages encrypted and compressed, separately. Now, it is possible to directly compress and encrypt in the same step. Compressive sensing is a novel technique built upon the path breaking work by Candes, Romberg, Tao, and Baraniuk[2][3]. Chaos Theory; which was developed by Edward Lorenz, studying the behavior of dynamical systems that are highly sensitive to initial conditions “The Butterfly Effect”[1][4]. This paper presents an compressive sensing and chaotic system based image encryption and compression. Section II describes the CS theory, in section III we describe in details multi-chaotic based image encryption, while sections IV and V we describe the proposed algorithm about using CS and chaotic system together in encryption and compression; while the performance of the algorithm and simulation results with compression tests and encryption tests are presented in Section VI. Section V concludes the paper with some remarks. II. COMPRESSIVE SENSING THEORY The basic concept of CS is to represent the original signal in a convenient basis Ψ. Then it employs a non-adaptive linear projection onto observation matrix Φ that preserves the structure of the signal and uncorrelated with the transform basis Ψ, and then the signal can be accurately reconstructed by solving the convex optimization problem or greedy pursuit algorithm with a small amount of measured values[5]. CS relies on two principles 1) sparsity: - which pertains to the signals of interest, Sparsity expresses the idea that the information rate of signals can be much smaller than suggested by its bandwidth. and 2) incoherence: - which pertains to the sensing modality, Incoherence expresses idea that signals having sparse representation in representation basis Ψ must be spread out in the sensing basis Φ[6]. CS framework that mainly consists of two crucial parts: sampling (encoding) and recovery (decoding). a. SAMPLING (ENCODING) Sampling mainly contains two parts: signal presented in sparsity and measurement matrix: 1. SIGNAL PRESENTED IN SPARSITY The signal X is called a K-sparse/compressible if it can be represented as a linear combination of only k basis vectors; only k elements of the vector S are non-zero [8][9]. For image data consider a real value, finite length, two-dimensional discrete-time signal X, which can be viewed as (N×N) pixels in RN×N with elements x (n, n). The signal X ‫ א‬RN×N which can be expanded on the orthonormal basis (such as DCT, DWT) ψ = [ψ1 ψ2……ψN], a signal X can be expressed as :୒ ୒ X ൌ ෍ ෍ S୧,୨ Ψ୧,୨ ୧ୀଵ ୨ୀଵ or X ൌ ΨS ் Where S is the (N×N) pixels of weighting coefficients Si,j =‫ߖ =ۄߖ ,ܺۃ‬௜,௝ ܺ and transpose, containing exactly K nonzero coefficient, K << N. 69 ሺ1ሻ T denotes
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME Ψ is a specific N×N dictionary (sparsifying basis matrix) that its columns are orthonormal and spans X domain and S is the coefficient vector of X in basis Ψ= [ψ1 ψ2 ……..ψN]. Clearly X and S are equivalent representations of the signal X in the spacial domain and S in the Ψ domain as shown in Fig.(1). 2. MEASUREMENT MATRIX (Φ) It is any random generated matrix such that the information in every S sparse signal is not damaged by dimensionality reduction from N×N to M×N samples[7]. Consider a general linear measurement process that computes (K<M<N) inner products between X and collection of vectors ே ൛߮௝ ൟ ௝ୀଵ :Y୧ ൌ ‫ۃ‬x, Ԅ‫ۄ‬ ሺ2ሻ then by substituting Ψ from (1) in Y we can write it as:ܻ ൌ ߔܺ ൌ ߶߰ܵ ൌ Θܵ ሺ3ሻ where Θ is called sensing matrix using only with compressible signal, Θ ‫ א‬RM×N , Θ=Φ ψ is an (M×N) matrix. And Φ is called measurement matrix, and if signal or image is sparse (don't need transform domain) then Φ is called sensing matrix Θ=Φ, Φ= [φ1,..φM]T ‫ א‬RM×N. Y: is (M×N) measurement vector ( compressive sensing measurement) as shown in Fig.(1). The measurement process is non-adaptive, meaning that Φ is fixed and does not depend on the signal X[8] .This matrix is given by Candes, Romberg and Tao [2]. We begin with ill-conditioned problem (M<N) and let X be a K-sparse and the K locations of the non-zero coefficients in S are known, this problem can be solved provided M≥K by deleting all those columns and elements corresponding to the zero-element using the following equation: Y=ΦK XK =ΦKΨKSK (4) Where K is the support sets which is the collection of indices corresponding to the non-zero elements of S. 1 െ ߜ௄ ൑ ||Θ୚||మ ||௏||మ ൑ 1 ൅ ߜ௄ ሺ5ሻ The necessary and sufficient condition for (5) to be good condition is that for any K-sparse vector V shares the same K non-zero entries as S. The sensing matrix should satisfy this condition, for some 0<δ<1[12]. Θ is the sensing matrix can be seen as a transformation of the signal from the signal space to the measurement space, where the measurement space is smaller than the signal space, Θ must preserve the Euclidean length(||.||2) of these particular K-sparse vectors and δ is the isometry constant (is the smallest value satisfying (5)) [9].Our aim is to get familiar with this inequality, this inequality will be used repeatedly under the name Restricted Isometry Property (RIP). In practice however, performance analyses based on RIP turns out to be challenging because of the difficulty of finding ߜ௄ for a given specific measurement-matrix[10]. In a practical scenario, one can instead bound ߜ௄ with the mutual coherence. Another property of the measurement matrix is the mutual coherence. The RIP requires incoherence that can be defined as follows: suppose we are given a pair (Φ,Ψ) of orthobases of the R . The first basis Φ is used for sensing the object X as in (2) and the second basis Ψ is used to represent X as in (3). The coherence between the Φ and Ψ is :70
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME µ(Φ,ψ) = √N max1≤K j≤N |‫ۃ‬φk, ψj‫|ۄ‬ (6) where ࣆ is coherence parameter measures the largest correlation between any two elements of Φ and Ψ then if Φ and Ψ contain correlated elements the coherence is large, otherwise it is small as for how large and how small, it follows from linear algebra that :µ(Φ,ψ) ‫√,1[ א‬N] (7) CS is mainly concerned with low coherence pairs or incoherence that requires the row {φj} of Φ cannot sparsely represent the columns {ψi} of Ψ and vice versa[9]. X Ψ Y=ΦX = ΦΨS = ΘS Φ Insecure channel ෡ ࡿ Recovery Inverse ෡ ߖ ෠ ෡መ ܺ ൌ ߖܵ Figure (1) Compressive Sensing Diagram b. RECOVERY (SIGNAL RECONSTRUCTION) Reconstruction of signal is nonlinear procedure with the aim to recover initial signal or its sparse representation from M measurements and sensing matrix Θ. Based on the knowledge of information measurements (Y,Φ,Ψ) the signal can be recovered by solving an underdetermined linear system of equations. III. MULTI-CHAOTIC BASED ON IMAGE ENCRYPTION In the last years, an increasing attention has been devoted to the use of chaos theory to implement the encryption process. In spite of much chaos-based on image encryption schemes have been proposed, but the class of cryptosystem uses the confusion-diffusion architecture proposed by Fridrich. The main advantage of these encryptions lies in the observation that a chaotic signal looks like noise for non-authorized users ignoring the mechanism for generating it. Secondly, time evolution of the chaotic signal strongly depends on the initial conditions and the control parameters of the generating functions then slight variations in these quantities yield quite different time evolutions[1].From above chaos-based image encryption appears a good combination of speed, security and flexibility either a chaotic block cipher or chaotic stream cipher. Although the application of a 1-D chaotic method such as (Logistic map, Cat map,...etc) based on image encryption is convenient and quick but some weakness appeared such as, small key space, weak security and complexity [20]. But the encryption sequences produced by using multidimensional like (Lorenz, Rossler, .etc) have excellences; One is that the structure of this system is more complex than the low-dimensional chaotic systems, It is more difficult to forecast such chaotic sequences. The other is that the real value sequences of three system variables can be used separately or put together to use, the design of encrypting sequence is more convenient[1][11]. In this paper, four types of chaotic systems are used, These are :- 71
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME 1. LORENZ SYSTEM Lorenz system is a classical chaotic system of differential equation arose from the work of meteorologist mathematician Edward N. Lorenz, he published in 1963 [12]. The dynamic equation of Lorenz system is as shown in Table (1). Among them, a, b and c are the system parameters. The Lorenz attractor is shown in Fig.(2(A)). 40 30 20 10 0 10 15 0 10 5 -10 0 -5 -20 A -10 B 0.6 0.4 6 4 0.2 2 0 0 -2 -0.2 -4 -0.4 -6 1 0.5 4 -0.6 2 0 0 -0.5 -2 -1 -0.8 -1.5 -4 C -1 -0.5 0 0.5 1 1.5 D Figure(2) Chaotic Attractor (A) Lorenz Attractor (B) Rossler Attractor (C) Chua Attractor(D) Henon Attractor 2. ROSSLER SYSTEM Otto E. Rossler, tries to enhance the Lorenz attractor and designs his own model for chaos in 1976 [13].The dynamic equation of Rossler system is shown in Table (1), where a, b, and c are control parameters of the system. The Rossler is shown in Fig.(2(B)). 3. CHUA SYSTEM The first real physical dynamical system, capable of generating chaotic phenomena in the laboratory, similar to those in the Lorenz system, was invented by Chua in 1992[14]. Because of its simplicity, robustness, and low cost that Chua’s circuit has become a favorite tool for analytical, numerical and experimental study of chaos. Chua’s circuit can be described by differential equations as shown in Table(1).a, b, c, m0, m1 are parameters of the system. The Chua's circuit is shown in Fig. (2(C)). 72
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME 4. HENON MAP A two-dimensional discrete-time nonlinear dynamical system proposed by the French astronomer Michel Henon in 1976[15]. See equation in Table(1). The map depends on two parameters a, and b. This map is shown in figure (2(D)). IV. COMPRESSION AND ENCRYPTION PROCEDURE The proposed algorithm for transmitter side is shown in Fig.(3) is elaborated in the following :1. Dividing Original Image:- Usually, the size of a natural image will be considerably large, the original image is resize into N×N pixels and then divide into four equal size blocks. 2. Discrete Wavelet Transform (DWT) Based CS:- Generally, the image itself is not sparse, but if image is represented in certain transformation then it will be sparse. In this work, the DWT is used to do the 4-level wavelet decomposition of the input block (each block of the original image separately).When we apply DWT into blocks as shown in figure(4), then each block represents S is the sparse/compressible image matrix with K-nonzero coefficients. 3. Chaos-Based Measurement Matrix:- Generation of the pseudo-random measurement matrix Φ utilizing a cryptographic key, offers a natural method for encrypting the signal during CS. The security of the encryption method relies on the fact that Φ is not known to an attacker that does not have the pseudo-random key used to generate Φ. Consequently, finding a proper Φ satisfying RIP and incoherence is one of the most important problem in CS. Here, in this work the chaotic sequence is used to construct such a sensing matrix, called chaotic matrix. Based on sensitivity to initial conditions and parameters, egodicity and statistical property of chaotic sequence, one can prove that chaotic matrix can also have RIP with overwhelming probability, provided that S ≤ α (M/ log (N/S)) [2]. Unlike the one-dimensional separate system, the Lorenz system needs to make use of the numerical solution of differential equation to obtain the real value chaotic sequences. We apply the Range-Kutta method to solve the Lorenz system based on these qualifications: Once obtaining the X(n), Y(n) and Z(n) real value chaotic sequences, then, before using the chaotic sequence to construct Φ, we need to transform chaotic sequence generated by using Eqs. (8,9) into an integer sequence(0-255). Magnification and modulo transformation to the two chaos types (Lorenz and Chua) are done as follows:XL (n) = mod (floor (XL (n) ×1015), 256) , YL (n) =mod (floor (YL (n) ×1015), 256) , ZL (n) = mod (floor (ZL (n) ×1015), 256) , XC (n)= mod (floor (XC (n) ×1016), 256) YC (n) =mod (floor (YC (n) ×1016),256) ZC (n) = mod (floor (Z C (n) ×1016),256) To make proposed system more secure. The Lorenz and Chua sequences are combined together by using XOR to get new chaotic sequence. XLC (n) =BITXOR (XL (n) , YC (n)) YLC (n) =BITXOR (YL (n) , ZC (n) ) ZLC (n) =BITXOR (ZL (n) , XC (n) ) FLC (n) =BITXOR (XL (n) , XC (n)) 73 (12)
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME To normalize, divide by M:XLC (n) =1/M × (XLC (n)) YLC (n) =1/M × (YLC (n)) ZLC (n) =1/M × (ZLC (n)) FLC (n) =1/M × (FLC (n)) (13) where M is the number of measurements and represents the new number of rows for image after reduction. This M which decides the compression ratio and also the reconstruction performance.To make the values between positive and negative and this makes work more secure and have better reconstruction :KΦ1 = XLC (n) - Xone KΦ2 = YLC (n) - Xone KΦ3 = ZLC (n) - Xone KΦ4 = FLC (n) - Xone (14) Xone =all 1's matrix of size (M×N/2) ‫ܭ‬ Then the new Φ= ൤ ఃଵ ‫ܭ‬ఃଷ ‫ܭ‬ఃଶ ൨ , the size of Φ equal 2M×N elements ,as shown in Fig.(5). ‫ܭ‬ఃସ 4. Compressive Sensing Measurement Y:In this work, measurements Y are obtained by projecting the resultant from DWT into chaotic matrix Φ to take important information with non-zero values without duplicating. 5. Lloyd's qantizer:- The resultant coefficients of Y will be large number (64bits/pixel). We must quantize to give minimum bits/pixel(in this work, (8bits/pixel) was shown to be enough). Quantization is implemented through the well-known Lloyd quantizer. Before using Lloyd all the elements of Y matrix are divided by 100 to reduce the high values of Y. as well as there are negative values in Y are difficult to apply the Lloyd values is withdrawn by the middle or minimum value in Y. This step is applied to each block separately: Y୥ ሺM, N/2ሻ ൌ N Y ቀM, 2 ቁ െ g 100 ሺ15ሻ where g represents the min value in Y(M,N/2).Then using Lloyd's algorithm in the new value of ࢅࢍ .The resultant quantized compressive sensing measurement Yq(4-block). But the existing CSbased encryption methods fail to resist against the chosen-plaintext attack. In this research we have tried to find a simple, fast and secure algorithm for image encryption, Then a new symmetric image cipher based on the widely used confusion–diffusion architecture is used. The proposed stream cipher is based on the use of Lorenz, Chua, Rossler and Henon to construct keys used in confusion and diffusion. Previously; we generated two types of Chaos(Lorenz and Chua). They are now modified to be between values (0,255). In the same way to Lorenz, Rossler and Henon sequences are generated and adjusted between (0,255). Most researchers used chaotic image encryption that depends on one chaotic systems like Lorenz or Rossler systems. In this work, a new chaotic is presented based on adding two variables from different 4-chaotic systems (Lorenz, Chua, Henon and Rossler) to construct new variable chaotic sequences, as shown in Table (2). 74
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME Figure (3) The Proposed Compression and Encryption Image at Transmitted Side, Decryption and D Reconstruction at Receiver Side Figure(4) Wavelet Transform Decompositions (4-Blocks) (4 Figure (5) Measurement Matrix Φ Using Chaotic System (Four Blocks) 75
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME Table (2) The New Keys Generated that will be used in Encryption The new keys for confusion mechanism The new keys for diffusion mechanism. Kc1 =XL YH , Kc2 =YL XH Kd1=[XL XC XH XR] , Kd2=[YR YH YC YL] Kc3 =XC YR , Kc4 =YC ZR Kd3=[ZL ZC YH ZR] , Kd4=[ZR XH ZC YL] XR , Kc6 =XH YR Kc5 =ZC Kde1=reshape (Kd1, M, N/2) Kc7 =YH ZR , Kc8 =ZL XR Kde2=reshape (Kd2, M, N/2) Kc9 = [ZL ZC ZR mod(XL+YH,255)] Kde3=reshape (Kd3, M, N/2) Kc10 = [XL YC XH ZR] Kde4=reshape (Kd4, M, N/2) Kc11 =XH XR , Kc12 =YH YR Kde=(Kde1 Kde2) (Kde3 Kde4) 6. Confusion:- Unlike the text data that has only two neighbors, each pixel in the image is in neighborhood with eight adjacent pixels. For this reason, it is important to disturb the high correlation among image pixels to increase the security level of the encrypted images. This work employs six-steps of confusion procedure:Step(1): - Conduct the function “Sort” on Kc9 for constructing scrambling index array SI9 with dimension (2MN×1) arranged in ascending order. Accordingly, the scrambling array I9 can be produced from chaotic key Kc9. Transform the quantized CS image from Yq(2M×N) into Yq(2MN×1), and then rearrangement the pixels on Yq according to the sort of the chaotic key I9, we can get the scrambling matrix Yc1(2MN×1). Transfer back the matrix Yc1(2MN×1) to Yc1(2M×N). Step(2): - Dividing image result from step (1) Yc1(2M×N) into 4-equal block, and repeat the process by which the first step was done. After the division of the image, we deal with each individual block and transform it into a single row and the first step is restored for each block. But here, the sort of the key (Kc1, Kc3, Kc5, Kc7) is used for the block (1,2,3,4), respectively. And then return every block from (1-D) into (2-D) ,then get YC2(2M×N). Step(3): -Working process of permuting between blocks, here the image is divided into 64 blocks and use a sort of key construction from two types of chaos:Kb= YL XC Step(4): -The resulting image from the previous step is treated like one block and we repeat the process in the first step but here the image is transformed into a single column. In this step we use the sort of the key Kc10 as shown in Table(2).Return back to 2-D then Yc4(1×2MN) become Yc4(2M×N). Step(5): -The pixels are processed within each block after converting pixels within each block to a single column. Here we use the sort of the key (Kc2, Kc4, Kc6, Kc8) for the block (1, 2, 3, 4) respectively. Then return back every column in every block into (2-D) Yc5(M×N/2). Step(6): -In the last step of confusion procedure image (Yc5(2M×N)) is treated like one (2-D) block and permutation pixel positions start in all image such as the row according to the sort of the key Kc11 and column according to sort of the key Kc12. 7. Diffusion:- Although pixel positions of an image were scrambled in the previous steps, generally the distribution of gray-scales of the image is still unchanged, i.e., the histogram of the plain image (here the plain image is Yq) is about the same as that of the (Yc6). This leaves a door widely open for statistical attack and chosen-plaintext attack. Thus, a diffusion process is necessary to make the spread influence of each single pixel overall the image[4]. The goal of the diffusion step is to encrypt 76
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME images by changing the grey scale values to create an encrypted image. Hence, XORing the chaotic cr mask and image will result in confusion step. In the diffusion step, we mix the properties of vertical age step ix adjacent pixels and this information is spread out in the backward direction over the whole image. The vertical diffusion(VD) considers t image obtained after step (6) as the input. It starts from the ) the last pixel of the last column in the image and then moves backward row-major order. In this process, row major the last pixel is modified by XORing itself and the corresponding value in key stream Kde, the pixel before last pixel is modified by XORing the last and before last pixels and the corresponding value in el Kde. The last pixel of each column (except the last column) is modified by XORing the modified column) first pixel of the previous column and itself, the resultant image encryption Yen is transmitted from itself transmitter to the receiver through insecure channel. V. RECOVERY AND DECRYPTION USING GREEDY PURSUIT(GP) . Suppose that at the receiver side as shown in Fig.(2), Yen is received, along with the keys KΦi, er Fig. g, Kci and Kde from a separate secured channel then depended on (Yen, g, KΦi, Kci and Kde) we can reconstruct image. And then, we proposed dividing an sparse image to a block of 256×256 pixels and applying GP (OMP (Orthogonal Matching Pursuit) SP (Subspace Pursuit) and CoSaMP Pursuit), (Compressive Sampling Matching Pursuit to each block. Pursuit)) VI. NUMERICAL SIMULATION RESULTS . a. Data Set In these experiments, three grayscale images all of size 512x512 pixels are used to test the proposed algorithm. The images used are shown in the Table (3). T Table (3) Test Images Lena.bmp Peppers.png Black.bmp The following subsections will review the evaluation measures for both image compression and encryption: b. METRICS FOR IMAGE COMPRESSION (RECOVERY) The terminology “recovery” refers to decrypt and then reconstruct the plain image from its ” uct measurement data. In measuring the quality of the reconstructed image, the peak signal signal-to-noise ratio known as PSNR is used. PSNR of an a X a 8-bit grayscale image X and its reconstruction is 8 calculated as: - where X (n,n) represented the intensity of a pixel in the original image, while its reconstructed n,n) counterpart is denoted by (n,n). PSNR is measured in decibels (dB), N: height of the image, N: width of the image, The result shown is in Table(4 Table(4). Besides measuring the image quality, we also measure the compression ratio (compression is done for sub blocks N/2×N/2 to M×N/2): 77
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME Compression ratio ൌ uncompressed ϐile size ܰൈܰ ൌ compressed ϐile size 2‫ ܯ‬ൈ ܰ Rate of compressionሺRCሻ ൌ ሺ17ሻ 1 2‫ܯ‬ ൌ compression ratio ܰ ሺ18ሻ In general, the higher the compression ratio, the smaller is the size of the compressed file[1] as shown in table(3). Table (4) Results of PSNR and Rate of Compression ( Chaotic-Based Measurement Matrix) Image Name Measurement Reduction M PSNR(dB) RC OMP SP CoSaMP Time to reconstruct (Second) OMP SP CoSaMP Lena 84 100 120 15.939 21.339 29.77 22.28 28.007 30.203 18.9775 27.3529 29.9581 0.3281 0.3906 0.4688 16.937 20.717 20.157 10.7 19.058 15.798 15.107 18.511 17.710 Black 12 ∞ ∞ ∞ 0.0469 0.6861 0.0679 0.1216 Peppers 84 100 120 19.549 28.242 31.244 23.677 29.50 31.22 22.5895 29.3015 31.1868 0.3281 0.3906 0.4688 14.782 18.475 22.136 11.198 16.573 16.842 14.359 16.833 18.137 Since a fixed 8-bit rate quantization was used, the compression ratio depends only on the parameter M, from the results in Table(4), one notice that a large M means more coefficients to be captured, this yields the high quality of reconstruction and high compression rate while small M yields an aborted case. Also we discussed three reconstruction algorithms and compared the advantages and disadvantages of them. PSNR is used to measure the quality of recovery. Higher PSNR value gives better recovery performance. From Table (4) OMP algorithm can achieve very high PSNR when the size of measurements is large, it is not accurate any more if the M is small. Since the algorithm picks the optimal entries one by one, it is very slow. So OMP is not an ideal algorithm in reality. CoSaMP algorithm is faster than OMP as shown in Table(4). The PSNR is acceptable if we have a large size of measurements. SP algorithm is fastest among these algorithm as shown in Table(4). It is not difficult to tell SP algorithm can offer a robust recovery by using fewer measurements comparing to OMP and CoSaMP. By testing the images, algorithms can provide satisfactory results when the images are smooth(Black image). But when the images are rough or have a lot of details (Lena and Peppers images), the recovery results are not good. This kind of images needs more measurements to reconstruct the images. c. EVALUATION OF ENCRYPTION PROCESS To prove that proposed technique has high security and can resist all kinds of known attacks. Here, some security analysis results are carried out on the scheme :1. Key Analysis A good image encryption algorithm must be sensitive to the cipher key, and the key space should be large enough to make brute-force attacks infeasible. 78
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME A. Key Space Analysis Key space size is the total number of different keys that are used in the encryption. The chaotic system used in this work is highly sensitive to the initial values of the system, the key space size is = 10168, when we compare the key space of encrypted images obtained from the CS-based encryption methods in [5][16][17] then key space is 3.4028×1038. This will provide more sufficient security against the brute force attack than methods in [7][10][16]. B. Key Sensitivity Test Sensitivity which is a basic criterion for an encryption method requires that a slight change results in a completely different output At Transmitter Side The first test verified the key sensitivity of the proposed image encryption using multichaotic algorithm at transmitter side. • Figure (6) The Comparison between Encrypted Images by A) Original Key (Q), B) Neighbored Key (Q ̂) and C) Different between A) and B) Fig.(6(A)&(B)) depicted the corresponding two encrypted images. The difference image between these two encrypted images was shown in figure(4 (C)) for perceptual observation, All the percentage values exceeded 99%, which indicated that the tiny change in key brought great changes in the encrypted image. At The Receiver Side The encryption system should be sensitive to the small changes on the decrypted keys. And, generate a wrong decrypted image, if there is a small difference in the decryption keys[15]. Only the same keys, should give the same image at the receiver side, as shown in figure (7(B)&(C)). Also, one can use this test to see sensitivity Φ, if the initial conditions are changed by any part of the keys that was used to generate Φ as shown in Fig.(7(E)). • Figure (7) Sensitivity Tests of Keys From Fig.(7) we can see that the original image cannot be restored even if a tiny difference of the key due to the extreme initial condition sensitive property of a chaos system. 79
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME 2. Statistical Analysis An ideal cipher should be robust against any statistical attack. So, this work performs statistical analysis by calculating the histograms and correlations coefficients. A. Correlation Coefficients Analysis: Correlation coefficient is the measure of extent and direction of linear combination of two random variables[12]. This metric can be calculated as follows: Corr୶୷ ൌ |covሺx, yሻ| ሺ19ሻ ඥDሺxሻ ൈ ඥDሺyሻ Where x and y are the gray-scale values of two pixels at the same indices in the plain and cipher images, while cov(.,.) and D(.) were computed as follows: ୒ 1 Eሺxሻ ൌ ෍ x୧ N ሺ20ሻ ୧ୀଵ ୒ 1 Dሺxሻ ൌ ෍ሺx୧ െ Eሺxሻሻଶ N ሺ21ሻ ୧ୀଵ ୒ 1 covሺx, yሻ ൌ ෍൫x୧ െ Eሺxሻ൯൫y୧ െ Eሺyሻ൯ N ሺ22ሻ ୧ୀଵ To test the correlation between two (vertically, horizontally and diagonally) adjacent pixels in a original and cipher image, are used respectively. First, randomly select 2000 pairs of adjacent pixels (Vertical, Horizontal, Diagonal) from image (original and then encrypted). Then, calculate the Corrxy of each pair by using the formulas (19),(20),(21) and (22). The results are shown in Table (5). Table (5) Correlation Coefficients of Adjacent Pixels Image name Direction Original image Encrypted Encrypted image in image in [16] [7,10] 0.0215 0.0033 0.0808 0.0009 0.0176 0.0058 Lena Horizontal Vertical Diagonal 0.9719 0.9850 0.9593 Black Horizontal Vertical Diagonal ∞ ∞ ∞ Peppers Horizontal Vertical Diagonal 0.9894 0.9921 0.9829 80 ∞ ∞ ∞ 0.00028 0.0021 0.0002199 0.0007 0.0007 0.0035 0.0205 0.0737 0.0174 0.77 0.02 0.0104 Encrypted image in this work 0.0000509 0.0033 0.0094 0.0008 0.0046 0.0039 0.0214 0.0837 0.0187 Encrypted by CS only 0.869 0.1045 0.117 0.000107 0.000109 0.000025
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME The results show that the correlation coefficient is very close to zero in ciphered image, and thus the proposed encryption algorithm is less predictable and more secure. This quantitative evaluation demonstrated that the proposed method reduced the correlation by one order of magnitude compared with the methods in[7][10][16]. B. Correlation Distribution(Similarity) of The Adjacent Pixels The correlation distribution test for horizontal, vertical, and diagonal adjacent pixels have been performed for the proposed encryption algorithm and the results are gathered in Fig.(8). Encryption image Original image (Lena) Pixel gray value on location (X+1,Y+1) Pixel gray value value on location (X+1,Y+1 ) 250 200 150 100 50 0 0 50 100 150 200 250 Pixel gray value on location (X,Y) Original image (Black) Encryption image 12000 10000 8000 6000 4000 2000 0 0 50 100 150 200 250 Pixel gray value on location (X,Y) Figure(8) Correlation Distribution, Shows the Test Results of Encrypted Images Obtained from the Chaos and CS-Based Encryption Methods c. Histograms Analysis To prevent the leakage of information to an opponent, it is also advantageous if the cipher image bears little or no statistical similarity to the plain image. An image-histogram illustrates how pixels in an image are distributed by graphing the number of pixels at each color intensity level. (a)Original histogram (b)After CS Yq (c)After confusion Yc6 (d)After diffusion Yen 1200 3000 12000 12000 10000 10000 8000 8000 6000 6000 4000 4000 2000 2000 1000 2500 2000 800 1500 600 1000 400 500 0 0 50 4 x 10 4 Lena 100 150 200 250 0 50 100 150 200 250 0 0 50 100 150 200 250 0 50 100 150 50 100 150 200 250 800 12000 10000 8000 8000 6000 6000 4000 4000 2000 3 12000 10000 3.5 200 0 0 2000 600 2.5 2 1.5 400 1 0.5 0 0 50 Black 100 150 200 200 250 0 0 0 0 50 100 150 200 250 0 50 100 150 200 250 0 200 250 Figure (9) Histogram Test. The histogram of the encrypted image by CS only Fig.(9b) is totally different from that of the original image. But proposed system is still weak against statistical attacks. From the observation of the Fig.(9b,c), the cipher values inherit the Gaussian distribution property introduced by the measurement matrix, Gaussian distribution property of the measurement matrix leads to a nonuniform distribution cipher image, which leaks statistic information to analysts. The proposed method completely dissipates this Gaussian distribution replacing by fairly uniform distribution as shown in Fig.(9d). 81
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME 3. DIFFERENTIAL ANALYSIS Generally, an opponent may make a slight change (modify only one pixel) of the encrypted image so as to observe the change in the result. In this way, he may be able to find out a meaningful relationship between the original image and the cipher image. This is known as the differential attack. Since compressive sensing plays a role in sampling data, in this test, Yq are regarded as the “plaintext image”. We argue that this test routine is impartial because the security strength of the second encryption stage must not be stronger than that of the entire cryptosystem. We modified one pixel of Yq, and then iteratively performed the second stage stream cipher. To test the influence of one pixel change on the whole cipher-image, two most common measures NPCR (Number of Pixel Change Rate) and UACI (Unified Average Changing Intensity) are used. Let the two cipher images be C1 and C2, whose corresponding plain images have only one pixel difference. Label the gray values of the pixels at grid (i, j) in C1 and C2 by C1(i, j) and C2(i, j), respectively. Define a bipolar array D with the same size as image C1 or C2, namely, if C1(i, j) = C2(i, j) then D(i, j) = 0, otherwise D(i, j) = 1. The NPCR and UACI are defined by: NPCR ൌ UACI ൌ ∑୧,୨ D(i, j) 2M ൈ N ൈ 100% (23) 1 |cଵ (i, j) െ cଶ (i, j)| ቎෍ ቏ ൈ 100% 2M ൈ N 255 (24) ୧,୨ The higher the values of NPCR and UACI are the better the encryption[16]. The results of these two tests are shown in Table (5). Table (6) NPCR and UACI Performance for Measuring the Plaintext Sensitivity Image name Lena Black Peppers Method in [16] (results are given for Lena image only) NPCR 0.0038 UACI 0.0013 CS Only Proposed method NPCR 0.0031 0.0054 UACI 1.24×10-5 9.72×10-5 NPCR 0.9992 0.9977 UACI 0.2512 0.2505 0.0041 1.6×10-5 0.9984 0.2506 From Table (6) the proposed method achieved the optimal diffusion, and outperformed method in [16]. Then the proposed algorithm has a good ability against known plain text attack. 4. INFORMATION ENTROPY Information entropy can be used to characterize the confusion, and is calculated by :E(C) ൌ ∑ P൫C୧,୨ ൯logଶ (1⁄p(C୧,୨ )) Where P (ci,j) represents the probability of symbol ci,j for a grayscale image. 82 (25)
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME Image name Lena Entropy for original image 7.5707 Black Peppers 0 6.9911 Table (7) Entropy Test Entropy after Method in CS [7,16] 2.3514 6.8048 0 2.1264 7.2538 6.8567 Method in [10] 7.9973 Proposed method 7.9987 7.9969 7.9974 7.9980 7.9986 From the observation of Table(7), the proposed method achieved outstanding confusion, and outperformed the CS-based methods [7][10][16], in the sense that the corresponding entropy E(C) was more close to the maximum value of 8 bits. 5. THE AVALANCHE EFFECT METRIC The avalanche effect metric can be used to test the efficiency of the diffusion mechanism. A ഥ ഥ single bit change can be made in the image P to give a modified image P. Both P and P are encrypted ത . The avalanche effect metric is the percentage of different bits between C and C . If C ത to give C and C ത and C differ from each other in half of their bits, we can say that the encryption algorithm possesses good diffusion characteristics[16]. Image name Lena Black Peppers Table (8) Avalanche Effect Test Method in [16](result are given for Lena) CS Only 0.0018 0.0018 0.0027 0.0017 Proposed method 0.4456 0.4978 0.4965 The results listed in Table (8) showed that the change rate achieved by proposed method was extremely close to the ideal case. VII. CONCLUSION Different techniques are used in this paper to implement image encryption and compression such as 2-D wavelet transform based sparse representation, 2-types of chaotic sequence(Lorenz and Chua)combined together based 4-blocks measurement matrix and used different key for each block. (OMP, SP and CoSaMP) based reconstruction image, 6-kinds of confusion mechanism all depends on chaotic sequence generated from combined 4-different chaotic types and 4-chaotic types XORing with confused image to get diffusion image. With usage of CS based compression, we get first level of security since; an original image is encrypted as a set of coefficients by a secret orthogonal transform. Without knowing fixed M, quantized level and seed used to generate the exactly measurement matrix, will be impossible to reconstruct original image. Compression ratio as well as the reconstruction performance decided by the factor M and quantization level, increase M and quantization level enhance reconstruction quality. For the weakness of using CS only-based image encryption, we proposed a new quantized encryption algorithm based on multi-chaotic system. Then this system gives the second level of security by using chaos based image encryption that has many merits; It has a large enough key space to resist all kinds of brute-force attacks, since the key space of the proposed system = 10168. The cipher-image has a good statistical property, the histogram of the encrypted image is fairly uniform, the correlation coefficient of two adjacent pixel are very small ൎzero, and the entropy is ൎ8bits. The encryption algorithm is very sensitive to the secret keys and plain-image, the NPCR and UACI of cipher image(Lena) are 0.9992 and 0.25. Then proposed 83
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 09766367(Print), ISSN 0976 - 6375(Online), Volume 5, Issue 1, January (2014), © IAEME algorithm has good ability against known plain text attack and encryption image has a highly confidential security. From all above Chaos and CS-based image encryption and compression appears a good combination of compression, security and flexibility. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] Afnan S. Al-Ali “Chaos Encryption Methods for Partial Encryption of Wavelet-based Images”, M.Sc. Thesis, Department of Computer Engineering, University of Basrah 2008. E.J. Candès, J. Romberg& T. Tao “Robust Uncertainty Principles: Exact Signal Reconstruction from Highly Incomplete Frequency Information”, IEEE Transactions on Information Theory pp. 489-509, 2009. Yi Yang, Oscar C. Au, Lu Fang, Xing Wen and Weiran Tang “Perceptual Compressive Sensing For Image Signals” IEEE International Conference on Advances in Computing and Communications v Magazine, pp.89-92 2008. S. Mazloom &A. M. Eftekhari-Moghadam “Color Image Cryptosystem using Chaotic Maps”, IEEE Computational Intelligence for Multimedia, Signal and Vision Processing (CIMSIVP),pp.142 – 147, 2011. Athira V., S. N. George & Deepthi P P. “A novel encryption method based on compressive sensing”, IEEE Automation, Computing, Communication, Control and Compressed Sensing (iMac4s), International Multi-Conference,pp. 271 – 275,2013. R. G. Baraniuk “Compressive Sensing”, IEEE Signal Processing Magazine, pp.118-124, 2007. A. Orsdemir, H. Oktay Altun, G.Sharma &Mark F. Bocko “On The Security and Robustness of Encryption Via Compressed Sensing”, IEEE Military Communications Conference (MILCOM),pp. 1 - 7 2008. A Anil Kumar and A. Makur “Lossy Compression of Encrypted Image by Compressive Sensing Technique” IEEE TENCON 2009. D. Tralic & S. Grgic “Signal Reconstruction via Compressive Sensing” IEEE International Symposium ELMAR, Zadar, Croatia Vol. 53, 2011. Y. Rachlin & D. Baron “The Secrecy of Compressed Sensing Measurements”, IEEE Communication, Control, and Computing, 46th Annual Allerton Conference, Illinois, USA, pp. 813 – 817,2008. Y. Wang C. Han &Y. Liu “A Parallel Encryption Algorithm for Color Images Based on Lorenz Chaotic Sequences” IEEE Proceedings of the 6th World Congress on Intelligent Control and Automation, Dalian, China, pp. 9744 - 9747, 2006. Edward N. Lorenz “Deterministic Nonperodic Flow” Journal of Atmospheric Sciences, Vol.20, pp.130-141,1963. O. E. Rossler “An Equation for Continuous Chaos”, An equation for continuous chaos, Physics Letters VOL.57, NO.5, pp. 397-398, 1976. Leon O. Chua “The Genesis of Chua's Circuit” CiteSeerX - Scientific documents, vol. 46, no. 4, pp. 250–257, 1992. M. Henon “A Two-Dimensional Mapping with A Strange Attractor”, Springer-Verlag Communications In Mathematical Physics, VOL.50, Pp.69-77, 1976. R. Huang, K. H. Rhee & S. Uchida “A Parallel Image Encryption Method Basedon Compressive Sensing” Springer Science & Business Media New York, 2012. Ahmad Salameh Abusukhon, “Block Cipher Encryption for Text-to-Image Algorithm”, International Journal of Computer Engineering & Technology (IJCET), Volume 4, Issue 3, 2013, pp. 50 - 59, ISSN Print: 0976 – 6367, ISSN Online: 0976 – 6375. 84