Published on

IJERA (International journal of Engineering Research and Applications) is International online, ... peer reviewed journal. For more detail or submit your article, please visit

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450 High Resolution Image Encryption & Reconstruction Using Scalable Codes Akash Raj Department Of Ece, M.E Embedded System, Sathyabama University, Chennai-119, Tamil Nadu, IndiaABSTRACT This paper proposes a novel scheme ofscalable coding for encrypted gray images. Therefore, the bit amount of the original image isAlthough there have been a lot of works on 8N. The content owner generates a pseudorandomscalable coding of unencrypted images/videos the bit sequence with a length of 8N. Here, we assumescalable coding of encrypted data has not been the content owner and the decoder has the samereported. In the encryption phase of the pseudorandom number generator (PRNG) and aproposed scheme, the pixel values are completely shared secret key used as the seed of the PRNG.concealed so that an attacker cannot obtain any Then, the content owner divides the pseudorandomstatistical information of an original image. bit sequence into N pieces, each of which containingThen, the encrypted data are decomposed into 8 bits, and converts each piece as an integer numberseveral parts, and each part is compressed as a within [0, 255]. An encrypted image is produced bybit stream. At the receiver side with the a one-by-one addition modulo 256 as follows:cryptographic key, the principal content withhigher resolution can be reconstructed when g 0  i, j   mod  p i, j   e i, j ,256,more bit streams are received. 1  i  N1,1  i  N 2Keywords-Bitstreams,Cryptography,Downsampling, Hadamard Where p i, j  represents the gray values of pixelstransform, Imagecompression ,Imageencryption,QuantizationScalable coding. at positions i, j ,   e i, j   represents the pseudorandom numbers within [0, 255] generated by the PRNG, and g i , j  represents theI. INTRODUCTION 0  In recent years, encrypted signal processinghas attracted considerable research interests. The encrypted pixel values. Clearly, the encrypted pixeldiscrete Fourier transform and adaptive filtering can values g 0  i, j  are pseudorandom numbers sincebe implemented in the encrypted domain based on e i, j  values are pseudorandom numbers. It is wellthe holomorphic properties of a cryptosystem, and acomposite signal representation method can be used known that there is no probability polynomial timeto reduce the size of encrypted data and computation (PPT) algorithm to distinguish a pseudorandomcomplexity. In joint encryption and data hiding, a number sequence and a random number sequencepart of significant data of a plain signal is encrypted until now. Therefore, any PPT adversary cannotfor content protection, and the remaining data are distinguish an encrypted pixel sequence and aused to carry buyer–seller protocols, the fingerprint random number sequence. That is to say, the imagedata are embedded into an encrypted version of encryption algorithm that we have proposed isdigital multimedia to ensure that the seller cannot semantically secure against any PPT adversary.know the buyer’s watermarked version while thebuyer cannot obtain the original product. A numberof works on compressing encrypted images have B. ENCRYPTED IMAGE ENCODINGbeen also presented. When a sender encrypts an Although an encoder does not know theoriginal image for privacy protection, a channel secret key and the original content, he can stillprovider without the knowledge of a cryptographic compress the encrypted data as a set of bitstreams.key and original content may tend to reduce the data The detailed encoding procedure is as follows. First,amount due to the limited channel resource the encoder decomposes the encrypted image into a series of subimages and data sets with a multiple-A. IMAGE ENCRYPTION resolution construction. The subimage at the The original image is in an uncompressed t  1th level G  t  1 is generated byformat and that the pixel values are within [0, 255], downsampling the subimage at the t th level asand denote the numbers of rows and columns as N1and N2 and the pixel number as (N=N1 X N2). follows: 444 | P a g e
  2. 2. Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450g t 1 i , j   g (t ) 2i ,2 j  , Where H is a L(t) x L(t) Hadamard matrix made up of +1 or -1. That implies the matrix H meets t  0,1, , T  1 H’*H = H*H’ = L(t) * I (0) Where H(t ) is a transpose of H,I is an L (t) x L (t)Where G just the encrypted image and T is is the identity matrix, and L (t) must be a multiple of 4.number of decomposition levels. In addition, the For each coefficient C k l  , calculate ( t 1) (t)encrypted pixels that belongs to G but do notbelong to form data set Q  t 1 as follows: C k(t ) l      mod C k( t ) l ,256  Q t 1   g i, j  mod i,2 1or mod( j,2)  1 , (t )   256 / M (t )   t  0,1,T  1. 1  k  K ,1  k  l  L (t ) (t ) (t) ( t 1) Where  That means each G is decomposed into G ( t 1) ( t 1)and Q , and the data amount of Q is three M( t )  round M / L( t ) ( t 1) and round (.) finds the nearest integer. Thetimes of that of G . After the multiple-level (t)decomposition, the encrypted image is reorganized remainder of C k (l) modulo 256 is quantized asas G (T ) , Q T  , Q T 1 ,  and Q ( t ) (t) integer C k (l) , L (t), and the quantization steps are T  approximately proportional to square roots of L (t).For the subimage G , the encoder quantizes eachvalue using a step Δ as follows: (t) Then, C k (l) at different levels are converted into  g (T ) i, j  bitstreams, which are denoted as BS (t). Sincebi, j     0  C (kt ) (l)  M ( t )  1    (t)Where the operator  takes an integer toward and the number of C k (l) at the th level is 3N/4tminus infinity and the bit amount of BS(t) is  256 / M 3  N  log 2 M ( t ) N(t)  , t  1,2,  , THere, M is an integer shared by the encoder and the 4tdecoder, and its value will be discussed later.Clearly The encoder transmits the bitstreams with 0  b(i, j)  M  1  an order of BG , BS , BS (T ) ( T 1) ,  , BS . . If (1) Then, the data of b (i,j) are converted into a the channel bandwidth is limited, the latterbitstream, which is denoted as BG. The bit amount bitstreams may be abandoned. A higher resolutionof BG is image can be reconstructed when more bitstreams N are obtained at the receiver side. Here, the totalN BG  . log 2 M. 4T compression ratio R C , which is a ratio between theFor each data set Q t  1,2,  T  the encoder (t) amount of the encoded data and the encrypted image data, ispermutes and divides encrypted pixels in it into K(t)groups, each of which containing L(t) pixelsK (t)  x L( t )  3N / 4 t . In this way, the L (t) pixels RC  N BG  1 T (t ) log 2 M 3 T log 2 M (t )  N  8  4t  8   4tin the same group scatter in the entire image. The 8 N 8 N t 1 t 1permutation way is shared by the encoder and thedecoder, and the values of L (t) will be discussedlater. Denote the encrypted pixels of the Kth group In the figure below, fig (a) is the original image, figas q k 1, q k 2 ,  , q k L 1  k  K t  , (t) (t) (t)   (t) (b) is encrypted image of size 512x512.afterand perform the Hadamard transform in each groupas follows: encryption I compressed the imge .i.e fig (c) is 256x256 size image. Fig (d) is 128x128, fig (e) is C (kt ) (1)   q (kt ) (1)  C ( t ) (2)   q ( t ) (2)  64x64 size image. k   H k        C (kt ) L t    q (kt ) L t       445 | P a g e
  3. 3. Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450Fig (a) fig (b) fig (c) fig (d) fig (e) Fig (1) Encrypted and Compressed Images Denote the interpolated pixel values of the Kth group at the tth level asC. IMAGE RECONSTRUCTION With the bitstreams and the secret key, areceiver can reconstruct the principal content of theoriginal image, and the resolution of thereconstructed image is dependent on the number ofreceived bitstreams. While BG provides the roughinformation of the original content, 𝐵𝑆 (𝑡) can beused to reconstruct the detailed content with an 𝑟𝑘 𝑡 1 , 𝑟𝑘 𝑡 2 … … . 𝑟𝑘 𝑡 𝐿(𝑡) 1 ≤ 𝑘≤ 𝐾 ,𝜏 𝑡iteratively updating procedure. The image ≤ 𝑡≤ 𝑇reconstruction procedure is as follows. and their corresponding original pixel values asWhen having the bitstream BG, the decoder may 𝑝𝑘𝑡 1 , 𝑝𝑘𝑡 2 … … . 𝑝𝑘𝑡 𝐿(𝑡) . The errors ofobtain the values of 𝑏(𝑖, 𝑗) and decrypts them as asubimage, i.e., interpolated values are 𝑇 𝑝 𝑖, 𝑗 = 𝑚𝑜𝑑 𝑏 𝑖, 𝑗 . ∆ − 𝑒 2 𝑇 . 𝑖. 2 𝑇 . 𝑗 . 256 𝑡 𝑡 𝑡 ∆ ∆𝑝 𝑘 𝑙 = 𝑝𝑘 𝑙 − 𝑟𝑘 𝑙 , + , 1 ≤ 2 𝑁1 𝑁2 𝑙 ≤ 𝐿(𝑡) , 1 ≤ 𝑘 ≤ 𝐾 (𝑡) , 𝜏 ≤ 𝑡 ≤ 𝑇 . 1 ≤ 𝑖≤ 𝑇 , 1 ≤ 𝑗≤ 𝑇 2 2 Define the encrypted values of 𝑟𝑘 𝑡 𝑙 asWhere 𝑒 2 𝑇 . 𝑖. 2 𝑇 . 𝑗 are derived from the secret 𝑟𝑘 𝑡 𝑡 𝑙 = 𝑚𝑜𝑑 𝑟𝑘 𝑙 + 𝑒 𝑘 𝑙 , 256 , 𝑡key.If the bitstreams𝐵𝑆 (𝑡) (𝜏 ≤ 𝑡 ≤ 𝑇) are also 1 ≤ 𝑙 ≤ 𝐿(𝑡) , 1 ≤ 𝑘 ≤ 𝐾 (𝑡) , 𝜏 ≤ 𝑡 ≤ 𝑇 .received, an image with a size of 𝑁1 /2(𝜏−1) × 𝑁2 /2(𝜏−1) will be reconstructed. First, upsample the 𝑡 Where 𝑒 𝑘 𝑙 are pseudorandom numbers derivedsubimage 𝑝 𝑇 𝑖, 𝑗 by factor 2(𝑇−𝜏+1) to yield an 𝑁1 /2(𝜏−1) × 𝑁2 /2(𝜏−1) image as follows: from the secret key and corresponding to 𝑟𝑘 𝑡 𝑙 . Then 𝑇−𝜏+1 𝑇−𝜏+1 𝑟 2 . 𝑖 .2 . 𝑗 = 𝑝 𝑇 𝑖, 𝑗 , 𝑁1 𝑁2 ∆𝑝 𝑘 𝑡 𝑙 ≡ 𝑞 𝑘 𝑡 𝑙 − 𝑟𝑘 𝑡 𝑙 𝑚𝑜𝑑 256. 1 ≤ 𝑖≤ 𝑇 , 1 ≤ 𝑗≤ 𝑇 2 2 We also defineand estimate the values of other pixels according tothe pixel values using a bilinear interpolationmethod. 446 | P a g e
  4. 4. Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450 ∆𝐶 𝑘 𝑡 1 ∆𝑝 𝑘 𝑡 1 𝐷𝑘 𝑙 , 𝑖𝑓𝑑 𝑘 𝑙 < 128 ∆𝐶 𝑘 𝑡 2 ∆𝑝 𝑘 𝑡 2 𝐷𝑘𝑡 𝑙 = 𝐷 𝑘 𝑙 − 256 , 𝑖𝑓𝑑 𝑘 𝑙 ≥ 128 . = 𝑯 . . . . 𝑡 . . 𝐷 𝑘 𝑙 are the differences between the values ∆𝐶 𝑘 𝑡 𝐿(𝑡) ∆𝑝 𝑘 𝑡 𝐿(𝑡) consistent with the corresponding 𝑐 𝑘 𝑡 𝑙 and 𝐶 𝑘 𝑡 𝑙 . Then, considering 𝐷 𝑘 𝑡 𝑙 as an estimate of 𝑡Where H is a 𝐿(𝑡) × 𝐿(𝑡) Hadamard matrix made up ∆𝐶 𝑘 𝑙 , modify the pixel values of each group asof +1 or -1. Since only the addition and subtraction follows:are involved in the Hadamard transform 𝑟𝑘 𝑡 1 𝑟𝑘 𝑡 1 𝐷𝑘𝑡 1 𝑡 𝑡 𝑡 ∆𝐶 𝑘 𝑡 1 ∆𝑝 𝑘 𝑡 1 𝑟𝑘 2 𝑟𝑘 2 ′ 𝐷𝑘 2 . . 𝑯 . = + . ∆𝐶 𝑘 𝑡 2 ∆𝑞 𝑘 𝑡 2 . . 𝐿(𝑡) . . ≡ 𝑯 . . . . . . . 𝑟𝑘 𝑡 𝐿 𝑟𝑘 𝑡 𝐿 𝐷𝑘 𝑡 𝐿(𝑡) . . 𝑡 𝑡∆𝐶 𝑘 𝐿(𝑡) ∆𝑞 𝑘 𝐿(𝑡) And enforce the modified pixel values into [0,255] 𝑟𝑘 𝑡 1 as follows: 𝑡 𝑟𝑘 𝑡 2 0, 𝑖𝑓𝑟𝑘 1 < 0 − 𝑯. . 𝑚𝑜𝑑 256 𝑟𝑘 𝑡 𝑙 = 𝑟𝑘 𝑡 1 , 𝑖𝑓 0 ≤ 𝑟𝑘 𝑡 1 ≤ 255 . 255 , 𝑖𝑓𝑟𝑘 𝑡 1 > 255 . 𝑟𝑘 𝑡 𝐿(𝑡) 3) Calculate the average energy of difference due to the modification as follows:That means the transform of errors in the plaindomain is equivalent to the transform of errors in the 𝐾 (𝑡) 𝐿 (𝑡) 𝑡 2encrypted domain with the modular arithmetic. 𝑇 𝑡=𝜏 𝑘=1 𝑙=1 𝑟 𝑘 𝑙 − 𝑟𝑘 𝑡 𝑙 𝐷 = 𝑇Denoting 𝑡=𝜏 3𝑁 4𝑡 𝐶𝑘𝑡 1 𝑟𝑘 𝑡 1 If D is not less than a given threshold of 𝑡 𝐶𝑘𝑡 2 𝑟𝑘 𝑡 2 0.10, for each pixel 𝑟𝑘 𝑙 , after putting it back to . . the position in the image and regarding the average = 𝑯. value of its four neighbor pixels as its new value . . . . 𝑟𝑘 𝑡 𝑙 , go to step 1. Otherwise, terminate the 𝐶 𝑘 𝑡 𝐿(𝑡) 𝑟𝑘 𝑡 𝐿(𝑡) iteration, and output the image as a final reconstructed result.We have 𝑡 𝑡 𝑡 In the iterative procedure, while the ∆𝐶 𝑘 𝑙 ≡ 𝐶 𝑘 𝑙 − 𝐶 𝑘 𝑙 𝑚𝑜𝑑 256 decrypted pixels 𝑝 𝑇 𝑖, 𝑗 are used to give an initialWith the bitstreams 𝐵𝑆 (𝑡) (𝜏 ≤ 𝑡 ≤ 𝑇) , the values estimation of other pixels, the values of 𝑐 𝑘 𝑡 𝑙 inof 𝐶 𝑘 𝑡 𝑙 can be retrived, which provide the 𝑡 bitstreams 𝐵𝑆 (𝑡) provide more detailed informationinformation of 𝐶 𝑘 𝑙 . Therefore, the receiver may to produce the final reconstructed result withuse an iterative procedure to progressively improve 𝑡 satisfactory quality. In step 2, by estimating ∆𝐶 𝑘 𝑙the quality of the reconstructed image by updating 𝑡 according to 𝑐 𝑘 𝑙 , the pixel values are modifiedthe pixel values according to 𝐶 𝑘 𝑡 𝑙 . The detailed to lower the reconstruction errors. If the image isprocedure is as follows. uneven and 𝐿(𝑡)is big, the absolute value of actual 1) For each group 𝑡 𝑡 𝑡 (𝑡) ∆𝐶 𝑘 𝑡 𝑙 may be more than 128 due to error 𝑟𝑘 1 , 𝑟𝑘 2 … … . 𝑟𝑘 𝐿 , calculate 𝑡 𝑡 𝑡 accumulation in a group, so that 𝐷 𝑘 𝑙 maybe not 𝑟𝑘 𝑙 and 𝐶 𝑘 𝑙 . close to ∆𝐶 𝑘 𝑡 𝑙 . To avoid this case, we let (𝑡) 𝐿 decrease with a increasing t since the spatial 2) Calculate correlation in a subimage with lower resolution is weaker. For instance, 𝐿(1) = 24, 𝐿(2) = 8, (3) 𝐷 𝑘 𝑡 𝑙 = 𝑚𝑜𝑑 𝑐 𝑘 𝑡 𝑙 . ∆(𝑡) + ∆(𝑡) 2 𝐿 = 4 for T=3. − 𝐶 𝑘 𝑡 𝑙 .256 447 | P a g e
  5. 5. Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450Fig (a) fig (b) fig (c) fig (d) fig (e) Fig (2) decompressed and decoded imagesD. OVERALL DIAGRAM Encrypted Take Image Image Image Input Image Encryption Reconstruction Encoding Fig (2) block diagramII. PROPOSED SYSTEM ALGORITHM IV. ADVANTAGESA. SCALABLE CODING SCHEME  The subimage is decrypted to produce an In the proposed scheme, a series of approximate image; the quantized data ofpseudorandom numbers derived from a secret key Hadamard coefficients can provide moreare used to encrypt the original pixel values. After detailed information for imagedecomposing the encrypted data into a subimage reconstruction.and several data sets with a multiple-resolution  Bitstreams are generated with a multiple-construction, an encoder quantizes the subimage and resolution construction, the principal contentthe Hadamard coefficients of each data set to with higher resolution can be obtained wheneffectively reduce the data amount. Then, the more bitstreams are received.quantized subimage and coefficients are regarded asa set of bit streams. When having the encoded bit V. TABLESstreams and the secret key, a decoder can first obtain A. COMPRESSION RATIOan approximate image by decrypting the quantizedsubimage and then reconstructing the detailedcontent using the quantized coefficients with the aidof spatial correlation in natural images. Because ofthe hierarchical coding mechanism, the principaloriginal content with higher resolution can bereconstructed when more bit streams are received.III. FUTURE ENHANCEMENT In Oder to reduce the size of thecompressed image we can use block TruncationCoding (BTC) for compression; Block TruncationCode (BTC) is digital technique in image processingusing which images can be coded efficiently. BTChas played an important role in the sense that many coding techniqueshave been developed based on it. its main attractionbeing its simple underlying concepts and ease of B. COMPRESSION RATIO GRAPHimplementation. 448 | P a g e
  6. 6. Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450 Encrypted Images”. IEEE transactions on image processing, vol. 21, no. 6, June 2012 [2] Z. Erkin, A. Piva, S. Katzenbeisser, R. L. Lagendijk, J. Shokrollahi, G. Neven, and M. Barni, “Protection and retrieval of encrypted multimedia content: When cryptography meets signal processing,” EURASIP J. Inf. Security, vol. 2007, pp. 1–20, Jan. 2007. [3] T. Bianchi, A. Piva, and M. Barni, “On the implementation of the discrete Fourier transform in the encrypted domain,” IEEE Trans. Inf. Forensics Security, vol. 4, no. 1, pp. 86–97, Mar. 2009. [4] J. R. Troncoso-Pastoriza and F. Pérez-C. PERFORMANCE COMPERISION OF González, “Secure adaptive filtering,” SEVERAL COMPRESSION MERTHODS IEEE Trans. Inf. Forensics Security, vol. 6, no. 2, pp. 469–485, Jun. 2011. [5] T. Bianchi, A. Piva, and M. Barni, “Composite signal representation for fast and storage-efficient processing of encrypted signals,” IEEE Trans. Inf. Forensics Security, vol. 5, no. 1, pp. 180– 187, Mar. 2010. [6] S. Lian, Z. Liu, Z. Ren, and H. Wang, “Commutative encryption and watermarking in video compression,” IEEE Trans. Circuits Syst. Video Technol., vol. 17, no. 6, pp. 774–778, Jun. 2007. [7] M. Cancellaro, F. Battisti, M. Carli, G. Boato, F. G. B. Natale, and A. Neri, “A commutative digital image watermarking and encryption method in the tree structured Haar transform domain,” Signal Process.Image Commun., vol. 26, no. 1, pp. 1–12, Jan. 2011.VI. CONCLUSION [8] N. Memon and P. W. Wong, “A buyer- This paper has proposed a novel scheme of seller watermarking protocol,”IEEE Trans.scalable coding for encrypted images. The original Image Process., vol. 10, no. 4, pp. 643–image is encrypted by a modulo-256 addition with 649, Apr. 2001.pseudorandom numbers, and the encoded bitstreams [9] M. Kuribayashi and H. Tanaka,are made up of a quantized encrypted subimage and “Fingerprinting protocol for images basedthe quantized remainders of Hadamard coefficients. on additive homomorphic property,” IEEEAt the receiver side, while the subimage is Trans. Image Process., vol. 14, no. 12, pp.decrypted to produce an approximate image, the 2129–2139, Dec. 2005.quantized data of Hadamard coefficients can [10] M. Johnson, P. Ishwar, V. M. Prabhakaran,provide more detailed information for image D. Schonberg, and K. Ramchandran, “Onreconstruction. Since the bitstreams are generated compressing encrypted data,” IEEE Trans.with a multiple-resolution construction, the principal Signal Process., vol. 52, no. 10, pp. 2992–content with higher resolution can be obtained when 3006, Oct. 2004.more bitstreams are received. [11] D. Schonberg, S. C. Draper, and K. Ramchandran, “On blind compression ofREFERENCES encrypted correlated data approaching the[1]Xinpeng Zhang, Member, IEEE, Guorui Feng, source entropy rate,” in Proc. 43rd Annu. Allerton Conf., Allerton, IL, 2005.YanliRen, and ZhenxingQian.” Scalable Coding of [12] R. Lazzeretti and M. Barni, “Lossless compression of encrypted greylevel and 449 | P a g e
  7. 7. Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450 color images,” in Proc. 16th EUSIPCO, Lausanne, Switzerland, Aug. 2008 .[13] W. Liu, W. Zeng, L. Dong, and Q. Yao, “Efficient compression of encrypted grayscale images,” IEEE Trans. Signal Process., vol. 19, no. 4,pp. 1097–1102, Apr. 2010.[14] D. Schonberg, S. C. Draper, C. Yeo, and K. Ramchandran, “Toward compression of encrypted images and video sequences,” IEEE Trans. Inf. Forensics Security, vol. 3, no. 4, pp. 749–762, Dec. 2008.[15] A. Kumar and A. Makur, “Lossy compression of encrypted image by compressing sensing technique,” in Proc. IEEE TENCON, 2009, pp. 1–6.[16] X. Zhang, “Lossy compression and iterative reconstruction for encrypted image,” IEEE Trans. Inf. Forensics Security, vol. 6, no. 1, pp. 53–58, Mar. 2011.[17] A. Bilgin, P. J. Sementilli, F. Sheng, and M. W. Marcellin, “Scalable image coding using reversible integerwavelet transforms,” IEEE Trans.Image Process., vol. 9, no. 11, pp. 1972–1977, Nov. 2000.[18] D. Taubman, “High performance scalable image compression with EBCOT,” IEEE Trans. Image Process., vol. 9, no. 7, pp. 1158–1170, Jul. 2000. 450 | P a g e