Chapter 3 Visual Cryptography in Two-level style: the VC with Extra Ability of
3.5 When a decoding-computer is not available
In the above approach, the decoding of the Lena image by VC does not need a computer, but the decoding of the confidential text d does. Therefore, the method can be used in an environment in which the decoding-computer is not always available.
For example, consider a system in which a single decoding-computer serves, say, 100
teams, in turn. Then, each team can decode its own moderately-confidential image immediately (and begin the within-team discussion about the visually-decoded image immediately); although each team leader must wait (until it is his turn) for the computer server to help him to decode the confidential text.
Below, we discuss how to modify the design so that the two new transparencies (generated by the modified design) can decode both Lena and the confidential text without using a decoding-computer.
Apparently, if the confidential text can also be visually decoded, then there is no need to use a decoding-computer. In this kind of approach, we have two images to deal with: the Lena image, and its background description image. What we can do is to create two transparencies T1 and T2 having the following two properties: 1) stacking T1 with T2 yields Lena; 2) after the stacking mentioned in 1, if we fix T1, and then shift T2 by u units horizontally and v units vertically, then the stacking result becomes the confidential text image. Notably, the values of the u and v are kept by the higher-ranking officer. If the higher-ranking officer thinks that it is not easy to shift a transparency by u units horizontally and v units vertically in the decoding phase, then he may use an auxiliary ″non-noisy″ transparency T3 prepared earlier, in which only the boundaries of the transparency T1 and T2 are sketched.
description example and an experiment. In the algorithm, the image C is either a confidential text image describing Lena, or a logo image for authentication purpose.
The coordinate (i,j) indicates a pixel at location (i,j) of the image Lena (or the image C), or equivalently, the 2-by-2 block at location (i,j) of the transparency T1 (or the transparency T2).
The Modified Encoding Algorithm (No decoding-computer is needed later)
Input: Two natural numbers u and v (u is the Horizontal-shift-amount, and v is the Vertical-shift-amount), an image Lena of size 256-by-256, and a confidential text image C.
Output: two noise-like transparencies T1 and T2 (both are of size 512-by-512) useful in visually decoding of both Lena and C.
Steps:
Step 1: For each coordinate (i,j) in the ″easier-to-construct″ areas, namely, {(i,j):0≤i<u, 0≤j≤255} and {(i,j): u≤i≤255, 0≤j<v}, do the following:
1a. Randomly assign one of the six fundamental block types to T1(i,j);
1b. If Lena(i,j) is a white pixel, then copy the block type of T1(i,j) to T2(i,j);
else copy the complement of the block type of T1(i,j) toT2(i,j).
Step 2: (for the remaining area whose construction is a little more complicated):
2a: Initially, let the value of the counter k be 0 .
2b: For each (i,j) satisfying u x k≤i<u x (k+1) and 0≤j<255-v, do the following:
2b-1: If C(i,j) is a white pixel, then copy the block type of T2(i,j) to T1(i+u,j+v);
else copy the complement of the block type of T2(i,j) to T1(i+u,j+v).
2b-2: If Lena(i+u,j+v) is a white pixel, then copy the block type of T1(i+u,j+v) to T2(i+u,j+v); else copy the complement of the block type of T1 (i+u,j+v) to T2(i+u,j+v).
2c:
2c-1: Add 1 to the value of k.
2c-2. If k<(256/u)-1, then go to 2b; else stop the algorithm.
——End of the Algorithm—
To help the readers understand Step 2, we give below an example. In the example, assume that T1⊕T2 means stacking T1 with T2, i.e. ″⊕″ is the stacking operator.
Example.
To make the explanation easier, we assume that the horizontal-shift-amount is u=3, and the vertical-shift-amount is v = 0.Without the loss of generality, assume that the pixel values of the input image Lena and confidential text image C are
Lena: BWBWBBBWWWBW…
Because the horizontal-shift-amount is u=3, we split Lena and C into sectors of 3 pixels each. Therefore, we have
Lena: BWB WBB BWW WBW…
Image C: WWB WBW BWB …
Iteration 0a. Initially, because u=3, randomly assign the block types to the three blocks of the first sector of T1; for example, assign (0,4,3). So we have
Transparency T1 : 0 4 3 ? ? ? ? ? ? ? ? ? … Transparency T2 : ? ? ? ? ? ? ? ? ? ? ? ? …
Iteration 0b. In order that the first three blocks of the stacking result (T1⊕T2) can be (B,W,B), which are the 3 blocks in the first sector of Lena, the first sector of T2 should be (~0
, 4, ~3
), due to the fact that the first sector of T1 is (0,4,3). Here, ~0
is the complement of the block type 0, i.e. 0~ =1. (See Fig. 3.3 for understanding; note that stacking block type 0 with block type
1 yields a black block.) Similarly,1~ =0,2~ =3, ~ =3 2,4~ =5, and~ =5 4. Anyway, we now know the first sector of T1, and the first sector of T2. i.e.
T1: 0 4 3 ? ? ? ? ? ? ? ? ? … T2 : 1 4 2 ? ? ? ? ? ? ? ? ? … Iteration 1a. In order that the three blocks of the first sector in (T1⊕T2shifted) can be
(W,W,B), which are the first 3 blocks of the confidential text image C, let the three blocks of the second sector of T1 be of types (1,4,3). Again, block type 3 is the complement of block type 2 implies (1,4,3) ⊕ (1,4,2)=(W,W,B). So we have
Transparency T1: 0 4 3 1 4 3 ? ? ? ? ? ? … Transparency T2 : 1 4 2 ? ? ? ? ? ? ? ? ? …
Iteration 1b. Because the second sector of Lena is (W,B,B), we let the second sector of T2 be ~3) (1,5,2)
Iteration 2a. Read in next sector, i.e. (W,B,W), of the confidential text image C.
Then, in order that (T1⊕T2shifted) can be (W,B,W) at current location, the 7th,8
th,9 th blocks of T1 should be (1,4,2), since (1,~5,2) = (1,4,2). Now we have Transparency T1: 0 4 3 1 4 3 1 4 2 ? ? ? …
Transparency T2 : 1 4 2 1 5 2 ? ? ? ? ? ? …
Iteration 2b. Because the third sector of the input image Lena are (B,W,W), let the
third sector of T2 be 1~,4,2) (0,4,2)
( = , so we have
Transparency T1: 0 4 3 1 4 3 1 4 2 ? ? ? …
Iteration 3a. Read in next sector, i.e. (B,W,B), of the confidential text image C. Then,
Iteration 3b. because the fourth sector of the input image Lena are (W,B,W), let the
fourth sector of T2 be ~4,3) (1,5,3) Remaining iterations: similar to above iterations.
—End of the example—
An experiment using the modified encoding algorithm is done here, and the results are shown in Fig. 3.7. No computer is used in the decoding process. Only stacking operation is used to get Fig. 3.7 (c) and (d).
3.6 Summary
In this chapter, we have proposed a two-in-one method that has two decoding levels. The method not only visually shares an input image of moderate
confidentiality, but also hides extra text file which is more confidential. The extra hiding ability is achieved without giving any artificial appearance in the unveiled image. The unveiled LENA is lossless, in the sense that we can sequentially map from the 2-by-2 blocks of LENA back to the ″exact″ pixel values of Lena. The method can also be applied to the authentication of the transparencies. In this chapter, some other versions with improved security or easier decoding are also discussed.
Notably, in the design introduced in Sec. 3.2, if the more confidential text is too long (for example, if Lena’s personal information text needs more than 256x256/2 digits to express, but the input image Lena is only 256×256), then we may enlarge the block size of the transparencies to solve the problem. (When we use 2-by-2 blocks [as we did so far], there are only six types of blocks. By using 3-by-3 blocks, there are many more block types that can be used.)
For possible future works, people may consider the following two topics: 1) If there is no computer available for decoding, then people can still use the proposed visual cryptography method (Sec. 3.6) to handle both Lana image and the confidential text image; however, due to the natural limitation of visual resolution, the hidden text is much shorter (as compared with the data amount carried by the
interesting topic to find a solution to increase the length of the text being carried, assuming that no computer can be used for decoding. 2). So far, our method deals with binary images. If we apply the method to the eight bit-planes of gray-value images, there might exists some new applications.
(a) (b)
( c )
(c)
(d)
Fig. 3.7. Double-decoding without using a decoding-computer. (a) and (b) are the two transparencies T1 and T2; (c) is the result of stacking (a) and (b); (d) is the result of stacking T1 with ″shifted T2″.
u
v
Shifted T2
T1
Chapter 4
Universal share for the sharing of multiple images
In an (n, n) image sharing system [TLIEEE2003, TL2002, WTL2004], n shares {L1,L2,...,Ln} are created for a given image, say, Lena. (For simplicity, temporarily assume the image is grey-valued; although our method can be applied to color images, too.) The image can be unveiled when all n shares are received, while less than n shares reveal nothing about the image. With sharing, nobody (including the company’s organizer) can unveil the image without attending a public meeting. Therefore, sharing is a safety process useful in a company where no employee/investor alone should be trusted. Notably, the original image can be discarded after the sharing; moreover, each of the n shares is 1/n times smaller than the given image. Therefore, the sharing process causes no storage-space waste.
To share another image Monkey (which is grey-valued if Lena is grey-valued), another n shares {M1,M2,...,Mn} will be created likewise. Each employee/partner of a company can thus get a share from each image related to his job/investment. As a result, if a company’s organizer gets 1 share from each of the 100 important images being shared, the management of the 100 shares will be a large burden to him. As the number of images increases, the management of the shares becomes more difficult. By
combining the techniques of sharing with that of hiding [LC1999,MB2004, TLPR2003,WLL2001, WL2003], we design here an ″universal″ share for company’s organizer; and he only has to take this special share (single share with compact size) to attend any image’s recovery meeting.
Notably, although the method show below deals with grey images; by processing the three color components one by one, our method can also be applied to color images.
4.1. The method
4.1.1 Embedding U in the LSB of the secret image
Let p×q denote be the standard size of each image to be shared. The company organizer randomly grabs or creates an extra image U of size p×q/n (all pixel values of U are less than 251, as they are used later in Eq. (4.1)).This image U, whether noisy or not, has 8pq/n bits, which are embedded in the p×q image Lena by the least-significant-bits (LSB) replacement method [LC1999, MB2004, TLIEEE2003, TL2002, TLPR2003, WLL2001]. For instance, if n ≥ 8, then Image U has at most p×q bits, so U can be hidden using the least-significant-bits (1 bit per pixel) of Lena, which has p×q pixels. If 4 ≤ n ≤ 7, then U is hidden using the last two bits of Lena’s pixels. After embedding, Lena becomes a distorted image called Lena*. Since only some less-important bits of Lena are replaced (assuming n≥4), the distortion is invisible when comparing Lena* and Lena.
4.1.2 Partitioning each sector
Decompose Lena* into non-overlapping sectors of n pixels each (8n bits per sector).
Then share the 8n bits of each sector among the n shares. We assume n=8 below; other values of n are handled analogously.
(1.2.i). The LSBs of the n=8 pixels of the sector form an 8-bit number, called a0. Notably, a0<251 by Sec. 2.1.
(1.2.ii). The remaining 8×7=56 bits of the sector are then partitioned into another 7 numbers {a1, …, a7} of 8 bits each (see Fig. 4.1); i.e., {ai=(ai1, ai2, …, ai8)|1≤i≤7}.For 1≤i≤7, Fig. 4.1 ensures that the most significant bit (MSB) ai1 of every ai=(ai1, ai2, …, ai8) is the bit next to the LSB of a Lena* pixel. This property avoids visible damage to the image Lena* if the bit value of some ai1 is changed from 1 to 0 so that all ai stay in the 0–250 range before utilizing Eq. (4.1) (as noted below Eq. (4.1)).
Fig 4.1 The partitioning of a section
4.1.3 Sharing
We already have {a0,a1,…,a7}. Affix to each Share k, where 0 ≤ k ≤ n−1=7, a value f(k)=(a0+a1k+a2k2+…+an−1kn−1 ) mod 251 (4.1)
where 251 is the prime number suggested in [TL2002]. In Eq. (4.1), for recovery purpose, each ai must be in the range 0–250. Therefore, some bits in the sector might need adjustment before (4.1) can be applied. The image after this minor adjustment is still called Lena*. Since each n-pixel sector only contributes a value f(k) to Share k, each share is n times smaller than the image Lena* (and hence Lena). The total size of the n shares is
a18 a17 a27 a37 a47 a57 a67 a77 a28 a16 a26 a36 a46 a56 a66 a76 a38 a15 a25 a35 a45 a55 a65 a75 a48 a14 a24 a34 a44 a54 a64 a74
a58 a13 a23 a33 a43 a53 a63 a73 a68 a12 a22 a32 a42 a52 a62 a72 a78 a11 a21 a31 a41 a51 a61 a71 a01 a02 a03 a04 a05 a06 a07 a08
Pixel 1 Pixel 2 Pixel 3 Pixel 4 Pixel 5 Pixel 6 Pixel 7
ÅMSB of Lena
ÅLSB of Lena
4.1.4 Using the universal share U
The company organizer keeps Share 0, whose value is f(0) = a0 for each sector. Since the set {a0} is formed of the LSB of image Lena*, it is also formed of image U, because U is embedded in Lena’s LSB to obtain Lena* in Sec. 4.1.1. Hence, Share 0 is identical to U, the image created earlier by the organizer. This statement is true even if Lena is replaced by any other image (e.g., Monkey). Share 0, i.e. image U, is thus the desired universal share.
During the recovery phase, when all n shares are collected, recover the values {a0,…, an−1} from {f(0),…, f(n−1)} using the Lagrangian interpolation polynomials, which is an ordinary and routine procedure used in sharing field, as described in Ref. [WTL2004].
The modified image, regardless whether it is Lena* or Monkey*, can thus be recovered sector-by-sector.
4.2. Experiments
Assume that n=8. Fig. 4.2(a) depicts the input image Lena, and the company organizer arbitrarily creates his own share (the top-most noisy image U in Fig 4.2(c), whose pixel values are all below 251). Fig. 4.2(b) is the modified image Lena*, which not only hides the entire image U in its LSB, but also has the property that all ai extracted from it are in the range 0–250 (see the explanations in Sec. 4.1.1 and 4.1.2). Then, Lena* is shared.
Share 0 is the given image U, and the remaining n−1=7 shares are generated using
k=1,2,…,n-1 in Eq. (4.1). All 8 shares are shown in Fig. 4.2(c). These 8 shares can together recover the Lena* displayed in Fig. 4.2(b). Fig. 4.3 shows another experiment in which Lena is replaced by Monkey. Its Share 0 (the top-most noisy image in 4.3(c)) is identical to Share 0 in Fig. 4.2(c), because both are identical to U. Notably, as stated earlier, by processing the three color components one by one, our method can also be applied to color images. In Fig. 4.4, we show the result of using our method on an input color image Lena.
(a) (b) (c) Fig 4.2 A sharing result for n=8.
(a) is the important image Lena;
(b) is the modified image Lena*, which contains the image U, and all ai extracted from it are in 0-250 (see Eq. (4.1));
universal share, which is identical to the image U.
(a) (b) (c)
Fig 4.3 Another sharing result for n=8.
(a) is the important image Monkey;
(b) is the modified image Monkey*;
(c) is the 8 shares that can recover (b) together; and the top-most share is identical to the top-most share in Fig. 4.2(c).
(a) (b) (c)
Fig 4.4 An experiment for a color image Lena.
(a) is the important image Lena;
(b) is the modified image Lena*.
(c) is the n=8 shares that can recover (b) together. The top-most share in (c) is the universal share, which is identical to the image U.