6

XOR-Based Visual Cryptography

Daoshun Wang and Lin Dong

Tsinghua University, China

CONTENTS

6.1 Introduction

A (k, n) visual cryptography (VC) scheme [16] is a type of secret sharing scheme with the special property that a secret image can be recovered visually by the human eye and does not require any calculation on a computer. However, the recovered secret image has low quality. In this case, some researchers attempt to consider other different approaches to improve the quality (contrast) of the recovered image.

Lee et al. [12] presented a VC scheme using an XOR process to share a binary image. Since phase masks were placed on any path of the Mach-Zehnder interferometer for reconstruction, the method is impractical and expensive [17]. Biham and Itzkovitz [2] investigated a VC system based on passive light polarization. This is more flexible than the Naor and Shamir schemes but cannot be modeled by an XOR [17]. Tuyls et al. [17, 18] gave a VC system that uses the polarization of light. The operation of the VC system is mathematically described by an XOR operation. In Section 6.3, we will show that a (n, n)-VC scheme with optimal resolution and contrast exist, and that (2, n)-VC schemes are equivalent to binary codes. Three explicit constructions for general k out of n schemes are also introduced [17, 13].

Viet and Kurosawa [21] noticed the phenomenon that most copy machines nowadays can change a black image into a white one and vice versa, then first gave a VC scheme with reversing for binary image. In the VC scheme with reversing, a dealer needs run the distribution phase of a VC scheme c times (with c arbitrary constant), hence requiring each participant to held c shadows. The almost ideal contrast of a recovered secret image is almost obtained for a large number of runs c. Cimato et al. [7] presented two elegant construction methods to improve the contrast and pixel expansion of the scheme in Reference [21]. In order to reduce run times of two schemes [21, 7], Yang et al. [25, 26] overcame the weakness of reversing only a based perfect VC scheme and first introduced a nonperfect black VC scheme, this approach uses a Boolean XOR operation for decoding. Reducing the stacking and reversing operations and minimizing number held by each participant, Hu and Tzeng [10] proposed an ideal contrast VC scheme with less reversing and stacking operations in only two runs. The scheme needs to perform XOR operations to decode the secret image. In section 6.4, we will introduce Yang et al.’s scheme and Hu and Tzeng’s [25, 26] scheme with ideal contrast.

The construction of the above schemes is all based on basis matrices, so they may suffer pixel expansion and loss of contrast. Probabilistic VC schemes are proposed in [11, 24, 6] with no pixel expansion. However, the recovered secret image has low contrast. Wang et al. [23] proposed two secret sharing schemes based on a Boolean operation and the recovering operation is XOR. One scheme is (2, n) for the binary image, and the other is (n, n) for the grayscale image. Both have no pixel expansion. Chao and Lin [5] improved Wang et al.’s [23] scheme in order to obtain a (k, n) scheme, which is fast and with a reasonable pixel expansion rate. In section 6.5, we introduce the (2, n), (n, n), and (k, n) schemes.

6.2 Preliminaries

In a black and white (k, n)-visual cryptography (VC) scheme [16], the secret image consists of a collection of black and white pixels and each pixel is subdivided into a collection of m black and white subpixels in each of the n shares. These subpixels are printed in close proximity to each other so that the human visual system averages their individual black and white contributions. The collection of subpixels can be represented by an n × m Boolean matrix S = [sij], where the element sij represents the j-th subpixel in the i-th share. A white subpixel is represented as a 0, and a black subpixel is represented as a 1. The white subpixels are let through the light while black subpixels stop it. sij = 1 if and only if the j-th subpixel in the i-th share is black. The gray level of the combined share obtained by stacking shares i1, ⋯,iγ is proportional to the Hamming weight (the number of 1’s in the vector V) H(V) of the OR-ed (”OR” operation) m-vector V = OR(i1, ⋯, iγ). Based on the definition of Naor and Shamir [16], Verheul and van Tilborg [20] gave a more general definition. Following the notation from [16, 20], a definition of k out of n XOR-based visual cryptography scheme is given by Tuyls in Reference [17]. A (k, n) VC scheme S = (C0, C1) consists of two collections of n × m binary matrices C0 and C1. To share a white (black) pixel, the dealer randomly chooses one of the matrices in C0(C1) and distributes its rows as shares among the n participants of the system. The following is the definition.

Definition 1 [20] Let k, n, n, m, l be positive integers satisfying 1 ≤ kn and mhl. Let Z(v) be the number of 0’s in the vector v. A [(k, n); m, h, l] visual cryptography (VC) scheme consists of two collections of n × m Boolean matrices C0 and C1 such that:

  1. For any sC0, the XOR v of any k of the n rows of s satisfies Z(v) ≥ h.

  2. For any sC1, the XOR v of any k of the n rows of s satisfies Z(v) ≤ l.

  3. For any i1 < i2 < ⋯ < it in {1, 2, ⋯, n} with t < k the two collections of t × m matrices Dj for j ∈ {0, 1}, obtained by restricting each n × m matrix in Cj, to rows i1, i2, ⋯, it are indistinguishable in the sense that they contain the same matrices with the same frequencies.

The number h and l are called the white level and black level, respectively, of the scheme. The parameter m is called the block length or pixel expansion and determines the resolution of the scheme. The contrast α is defined as α=(hl)h+lα=(hl)h+l. Note that α ∈ [0, 1] and α is maximal when l = 0. A scheme with l = 0 are called maximal contrast schemes. When α = 1, the contrast is defined as an ideal contrast.

The following symmetry property follows very easily and is therefore stated without proof.

Proposition 1 [17] Let S = (C0, C1) be a [(k, n); m, h, l] VC scheme. Let Ĉi be obtained from Ci by replacing zeroes by ones and vice versa. If k is even, then the scheme (Ĉ0, Ĉ1) is a [(k, n); m, h, l] scheme as well. If k is odd, then (C0, C1) is a [(k, n); m, ml, mh] scheme with contrast α given by ˆα=(hl)/(2mlh)αˆ=(hl)/(2mlh). It follows that ˆα>ααˆ>α whenever l + h > m.

6.3 Visual Cryptography Scheme Using the Polarization of Light

In this section, we will introduce XOR-based visual cryptography scheme. They are constructed using basis matrices and the secret image is recovered by an XOR certain number of shares. We will show how to construct (2, n), (n, n), and (k, n) XOR-based visual cryptography schemes as follows.

6.3.1 (2, n) Scheme

In this section, we show how to construct a (2, n) XOR-based visual cryptography scheme. The (2, n) scheme is equivalent to binary error-correcting codes. By a (m, n, d) code, that is, a binary code of length m consists of n words and a minimum Hamming distance of at least d.

Theorem 1 [17] Let m, l and h be positive integers such that l < h ≤ m. The three following statements are equivalent.

  1. A [(2, n); m, m, l] VC scheme exists.

  2. A [(2, n); m, h, l] VC scheme exists.

  3. A binary (m, n, ml) code exists.

Proof: It is clear that (i) implies (ii).

In order to show that (ii) implies (iii), let S = (C0, C1) be a [(2, n); m, h, l] VC scheme. Take a matrix A1C1 and let C consist of the rows from A1. As S is a [(2, n); m, h, l] VC scheme, the Hamming distance between two words from C is at least ml. Consequently, C is a (m, n, ml) code. Finally, to show (iii) implies (i), let C be a binary (m, n, ml) code. For cC, let A(c) denote the n × m matrix for which each row equals c. Moreover, let B be an n × m matrix containing each word from C as a row, and for 0 ≤ in − 1, let B(i) be the matrix obtained by a cyclic shift of the rows of B over i positions. We claim that (C0, C1) = ({A(c)|cC}, {B(0), B(1), ⋯, B(n − 1)}) is a [(2, n); m, m, l] scheme. It is clear that both collections contain n matrices, and that in each row, each word from C occurs in one matrix from C0 and in one matrix from C1, showing the indistinguishability. The sum of any two rows from a matrix in C0 equals 0. Finally, the Hamming distance between any two rows of a matrix from C1 is at least ml, showing that the XOR of these two rows contains at most m − (ml) = l zeros.

An example is given as follows.

Example 1 Let C be a binary (3, 3, 2) code containing words 100, 010 and 001 . Construct C0 and C1 as follows:

C0={[100100100],[010010010],[001001001]},

C0=111000000,000111000,000000111,

C1={[100010001],[010001100],[001100010]}.

C1=100010001,001100010,010001100.

(C0, C1) is a [(2, 3); 3, 3,1] scheme. The contrast α=(hl)h+l=24=12α=(hl)h+l=24=12.

6.3.2 (n, n) Scheme

In this section, we show how to construct a (n, n) XOR-based visual cryptography scheme.

Proposition 2 [17] Let C0 and C1 be the set of all binary vectors of length n with even, odd number of ones, respectively. Then (C0, C1) is an [(n, n); 1, 1, 0] scheme.

An example is given as follows.

Example 2 Let C0 and C1 be

C0={[000],[110],[101],[011]},C1={[100],[010],[001],[111]}

C0=000,110,101,011,C1=100,010,001,111

(C0, C1) is a [(3, 3); 1,1, 0] scheme with contrast α=(hl)h+l=1α=(hl)h+l=1.

6.3.3 (k, n) Scheme

In this section we will introduce three (k, n) XOR-based visual cryptography schemes. Construction 1 and Construction 2 are given by Tuyls (see more detail in Reference [17]). Construction 3 comes from Droste’s OR-based visual cryptography [9] and Liu et al. [13] shows that it is also a (k, n) XOR-based visual cryptography scheme.

Before introducing Construction 1 and Construction 2, some definitions and theorems will be given, which are used in both constructions.

For describing the constructions, we use the following notation. If A is a binary matrix, then P(A) is the multi set of matrices obtained by permuting the columns of A. Moreover, we use the concept of (k, n) pairs, defined as follows.

Definition 2 [17]A pair (A, B) of binary n × m matrices is called a (k, n) pair if there exist numbers a1, ⋯, ak and b1, ⋯, bk such that

  1. For each i with 1 ≤ ik, the weight of the sum of any i rows from A equals ai and the weight of the sum of any i rows from B equals bi, and

  2. ai = bi for 1 ≤ i < k, and akbk.

The importance of this definition stems from the following theorem.

Theorem 2 [17] If (A, B) is a (k, n)-pair of n × m matrices, then (P(A), P(B)) is a [(k, n); m, h, l] VC scheme with h = max(mak, mbk) and l = min(mak, mbk). Here, ak and bk denote the weight of the sum of any k rows from A and B, respectively.

Some notations are given here for later use. For a binary vector v of length m, we define Z(v) as the number of zeros in v, and H(v) as its number of ones. Moreover, we define the unbalance δ(v) of v by δ(v) = Z(v) − H(v). Note that δ(v) = m − 2H(v). For later use, we also observe that δ(v)=mj=1(1)vjδ(v)=j=1m(1)vj. With each binary n × m matrices A we associate two vectors δ(A) and N(A) of length 2n, with the components indexed by binary vectors of length n. For each binary vector x of length n, the x-th component δx(A) of δ(A) is defined as δx(A) = δ(xTA), the unbalance of the sum of the rows in A whose index i satisfies xi = 1; also, the x-th component Nx(A) of N(A) is defined as the number of columns of A that are equal to x. Lemma 1 will show that the vectors δ(A) and N(A) can be computed from each other. To make this precise, define the 2n × 2n matrix H by H(x, y) = (−1)(x,y), where x, y are binary vectors of length n and (x,y)=ni=1xiyi(x,y)=i=1nxiyi denotes the inner product of x and y. Then we have the following lemma:

Lemma 1 [17]

  1. The matrix H is a Hadamard matrix, that is, HHT = 2nI.

  2. The vectors δ(A) and N(A) are related by δ(A) = HN(A).

We are now in the position to prove a generalization of Theorem 2. Before stating it, we need one more notation: if A is a n × m matrix, then w(AI) denotes the weight of the sum of the rows of A indexed by I. Note that w(AI)=12(mδχ(I)(A))w(AI)=12(mδχ(I)(A)), where χ(I) is the characteristic vector of the set I.

Theorem 3 [17] Let A and B be n × m matrices such that for each I ⊂ {1, 2, ⋯, n} of size at most k − 1, w(AI) = w(BI). Assume moreover that there exist integers h and I such that h > I and that for each I ⊂ {1, 2, ⋯, n} of size k, mw(AI) ≥ h and mw(BI) ≤ l. Then (P(A), P(B)) is a [(k, n); m, h, l] VC scheme.

Proof The only nontrivial thing we have to prove is the indistinguishability. Let I ={i1,·⋯, it} be a subset of {1, 2, ⋯, n} of size t < k. Let Ā and ˉBB¯¯¯ denote the restrictions of A and B to the t rows indexed by I. Let x = {x1, ⋯, xt} be a binary vector of length t, and let ˜XX˜ be the binary vector of length n for which entry ij is equal to xj for j = 1, 2, ⋯, t, and whose other entries equal zero. It is clear that δx(Ā) = δx(Ā). As ˜XX˜ has weight at most t, we find, using properties of A and B, that δx(ˉA)=δx(ˉB)δx(A¯¯¯)=δx(B¯¯¯).

Hence, by Lemma 1, the number of columns Ny(Ā) in Ā and the number of columns Ny(ˉB)Ny(B¯¯¯) in ˉBB¯¯¯ of type y = {y0, ⋯, yt−1} are equal for all binary vectors y of length t. As a consequence, the matrices A and B are equal up to a column permutation, which readily implies indistinguishability in the rows under consideration in the multisets P(A) and P(B). ■

Construction 1

Now an explicit construction of (k, n) VC schemes for all n and all k with 1 ≤ kn will be given below. According to Theorem 3, it is sufficient to construct (k, n)-pairs for all such n and k. We will obtain such pairs by concatenation of matrices from a fixed collection of building blocks.

For each n and w with 0 ⩽ wn, we let the n×(nw)-matrixn×(nw)-matrix Cw consist of all the (nw)(nw) different 0 − 1 column vectors of weight w, in any order.

In the sequel, we will need an explicit expression for the weight of the sum of any j rows from Cw. In Lemma 2, we state the result. Here and in what follows, we will use the standard convention that (nk)=0(nk)=0 whenever k < 0 or k > n.

Lemma 2 [17] The weight of the sum of any j rows, 1 ≤ jn, from Cw does not depend on the choice of the rows and is equal to Mj,W, where

Mj,w=iodd(ji)(njwi).

Mj,w=iodd(ji)(njwi).

Let λ = (λ0, ⋯, λn)T be a vector of length n +1 with nonnegative integer entries. We define the matrix C(λ) to be the matrix consisting of the concatenation of λ0 copies of C0, λ1 copies of C1, ⋯, λn copies of the matrix Cn. It is clear that c0(λ), the number of columns of C(λ), satisfies C0(λ)=wλw(nw)C0(λ)=wλw(nw).

According to Lemma 2, the weight of the sum of any j rows of C(λ) equals cj(λ), where

cj(λ)=wλwiodd(ji)(njwi).

cj(λ)=wλwiodd(ji)(njwi).

Hence, if we define c(λ) = (c0(λ), ⋯,cn(λ))T, then the above can also be written as c(λ) = Mλ, where M is the (n +1) × (n +1) matrix with entries the Mj,W as defined in Lemma 2 for j ≥ 1 and with M0,w=(nw)M0,w=(nw). Now suppose that λ and µ are nonnegative integer vectors such that and agree in position 0, 1, ⋯, k − 1, but differ in position k. Then (C(λ), C(µ)) is a (k, n) pair of matrices to which we can apply Theorem 2. The way to find such vectors λ and µ is described in Theorem 5, which uses Lemma 3, Corollary 4, and Lemma 4 below.

Lemma 3 [17] For 1 ≤ jn, 1 ≤ wn, we have that Mj,w=k1(2)k1(jk)(nkwk)Mj,w=k1(2)k1(jk)(nkwk)

The following corollary is a direct consequence of Lemma 3.

Corollary 4 Let R and L be the matrices defined as Rk,w=(nkwk)Rk,w=(nkwk) for 0 ≤ k, wn and L0,0 = 1, Li,0 = L0,i =0 if i > 0, and Lj,k=(2)k1(jk)Lj,k=(2)k1(jk) if 1 ≤ j, kn. Then M = LR.

We define the (n +1) × (n + 1) matrix S by Si,j=(1)i+j(niji)Si,j=(1)i+j(niji).

Lemma 4 [17]The matrices R and S are inverses of each other.

Theorem 5 [17] Let 1 ≤ kn − 1. Let θ = (θ0, θ1, ⋯, θn) be an integer-valued vector such that θj =0 if 0 ≤ jk − 1, and θk ≠ 0, and let ϕ := . For 0 ≤ jn, we define

λj=max(0,ϕj)andμj=min(0,ϕj).

λj=max(0,ϕj)andμj=min(0,ϕj).

Then λ and µ are vectors with nonnegative integer entries, and (C(λ), C(µ)) is a (k, n) pair. The parameters of the corresponding [(k, n); m, h, l] VC scheme satisfy the following equations:

m=12nw=0|ϕw|(nw),hl=2k1|θk|,andh+l=m+12nw=0|ϕw|i(1)i(ki)(nkwi).

m=12w=0n|ϕw|(nw),hl=2k1|θk|,andh+l=m+12w=0n|ϕw|i(1)i(ki)(nkwi).

Proof As S has integer entries, ϕ has integer entries, hence λ and µ have nonnegative integer entries. Using Corollary 4, Lemma 4, and the fact that ϕ = λ − µ, we find that

c(λ)c(μ)=MλMμ=M(λμ)=Mϕ=LRSθ=Lθ.

c(λ)c(μ)=MλMμ=M(λμ)=Mϕ=LRSθ=Lθ.

As L is a lower triangular matrix, and θj = 0 if j < k, it follows that cj(λ) − cj(µ) if 0 ≤ jk − 1, and that

hl=|ck(λ)ck(μ)|=|Lk,kθk|=2k1|θk|.

hl=|ck(λ)ck(μ)|=|Lk,kθk|=2k1|θk|.

Moreover, 2m = c0(λ) + c0(µ) = c0(λ + µ) = c0(|ϕ|), and similarly (mh) + (ml) = ck (λ + µ) = ck (|ϕ|). ■

We will give an example to illustrate the construction.

Example 3 Take θ = (0, ⋯, 0, 1, 2, ⋯, nk, nk + l)T. As ϕ = , we have by definition

ϕi=niv=ki1(1)v(niv)(vk+i+1).

ϕi=v=ki1ni(1)v(niv)(vk+i+1).

If k = 3, then ϕ = (2 − n, 1, 0, 0, ⋯, 1, n − 2). Consequently, λ = (0, 1, 0, ⋯, 0, n − 2) and µ = (n − 2, 0, ⋯, 0, 1, 0). That is to say, A = C(λ) consists of the n × n identity matrix and n − 2 columns of weight n, while B = C(µ) consists of n − 2 all-zero columns and furthermore contains each column of weight n − 1 once. It is clear that A and B both contain 2n − 2 columns. Straightforward computations show that a1 = b1 = n − 1, a2 = b2 = 2, a3 = n + 1, b3 = n − 3. As a consequence, we obtain a [(3, n); 2n − 2, n + 1, n − 3] VC scheme with α = 2/(n − 1).

Construction 2

In general, it seems hard to give manageable expression for the physical parameters of the schemes obtained with Construction 1. Tuyls [17] gave another explicit construction of a (k, n) VC scheme that has the virtue that the physical parameters of these schemes can readily be computed in Reference [17]. For constructing these matrices, they used maximum distance separable (MDS) codes over GF(q), the finite field with q elements. An [n, k] MDS code over GF(q) consists of qk vectors of length n with entries from GF(q) such that any two codewords have a Hamming distance of at least nk + 1. It is known that such a code exists whenever q + 1 ≥ n. Therefore, we choose qn − 1.

Lemma 5 [17] Let C be an [n, k] MDS code over GF(q). In any set of k positions, each of the qk possible patterns occurs in exactly one of the words of C.

Proof Fix k positions, two codewords that agree in these positions, differ in at most n k positions. We conclude that each of the qk patterns agrees with at most one codeword. As the number of patterns equals the number of codewords, each pattern agrees with exactly one codeword in the given positions. ■

Let C be an [n, k] MDS code over GF(q). Let U(C) be an n × qk matrix over GF(q) in which each word from C occurs as a column once, and let A(C) be the binary n × qk matrix obtained from U(C) by replacing each nonzero symbol in GF(q) by a ‘1,’ and the zero symbol in GF(q) by a ‘0.’

Proposition 3 [17] Let 1 ≤ jk, the sum of any j rows of A(C) has weight 12qkj[qj(2q)j]12qkj[qj(2q)j].

Proof Consider j rows from U(C). Lemma 5 implies that each of the qj possible patterns occurs in these j positions in qkj words from C. The number of patterns with w nonzero elements equals (jw)(q1)w(jw)(q1)w. Each such pattern yields a column in A(C) with exactly w ones in the j prescribed rows. Consequently, the number of ones in the sum of the j rows from A(C) under consideration equals

qkjwodd(jw)(q1)w=12qkj((q1+1)j(1)j(q11)j).

qkjwodd(jw)(q1)w=12qkj((q1+1)j(1)j(q11)j).

Proposition 4 [17] The sum of any k + 1 rows of A(C) has a weight 12q(qk+1(2q)k+1)q1q2k12q(qk+1(2q)k+1)q1q2k.

Proof Consider k + 1 positions in C. Any two distinct words from C differ in at least two of these positions. That is, restricted to these k + 1 positions, C is a [k + 1, k, 2] code over GF(q). The number of words of weight w in such a code equals

bw=(k+1w)(q1)w2j=0(1)j(w1j)qw2j=(k+1w)((q1)w1(1)w1q).

bw=(k+1w)(q1)j=0w2(1)j(w1j)qw2j=(k+1w)((q1)w1(1)w1q).

The weight of the sum of the rows of A(C) corresponding to the k + 1 chosen positions is obtained by summing the above expressions of bw over all odd w.

Theorem 6 [17] Let 2 ≤ kn − 1, and let q be a prime power not smaller than n − 1. There exists a[(k,n);qk,12(qk+(1)k(q2)k+(q1)2k),12(qk+(1)k(q2)k)]a[(k,n);qk,12(qk+(1)k(q2)k+(q1)2k),12(qk+(1)k(q2)k)] VC scheme with contrast (q − 1)2k−1/[qk + (−1)k(q − 2)k + (q − 1)2k−1].

Proof Let C be an [n, k] MDS code over GF(q), and let D be an [n, k − 1] MDS code over the same field. In the notation of this section, let A equal A(C), and let B equal the concatenation of q copies of A(D). By combining the above results, (A, B) is a (k, n) pair, and (P(A), P(B)) is a VC scheme with parameters as claimed in the theorem. ■

Bounds on the parameters m, h and l

Tuyls provided bounds on the parameters of a (k, n)-VC scheme. We start by proving that maximal contrast schemes (l = 0) do not exist. We note that for OR-based schemes maximal contrast schemes can always be constructed.

Proposition 5 [17] Let 3 ≤ k < n. There exists neither a [(k, n); m, h, 0] VC scheme, nor a [(k, n); m, m, l] VC scheme.

Proof Let S = (C0, C1) be a [(k, n); m, h, 0] VC scheme and let BC1.. Denote by σ1, σ2 two arbitrary rows in B. Since n − 2 ≥ k − 1, B contains (at least) k − 1 more rows. We denote these rows by σ3, ⋯, σk+1. Since S is a scheme with l = 0, the XOR of σ1, σ3, ⋯, σk+1 is the all-one vector, as is the XOR of σ2, σ3, ⋯, σk+1. If follows that σ1 = σ2, so all rows of B are equal.

Next, let AC0 and consider row i and j of A. As k ≥ 3, the indistinguishability property of Definition 1 implies that there is a BC1 that agrees with A in these rows. As all rows of B are equal, the i-th and j-th row of A are equal. Since i and j are arbitrary, all rows of A are equal, so A = B, a contradiction.

The second statement follows from an analogous reasoning. ■

The next two propositions show that XOR-based VC schemes with odd and even k fundamentally differ.

Proposition 6 [17] Let k be odd, and let k < n. For each ϵ > 0, there are integers m, h, and l such that l/m < ϵ and a [(k, n); m, h, l] VC scheme exists.

Proposition 7 [17] Let k be even, and let k < n. If a [(k, n); m, h, l] VC scheme exists, then l/m ≥ 1/(k + 1).

Corollary 7 [17] For even k < n, the contrast of a k out of n VC scheme is at most k/(k + 2).

Proof Let S be a [(k, n); m, h, l] scheme. By definition, the contrast α is equal to (hl)/(h + l). It is clear that α is increasing in h, and so α ≤ (ml)/(m + l). As (ml)/(m + l) is decreasing in l, we obtain an upper bound on α by plugging in the upper bound for l from Proposition 7. ■

Lemma 6 [17] Let k be an even integer. Let B be a binary matrix with n rows such that the sum of any k rows from B differs from 0. Then B has at least nk + 2 distinct rows.

Lemma 7 [17] Let (C0, C1) be a [(k, n); m, h, l] VC scheme with k ≥ 3, and let c1 and c2 be two rows of a matrix in C0 and hence also two rows of some matrix in C1. Then, the Hamming distance between c1 and c2 satisfies

d(c1,c2)min{2l,2(mh)}.

d(c1,c2)min{2l,2(mh)}.

Proposition 8 [17] Let k be even, k ≥ 4. If a [(k, n); m, h, l] VC scheme exists, then nk+1min(l,2(mh))i=0(mi)nk+1i=0min(l,2(mh))(mi)

Proof Let k be even, k ≥ 4, and let S = (C0, C1) be a [(k, n); m, h, l] scheme. Let B be a matrix in C1 . As lm, no k rows of B add to the all-zero word. Lemma 6 implies that B has at least nk + 2 distinct rows. Since according to Lemma 7, all rows from B have a Hamming distance at most 2(mh) to its top row, we obtain nk+22(mh)i=0(mi)nk+2i=02(mh)(mi)

Now we assume without loss of generality that the top nk + 1 rows of B are distinct. Let c be the sum of the k − 1 bottom rows of B. For 1 ≤ ink + 1, the sum of c and the i-th row of B contains at most l ones; that is to say, the i-th row of B has a Hamming distance at most l to the complement of c. As the nk + 1 top rows of B are distinct, nk + 1 is at most the number of vectors at distance at most l from the complement of c, so nk+1li=0(mi)nk+1i=0l(mi). ■

Construction 3

Droste [9] proposed an algorithm to construct a (k, n)-VC scheme under the OR operation. Liu et al. [13] proved that the basis matrices constructed by that algorithm are also the basis matrices of a (k, n)-VC scheme under the XOR operation. Droste’s algorithm can be described as follows.

For easy specification, we call a column of a Boolean matrix with an even number of 1’s even and otherwise odd. If B is a Boolean matrix, we define P(B) as the multiset of matrices obtained by permuting the columns of B, i.e., each permutation corresponds exactly to one element of P(B).

The following lemma will be needed later.

Lemma 8 [9] Let B0 and B1 be two n × m Boolean matrices so that there exist m − 2k−1 column vectors v1,,vm2k1{0,1}kv1,,vm2k1{0,1}k with the following property: for every {i1, ⋯, ik} ⊆ {1, ⋯, n} the restriction of B0 (resp. B1) to the rows i1, ⋯, ik contains every even (resp. odd) column of length k exactly once and all columns v1,,vm2k1v1,,vm2k1. Then P(B0) and P(B1) are a k out of n secret sharing scheme with relative contrast 1/m; here the contrast is defined as α=hlmα=hlm.

The main idea for construction is to start with an empty matrix (which has no columns) and, for various q ∈ {0, ⋯, n} and all (nq)(nq) columns, which have exactly q 1’s. Because of the symmetry of this construction with respect to rows, all restrictions of such a matrix of k rows contain the same columns. And one can exactly determine which columns they contain.

Lemma 9 [9] For q ∈ {0, ⋯, n} let B be an n×(nq)n×(nq) Boolean matrix that contains every column with q 1’s exactly once. Then every restriction of B to k rows (with kn) contains every column with p 1’s exactly (nkqp)(nkqp)-times (where p ∈ max{0, q − (nk), ⋯, min(q, k)}).

Lemma 9 shows a possibility to expand a matrix, if we add to all its restrictions every column with p 1’s exactly once: just add all columns with q = p or q = p + nk 1’s to the entire matrix. So a subroutine ADD(p, B) adds to each restriction of k rows of a matrix B every column with p 1’s by adding columns to the entire matrix.

ADD(p, B)

Step 1: If pkp, add all the columns with q = p 1’s to B.

Step 2: If pkp, add all the columns with q = p + nk 1’s to B.

The subroutine makes it easy to construct basis matrices B0 (resp. B1) whose restrictions always contain every even (resp. odd) column. But besides these columns, every restriction of B0 and B1 can contain remaining columns (which are the same for all restrictions of one matrix because of the construction principle). To be appropriate for a k out of n scheme these remaining columns have to be the same for B0 and B1 (see Lemma 8). So the remaining columns of every restriction of B0, which are not remaining columns of every restriction of B1, called the rest of B0, have to be added to every restriction of B1 and vice versa. In most cases, these added columns will create new rests that cause new columns to be added.

Droste’s algorithm

Step 1: For all even p ∈ {0, ⋯, k}, call ADD(p, Bo).

Step 2: For all odd p ∈ {0, ⋯, k}, call ADD(p, B1).

Step 3: While the rests of B0 and B1 are not empty:

  1. Add to B0 all columns adjusting the rest of B1 by calling ADD.

  2. Add to B1 all columns adjusting the rest of B0 by calling ADD.

Theorem 8 shows that Droste’s algorithm also generates a (k, n)-VC scheme under the XOR operation, by Liu et al. [13].

Theorem 8 [13] Droste’s algorithm generates the basis matrices of a (k, n)-VCS, B0 and B1, under the XOR operation.

Proof We need to prove that the basis matrices B0 and B1 satisfy the contrast and security conditions of Definition 1.

First, for the contrast condition, we need to prove that the Hamming weight of the stacking (XOR operation) of any k out of n rows of B0 is less than that of B1. Denote Bk0Bk0 (resp. Bk1Bk1) as the submatrix generated by restricting to arbitrary k rows of B0 (resp. B1). According to the Steps 1 and 2 in Droste’s algorithm, it is clear that all the even (resp. odd) columns appear in Bk0Bk0 (resp. odd). Denote Ik0Ik0 (resp.Ik1Ik1) as the matrix whose columns are all the even (resp. odd) columns of length k. Because Droste’s algorithm terminates when the rests of B0 and B1 are empty, it implies that the remaining columns of B0 and B1 are the same, that is, Bk0Ik0=Bk1Ik1Bk0Ik0=Bk1Ik1. Denote R as the remaining columns of B0 and B1, we have Bk0=Ik0R,Bk1=Ik1RBk0=Ik0R,Bk1=Ik1R. Because the XOR (operation) of the entries of an even (resp. odd) column is 0 (resp. 1), we have the result that the Hamming weight of the stacking (XOR operation) of the rows of Bk0Bk0 is less than that of Bk1Bk1. Hence, the contrast condition is satisfied.

Second, for the security condition, we need to prove that the submatrices of any less than k rows of B0 and B1 have the same columns, and only in such a case, all the column permutations of the two submatrices will generate the same collection, that is, the security condition is satisfied. Denote Bt0Bt0 (resp. Bt1Bt1) as the submatrix generated by restricting to arbitrary t rows of B0 (resp. B1), where t < k. Denote Bk0Bk0 (resp. Bk1Bk1) as the submatrix generated by concatenating Bt0Bt0 (resp. Bt1Bt1) and arbitrary kt rows chosen from the remaining rows of B0 (resp. B1) (other than the rows in Bt0Bt0 and Bt1Bt1). As discussed above, we have Bk0=Ik0R,Bk1=Ik1RBk0=Ik0R,Bk1=Ik1R, where Ik0Ik0 (resp. Ik1Ik1) is the matrix that contains all the even (resp. odd) columns of length k. Note that Ik0Ik0 and Ik1Ik1 are the basis matrices of a (k, k)-VC scheme proposed in References [16, 3]. We have the result that the submatrices generated by restricting to any t rows of B0 and B1 have the same columns. Hence, the submatrices generated by restricting to any t rows of B0 and B1 have the same columns, that is, the security condition is satisfied. ■

Besides the above schemes, Liu et al. [15] proposed a step construction to construct XOR-based visual cryptography for general access structure by applying (2, 2)-VCS recursively, where a participant may receive multiple share images. Readers can refer to [15] for more detail. An approach to construct extended XOR-based visual cryptography was proposed in Reference [14].

6.4 Visual Cryptography Scheme with Reversing

First we introduce the following notations that will be used throughout the section. Let AB denote the concatenation of two matrices A and B of the same number of rows. Let |X| be the number of elements in set X. The symbol ”⊕” denotes an XOR operation. Let GRAY(P) be the gray level of a pixel P and defined as GRAY(P) = |blαck pixel|/m.

6.4.1 (k, n) VC Scheme Using Cyclic-Shift Operation

Let the shadow image s = [sijk], and the element sijk is the secret pixel sij in a (W × H)-pixel secret image replaced by m subpixels (sij1, sij2, ⋯, sijm), where i ∈ [1, W], j ∈ [1, H], and k ∈ [1, m]. The cyclic-shift operation is Γ([sijk]) = [γ(sijk)], where γ(•) is a 1-bit cyclical right shift function, i.e.,

γ(sij1,sij2,,sijm)=(sijm,sij1,,sijm1)

γ(sij1,sij2,,sijm)=(sijm,sij1,,sijm1)

A matrix operation Γ(•) cyclically shifts right one subpixel in every m subpixels (for a secret pixel) in the shadow image.

When the difference of whiteness ”hl” is odd, we can design an ideal contrast VC scheme even when the underlying VC scheme with reversing is nonperfect black. At this time the decoding needs an XOR operation.

Yang et al.’s scheme [25] is described in a pseudo-code style below in terms of its construction procedure and the revealing procedure.

Yang et al.’s algorithm for a (k,n)-VC scheme

Distribution phase.

Step 1: Given a secret image, the dealer performs a (k, n) nonperfect black VC scheme(NPBVCS) to generate n shadows, s11,,s1ns11,,s1n for the first run.

Step 2: The dealer generates the shadows srj=Γ(sr1j)srj=Γ(sr1j) for the rth run, r = 2, ⋯, m. Note that the shadow should be labeled as to which run it is, for easy management by the participant.

Step 3: The dealer distributes m shadows s1j,,smjs1j,,smj to Participant j, j = 1, ⋯, n.

Step 4: Finally, every participant holds m shadows.

Reconstruction phase.

Step 1: To recover the secret within m runs, at least k participants, Participants j1, ⋯, jk, offer their (k × R) shadows sij1,,sijksij1,,sijk, i = 1, ⋯R, for reconstruction.

Step 2: Stack the shadows srj1,,srjksrj1,,srjk to reconstruct the image Tr in the rth run.

Tr=srj1+srj2++srjk,r=1,,m

Tr=srj1+srj2++srjk,r=1,,m

Step 3: Finish m runs by using an XOR operation to reconstruct U′ = T1 ⊕ ⋯ ⊕ Tm.

Step 4: If ”mh” is even (i.e., ”ml” is odd) then the reconstructed image is U′; otherwise, the reconstructed image is U′.

Theorem 9 [25] The whiteness percentages of the white and black secret pixels for Yang et al.’s algorithm are PW = 100% and PW = 0%, respectively, after finishing m runs.

Proof There are ”mhBhW (respectively ”ml” BlW) subpixels for the white (respectively black) secret pixel. When shifting right one bit m times, there are m h (respectively ml) black subpixels for the white (respectively black) secret pixels in U′. Suppose ”mh” is even (respectively odd); an XOR operation will result in all white subpixels for the white pixels in U′ (respectively U′). Thus, the PW of the white secret pixel is 100%. On the other hand, even (respectively odd) ”mh” means odd (respectively even) ”ml” since ’h − l’ is odd. It is evident that an XOR operation will result in all black subpixels for the black pixels in U′ (respectively U′), i.e., the PW of the black secret pixel is 0%. ■

An example (2,4) – NPBVCS is given below as a demonstration for Yang et al.’s algorithm.

Example 4 Suppose in (2, 4)-VCS with basis matrices B0 and B1.

B0=[1000100010001000],B1=[1000010000100001].

B0=1000100010001000,B1=1000010000100001.

The distribution phase is shown in Table 6.1 and the reconstruction phase is shown in Table 6.2 and Table 6.3.

Distribution phase:

Table 6.1 Distribution phase of (2, 4)-VCS using Yang et al.’s [25] algorithm.

Images

Reconstruction phase

Table 6.2 Reconstruction of participant 1 and 2 using Yang et al.’s [25] algorithm.

Pixel First run T1=s11+s12T1=s11+s12 Second run T2=s21+s22T2=s21+s22 Third run T3=s31+s32T3=s31+s32 Fourth run T4=s41+s42T4=s41+s42 ¯UU¯¯¯¯
White (1000) (0100) (0010) (0001) (0000)
Black (1100) (0110) (0011) (1001) (1111)

Table 6.3 Reconstruction of participant 3 and 4 using Yang et al.’s [25] algorithm.

Pixel First run T1=s13+s14T1=s13+s14 Second run T2=s23+s24T2=s23+s24 Third run T3=s33+s34T3=s33+s34 Fourth run T4=s43+s44T4=s43+s44 ¯UU¯¯¯¯
White (1000) (0100) (0010) (0001) (0000)
Black (0011) (1001) (1100) (0110) (1111)

We can see that the white pixel is reconstructed as four white subpixels and the black pixel is reconstructed as four black subpixels.

6.4.2 A Scheme for General Access Structure

Let P = {1, 2, ⋯, n} be a set of participants, 2P represents the set of all subsets of P. Let Γqual ⊆ 2P and Γforb ⊆ 2P, where Γqual; ∩ Γforb = ϕ. The members of Γqual;(resp. Γforb) is called qualified sets (resp. forbidden sets). The Γ = (Γqual, Γforb) is called the access structure. Define Γ0 = {A ∈ Γqual: A′ ∉ Γqual for all A′ ⊂ A} be all the minimal qualified sets [1].

Suppose Γ0={ΓQ1,,ΓQt}Γ0={ΓQ1,,ΓQt}, by employing the optimal (k, k)-scheme [16], the basis matrices L0 and L1 are constructed as follows:

Let kp=|ΓQp|kp=ΓQp, and ΓQp={p1,,pkp}ΓQp={p1,,pkp}, for 1 ≤ pt. We will construct a n×2kp1n×2kp1 matrix Eip,i{0,1}Eip,i{0,1}, i ∈ {0, 1} according to the following steps: the pi row of E0pE0p is the i-th row of the basis matrix B0 of the (kp, kp)-scheme. The elements of other rows of E0pE0p are all 1’s.

Then L0=E01L0=E01. The construction E1pE1p of is similar to E0pE0p except we replace the pi row of from the basis matrix B1 of the (kp, kp)-scheme instead of B0. Then L1=E11E1tL1=E11E1t.

Lemma 10 [10] The L0 and L1 are a pair of basis matrices of a perfect black VC scheme for Γ0 such that the expansion rate is m=2|Q11|++2|Qt1|m=2|Q11|++2|Qt1| and GRAY(white) = 1 − 1/m.

We now construct an n×2kp1n×2kp1 matrix Fp, which has the property that the elements in pi row of Fp are all 0’s and the other rows of F are all 1’s, here 1 ≤ pt. Then an auxiliary basis matrix A0 = F1|⋯|Fi.

Hu and Tzeng [10] algorithm for minimal access structure

Input:

  1. Γ0 on a set ρ of n participants.

  2. Let C0pC0p and C1pC1p be the collection of basis Boolean matrices E0pE0p and E1pE1p, where 1 ≤ p ≤ |Γ0|.

  3. Let CApCAp be the collection of matrix Fp.

Output:

The reconstructed secret image U.

Distribution phase:

The dealer encodes each transparency ti as |Γ0| subtransparecies ti,p and each subblock consists of one secret image. For 1 ≤ p ≤ |Γ0|, each white (resp. black) pixel on subblock ti,p is encoded using n×2kp1n×2kp1 matrices E0pE0p (resp. E1pE1p). To share a white (resp. black) pixel, the dealer performs the following steps:

Step 1: Randomly choose a matrix S0pS0p in C0pC0p (resp. S1pS1p in C1pC1p), and a matrix A0p=[ai,j]A0p=[ai,j] in CApCAp.

Step 2: For each participant i, put a white (resp. black) pixel on the subblock ti,p if si,j = 0 (resp. si,j = 1).

Step 3: For each participant i, put a white (resp. black) pixel on the subblock Ai,p if ai,j·= 0 (resp. ai,j·= 1).

Reconstruction phase:

Let Qp={i1,,ikp}Qp={i1,,ikp} be the minimal qualified set in Γ0, participants in Qp reconstruct the secret image by:

Step 1: XORing all the shares tj and stacking all the shares Aj for j = 1, ⋯, kp and obtain T and T=t1tkp,A=A1+A2++AkpT=t1tkp,A=A1+A2++Akp respectively.

Step 2: Computing U = (T + A) ⊕ A.

Lemma 11 [10] The (k, k)-VC scheme [16] is an ideal contrast (k, k)-VC scheme with reversing.

Proof k participants perform XOR operations on the k transparencies by computing t1t2 ⊕ ⋯·⊕ tk. It is easy to see that the white pixels are all white since S0 has an even number of 1’s; whereas the black pixels are all black since S1 has an odd number of 1’s. ■

Theorem 10 [10] Let Γ = (P, Q, F) be an access structure on a set ρ of n participants. Then the basis matrices B0, B1, and A0 constitute a compatible ideal contrast VC scheme with reversing in two runs.

Proof It is obvious that the VC scheme is security. The basis matrix Ao also reveals absolutely no information about the secret image since no secret is encoded into the shares Aj for j = 1, ⋯, kp.

Let L0=E01E0t,L1=E11E1tL0=E01E0t,L1=E11E1t and A0 = F1‖ ⋯ ‖Ft be the basis matrices for a VC scheme with reversing, constructed using the previously described technique. Without loss of generality, let Γ0 = {Q0, ·⋯, Qt} and X = Q1, X be a subset of qualified participants. Since the secret image is reconstructed by computing (T + A) ⊕ A, we will prove that the general access structure has an ideal contrast, i.e., H((E01+F1)F1)=0,H((E11+F1)F1)=2|Q1|1H((E01+F1)F1)=0,H((E11+F1)F1)=2|Q1|1 and H((Ebi+Fi)Fi)H((Ebi+Fi)Fi) for i = 2, ⋯, |Γ| and b = 0, 1. It results that H((E01+F1)F1)=H((E01+0)0)=H(E010)=H(E01)=0H((E01+F1)F1)=H((E01+0)0)=H(E010)=H(E01)=0 by Lemma 11, and H((E11+F1)F1)=H((E11+0)0)=H(E110)=H(E11)=2|Q1|1H((E11+F1)F1)=H((E11+0)0)=H(E110)=H(E11)=2|Q1|1 by Lemma 11, whereas, H((Ebi+Fi)Fi)=H((Ebi+1)1)=w(11)=0H((Ebi+Fi)Fi)=H((Ebi+1)1)=w(11)=0 for i = 2, ⋯, |Γ0| and b = 0, 1. ■

We give the following example to illustrate the construction method above.

Example 5 Let p = {1, 2, 3, 4} and Γ0 = {{1, 2}, {1, 3}, {2, 3}}. Then the basis matrices L0, L1, and A are constructed as follows according to the method above. B0 and B1 are basis matrices of a (2, 2) – VC scheme.

B0=[1010],B1=[1001].E01=[101010],E02=[111010],E03=[101110],E11=[100111],E12=[111001],E13=[101101].L0=[101110101011111010],L1=[101110011011110101].F1=[000011],F2=[110000],F3=[001100],A0=[001100000011110000].

B0=[1010],B1=[1001].E01=101010,E02=111010,E03=101110,E11=100111,E12=111001,E13=101101.L0=101110101011111010,L1=101110011011110101.F1=000011,F2=110000,F3=001100,A0=001100000011110000.

The distribution phase is shown in Table 6.4 and the reconstruction phase is shown in Tables 6.5, 6.6, and 6.7.

Distribution phase

Table 6.4 Distribution phase of the visual cryptography with minimal access structure Γ0 = 1, 2, 1, 3, 2, 3 using Hu and Tzeng [10] algorithm.

Images

Reconstruction phase

Table 6.5 Reconstruction of participant 1 and 2 using Hu and Tzeng [10] algorithm.

Pixel First run Second run U = (T + A) ⊕ A
T = t1t2 A = A1 + A2
Black (110101) (001111) (110000)
White (000101) (001111) (000000)

Table 6.6 Reconstruction of participant 1 and 3 using Hu and Tzeng [10] algorithm.

Pixel First run Second run U = (T + A) ⊕ A
T = t1t3 A = A1 + A3
Black (011011) (111100) (000011)
White (010100) (111100) (000000)

Table 6.7 Reconstruction of participant 2 and 3 using Hu and Tzeng [10] algorithm.

Pixel First run Second run U = (T + A) ⊕ A
T = t2t3 A = A2 + A3
Black (101110) (110011) (001100)
White (010001) (110011) (000000)

6.5 Secret Sharing Scheme Using Boolean Operation

This section gives an introduction to some methods using an XOR Boolean operation directly without using basis matrices to construct secret sharing schemes. The algorithms of three schemes: the probabilistic (2, n) secret sharing scheme, (n, n) secret sharing scheme, and (k, n) secret sharing scheme will be described.

Consider a secret image A with size NR × NC. Each pixel of A can take any one of c different colors or gray levels. Image A is represented by an integer matrix A.A=[aij]NR×NCA.A=[aij]NR×NC, where i = 1, 2, ⋯ , NR, j = 1, 2, ⋯ , NC, and aij ∈ {0,1, ⋯ , c − 1}. We have c = 2 for a binary image and c = 256 for grayscale image with one byte per pixel. In a color image with one byte per pixel, the pixel value can be an index to a color table, thus, c = 256. In a color image using an RGB model, each pixel has three integers: R(red), G(green), and B(blue). If each R, G, or B takes a value between 0 and 255, we have c = 2563. This integer matrix is also called A and will be treated as equivalent to the secret image A itself. The symbol ”&” denotes an AND operation in the following construction.

6.5.1 (2, n) Scheme

To solve the pixel expansion problem with VSS schemes, Ito et al. [11], Yang [24] and Cimato et al. [6] proposed probabilistic VSS models. The frequency of white pixels in a white (or black) area is used to display the contrast of the recovered image. In reconstructing the secret image, the ”OR”-ed operation of pixels of the shadows is the same as the stacking operation of subpixels in the nonprobabilistic VSS schemes. They defined p0 (resp. p1) as the appearance probability of a white pixel in a white (resp. black) area of the recovered image. For a fixed threshold probability 0 ≤ pTH ≤ 1 and relative contrast α ≥ 0, if p0pTH and p1pTHα, the frequency of white pixels in a white area of the recovered image should be higher than that in a black area.

Wang et al. [23] proposed a probabilistic (2, n) secret sharing scheme for binary images. Boolean XOR and AND operations are employed, and n + 1 distinct random matrices are generated as intermediate results. The scheme is described in a pseudo-code style below in terms of its input, output, the construction procedure, and the revealing procedure.

Wang et al.’s [23] algorithm for (2,n) scheme

Input: an integer n with n ≥ 2, and the secret image A.

Output: n distinct matrices A1 ⋯ , An, called shadow images.

Construction:

Step 1: Generate n +1 random matrices B1, ⋯ , Bn+1.

Step 2: Compute n intermediate matrices C1, ⋯ , Cn with Ci = Bi&A for i = 1 , ⋯ , n.

Step 3: Compute n shadow images A1, ⋯ , An with Ai = Bn+1Ci for i = 1, ⋯ , n.

Revealing: A′ = AiAj where i, j ∈ {1, 2, ⋯ , n} and ij.

For integer scalar inputs between 0 and c−1, each operand is represented in binary and the operation is carried out bit-by-bit. For example, when a = 125 and b = 18, the XOR between these two integers is

ab=(125)10(18)10=(01111101)2(00010010)2=(01101111)2=(111)10

ab=(125)10(18)10=(01111101)2(00010010)2=(01101111)2=(111)10

For matrix inputs, the XOR operation of two NR × NC matrices is defined pixel-wise. That is,

AB=[aijbij],wherei=1,2,,NR,j=1,2,,Nc.

AB=[aijbij],wherei=1,2,,NR,j=1,2,,Nc.

The AND operation for integer scalar operands and matrix operands can be defined similarly.

In all computations, every pixel is handled individually, separated from other pixels. Therefore, to make the context clear, we denote pixel Ai(s,t) simply as Ai. With the above construction procedure, for a ”0” pixel in A and any i, we have Ci = Bi&0 = 0 and Ai = Bn+1Ci = Bn+1, thus

A=AiAj=Bn+1Bn+1=0.

A=AiAj=Bn+1Bn+1=0.

For a ”1” pixel in A, Ci = Bi&1 = Bi and Ai = Bn+1Bi, thus

A=AiAj=Bn+1Bn+1BiBj=BiBj

A=AiAj=Bn+1Bn+1BiBj=BiBj

which could be 0 or 1. In other words, between the original image A and a reconstructed image A′, the ”0” bits are kept the same and the ”1” bits may or may not changed. With any single shadow image, no information of A is revealed because of the random nature of the matrices B′s. It is easy to verify that the n matrices A1, A2, ⋯ , An are n distinct random matrices from construction method above, each Ai (i = 1, ⋯ , n) does not contain any information of the original matrix A.

Associated Shamir’s secret sharing scheme and a gradual search algorithm for a single bitmap block truncation coding with the above (2, n) scheme, the secret sharing scheme for color images was proposed in Reference [3]. Combined the above (2, n) scheme with voting strategy, the probabilistic visual secret sharing scheme for grayscale images was provided in Reference [4]. Based on the above proposed (2, n) scheme, the matrices B1, B2, ⋯ , Bn are chosen according to Yang’s into ”probabilistic VC scheme and the (2, n) probabilistic scheme with improved contrast was given in Reference [19].

6.5.2 (n, n) Scheme

The construction steps are given in the context of grayscale images. It is trivially applicable to binary images and can be easily extended to color images.

Wang et al.’s [23] algorithm for (n,n) scheme

Input: an integer n with n ≥ 2, and the secret image A.

Output: n distinct matrices A1, ⋯ , An, called shadow images.

Construction:

Step 1: Generate n − 1 random matrices B1, ⋯ , Bn−1.

Step 2: Compute the shadow images as below:

A1 = B1, A2 = B1B2,⋯⋯, An−1 = Bn−2Bn−1, An = Bn−1A.

Revealing: A′ = A1A2 ⊕ ⋯ ⊕ An.

Theorem 11 [23] A1A2 ⊕⋯⊕ An = A.

Proof Because the ”⊕” operation is associative and BiBi is a zero matrix for any i, we have

A=B1(B1B2)(Bn2Bn1)(Bn1A)=(B1B1)(Bn1Bn1)A=A.

A=B1(B1B2)(Bn2Bn1)(Bn1A)=(B1B1)(Bn1Bn1)A=A.

Theorem 12 [23] Ai1Ai2 ⊕⋯⊕AikA for any set of integers {i1,⋯,ik} when k < n.

Proof We consider two cases. Case 1 is for n ∈ {i1,⋯ ik} and Case 2 is for n ∉ {iı,⋯, ik}.

Case 1: n ∈ {i1,⋯,ik}. In this case, An(tj=sAj)=ABn1(tj=sAj)An(tj=sAj)=ABn1(tj=sAj) where tj=stj=s means As ⊕ ⋯⊕ At with s,⋯,t being the indices in 1,⋯, ik} besides n. Since there are an odd number of n − 2 term random matrices involved, at least one of them cannot be absorbed into a zero matrix, thus Ai1Ai2AikAi1Ai2Aik must be random, thus not equal to A.

Case 2: n ∉ {i1,⋯, ik}. Since no matrix A involved in Ai1Ai2AikAi1Ai2Aik to begin with, Ai1Ai2AikAi1Ai2Aik is constructed from the n − 1 term random matrices only and it must be random.

Next, we analyze the steps of Wang et al.’s [23] (n,n) algorithm in the context of the grayscale image below. It is trivially applicable to a binary image and can be easily extended to a color image. Now we give an example to demonstrate the computation steps in the construction/revealing process using the above algorithm.

Example 6 Let n = 3 and the secret image A be a single pixel.

Input: A = (240)10 = (1111 0000)2

Construction:

Step 1:

Bı = (125)10 = (0111 1101)2,

B2 = (10)10 = (0001 0010)2

Step 2:

Aı = Bı = (125)10 = (0111 1101)2,

A2 = B1B2 = (0110 1111)2,

A3 = B2A = (1110 0010)2

Revealing: A′ = A1A2A3 = (1111 0000)2 = (240)10.

From the above algorithm, it is known that the proposed (n, n) scheme reconstructs the secret image exactly and when fewer than n shadows are used, the original secret image A will not be revealed. Moreover, only simple Boolean XOR operations are used and the size of each shadow image is the same as the original image, thus no pixel expansion. The above (n, n) secret sharing scheme was applied to deal with gray scale and color secret images respectively in Reference [22].

6.5.3 (k, n) Scheme

Based on above Wang et al.’s [23] (n, n) secret sharing scheme [23], Chao and Lin [5] have attempted to construct a (k, n) secret sharing scheme. To design a threshold (k, n) scheme, one may first directly utilize Wang et al.’s [23] (m, m) scheme for some carefully chosen parameter m=(nk1)m=(nk1). The (k, n, m) shadows-assignment matrix has n rows and m columns. Its n rows represent n persons; and its m columns represent the m (distinct) temporary shadows produced by the above (m, m) scheme. The element of H is either 0 or 1. The i-th person (row) has a copy of the j-th shadow image (column) if and only if Hij. Each column of H have exactly k − 1 zeros and nk + 1 ones.

Now we will introduce Chao et al.’s (k, n)-VC scheme based on the (k, n, m) shadows assignment matrix H.

Chao and Lin [5] algorithm for (k,n) scheme

Input: the secret image A

Output: the final shadow Si

Construction:

Step 1: Generate a random image B1 with the same size as A.

Step 2: Generate another image B2 using B2 = B1A.

Step 3: Construct a n × m shadows-assignment matrix H, each column of H have exactly k − 1 zeros and nk + 1 ones, so m=(nk1)m=(nk1).

Step 4: Partition B1 and B2 into m nonoverlapping blocks C11, C21, ⋯ ,Cm1 and C12, C22, ⋯, Cm2.

Step 5: Let C* = C11C21 ⊕ ⋯ ⊕ Cm1. Compute Ci3 = Ci2C*.

Step 6: Construct m temporary shadows C1, C2, ⋯ , Cm, where the upper half of each Ci is the block Ci1 and the lower half of each Ci is the block Ci3.

Step 7: Assign the duplicated copies of the m temporary shadows C1, C2, ⋯ , Cm to the n persons according to the shadows-assignment matrix H. For each participant i, the final shadow Si is exactly the union of those copies assigned to him.

Revealing:

Step 1: k participants using their shares Si1,,SikSi1,,Sik to reconstruct the secret image. Referring to H, all m temporary shadows C1, C2, ⋯ , Cm can be extracted from these k final shadows.

Step 2: The upper half of each Ci is the block Ci1 and the lower half of each Ci is the block Ci3. So we get all C11, C21,⋯, Cm1 and C13, C23, ⋯, Cm3.

Step 3: Compute C* = C11C21 ⊕⋯⊕ Cm1, then Ci2 = Ci3C*.

Step 4: Recombination C11, C21,⋯, Cm1 and C12, C22, ⋯ , Cm2 into B1 and B2.

Step 5: Reveal the secret image A′ by A′ = B1B2.

Let the size of secret image A be NR × NC. Since the size of every temporary shadow Ci(1 ≤ im) is 2 × (NR × NC)/m, the size of every final shadow Si(1in)is[2×(NR×NC)m]×(n1k1)=2(NR×NC)(nk+1)nSi(1in)is[2×(NR×NC)m]×(n1k1)=2(NR×NC)(nk+1)n. Notice that each final shadow Si(1 ≤ in) contains (n1k1)(n1k1) temporary shadows. After we divide by the size of secret image A, we obtain the pixel expansion rate per=2×nk+1n<2per=2×nk+1n<2. Each shadow will be at most two times larger than secret image A.

Next, we will give an example to analyze the steps of Chao and Lin [5] (k, n) algorithm scheme.

Example 7 Let k = 3, n = 4, and a grayscale secret image A=[23545239188103234]A=[23518845103239234].

Input: the secret image A=[23545239188103234]A=[23518845103239234]

Output: the final shadows S1, S2, S3, S4

Construction:

Step 1: Generate random image B1=[10514208228902]B1=[10522814902082]

Step 2: Generate B2=B1A=[10514208228902][23545239188103234]=[13035638861232]B2=B1A=[10522814902082][23518845103239234]=[13088356163232]

Step 3: m=(nk1)=(42)m=(nk1)=(42). Construct a 4 × 6 shadows-assignment matrix H, each column of H have exactly 2 zeros and 2 ones, so

H=(000111011001101010110100)

H=001101010110100110101100

Step 4: Partition B1 into 6 nonoverlapping blocks C11 = 105, C21 = 14, C31 = 208, C41 = 228, C51 = 90, C61 = 2, Partition into 6 nonoverlapping blocks C12 = 130, C22 = 35, C32 = 63, C42 = 88, C52 = 61, C62 = 232.

Step 5: C* = C11C21 ⊕ ⋯ ⊕ C61 = 105 ⊕ 14 ⊕ 208 ⊕ 228 ⊕ 90 ⊕ 2 = 11. Compute C13 = C12C* = 130 ⊕ 11 = 137, similarly C23 = 40, C33 = 52, C43 = 83, C53 = 54, C63 = 227.

Step 6: Construct 6 temporary shadows C1=[105137],C2=[1440],C3=[208137],C4=[22883],C5=[9054],C6=[2227]C1=[105137],C2=[1440],C3=[208137],C4=[22883],C5=[9054],C6=[2227] where the upper half of each Ci is the block Ci1 and the lower half is the block Cį3.

Step 7: According to the shadows-assignment matrix H, assign C4, C5, C6S1, C2, C3, C6S2, C1, C3, C5S3, C1, C2, C4S4.

Revealing:

Step 1: Suppose 3 participants using their shares S1, S2, S3 to reconstruct the secret image. Referring to H, all 6 temporary shadows C1=[105137],C2=[1440],C3=[208137],C4=[22883],C5=[9054],C6=[2227]C1=[105137],C2=[1440],C3=[208137],C4=[22883],C5=[9054],C6=[2227], can be extracted from S1, S2, S3.

Step 2: The upper half of each Ci is the block Ci1 and the lower half of each Ci is the block Ci3. So we get all C11 = 105, C21 = 14, C21 = 14, C31 = 208, C41 = 228, C51 = 90, C61 = 2 and C13 = 137, C23 = 40, C33 = 52, C43 = 83, C53 = 54, C63 = 227.

Step 3: Compute C* = C11C21 ⊕⋯⊕C61 = 105⊕14⊕208⊕228⊕90⊕2 = 11, then C12 = C13C* = 137 ⊕ 11 = 130. Similarly, C22 = 35, C32 = 63, C42 = 88, C52 = 61, C62 = 232.

Step 4: B1=[C11C21C31C41C51C61]=[10514208228902]andB2=[C12C22C32C42C52C62]=[13035638861232].B1=[C11C41C21C51C31C61]=[10522814902082]andB2=[C12C42C22C52C32C62]=[13088356163232].

Step 5: Reveal the secret image

A=B1B2=[10514208228902][13035638861232]=[23545239188103234].

A=B1B2=[10522814902082][13088356163232]=[23518845103239234].

6.6 Conclusion

XOR-based visual cryptography schemes use XOR operation to decrypt the secret These schemes have higher contrast compared with OR-based visual cryptography. This chapter introduced three types of different XOR-based visual cryptography schemes. The three type schemes have their virtues respectively. We also notice there is XOR-based audio cryptography, which uses music to embed message and relies on the human auditory system to decrypt secret messages. It is a very interesting topic, however we do not cover audio cryptography schemes because the topic in this chapter is limited to image, and readers can see more details in Reference [8].

Acknowledgments

The research work related to this chapter was supported by the National Natural Science Foundation of China under Grant No. 60873249, 863 Project of China under Grant 2008AA01Z419.

Bibliography

[1] G. Ateniese, C. Blundo, and A. D. Santis. Visual cryptography for general access structures. In Information and Computation, volume 129, pages 86–106, 1996.

[2] E. Biham and A. Itzkovitz. Visual cryptography with polarization. In The Dagstuhl Seminar on Cryptography, September 1997, and in the RUMP session of CRYPTO’98, 1997.

[3] C. C. Chang, C. C. Lin, T. H. N. Le, and H. B. Le. A new probabilistic visual secret sharing scheme for color images. In 4th International Conference on Intelligent Information Hiding and Multimedia Signal Processing, pages 1305–1308, 2008.

[4] C. C. Chang, C. C. Lin, T. H. N. Le, and H. B. Le. A probabilistic visual secret sharing scheme for grayscale images with voting strategy. In Proceedings of the International Symposium on Electronic Commerce and Security, pages 184–188, 2008.

[5] K. Y. Chao and J. C. Lin. Secret image sharing: A Boolean-operations-based approach combining benefits of polynomial-based and fast approaches. International Journal of Pattern Recognition and Artificial Intelligence, 23((2):263–285, 2009.

[6] S. Cimato, R. De Prisco, and A. De Santis. Probabilistic visual cryptography schemes. Computer Journal, 49((1):97–107, 2006.

[7] S. Cimato, A. De Santis, A. L. Ferrara, and B. Masucci. Ideal contrast visual cryptography schemes with reversing. Information Processing Letters, 93((4):199–206, 2005.

[8] Y. Desmedt, S. Hou, and J. J. Quisquater. Audio and optical cryptography. In ASIACRYPT ’98, Lecture Notes in Computer Science, volume 1514, pages 392–404, 1998.

[9] S. Droste. New results on visual cryptography. In Advances in Cryptology-CRYPTO ’96, Lecture Notes in Computer Science, volume 1109, pages 401–415, 1996.

[10] C. M. Hu and W. G. Tzeng. Compatible ideal contrast visual cryptography schemes with reversing. Information Security, 3650:300–313, 2005.

[11] R. Ito, H. Kuwakado, and H. Tanaka. Image size invariant visual cryptography. IEICE Trans. Fundamentals, E82-A(10):2172–2177, 1999.

[12] S. S. Lee, J. C. Na, S. W. Sohn, C. Park, D. H. Seo, and S. J. Kim. Visual cryptography based on an interferometric encryption technique. ETRI Journal, 24((5):373–380, 2002.

[13] F. Liu, C. K. Wu, and X. J. Lin. Colour visual cryptography schemes. IET Information Security, 2((4):151–165, 2008.

[14] F. Liu, C. K. Wu, and X. J. Lin. Some extensions on threshold visual cryptography schemes. Computer Journal, 53:107–119, 2010.

[15] F. Liu, C. K. Wu, and X. J. Lin. Step construction of visual cryptography schemes. In IEEE Transactions on Information Forensics and Security, volume 5, pages 27–28, 2010.

[16] M. Naor and A. Shamir. Visual cryptography. In Visual Cryptography, Proceedings of Eurocrypto ’94, Lecture Note in Computer Science, volume 950, pages 1–12, 1995.

[17] P. Tuyls, H. D. L. Hollmann, J. H. V. Lint, and L. Tolhuizen. Xor-based visual cryptography schemes. Designs Codes and Cryptography, 37:169–186, 2005.

[18] P. Tuyls, H.D.L. Hollmann, H.H.V. Lint, and L. Tolhuizen. A polarisation based visual crypto system and its secret sharing schemes. http://eprint.iacr.org, 2002.

[19] M. Ulutas, V. V. Nabiyev, and G. Ulutas. A PVSS scheme based on Boolean operations with improved contrast. In 2009 International Conference on Network and Service Security, pages 1–5, 2009.

[20] E. R. Verheul and H. C. A. van Tilborg. Constructions and properties of k-out-of-n visual secret sharing schemes. Designs, Codes and Cryptography, 11:179–196, 1997.

[21] D. Q. Viet and K. Kurosawa. Almost ideal contrast visual cryptography with reversing. In Proceeding of Topics in Cryptology-CT-RSA2004, Lecture Notes in Computer Science, volume 2964, pages 353–365, 2004.

[22] D. S. Wang, X. Li, and F. Yi. Probabilistic (n,n) visual sharing scheme for grayscale images. In SKLOIS Conference on Information Security and Cryptology, Inscrypt 2007, Lecture Notes in Computer Science, volume 4990, pages 192–200, 2008.

[23] D. S. Wang, L. Zhang, N. Ma, and X. Li. Two secret sharing schemes based on Boolean operations. Pattern Recognition, 40:2776–2785, 2007.

[24] C. N. Yang. New visual secret sharing schemes using probabilistic method. Pattern Recognition Letters, 25:481–494, 2004.

[25] C. N. Yang, C. C. Wang, and T. S. Chen. Real perfect contrast visual secret schemes with reversing. In Lecture Notes in Computer Science, volume 3989, pages 433–447, 2006.

[26] C. N. Yang, C. C. Wang, and T. S. Chen. Visual cryptography schemes with reversing. Computer Journal, 51((6):710–722, 2008.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.39.55