Color Image Compression and Encryption Based on Compressive Sensing *

In this paper; a simple and powerful technique is proposed to encrypt and compress the color image in one step based on Compressive Sensing (CS) with using multi-chaotic system (Chen and Chua) as measurement matrix. The CS is used due to many properties; Greatly reduce the ratio of signal sampling, the size of capacity, power unitization, computational complexity that need to represent a sparse signal or images and lead signal processing into a new revolutionary era. In addition to all the above features; it combines encryption and compression in the one step. Also using chaotic system (Chen and Chua) as measurement matrix in CS provides high level of security to the encryption and compression image since each one of chaotic system has Three-dimension variable. The simulation results demonstrate the compression and encryption color image has low storage size and transmitted requirement, high security, large key size and low encryption time requirement since image compression and encryption in the same step, incoherence, key sensitivity, and resistance to brute force attack. Also the recovered image, has good quality (to human perception) and saves both the clarity and the characteristics of the image.


Introduction
In an era of the rapid development; digital multimedia signals often need to be transmitted through a channel or a network.These signals are redundant.Transmission channel is always insecure with limited bandwidth; then prior to transmission, it is desirable to compress the multimedia signal for efficient usage of storage resources and/or bandwidth of the communication channels.This compression step is performed either in a lossy or lossless way depending on the needs of the receiver.In addition, the security of multimedia (Image, video and 3D object…etc.)becomes increasingly important for many applications like confidential transmission, video surveillance, military and medical applications.So it is desired to transmit the redundant data after compression and encryption [1].Typically, encryption of the compressed multimedia is performed following the compression.This step is performed conventional cryptographic algorithms.
Recently, some researchers [2,3] propose a compression combined encryption method based on Compressive Sensing (CS) which is known as a signal acquisition and sparse vector recovery technique at low sampling rate.The compressed sensing (CS) paradigm unifies sensing and compression of sparse signals in a simple linear measurement step.Reconstruction of the signal from the CS measurements relies on the knowledge of the measurement matrix used for sensing.Generation of the pseudorandom sensing matrix utilizing a cryptographic key, offers a natural method for encrypting the signal during CS.This CS based encryption has the inherent advantage that encryption occurs implicitly in the sensing process without requiring additional computation.Additionally, the robustness of recovery from compressed sensing, allows a new form of "robust encryption" for multimedia data, wherein the signal is recoverable with high fidelity despite the introduction of additive noise in the encrypted data [1,4].

Related Work
In [4] a compression-combined digital image encryption method is proposed which robust against consecutive packet loss and malicious shear attack with using Gaussian random generator as measurement matrix.In [5] a secure color image encryption scheme by combining the strengths of compressive sensing method and Arnold scrambling method in this paper.In [6] an image compression-encryption algorithm based on 2-D compressive sensing is proposed, which can accomplish encryption and compression simultaneously.The measurements are performed in two directions and the measurement matrices are constructed as partial Hadamard matrices, which are controlled by Chaos map.
In [7] a secure digital image encryption method based on fast compressed sensing approach using structurally random matrices and Arnold transform is proposed, the size of the digital image is reduced to 25 % of the measurements with increased quality.In paper [8] a hybrid algorithm for compression and encryption color image has been proposed which is based on key matrix (logistic map) with Arnold transform, and in [9] a kind of combined CS and FLT (Fibonacci-Lucas transform) image compression and encryption scheme is proposed with the advantages of the 1D hybrid chaotic map.

Overview of Compressive Sensing
Suppose we have an original signal X which could be sparsely represented in a certain domain Ψ.Then it employs a non-adaptive linear projection onto observation matrix Φ that preserves the structure of the signal and uncorrelated with the transform basis Ψ; the previous two steps called sampling at the transmitter side, and then the signal can be accurately reconstructed at the receiver by solving the convex optimization problem or greedy pursuit algorithm with a small amount of measured values this step called recovery [10].In fact; 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 Φ [11].Finally, CS framework that mainly consists of two crucial parts: -sampling (compression and encryption) and recovery (decryption).

Sampling
Sampling mainly contains two parts:

Signal Presented in Sparsity
The original signal X ∈ R N×N which can be expanded on the orthonormal basis (such as DCT, DWT) ψ = [ψ1 ψ2……ψN], a signal X can be expressed as : Where S is the (N×N) pixels of weighting coefficients

〈 〉
T denotes transpose, containing exactly K nonzero coefficient, K << N.Only k elements of the vector S are non-zero [11].Clearly X and S are equivalent representations of the signal X in the special domain and S in the Ψ domain.
Ψ is a specific N×N dictionary that its columns are orthonormal and spans X domain and S is the coefficient vector of X in basis Ψ= [ψ 1 ψ 2 ……..ψ N ].

Measurement Matrix (Φ)
It is any random generated matrix such that the information in every S sparse signal is not damaged Then substituting Ψ from (1) in Y gives: by dimensionality reduction from N×N to M×N samples [1].Consider a general linear measurement process that computes (K<M<N) inner products between X and collection of vectors : Where Θ is called 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 Θ ∈ R M×N .And Φ is called measurement matrix, and if signal or image is sparse then Φ is called sensing matrix Θ=Φ, Φ= [φ 1 ,…..φ M ] T ∈ R M×N .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 [2].Y: is (M×N) measurement vector .The measurement process is non-adaptive, meaning that Φ is fixed and does not depend on the signal X .This matrix is given by Candes, Romberg and Tao [2,3,11].

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.Since M<N there are infinitely many ̂ that satisfy Θ ̂=Y [2,11].Eventually, based on the knowledge of information measurements (Y, Φ, Ψ) the signal can be recovered by solving an underdetermined linear system of equations using the convex optimization algorithm L1-norm minimization or Greedy pursuit algorithm.

Chaotic Systems
Chaotic system is a kind of nonlinear dynamic system was develop by Edward Lorenz, which is very sensitive to the initial conditions and system parameters and has characteristics of pseudorandom [12].Although the application of a 1-D chaotic method such as (Logistic map, Cat map…etc.)based on image encryption is traditional and fast but some weakness appeared such as, small key space, weak security and complexity.But the encryption sequences produced by using multidimensional like (Chen, Chua, Rossler .etc.) have excellences; one is that the structure of this system is more complicated than the low-dimensional.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 [13].From above measurement matrix generated by using multi-chaotic system appears a good combination of fast, security and flexibility for both compression and encryption.In this paper, two types of chaotic systems are used, these are:

Chen System
Chen's chaotic system coined by G. Chen in 1999.Chen system can be applied to designing an encryption with higher security.Chen dynamical system is described by the following system of differential equations [14]: Where X, Y and Z are the state conditions and a, b and c are three parameters.The Chen attractor is shown in Figure (1-A).

Chua System
The principal genuine physical dynamical physical dynamical system, capable of generating chaotic phenomena in the laboratory, comparable to those in the Lorenz system, was invented by Chua in 1992 [15].Due to its simplicity, strength, and minimal effort 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: Where a, b, c, m 0 , m 1 are parameters of the system and X, Y and Z initial condition.The Chua's circuit is shown in Figure (1-B).

A B
Figure .1 Chaotic Attractor (A) Chen Attractor (B) Chua Attractor

Proposed System
The proposed algorithm for transmitter and receiver side is shown in Figure .2:-

Compression and Encryption Procedure (At Transmitter Side)
1. Read original image; before apply these algorithms on color image; the original color image (24bit/pixels) is divided into three original colors (red (R) channel, green (G) channel and blue (B) channel (each color have 8 bits/pixel)).
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 (Daubechies3 is used to do the 4-level wavelet decomposition for each color.The result represents S is the sparse/compressible image matrix with K-nonzero coefficients.
3. Multi chaotic system-based measurement matrix; the need for the use of random numbers generator to generate measurements matrix represents a natural way to encrypt signal through CS, by using measurement matrix Φ as a cryptographic key.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 Φ.Here, in this work the chaotic sequence is used to construct such a sensing matrix, called chaotic matrix.
The proposed stream cipher is based on adding two variables from two types chaotic system; Chua and Chen to construct a new variable chaotic sequence.This sequences are used to generate the random number sequence (keys) are used to generate Φ.The security of Chua or Chen system depends on three parameters and three initial conditions, but in the proposed algorithm the security level is increased to six parameters and six initial conditions.From this step gets a new key and makes the work more strong.The trajectory of both Chen and Chua systems can be found by using a Runge-Kutta algorithm with step=0.01.The optimization and modification model of Chen system and Chua system to be values between (0-255): Where X* , Y* and Z* , are the random number sequences generated by the optimal model of Chen or Chua systems after this step adding the two systems as shown below, and floor ( ) is a rounded down function.
X red =X X1 (generate Φ for red channel) Y green =Y Y1 (generate Φ for green channel) Z blue = Z Z1 (generate Φ for blue channel) To normalize, divide by M; Y green (n) =1/M × (Y green (n)) ( 14) Where M is the new number of rows for image after reduction also represents the number of measurements, 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 Φred = X red (n) -X one (chaotic matrix for red channel) K Φgreen = Y green (n) -X one (chaotic matrix for green channel) (17) Xone =all 1's matrix of size (M×N).

Compressive Sensing Measurement Y; in this work the CS measurements Y can be
obtained by projecting the resultant from Daubechies wavelet into chaotic matrix Φ to take important information with non-zero values without duplicating.Then the results three CS measurement (red, green, blue). 5. Lloyd's qantizer; the resultant coefficients of Y will be large number (64bits/pixel) in each channel.The result must be quantizing to give minimum bits/pixel (in this work, (8bits/pixel) was shown to be enough).Quantization is implemented through the wellknown Lloyd quantizer.Before using Lloyd all the elements of Y (in each channel) 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 channel separately;

Y Y
Where h represents the min value in Y(M,N).Then using Lloyd's algorithm in the new value of .

Recovery and Decryption Using Greedy Pursuit(Gp) (At Reciver)
Suppose that at the receiver side as shown in Figure .2,Y h is received, along with the keys K Φi and h from a separate secured channel then reconstruction image.And then, applying GP (SP (Subspace Pursuit)) to each channel.

Subspace Pursuit
The Subspace Pursuit (SP) algorithm was developed by Dai and Milenkovic and published in 2009.The basic idea behind the SP algorithm is borrowed from sequential coding theory with back tracking, more precisely, the Φ*(is the conjugate transpose of matrix Φ) order-statistic algorithm.In this decoding framework, one first selects a set of K code word of highest reliability that span the code space.If the distance of the received vector to this space is deemed large, the algorithm is incrementally removed and adds new basis vectors according to their reliability values, until a sufficiently close candidate code word is identified [16].

Simulation Results
In this section, the simulation results is achieved by using MATLAB2014 to run compression ,encryption and reconstruction programs in a personal computer, and the operation system is Microsoft Windows 7. The 512×512 true color BMP image "Pepper" is used.selecting keys with initial condition X= 0.2, Y=-0.1, Z=0 for Chua system and X= -0.8266, Y= -0.8063, Z= 24.4389 for Chen system.The results of encryption (cipher) image and the plain image is shown in Figure .

Metrics for Image Compression (Recovery)
The expression "recovery" indicates to decrypt and reconstruct the original color image from its measurement data.PSNR is used to measure the quality of the reconstructed image.PSNR of an a X a 8-bit grayscale image X and its reconstruction ̂ is calculated as; Where X (m, n) represented the intensity of a pixel in the plain image (to each color and then to all image), while its reconstructed counterpart is denoted by ̂ (m, n).PSNR is measured in decibels (dB), M: height of the image, N: width of the image, The result shown is in Table1.Besides measuring the image quality, we also measure the compression ratio; From the outcome above the quantization ( a fixed 8-bit rate quantization was used) then compression ratio depends only on the parameter M, then; we can said that a large M means more coefficients to be captured then yield the high quality of reconstruction and high compression rate while small M yields an aborted case.

Grey-Scale Histogram
An image-histogram illustrates how pixels in an image are distributed by graphing the number of pixels at each color intensity level [9]

Key Space and Sensitivity Analysis
Key space size is up to the total number of different keys that are used in the encryption, good cryptosystem should be sensitive to all secret keys [1].That means, if the attacker uses slightly different in key to decrypt the same encryption image then the output completely different as shown in Figure .5.Only the same key give the right plain image.For example; let changed slightly the initial value of Chua system X0 = 0.2 to be X0=0.2000000000001used to decrypt the same encryption image with the stay off the other keys in the same value Y0=-0.1 and Z0= 0, as shown in Figure .5 the decryption fails completely.This test result shows that the algorithm is very sensitive to the initial values.

Correlation Coefficients Analysis
Correlation coefficient is the measure of extent and direction of linear combination of two random variables.This metric can be calculated as follows: - 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: - 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 (23),( 24),( 25) and (26).The results are shown in Table (2).

Correlation Distribution(Similarity) of The Adjacent Pixels
The correlation distribution test for horizontal, vertical, and diagonal adjacent pixels have been performed for the proposed compression and encryption algorithm and the results are gathered in Fig. (6).

Original red image
Compression and encryption red image

Conclusions
The new approach as shown in this paper is combines compression and encryption in one steps by using CS.CS is used to combine the sampling, compression, and encryption of the data to be sent.This is achieved through a single linear measurement step, using a measurement matrix is generated based on adding two chaotic systems; Chen and Chua together, which can effectively enhance the security level in the system.The experiment results including; grey-scale histogram analysis, key space analysis, and PSNR provide that the security and performance of the proposed system has high security and simple design, since it has a large key space, high key sensitivity, the correlation coefficient of two adjacent pixels are very small ≈zero, achieve good randomness and finally high security.

Figure. 2
Figure.2 Proposed Compression and Cryptography System (A) Transmitter Side (B) Receiver Side

Figure( 6 )
Figure(6) Correlation Distribution, Shows the Test Results of original red from original image and red from compressed and encrypted image