Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN:2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450444 | P a g eHigh Resolution Image Encryption & Reconstruction UsingScalable CodesAkash RajDepartment Of Ece, M.E Embedded System, Sathyabama University, Chennai-119,Tamil Nadu, IndiaABSTRACTThis paper proposes a novel scheme ofscalable coding for encrypted gray images.Although there have been a lot of works onscalable coding of unencrypted images/videos thescalable coding of encrypted data has not beenreported. In the encryption phase of theproposed scheme, the pixel values are completelyconcealed so that an attacker cannot obtain anystatistical information of an original image.Then, the encrypted data are decomposed intoseveral parts, and each part is compressed as abit stream. At the receiver side with thecryptographic key, the principal content withhigher resolution can be reconstructed whenmore bit streams are received.Keywords-Bitstreams,Cryptography,Downsampling, Hadamardtransform, Imagecompression ,Imageencryption,QuantizationScalable coding.I. INTRODUCTIONIn recent years, encrypted signal processinghas attracted considerable research interests. Thediscrete Fourier transform and adaptive filtering canbe implemented in the encrypted domain based onthe holomorphic properties of a cryptosystem, and acomposite signal representation method can be usedto reduce the size of encrypted data and computationcomplexity. In joint encryption and data hiding, apart of significant data of a plain signal is encryptedfor content protection, and the remaining data areused to carry buyer–seller protocols, the fingerprintdata are embedded into an encrypted version ofdigital multimedia to ensure that the seller cannotknow the buyer’s watermarked version while thebuyer cannot obtain the original product. A numberof works on compressing encrypted images havebeen also presented. When a sender encrypts anoriginal image for privacy protection, a channelprovider without the knowledge of a cryptographickey and original content may tend to reduce the dataamount due to the limited channel resourceA. IMAGE ENCRYPTIONThe original image is in an uncompressedformat and that the pixel values are within [0, 255],and denote the numbers of rows and columns as N1and N2 and the pixel number as (N=N1 X N2).Therefore, the bit amount of the original image is8N. The content owner generates a pseudorandombit sequence with a length of 8N. Here, we assumethe content owner and the decoder has the samepseudorandom number generator (PRNG) and ashared secret key used as the seed of the PRNG.Then, the content owner divides the pseudorandombit sequence into N pieces, each of which containing8 bits, and converts each piece as an integer numberwithin [0, 255]. An encrypted image is produced bya one-by-one addition modulo 256 as follows: 2101,1,256,,,mod,NiNijiejipjigWhere jip , represents the gray values of pixelsat positions ji, , jie , represents thepseudorandom numbers within [0, 255] generatedby the PRNG, and jig ,0represents theencrypted pixel values. Clearly, the encrypted pixelvalues jig ,0are pseudorandom numbers since jie , values are pseudorandom numbers. It is wellknown that there is no probability polynomial time(PPT) algorithm to distinguish a pseudorandomnumber sequence and a random number sequenceuntil now. Therefore, any PPT adversary cannotdistinguish an encrypted pixel sequence and arandom number sequence. That is to say, the imageencryption algorithm that we have proposed issemantically secure against any PPT adversary.B. ENCRYPTED IMAGE ENCODINGAlthough an encoder does not know thesecret key and the original content, he can stillcompress the encrypted data as a set of bitstreams.The detailed encoding procedure is as follows. First,the encoder decomposes the encrypted image into aseries of subimages and data sets with a multiple-resolution construction. The subimage at the th1t level 1tG is generated bydownsampling the subimage at the tht level asfollows:
Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN:2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450445 | P a g e 1,,1,0,2,2, )(1Ttjigjig ttWhere)0(G just the encrypted image and T is is thenumber of decomposition levels. In addition, theencrypted pixels that belongs to)1t(G but do notbelong to form data set 1tQ as follows: .1,1,0,1)2,mod(12,mod,)(1TtjorijigQ ttThat means each)t(G is decomposed into)1t(G and)1t(Q , and the data amount of)1t(Q is threetimes of that of)1t(G . After the multiple-leveldecomposition, the encrypted image is reorganizedas )t(1TT)T(Qand,Q,Q,G For the subimage TG , the encoder quantizes eachvalue using a step Δ as follows: jigjibT,,)(Where the operator takes an integer towardminus infinity andM/256Here, M is an integer shared by the encoder and thedecoder, and its value will be discussed later.Clearly1M)j,i(b0 Then, the data of b (i,j) are converted into abitstream, which is denoted as BG. The bit amountof BG is.Mlog.4NN 2TBG For each data set T,2,1tQ )t( the encoderpermutes and divides encrypted pixels in it into K(t)groups, each of which containing L(t)pixels t)t()t(4/N3LxK . In this way, the L (t)pixelsin the same group scatter in the entire image. Thepermutation way is shared by the encoder and thedecoder, and the values of L (t)will be discussedlater. Denote the encrypted pixels of the Kth groupas tKk1Lq,,2q,1q )t()t(k)t(k)t(k ,and perform the Hadamard transform in each groupas follows: t)t(k)t(k)t(kt)t(k)t(k)t(kLq)2(q)1(qHLC)2(C)1(CWhere H is a L(t)x L(t)Hadamard matrix made up of+1 or -1. That implies the matrix H meetsH’*H = H*H’ = L(t)* IWhere H(t )is a transpose of H,I is an L (t)x L (t)identity matrix, and L (t)must be a multiple of 4.For each coefficient lC )t(k , calculate )()()()()(1,1/256256,modttttktkLlkKkMlClCWhere )t()t(L/MroundM and round (.) finds the nearest integer. Theremainder of )l(C )t(k modulo 256 is quantized asinteger )l(C )t(k , L (t), and the quantization steps areapproximately proportional to square roots of L (t).Then, )l(C )t(k at different levels are converted intobitstreams, which are denoted as BS (t). Since1M)l(C0 )t()t(k and the number of )l(C )t(k at the th level is 3N/4tthe bit amount of BS(t)isT,,2,1t,4MlogN3N t)t(2)t(The encoder transmits the bitstreams withan order of .BS,,BS,BS,BG )1()1T()T(. Ifthe channel bandwidth is limited, the latterbitstreams may be abandoned. A higher resolutionimage can be reconstructed when more bitstreamsare obtained at the receiver side. Here, the totalcompression ratio CR , which is a ratio between theamount of the encoded data and the encrypted imagedata, is TttttTttBGCMMNNNNR1)(221)(4log8348log818In the figure below, fig (a) is the original image, fig(b) is encrypted image of size 512x512.afterencryption I compressed the imge .i.e fig (c) is256x256 size image. Fig (d) is 128x128, fig (e) is64x64 size image.
Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN:2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450446 | P a g eFig (a) fig (b) fig (c) fig (d) fig (e)Fig (1) Encrypted and Compressed ImagesC. IMAGE RECONSTRUCTIONWith 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 aniteratively updating procedure. The imagereconstruction procedure is as follows.When having the bitstream BG, the decoder mayobtain the values of 𝑏(𝑖, 𝑗) and decrypts them as asubimage, i.e.,𝑝 𝑇𝑖, 𝑗 = 𝑚𝑜𝑑 𝑏 𝑖, 𝑗 . ∆ − 𝑒 2 𝑇. 𝑖. 2 𝑇. 𝑗 . 256+∆2,1 ≤ 𝑖 ≤𝑁12 𝑇, 1 ≤ 𝑗 ≤𝑁22 𝑇Where 𝑒 2 𝑇. 𝑖. 2 𝑇. 𝑗 are derived from the secretkey.If the bitstreams𝐵𝑆(𝑡)(𝜏 ≤ 𝑡 ≤ 𝑇) are alsoreceived, an image with a size of 𝑁1/2(𝜏−1)×𝑁2/2(𝜏−1)will be reconstructed. First, upsample thesubimage 𝑝 𝑇𝑖, 𝑗 by factor 2(𝑇−𝜏+1)to yield an𝑁1/2(𝜏−1)× 𝑁2/2(𝜏−1)image as follows:𝑟 2 𝑇−𝜏+1. 𝑖 . 2 𝑇−𝜏+1. 𝑗 = 𝑝 𝑇𝑖, 𝑗 ,1 ≤ 𝑖 ≤𝑁12 𝑇, 1 ≤ 𝑗 ≤𝑁22 𝑇and estimate the values of other pixels according tothe pixel values using a bilinear interpolationmethod.Denote the interpolated pixel values of the Kthgroup at the tth level as𝑟𝑘𝑡1 , 𝑟𝑘𝑡2 … … . 𝑟𝑘𝑡𝐿(𝑡)1 ≤ 𝑘 ≤ 𝐾 𝑡, 𝜏≤ 𝑡 ≤ 𝑇and their corresponding original pixel values as𝑝𝑘𝑡1 , 𝑝𝑘𝑡2 … … . 𝑝𝑘𝑡𝐿(𝑡). The errors ofinterpolated values are∆𝑝𝑘𝑡𝑙 = 𝑝𝑘𝑡𝑙 − 𝑟𝑘𝑡𝑙 ,1 ≤𝑙 ≤ 𝐿(𝑡), 1 ≤ 𝑘 ≤ 𝐾(𝑡), 𝜏 ≤ 𝑡 ≤ 𝑇 .Define the encrypted values of 𝑟𝑘𝑡𝑙 as𝑟𝑘𝑡𝑙 = 𝑚𝑜𝑑 𝑟𝑘𝑡𝑙 + 𝑒 𝑘𝑡𝑙 , 256 ,1 ≤ 𝑙 ≤ 𝐿(𝑡), 1 ≤ 𝑘 ≤ 𝐾(𝑡), 𝜏 ≤ 𝑡 ≤ 𝑇 .Where 𝑒 𝑘𝑡𝑙 are pseudorandom numbers derivedfrom the secret key and corresponding to 𝑟𝑘𝑡𝑙 .Then∆𝑝𝑘𝑡𝑙 ≡ 𝑞 𝑘𝑡𝑙 − 𝑟𝑘𝑡𝑙 𝑚𝑜𝑑 256.We also define
Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN:2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450447 | P a g e∆𝐶𝑘𝑡1∆𝐶𝑘𝑡2...∆𝐶𝑘𝑡𝐿(𝑡)= 𝑯 .∆𝑝𝑘𝑡1∆𝑝𝑘𝑡2...∆𝑝𝑘𝑡𝐿(𝑡)Where H is a 𝐿(𝑡)× 𝐿(𝑡)Hadamard matrix made upof +1 or -1. Since only the addition and subtractionare involved in the Hadamard transform∆𝐶𝑘𝑡1∆𝐶𝑘𝑡2...∆𝐶𝑘𝑡𝐿(𝑡)≡ 𝑯 .∆𝑝𝑘𝑡1∆𝑞 𝑘𝑡2...∆𝑞 𝑘𝑡𝐿(𝑡)− 𝑯.𝑟𝑘𝑡1𝑟𝑘𝑡2...𝑟𝑘𝑡𝐿(𝑡)𝑚𝑜𝑑 256That means the transform of errors in the plaindomain is equivalent to the transform of errors in theencrypted domain with the modular arithmetic.Denoting𝐶𝑘𝑡1𝐶𝑘𝑡2...𝐶𝑘𝑡𝐿(𝑡)= 𝑯.𝑟𝑘𝑡1𝑟𝑘𝑡2...𝑟𝑘𝑡𝐿(𝑡)We have∆𝐶𝑘𝑡𝑙 ≡ 𝐶𝑘𝑡𝑙 − 𝐶𝑘𝑡𝑙 𝑚𝑜𝑑 256With the bitstreams 𝐵𝑆(𝑡)(𝜏 ≤ 𝑡 ≤ 𝑇) , the valuesof 𝐶𝑘𝑡𝑙 can be retrived, which provide theinformation of 𝐶𝑘𝑡𝑙 . Therefore, the receiver mayuse an iterative procedure to progressively improvethe quality of the reconstructed image by updatingthe pixel values according to 𝐶𝑘𝑡𝑙 . The detailedprocedure is as follows.1) For each group𝑟𝑘𝑡1 , 𝑟𝑘𝑡2 … … . 𝑟𝑘𝑡𝐿(𝑡), calculate𝑟𝑘𝑡𝑙 and 𝐶𝑘𝑡𝑙 .2) Calculate𝐷𝑘𝑡𝑙 = 𝑚𝑜𝑑 𝑐 𝑘𝑡𝑙 . ∆(𝑡)+ ∆(𝑡)2− 𝐶𝑘𝑡𝑙 .256𝐷𝑘𝑡𝑙 =𝐷𝑘 𝑙 , 𝑖𝑓𝑑 𝑘 𝑙 < 128𝐷𝑘 𝑙 − 256 , 𝑖𝑓𝑑 𝑘 𝑙 ≥ 128𝐷𝑘𝑡𝑙 are the differences between the valuesconsistent with the corresponding 𝑐 𝑘𝑡𝑙 and𝐶𝑘𝑡𝑙 . Then, considering 𝐷𝑘𝑡𝑙 as an estimate of∆𝐶𝑘𝑡𝑙 , modify the pixel values of each group asfollows:𝑟𝑘𝑡1𝑟𝑘𝑡2...𝑟𝑘𝑡𝐿=𝑟𝑘𝑡1𝑟𝑘𝑡2...𝑟𝑘𝑡𝐿+𝑯′𝐿(𝑡).𝐷𝑘𝑡1𝐷𝑘𝑡2...𝐷𝑘𝑡𝐿(𝑡)And enforce the modified pixel values into [0,255]as follows:𝑟𝑘𝑡𝑙 =0, 𝑖𝑓𝑟𝑘𝑡1 < 0𝑟𝑘𝑡1 , 𝑖𝑓 0 ≤ 𝑟𝑘𝑡1 ≤ 255255 , 𝑖𝑓𝑟𝑘𝑡1 > 2553) Calculate the average energy of differencedue to the modification as follows:𝐷 =𝑟𝑘𝑡𝑙 − 𝑟𝑘𝑡𝑙2𝐿(𝑡)𝑙=1𝐾(𝑡)𝑘=1𝑇𝑡=𝜏3𝑁 4𝑡𝑇𝑡=𝜏If D is not less than a given threshold of0.10, for each pixel 𝑟𝑘𝑡𝑙 , after putting it back tothe position in the image and regarding the averagevalue of its four neighbor pixels as its new value𝑟𝑘𝑡𝑙 , go to step 1. Otherwise, terminate theiteration, and output the image as a finalreconstructed result.In the iterative procedure, while thedecrypted pixels 𝑝 𝑇𝑖, 𝑗 are used to give an initialestimation of other pixels, the values of 𝑐 𝑘𝑡𝑙 inbitstreams 𝐵𝑆(𝑡)provide more detailed informationto produce the final reconstructed result withsatisfactory quality. In step 2, by estimating ∆𝐶𝑘𝑡𝑙according to 𝑐 𝑘𝑡𝑙 , the pixel values are modifiedto lower the reconstruction errors. If the image isuneven and 𝐿(𝑡)is big, the absolute value of actual∆𝐶𝑘𝑡𝑙 may be more than 128 due to erroraccumulation in a group, so that 𝐷𝑘𝑡𝑙 maybe notclose to ∆𝐶𝑘𝑡𝑙 . To avoid this case, we let𝐿(𝑡)decrease with a increasing t since the spatialcorrelation in a subimage with lower resolution isweaker. For instance, 𝐿(1)= 24, 𝐿(2)= 8,𝐿(3)= 4 for T=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-450448 | P a g eFig (a) fig (b) fig (c) fig (d) fig (e)Fig (2) decompressed and decoded imagesD. OVERALL DIAGRAMFig (2) block diagramII. PROPOSED SYSTEM ALGORITHMA. SCALABLE CODING SCHEMEIn the proposed scheme, a series ofpseudorandom numbers derived from a secret keyare used to encrypt the original pixel values. Afterdecomposing the encrypted data into a subimageand several data sets with a multiple-resolutionconstruction, an encoder quantizes the subimage andthe Hadamard coefficients of each data set toeffectively reduce the data amount. Then, thequantized subimage and coefficients are regarded asa set of bit streams. When having the encoded bitstreams and the secret key, a decoder can first obtainan 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 ENHANCEMENTIn 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 rolein the sense that many coding techniqueshave been developed based on it. its main attractionbeing its simple underlying concepts and ease ofimplementation.IV. ADVANTAGES The subimage is decrypted to produce anapproximate image; the quantized data ofHadamard coefficients can provide moredetailed information for imagereconstruction. Bitstreams are generated with a multiple-resolution construction, the principal contentwith higher resolution can be obtained whenmore bitstreams are received.V. TABLESA. COMPRESSION RATIOB. COMPRESSION RATIO GRAPHImageEncryptionImageReconstructionEncryptedImageEncodingTakeInput Image
Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN:2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450449 | P a g eC. PERFORMANCE COMPERISION OFSEVERAL COMPRESSION MERTHODSVI. CONCLUSIONThis paper has proposed a novel scheme ofscalable coding for encrypted images. The originalimage is encrypted by a modulo-256 addition withpseudorandom numbers, and the encoded bitstreamsare made up of a quantized encrypted subimage andthe quantized remainders of Hadamard coefficients.At the receiver side, while the subimage isdecrypted to produce an approximate image, thequantized data of Hadamard coefficients canprovide more detailed information for imagereconstruction. Since the bitstreams are generatedwith a multiple-resolution construction, the principalcontent with higher resolution can be obtained whenmore bitstreams are received.REFERENCESXinpeng Zhang, Member, IEEE, Guorui Feng,YanliRen, and ZhenxingQian.” Scalable Coding ofEncrypted Images”. IEEE transactions on imageprocessing, vol. 21, no. 6, June 2012 Z. Erkin, A. Piva, S. Katzenbeisser, R. L.Lagendijk, J. Shokrollahi, G. Neven, andM. Barni, “Protection and retrieval ofencrypted multimedia content: Whencryptography meets signal processing,”EURASIP J. Inf. Security, vol. 2007, pp.1–20, Jan. 2007. T. Bianchi, A. Piva, and M. Barni, “On theimplementation of the discrete Fouriertransform in the encrypted domain,” IEEETrans. Inf. Forensics Security, vol. 4, no. 1,pp. 86–97, Mar. 2009. J. R. Troncoso-Pastoriza and F. Pérez-González, “Secure adaptive filtering,”IEEE Trans. Inf. Forensics Security, vol. 6,no. 2, pp. 469–485, Jun. 2011. T. Bianchi, A. Piva, and M. Barni,“Composite signal representation for fastand storage-efficient processing ofencrypted signals,” IEEE Trans. Inf.Forensics Security, vol. 5, no. 1, pp. 180–187, Mar. 2010. S. Lian, Z. Liu, Z. Ren, and H. Wang,“Commutative encryption andwatermarking in video compression,” IEEETrans. Circuits Syst. Video Technol., vol.17, no. 6, pp. 774–778, Jun. 2007. M. Cancellaro, F. Battisti, M. Carli, G.Boato, F. G. B. Natale, and A. Neri, “Acommutative digital image watermarkingand encryption method in the treestructured Haar transform domain,” SignalProcess.Image Commun., vol. 26, no. 1,pp. 1–12, Jan. 2011. N. Memon and P. W. Wong, “A buyer-seller watermarking protocol,”IEEE Trans.Image Process., vol. 10, no. 4, pp. 643–649, Apr. 2001. M. Kuribayashi and H. Tanaka,“Fingerprinting protocol for images basedon additive homomorphic property,” IEEETrans. Image Process., vol. 14, no. 12, pp.2129–2139, Dec. 2005. M. Johnson, P. Ishwar, V. M. Prabhakaran,D. Schonberg, and K. Ramchandran, “Oncompressing encrypted data,” IEEE Trans.Signal Process., vol. 52, no. 10, pp. 2992–3006, Oct. 2004. D. Schonberg, S. C. Draper, and K.Ramchandran, “On blind compression ofencrypted correlated data approaching thesource entropy rate,” in Proc. 43rd Annu.Allerton Conf., Allerton, IL, 2005. R. Lazzeretti and M. Barni, “Losslesscompression of encrypted greylevel and
Akash Raj / International Journal of Engineering Research and Applications (IJERA) ISSN:2248-9622 www.ijera.comVol. 3, Issue 2, March -April 2013, pp.444-450450 | P a g ecolor images,” in Proc. 16th EUSIPCO,Lausanne, Switzerland, Aug. 2008 . W. Liu, W. Zeng, L. Dong, and Q. Yao,“Efficient compression of encryptedgrayscale images,” IEEE Trans. SignalProcess., vol. 19, no. 4,pp. 1097–1102,Apr. 2010. D. Schonberg, S. C. Draper, C. Yeo, and K.Ramchandran, “Toward compression ofencrypted images and video sequences,”IEEE Trans. Inf. Forensics Security, vol. 3,no. 4, pp. 749–762, Dec. 2008. A. Kumar and A. Makur, “Lossycompression of encrypted image bycompressing sensing technique,” in Proc.IEEE TENCON, 2009, pp. 1–6. X. Zhang, “Lossy compression anditerative reconstruction for encryptedimage,” IEEE Trans. Inf. ForensicsSecurity, vol. 6, no. 1, pp. 53–58, Mar.2011. A. Bilgin, P. J. Sementilli, F. Sheng, andM. W. Marcellin, “Scalable image codingusing reversible integerwavelettransforms,” IEEE Trans.Image Process.,vol. 9, no. 11, pp. 1972–1977, Nov. 2000. D. Taubman, “High performance scalableimage compression with EBCOT,” IEEETrans. Image Process., vol. 9, no. 7, pp.1158–1170, Jul. 2000.