[ieee 2012 international conference on communications, devices and intelligent systems (codis) -...

Post on 06-Mar-2017

215 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Distortion free Secret Image Sharing Based onX-OR Operation

Amitava NagDept. of Information Technology

Academy of TechnologyEmail: amitava.nag@ieee.org

Jyoti Prakash SinghDept. of Information Technology,

National Institute of Technology PatnaEmail: jps@nitp.ac.in

D. Sarkar, P. P. Sarkar, Sushanta BiswasDept. of Engg. and Technological Studies

University of KalyaniWest Bengal, India

Abstract—We propose a secret sharing algorithm which allowsa secret image to be divided into (𝑛 : 𝑛 > 2) image shares. Theshare generation algorithm works by dividing one 8-bit pixel oforiginal secret image into two parts of 4-bits each. We find apair of 4-bits whose XOR gives a specific 4-bits of secret image.Each pair is then concatenated together to form a 8-bit numberwhich is then taken as a pixel value of a share. Dependingupon whether the original 4 bits were of even positions or oddpositions, the share is categorized as even group of share or oddgroup of share. Two shares one from each group is needed toreconstruct the original secret in a lossless way. Our method ofshare generation is an very easy and lossless way to generateshares and reconstruct the secret image when needed. Moreover,Individual share does not possess any similarity with originalimages and looks meaningless which is confirmed by StructuredSimilarity Index Metric (SSIM).

I. INTRODUCTION

Secret images are used in many commercial and militaryapplications. The prime concerns in these applications are thestorage and transmission security of certain secret images. Toincrease the security of secret images, many techniques likeimage hiding [6], watermarking [4], steganography [3] etc.are proposed in recent years. A common weakness of thesesecurity techniques is a single unit of secret. Al-tough a singleunit of secret helps in storage and transmission but there isa fear that if that single unit is corrupted or lost, we maylose the information altogether. Another problem is that theintruder has just one target to break and if he is successful incapturing the information, the secret may not remain secret.Secret sharing method on the other hand divides a secretinto some components called shadow images or shares whereeach shadow image/share looks meaningless. The concept ofsecret sharing was proposed by Blakley [2] and Shamir [7]independently in 1979. Secret sharing refers to the methodof distributing a secret media like image amongst a group ofparticipants. Each participant is allocated a share of the secretthat looks meaningless. The secret can be reconstructed onlywhen a sufficient number of shares are combined together.The sharing is performed in such a way that only certainspecified subsets of players are able to reconstruct the secret,while smaller subsets have no information about this secretat all. More formally, in a secret sharing scheme there areone-dealer and n players. The dealer accomplishes this bygiving each player a share in such a way that any group of

𝑡 (for threshold) or more players can together reconstruct thesecret but no group of fewer than 𝑡 players can reconstructthe secret. Such a system is called a (𝑡, 𝑛)-threshold scheme.Shamir [7] developed the idea of a (𝑘, 𝑛) threshold basedsecret sharing technique. The technique allows a polynomialfunction of order (𝑘 − 1) constructed as,

𝑓(𝑥) = 𝑑0 + 𝑑1𝑥+ 𝑑2𝑥2 + ⋅ ⋅ ⋅+ 𝑑𝑘−1𝑥

𝑘−1(𝑚𝑜𝑑𝑝) (1)

where the value 𝑑0 is the secret and p is a prime number. Thesecret shares are the pairs of values (𝑥𝑖, 𝑦𝑖) where 𝑦𝑖 = 𝑓(𝑥𝑖),1 ≤ 𝑖 ≤ 𝑛 and 0 < 𝑥1 < 𝑥2... < 𝑥𝑛 ≤ 𝑝− 1. The polynomialfunction 𝑓(𝑥) is destroyed after each shareholder possesses apair of values (𝑥𝑖, 𝑦𝑖) so that no single shareholder knows thesecret value 𝑑0. In fact, no groups of k - 1 or fewer secretshares can discover the secret 𝑑0. On the other hand, when kor more secret shares are available, then one can set at leastk linear equations 𝑦𝑖 = 𝑓(𝑥𝑖), 1 ≤ 𝑖 ≤ 𝑛 for the unknown𝑑𝑖𝑠. The unique solution to these equations shows that thesecret value 𝑑0 can be easily obtained by using Lagrangeinterpolation. Thien and Lin [10] proposed a (𝑘, 𝑛) threshold-based image secret sharing scheme by cleverly using Shamirssecret sharing scheme [7] to generate image shares. They useda polynomial function of order (𝑘 − 1) to construct n imageshares from an 𝑙 × 𝑙 pixels secret image (denoted as I) as,𝑆𝑥(𝑖, 𝑗) = 𝐼(𝑖𝑘+1, 𝑗) + 𝐼(𝑖𝑘+2, 𝑗)𝑥... + 𝐼(𝑖𝑘+𝑘, 𝑗)𝑥

𝑘−1(𝑚𝑜𝑑𝑝) where 0 ≤ 𝑖 ≤ ⌊ 1

𝑘 ⌋ and 1 ≤ 𝑗 ≤ 𝑙. This method reducesthe size of image shares to become 1/k of the size of thesecret image. Any 𝑘 image shares are able to reconstructevery pixel value in the secret image. Thien and Lin alsoprovided some research insights for lossless image recoveryusing their technique. They further introduced the possibilityof a steganography approach [10], [13] by hiding image sharesinto host images. Bai [1] extended the idea of a secret sharingscheme using matrix projection. The idea is based upon theinvariance property of matrix projection. This scheme can alsobe used to share multiple secrets. Wang and Su [12] proposeda secret image sharing method using Huffman coding. Shi et.al. [8], proposed a new scheme for image encryption basedon Shamir’s secret sharing, where the size of each share is2𝑙𝑜𝑔𝑡𝑚𝑚2 of that of the shared 𝑚×𝑚 image. Their reconstructed

matrix is the same as the secret matrix and the shares are1/m of the size of the secret matrix. Its main advantages aremultiple secrets sharing, strong protection of the secrets and

286978-1-4673-4700-6/12/$31.00 c©2012 IEEE

smaller size for the secret shares. Wang et al. [11] proposedtwo (𝑛, 𝑛) scheme for gray scale image secret sharing usingXOR and AND operation. The scheme has no pixel expansionand gives an exact reconstruction of the original secret. In [5],the authors proposed a novel secret sharing scheme wheresimple graphical masking (ANDing) technique is used forshare generation. The reconstruction of share is done findingfinding the qualified set of shares and then ORing them. J. P.Singh et al. [9] proposed an image secret sharing method basedon some random matrices that acts as a key for secret sharing.The technique allows a secret image to be divided into fourimage shares with each share individually looks meaningless.The share generation algorithm works by converting threepixels of the secret image to one pixel each of four differentshares based on four random matrices. So, each share isreduced by 1/3𝑟𝑑 of the original secret image.In this paper, we propose a secret image sharing method basedon XOR operation for share generation and reconstruction. The(𝑛 : 𝑛 > 2 and even) generated shares are kept in two groupscalled even and odd groups respectively. To reconstruct thesecret only two shares (one from even and other from oddgroup) are needed to get back the original image. Our methodis applicable in those situation where there are two groups andto come to a decision at least one members from each groupmust agree.The rest of this paper is organized as follows. Section 2introduces our secret sharing method. A brief discussion onthe correctness of our algorithm in section 3. The experimentalresult is shown in Section 4. Finally, we conclude the paperby pointing towards future direction in Section 5.

II. PROPOSED METHOD

In this section, we propose our sharing algorithm basedon XOR operation. Our secret sharing scheme generates8 secrets in two groups of 4 secret each. One secret fromeach group is sufficient to reconstruct the secret which isidentical to the original image. Our method employs onlyXOR operation and certain bit manipulation. Say, the first8-bits pixel is represented by (𝑏7, 𝑏6, 𝑏5, 𝑏4, 𝑏3, 𝑏2, 𝑏1, 𝑏0).We segregate the bits into two parts containing - (i)bits of odd positions (𝑏7, 𝑏5, 𝑏3, 𝑏1) and (ii) bits of evenpositions (𝑏6, 𝑏4, 𝑏2, 𝑏0). Next we find out such pairs of4-bits (𝑥3, 𝑥2, 𝑥1, 𝑥0) and (𝑥′3, 𝑥

2, 𝑥′

1, 𝑥′

0) which can produce𝑏7, 𝑏5, 𝑏3, 𝑏1. Every pair of those 4-bits are concatenatedtogether to produce (𝑥3, 𝑥2, 𝑥1, 𝑥0, 𝑥

3, 𝑥′2, 𝑥′

1, 𝑥′

0) whichform shares of odd group. In a similar way, we find outsuch pairs of 4-bits (𝑦3, 𝑦2, 𝑦1, 𝑦0) and (𝑦′3, 𝑦

2, 𝑦′

1, 𝑦′

0) whichcan produce 𝑏6, 𝑏4, 𝑏2, 𝑏0. Every pair of those 4-bits areconcatenated together to produce (𝑦3, 𝑦2, 𝑦1, 𝑦0, 𝑦

3, 𝑦′

2, 𝑦′

1, 𝑦′

0)which form shares of even group. Let one 8-bits pixel valueis 95 and it binary with 8-bit representation is 01011111.The odd position bits and even position bits of size 4-bitsas follow: 𝐵𝑜 = 0011 and 𝐵𝑒 = 1111. For (𝐵𝑜 = 0011),the pairs of 4-bits which can generate 𝐵𝑜 are 0101&0110,0111&0100, 1100&1111 and 1001&1010 As we can see0101⊕ 0110 = 0011 so 𝑜𝑠ℎ𝑎𝑟𝑒1 = (01010110)2 = (86)10

0111⊕ 0100 = 0011 so 𝑜𝑠ℎ𝑎𝑟𝑒2 = (01110100)2 = (116)101100⊕ 1111 = 0011 so 𝑜𝑠ℎ𝑎𝑟𝑒3 = (11001111)2 = (207)101001⊕ 1010 = 0011 so 𝑠ℎ𝑎𝑟𝑒4 = (10011010)2 = (154)10Thus for pixel value of 95, the odd share contains values of86, 116, 207 and 154. Similarly for even shares from 𝐵𝑒:0110⊕ 1001 = 1111 so 𝑒𝑠ℎ𝑎𝑟𝑒1 = (01101001)2 = (105)100001⊕ 1110 = 1111 so 𝑒𝑠ℎ𝑎𝑟𝑒2 = (01101001)2 = (30)101010⊕ 0101 = 1111 so 𝑒𝑠ℎ𝑎𝑟𝑒3 = (01101001)2 = (165)101011⊕ 0100 = 1111 so 𝑒𝑠ℎ𝑎𝑟𝑒4 = (01101001)2 = (180)10Thus for the pixel value of 95, four even shares with values105, 30, 165 and 180 can be generated. If someone doesnot need all 4 shares from each group to be distributed,then any subset of shares from each group can be selectedfor distribution. The complete share generation algorithm isgiven below.

Algorithm 1:Share generation ProcedureInput: A gray-level secret image 𝐻 of size 𝑀 ×𝑁Output: Eight secret shares 𝑆𝑖 for 1 ≤ 𝑖 ≤ 8 each of size𝑀 ×𝑁Steps

1) put the 8-bits (𝑏7, 𝑏6, 𝑏5, 𝑏4, 𝑏3, 𝑏2, 𝑏1, 𝑏0) of a pixelof secret image 𝐻 in two groups 𝑃𝑒 containing bits(𝑏7, 𝑏5, 𝑏3, 𝑏1) and 𝑃𝑜 containing bits (𝑏6, 𝑏4, 𝑏2, 𝑏0).

2) Find all pairs of 4-bits whose XOR produces bits of 𝑃𝑜

i.e. (𝑏7, 𝑏5, 𝑏3, 𝑏1).3) concatenate each 4-bit pair to give 8-bit number and

place it in a matrix to from a share of odd group.4) Find all pairs of 4-bits whose XOR produces bits of 𝑃𝑒

i.e. (𝑏6, 𝑏4, 𝑏2, 𝑏0).5) concatenate each 4-bit pair to give 8-bit number and

place it in a matrix to from a share of even group.6) Repeat step 1 to 5 for every pixel in the original Image.7) Change the first pixel value of odd shares to odd number

and even shares to even number so that odd shares andeven shares can be distinguished.

8) END.

The share reconstruction works in just the reverse way ofshare generation. To reconstruct the original secret image 𝐻at least one share from odd group and one share from evengroup is needed. Every pixel (𝑥7, 𝑥6, 𝑥5, 𝑥4, 𝑥3, 𝑥2, 𝑥1, 𝑥0) ofthe share is divided into two 4-bits block as (𝑥7, 𝑥6, 𝑥5, 𝑥4)and 𝑥3, 𝑥2, 𝑥1, 𝑥0). The XOR of (𝑥7, 𝑥6, 𝑥5, 𝑥4) and (𝑥3,𝑥2, 𝑥1, 𝑥0) will give (𝑏7, 𝑏5, 𝑏3, 𝑏1) if the pixel is from oddshare otherwise the XOR operation will yield (𝑏6, 𝑏4, 𝑏2, 𝑏0).Once the bit values (𝑏7, 𝑏5, 𝑏3, 𝑏1) and (𝑏6, 𝑏4, 𝑏2, 𝑏0) areobtained from odd and even shares respectively, they areplaced in proper position to get back the original secretimage. The detail algorithm is given below.

Algorithm 2: Secret Revelation procedureInput: At least one share from odd group and one share fromeven group.Output: A recovered secret image 𝐻 ′ of size 𝑀 ×𝑁Steps

2012 International Conference on Communications, Devices and Intelligent Systems (CODIS) 287

1) Identify the odd share and even share from first pixel ofthe share images.

2) take one pixel from even share and one from odd share.3) Divide a pixel of in two halves and XOR them. 𝑧3𝑧2𝑧1𝑧0

= (𝑏′3𝑏′

2𝑏′

1𝑏′

0) ⊕( 𝑏′7𝑏′

6𝑏′

5𝑏′

4).4) If pixel is from even share then 𝑧3𝑧2𝑧1𝑧0 will be mapped

to (𝑏6, 𝑏4, 𝑏2, 𝑏0) and if the pixel is from odd share then𝑧3𝑧2𝑧1𝑧0 will be mapped to (𝑏7, 𝑏5, 𝑏3, 𝑏1).

5) Repeat step 2 to 4 for all pixel values in correspondingodd and even share.

6) END.

III. DISCUSSION

Our algorithm works correctly provided one share from evengroup and one share from odd group is selected for sharereconstruction, irrespective of which share is selected eachgroup. Each pixel value of a share contributes to only 4 bitsof a pixel of the original image. If the share is from even group,a pixel of that share contribute to only 4 even position of a8-bits pixel of the original secret image. Similarly, if the shareis from odd group, if only affects 4 odd positions of a 8-bitpixel of the original secret image. If the shares are taken fromone group only, it does not recovers the secret in lossless way.Since we are using only XOR operation, the time complexityof algorithm is 𝑂(𝑛) as needed to process each pixel of theimage.

IV. RESULTS

The experiments are conducted on a PC with an Intel(R)Core 2 Duo CPU 1.83 GHz having 2-GB of RAM. Theoperating system is Windows XP Professional. The proposedalgorithms are programmed in Matlab version 7.0. We have settwo main objective for our experiments (i) the reconstructedimage should be very similar or identical to original imageand (ii) the individual shares should not reveal any informationor should be totally dissimilar to original image. The recon-structed image quality presented in our scheme is evaluated byPeak Signal to Noise Ratio (PSNR). The performance metricPSNR is defined as follows:

𝑃𝑆𝑁𝑅 = 10× 𝑙𝑜𝑔2552

𝑀𝑆𝐸(2)

where

𝑀𝑆𝐸 =1

𝑀 ×𝑁

𝑀∑

𝑖=1

𝑁∑

𝑗=1

(ℎ𝑖,𝑗 − ℎ′𝑖,𝑗)2, (3)

where ℎ𝑖,𝑗 is the pixel value of the original image and the ℎ′𝑖,𝑗is the pixel value of the recovered image. MSE is the MeanSquared Error.The other objective is evaluated by Structured Similarity IndexMetric (SSIM) which is defined as

𝑆𝑆𝐼𝑀(𝑥, 𝑦) =(2𝜇𝑥𝜇𝑦 + 𝑐1)(2𝜎𝑥𝑦 + 𝑐2)

(𝜇2𝑥 + 𝜇2

𝑦 + 𝑐1)(𝜎2𝑥 + 𝜎2

𝑦 + 𝑐2)(4)

Where x and y denote the original and recovered image,respectively.

Fig. 1. The Original Lenaimage

Fig. 2. The recovered Lenaimage

Fig. 3. The first even share ofLena image

Fig. 4. The second even shareof Lena image

𝜇𝑥 the average of 𝑥𝑖𝑗 ; 𝜇𝑦 the average of 𝑦𝑖𝑗 ; 𝜎2𝑥 the variance

of X; 𝜎2𝑦 the variance of Y; 𝜎𝑥𝑦 the covariance of X and Y;

𝑐1 = (𝑘1𝐿)2, 𝑐2 = (𝑘2𝐿)

2 two variables to stabilize thedivision with weak denominator;L the dynamic range of the pixel-values (typically this is2#𝑏𝑖𝑡𝑠/𝑝𝑖𝑥𝑒𝑙 − 1);𝐾1 = 0.01 and 𝑘2 = 0.03 by defaultThe resultant SSIM index is a decimal value between 0 and1. An SSIM value close to 0 indicates that the comparedimages are totally dissimilar, whereas SSIM value equal to1 represents that the compared images are identical. Ourobjective here to get SSIM value close to 0 between originalimage and each share. A gray-level secret image of Lena ofsize 512 × 512 pixels is chosen as the secret image which isshown in Fig. 1. The secret image of Fig. 1 is divided into8 shares of two groups. The first group called even groupcontains four shares which are shown in Fig. 3, 4, 5 and 6.The second group called odd group also contains 4 shareswhich are shown in Fig. 7, 8, 9 and 10. The reconstructedimage by taking the first share from even group and firstshare from odd group is shown in Fig. 2. The PSNR valueof reconstructed image of Fig. 2 and original secret image ofFig. 1 is infinity which proves our claim that the reconstructedimage is identical to original image and this process is lossless.Each individual share looks like noise and do not contain anyinformation about the secret image. This fact is proved byfinding the SSIM values of each share against the originalimage. The SSIM values for each share with the originalimages is shown in Table I. As can be seen from Table Ithat the values are close to 0 which indicates that individualshares are totally dissimilar to the original image.

288 2012 International Conference on Communications, Devices and Intelligent Systems (CODIS)

Fig. 5. The third even shareof Lena image

Fig. 6. The fourth even shareof Lena image

Fig. 7. The first odd share ofLena image

Fig. 8. The second odd shareof Lena image

V. CONCLUSION

We proposed a secret sharing method which generates(𝑛 : 𝑛 > 2) secrets in two groups. One share from eachgroup is sufficient to reconstruct the secret which is identicalto the original secret image. Our method employs only XORoperation and hence employs low computational complexityof 𝑂(𝑛). Al-tough our scheme is limited to (2, 𝑛) schemeright now but still it is very useful in those scenario wherethere are two groups of people and at least one people fromeach group should agree to carry out a particular task. In ournext endeavour, we are trying to extend this scheme to (𝑘, 𝑛)scheme without any grouping so that its use can be generalised.

Fig. 9. The third odd share ofLena image

Fig. 10. The fourth odd shareof Lena image

TABLE ITHE SSIM VALUES FOR DIFFERENT SHARES WITH SECRET IMAGE

Share No. SSIM ValuesEven 1 0.0113Even 2 0.0097Even 3 0.0109Even 4 0.0094Odd 1 0.0066Odd 2 0.0099Odd 3 0.0102Odd 4 0.0109

REFERENCES

[1] L. Bai. A strong ramp secret sharing scheme using matrix projection.In Intl. Symp. on World of Wireless, Mobile and Multimedia Networks(WoWMoM), pages 556–560, NY, 2006.

[2] G. R. Blakley. Safeguarding cryptographic keys. In AFIPS NCC,volume 48, pages 313–317, 1979.

[3] Abbas Cheddad, Joan Condell, Kevin Curran, and Paul McKevitt. Digitalimage steganography: Survey and analysis of current methods. SignalProcessing, 90:727–752, 2010.

[4] C.I.Podilchuk and E.J.Delp. Digital watermarking: algorithms andapplications. IEEE Signal Processing Magazine, pages 33–46, 2001.

[5] Prabir Kr. Naskar, Ayan Chaudhuri, Debarati Basu, and Atal Chaudhari.A novel image secret sharing scheme. In Emerging Applications ofInformation Technology (EAIT), pages 177–180, 2011.

[6] F.A.P. Petitcolas, R.J. Anderson, and M.G. Kuhn. Information hiding:A survey. Proceedings of IEEE, 87(7):1062–1078, July 1999.

[7] A Samir. How to share a secret. Communications of ACM, 22(11):612–613, 1979.

[8] Runhua Shi, Hong Zhong, Liusheng Huang, and Yonglong Luo. A (𝑡, 𝑛)secret sharing scheme for image encryption. In Congress On Image AndSignal Processing (CISP), pages 3–6, 2008.

[9] J. P. Singh, Amitava Nag, and Tapasi Bhattacharjee. Random matricesbased image secret sharing. International Journal of Advanced Researchin Computer Science, 2(4):104–108, Aug 2011.

[10] C. C. Thien and J. C. Lin. Secret image sharing. Computers andGraphics, 26(5):665–670, 2002.

[11] D. Wang, L. Zhang, N. Ma, and X.B. Li. Two secret sharing schemesbased on boolean operations. Pattern Recognition, 40(10):2776–2785,October 2007.

[12] R. Z. Wang and C. H. Su. Secret image sharing with smaller shadowimages. Pattern Recognition, 27:551–555, 2006.

[13] Y.S. Wu, C.C. Thien, and J.C. Lin. Sharing and hiding secret imageswith size constraint. Pattern Recognition, 37(7):1377–1385, July 2004.

2012 International Conference on Communications, Devices and Intelligent Systems (CODIS) 289

top related