1 Introduction

With the rapid development and wide application of digital camera, scanner, mobile phone and other digital products, images are easily obtained and transmitted. At the same time, more and more attentions are paid to the secure protection of the image. To protect the secret image from the malicious behaviors, some technologies have been developed, such as image secret sharing [29, 31] and steganography [1, 9, 23]. Image secret sharing (ISS) is about encoding the secret image while steganography is about concealing the very existence of the encoded image. Obviously, the conjunctive use of steganography and ISS is more secure [18, 39]. In this paper, we focus on ISS.

In a conventional (k, n)-ISS scheme, a secret image is encoded into n different shadows distributed to n participants such that any group of k participants can compute the secret image using their shadows, while that of less than k ones cannot. The secret image is thus tolerant to a loss of nk shadow images. However, the complicated computations, i.e., Lagrange interpolations, are required in both encoding and decoding. In some circumstances where the cost of computations may not be affordable or the decoding time should be instantly done in a constant time, these computation-based ISS schemes become no longer appropriate.

Two visual models of ISS have been studied: visual cryptography scheme(VCS), introduced by Naor and Shamir [22], and visual cryptograms of random grids (VCRG), introduced by Kafri and Keren [16]. Such a (k, n) scheme is capabl1e of encoding a secret image into n shadows. Any group of k or more shadows can visually recover the secret image by printing the shadows on transparencies and stacking (Boolean OR operation) them together. Whereas, any group of k − 1 or less shadows give no clue about the secret image. The feature is that the decoding is done via human visual system instead of complicated computations. With such an attractive feature, the above two models can be applied to protect online transactions against manipulation like online money transfers by Trojans [21], realize visual voting while ensuring voter’s anonymity without counting process [9], design secure display screen with controllable visual area against malicious peep while avoiding the attacks of virus and electromagnetic leakage [19], and other application scenarios including financial documents [12] and bar codes [36]. In addition, some new technologies, such as google glass and flexible screen, also provide new opportunities for the application of the above two models.

VCS uses whiteness to distinguish black color from white color. Specifically, each pixel of the black-and-white secret image is encoded into m subpixels, referred to as pixel expansion, for each of the n shadows by designing two collections of n × m Boolean matrices C 0 and C 1. To share a white pixel, the dealer randomly chooses one of the matrices in C 0, and to share a black pixel, the dealer randomly chooses one of the matrices in C 1. The chosen matrix defines the color of the m subpixels in each of the shadows. If any k or more shadows are stacked together, our eyes can perceive the secret information due to the whiteness difference, referred to as contrast, between black pixels and white pixels in the stacked result, while if fewer than k shadows are superimposed it is impossible to perceive the secret information. Inspired by Naor and Shamir’s work, many research papers have explored various aspects: general access structure (GAS) [2, 3], pixel expansion [8, 25], contrast [4, 6], multiple secrets [24, 40], cheating prevention [14, 20], meaningful shadows [30, 35], color image [5, 13], aspect ratio invariant [17, 38] and other applications [15, 33, 34]. However, a main drawback of VCS is the large pixel expansion, which will increase storage and transmission bandwidth.

VCRG uses average light transmission to distinguish black areas from white areas. A secret image is encoded into some size invariant random grids, each of which is a transparency comprising a two-dimensional array of pixels that are chosen between white and black with a probability. After VCRG was first introduced, many researchers focused their attentions on it. Shyu gave a formal definition to VCRG to make VCRG applicable [26], and devised algorithms for (k, n)-VCRG [27] and VCRG for GAS [24], respectively. Similar works by other research groups could also be found in [10, 32]. The most essential advantage of VCRG lies in that extra pixel expansion is not needed.

At the same time, the relationship between VCS and VCRG was discussed [7, 37]. Especially, De Prisco and De Santis [7] showed that there is a close relation between deterministic VCS and VCRG, and indicated that it allows to use results known for the deterministic VCS in the VCRG and vice versa. In other words, the future works that deal with VCRG and VCS should not ignore each other in comparison of contrast.

Recently, Adhikari [2] introduced a linear algebraic technique to construct VCS. In addition, a simple and effective way to construct VCRG, as described in [7], is randomly choosing a column from the corresponding encoding matrix of VCS. Hence, exploring the algebraic aspects of VCS is worthy of study. For a future study, as posed in [2], taking more than two equations simultaneously to construct the encoding matrix should be considered.

In this paper, we pay attention to the construction of VCRG and improve VCRG by exploiting the algebraic aspects of VCS. First, we consider the problem of characterizing the set of access structures on n participants and put forward a characterization where we can take more equations simultaneously. Second, based on the above knowledge, we propose a new construction of VCRG for general access structures, where a competitive visual performance is achieved. Finally, we provide some experimental results and comparisons to demonstrate the effectiveness and advantage of our construction.

The rest of the paper is organized as follows. In Section 2, we give some preliminaries including the models of VCS and VCRG. In Section 3, some related works, as well as our motivation, are presented. In Section 4, we provide a characterization of the set of access structures on a set of participants where we are able to take more equations simultaneously. In Section 5, we give a new construction of VCRG for GAS based on the above characterization. Some experimental results and comparisons are presented in Section 6. Lastly we conclude the paper in Section 7.

2 The model

2.1 GAS

Let P = {1,2,…, n} be a set of n participants and 2P denoting the set of all subsets of P. Let \({\Gamma }_{Qual}\subseteq 2^{P}\) and \({\Gamma }_{Forb}\subseteq 2^{P}\), where \({\Gamma }_{Qual}\cap {\Gamma }_{Forb}=\emptyset \). Members of Γ Qual are referred to as qualified sets and members of Γ Forb are referred to as forbidden sets. The pair (Γ Qual Forb ) is called an access structure on P. A participant pP is an essential participant if there exists a set \(X\subseteq P\) such that \(X\cup \{p\}\in {\Gamma }_{Qual}\) but X∉Γ Qual . In fact, a non-essential participant does not need to participate “actively” in the reconstruction of the secret image, since the information he has is not needed by any set in P in order to recover the shared image. Therefore, unless otherwise specified, we assume that all participants are essential throughout the paper.

Definition 1

[3] An access structure (Γ Qual Forb ) on P = {1,2,…, n} is said to be strong if the following conditions are satisfied:

  1. 1.

    Γ Qual is monotone increasing. Formally, for each Q ∈Γ Qual and \(Q\subseteq Q^{\prime }\subseteq P\), we have \(Q^{\prime }\in {\Gamma }_{Qual}\).

  2. 2.

    Γ Forb is monotone decreasing. Formally, for each F ∈Γ Forb and \(F^{\prime }\subseteq F\subseteq P\), we have \(F^{\prime }\in {\Gamma }_{Forb}\).

  3. 3.

    \({\Gamma }_{Qual}\cup {\Gamma }_{Forb}=2^{P}\).

For a strong access structure (Γ Qual Forb ), define Γ0 to consist of all the minimal qualified sets:

$$ {\Gamma}_{0}=\{Q\in\ {\Gamma}_{Qual}:Q^{\prime}\notin {\Gamma}_{Qual}~for~all~Q^{\prime}\subset Q\} $$
(1)

and Z M to consist of all the maximal forbidden sets:

$$ Z_{M}=\{F\in{\Gamma}_{Forb}:F\cup\{i\}\in{\Gamma}_{Qual}~for~all~i\in P\setminus F\}. $$
(2)

Because Γ Forb = 2P −Γ Qual , Γ0 is termed a basis, which completely determines its corresponding strong access structure by

$$ {\Gamma}_{Qual}=\{Q^{\prime}\subseteq P: Q\subseteq Q^{\prime}~for~some~Q \in {\Gamma}_{0}\}. $$
(3)

As a special access structure, a (k, n) threshold structure is a strong access structure (Γ Qual Forb ) with the following constraints: \({\Gamma }_{0}=\{Q\subseteq P: |Q|=k\}\) and \({\Gamma }_{Forb}=\{Q\subseteq P: |Q|\leq k-1\}\).

In this paper, unless otherwise specified, all the considered access structures are supposed to be strong.

2.2 VCS and VCRG

Let D be an n × m Boolean matrix and \(X\subseteq P\). Then D[X] denotes the |Xm submatrix obtained from D by considering its restriction to rows corresponding to the elements in X. D X denotes the Boolean “OR” operation to the rows of D[X]. ω(D X ) denotes the whiteness of the row vector D X , which is the number of 0’s in the vector D X .

Definition 2

[3] Let (Γ Qual Forb ) be an access structure on a set of n participants. Two n × m basis matrices S 0 and S 1, which generate the two collections of n × m Boolean matrices C 0 and C 1 by permuting the columns of the corresponding basis matrix (S 0 for C 0, and S 1 for C 1) in all possible ways, constitute a (Γ Qual Forb , m)-VCS if the following conditions are satisfied:

  1. 1.

    If X = {i 1, i 2,…, i p }∈Γ Qual , \(\omega ({S^{0}_{X}})>\omega ({S^{1}_{X}})\).

  2. 2.

    If X = {i 1, i 2,…, i p }∈Γ Forb , \(\omega ({S^{0}_{X}})=\omega ({S^{1}_{X}})\).

For VCRG, a secret image S is encoded into n size invariant random grids R 1, R 2,…, R n . Let S(0) (resp. S(1)) denote the area of all the white (resp. black) pixels in the secret image. R X denotes the Boolean “OR”ed result of the random grids of \(X\subseteq P\). Let R X [S(0)] (resp. R X [S(0)]) denote the corresponding area of all the white (resp. black) pixels in the recovered secret image. The formal definition of VCRG is given by means of the average light transmission.

Definition 3

[26] For a certain pixel s in a secret image S whose size is M × N, the probability for s being transparent, say Prob(s = 0), is represented as the light transmission of s, say T(s). The light transmission of a white (resp. black) pixel is defined as T(s) = 1 (resp. T(s) = 0). The average light transmission of S is defined as

$$ T(S)=\frac{1}{M\times N}\times\sum\limits_{i=1}^{M}\sum\limits_{j=1}^{N}T(S(i,j)), $$
(4)

where S(i, j) denotes the secret pixel at position (i, j) of S.

Definition 4

[24] Given an access structure (Γ Qual Forb ) on a set of n participants, n random grids R 1, R 2,…, R n constitute a (Γ Qual Forb )-VCRG if the following conditions are satisfied:

  1. 1.

    If X = {i 1, i 2,…, i p }∈Γ Qual , T(R X [S(0)]) > T(R X [S(1)]).

  2. 2.

    If X = {i 1, i 2,…, i p }∈Γ Forb , T(R X [S(0)]) = T(R X [S(1)]).

In Definitions 2 and 4, the first condition is related to the contrast of the reconstructed secret image. It states that when a qualified set of participants stack their shares they can perceive the secret information. The second condition is called security, since it implies that, even by inspecting all their shares, a forbidden set of participants cannot gain any information in deciding whether the shared pixel was white or black.

2.3 Visual performance

For a qualified set of participants, the secret image can be reconstructed and the visual performance of the reconstructed secret image is mainly determined by the contrast.

For VCS, various definitions of contrast have been used. In the original model by Naor and Shamir [22], the contrast is defined as

$$ \alpha_{NS}=\frac{\omega({S^{0}_{X}})-\omega({S^{1}_{X}})}{m}, $$
(5)

while Eisen and Stinson [8] have proposed

$$ \alpha_{ES}=\frac{\omega({S^{0}_{X}})-\omega({S^{1}_{X}})}{m+\omega({S^{1}_{X}})}. $$
(6)

Both measurements favor a larger \(\omega ({S^{0}_{X}})-\omega ({S^{1}_{X}})\), yet the latter in addition prefers a smaller (darker) \(\omega ({S^{1}_{X}})\) due to the reason that a larger (brighter) \(\omega ({S^{1}_{X}})\) weakens our visual recognition between \({S^{1}_{X}}\) and \({S^{0}_{X}}\) (than a smaller (darker) one) under a same \(\omega ({S^{0}_{X}})-\omega ({S^{1}_{X}})\). Therefore, α ES , as pointed out in [6], is a better choice for measuring the contrast.

For VCRG, the contrast depends on the difference of the average light transmission between the white and the black areas of the secret image. Papers [10, 26,27,28, 32] that dealt with VCRG have used the following definition of contrast

$$ \alpha_{RG}=\frac{T(R_{X}[S(0)])-T(R_{X}[S(1)])}{1+T(R_{X}[S(1)])}. $$
(7)

Clearly, the use of the average light transmission is not restricted to reconstructions obtained with VCRG but can be used also to evaluate VCS. In fact, it should not be hard to see that

$$ T(R_{X}[S(0)])=\frac{\omega({S^{0}_{X}})}{m} $$
(8)

and

$$ T(R_{X}[S(1)])=\frac{\omega({S^{1}_{X}})}{m}. $$
(9)

Hence, we have that

$$\begin{array}{@{}rcl@{}} \alpha_{ES} &=& \frac{\omega({S^{0}_{X}})-\omega({S^{1}_{X}})}{m+\omega({S^{1}_{X}})} \\ &=& \frac{T(R_{X}[S(0)])-T(R_{X}[S(1)])}{1+T(R_{X}[S(1)])} \\ &=& \alpha_{RG}. \end{array} $$
(10)

This equivalence opens up a door between VCRG and VCS. As De Prisco and De Santis [7] pointed out, the future works that deal with VCRG and VCS should not ignore each other in comparison of contrast, which is defined by α ES and α RG respectively.

The contrast α determines how well human visual system can recognize the recovered secret image. It is lucid that for a valid scheme, α = 0 if X ∈Γ Forb and α > 0 where X ∈Γ Qual . The contrast is expected to be as large as possible.

3 Related work and our motivation

In terms of the construction of VCRG for GAS, Wu and Sun [32] proposed one, which is restated as Algorithm 1.

figure e

In Algorithm 1, it is easy to see that the steps 4–6 are the core that certifies the security and contrast requirements for p random grids to constitute a (p, p)-VCRG [27]. The left np random grids are randomly assigned. As proved in [32], any qualified set containing the chosen minimal qualified set Q can recover the secret. When a set X is randomly chosen from 2P, the chance for X being able to recover the secret (namely, \(X\supseteq Q\)) does exist (\(\frac {d}{|{\Gamma }_{0}|}\), where d denotes the number of minimal qualified sets that elements in X can form). Moreover, Wu and Sun [32] gave an accurate equation expressing the relation between the contrast and the chance (please refer to [32] for details). The equation concludes that a larger chance will lead to a better contrast of the recovered secret image. However, the chance for X being able to recover the secret is small when |Γ0| is large, and then the contrast becomes quite small.

In this paper, we try to improve the contrast by increasing the chance for X being able to recover the secret. A comprehensive idea to improve such a probability is to choose more minimal qualified sets in the step 3 and assign them in the steps 4–6. This method undoubtedly works since the value d is increased.

For the assignment to random grids of Q, Algorithm 1 actually accomplishes it by solving the following two linear equations over the binary field: \(x_{i_{1}} + {\cdots } + x_{i_{p-1}} + x_{i_{p}} = 0\) for the white secret pixel (S(i, j) = 0) and \(x_{i_{1}} + {\cdots } + x_{i_{p-1}} + x_{i_{p}} = 1\) for the black secret pixel (S(i, j) = 1). Thereinto, Algorithm 1 randomly choose one from all possible solutions of the first (resp. second) equation and assign it to the corresponding random grids of Q when the shared secret pixel is white (resp. black).

Similar to Algorithm 1, we can accomplish the assignment to random grids of more chosen minimal qualified sets by solving the following two systems of linear equations over the binary field: A x = 0 for the white secret pixel and A x = 1 for the black secret pixel, where A is a Boolean matrix of t rows determining t chosen minimal qualified sets, x is a vector denoting an assignment to random grids of the t chosen minimal qualified sets, and 0 and 1 are t × 1 vectors of 0’s and 1’s respectively. If both systems are consistent, we can randomly choose one from all possible solutions of the first (resp. second) system and assign it to the corresponding random grids of the chosen minimal qualified sets when the shared secret pixel is white (resp. black). Therefore, to explore the conditions for consistency or inconsistency of both systems is the problem to be solved.

Recently, Adhikari [2] systematically explored the consistency or inconsistency of the above systems. He utilized this linear algebraic technique to construct VCS, where all possible solutions of the first (resp. second) system form the basis matrix S 0 (resp. S 1). In other words, to construct VCRG for the chosen minimal qualified sets, we can randomly choose a column from the above basis matrices. If the number of chosen minimal qualified sets is two, then we could solve a linear system of two equations to obtain the basis matrices in accordance with Adhikari’s method [2]. However, Adhikari’s method is confined to taking a system of two equations and cannot deal with more than two chosen minimal qualified sets.

Inspired by the above analysis, we are going to propose a new construction of VCRG via the linear algebraic technique, where we are able to take a system of more than two equations simultaneously.

4 New insight into linear algebraic technique to construct VCS

In this section, we propose an improved linear algebraic technique to construct basis matrices of VCS for some specific access structures, where the access structure should meet some constraints. Given such a specific access structure on a set of n participants, we construct some suitable systems of linear equations over the binary field and the solutions of these systems of linear equations will construct the basis matrices for the given access structure. However, to understand what constraints the access structure should meet, we build our theory from the reverse direction in this section. First, we start with the following two systems of linear equations over the binary field,

$$\begin{array}{@{}rcl@{}} A\mathbf{x} &=& \mathbf{0} \end{array} $$
(11)
$$\begin{array}{@{}rcl@{}} A\mathbf{x} &=& \mathbf{1} \end{array} $$
(12)

where, A is a t × n known Boolean matrix of rank r, 0 < rt < n; x is an n × 1 vector of unknowns; 0 and 1 are t × 1 vectors of 0’s and 1’s respectively; both the systems (11) and (12) are consistent. The difference from Adhikari’s systems [2] is the coefficient matrix A, which does not have to be of full row rank.

Let S 0 (resp. S 1) be an n × 2nr Boolean matrix whose columns are all possible solutions of the system (11) (resp. (12)). Then, to prove S 0 and S 1 can form the basis matrices of a (Γ Qual Forb , m = 2nr)-VCS, the following lemma is first given immediately since the proof of Lemma 5 in Adhikari [2] also works for this lemma.

Lemma 1

Let \(X=\{i_{1},i_{2},\ldots ,i_{p}\}\subseteq P=\{1,2,\ldots ,n\}\) . Build a system of equations as follows:

$$ \left( \begin{array}{c} A \\ B^{X} \end{array} \right)\boldsymbol{x}=\left( \begin{array}{c} \mathbf{1} \\ \mathbf{0} \end{array} \right) $$
(13)

where B X is a column permutation of the p × n Boolean matrix (I p |0 p×(np)) with unit vectors of the identity matrix I p , which is of order p, occupying columns indexed by i 1, i 2,…, i p in B X. Then, for anaccess structure Qual Forb ), S 0 and S 1 form the basismatrices of a Qual Forb , m = 2nr)-VCS if the following conditions are satisfied:

  1. 1.

    For X ∈Γ Qual , the system (13) is inconsistent.

  2. 2.

    For X ∈Γ Forb , the system (13) is consistent.

Next we are going to explore the conditions for consistency or inconsistency of the system (13). Let rows of A 1 (resp. A 2) represent all possible sum of odd (resp. even) number of rows in A. For a 1 × n Boolean row vector v = {v 1, v 2,…, v n }, let R v = {j|v j = 1, j = 1,2,…, n}. Given two Boolean row vectors v 1 and v 2, define \(\Re _{\mathbf {v}_{1}}\oplus \Re _{\mathbf {v}_{2}}=\Re _{\mathbf {v}_{1}\oplus \mathbf {v}_{2}}\). Denote \({\Gamma }_{0}^{odd}\) as the “ ⊕”ed result of any odd number of elements of Γ0 and \({\Gamma }_{0}^{even}\) as the “ ⊕”ed result of any even number of elements of Γ0. Then we have the following lemma.

Lemma 2

For an access structure Qual Forb ), S 0 and S 1 form the basismatrices of a \(({\Gamma }_{Qual},{\Gamma }_{Forb},m=2^{n-r})\) -VCSif the following conditions are satisfied:

  1. 1.

    For X ∈Γ Qual , any row vector of A 1 belongs to the row space of B X .

  2. 2.

    For X ∈Γ Forb , A and B X are independent, or, any row vector of A 2 belongs to the row space of B X .

Proof

In light of the system (13), there are two possibilities: the coefficient matrix A and B X are either linearly independent or linearly dependent.

If they are independent, since the system (12) is consistent and B X x = 0 is consistent (B X is of full row rank), the system (13) is consistent.

If they are linearly dependent, then there exists a vector u = (u 1, u 2)≠0, where u 1 and u 2 are 1 × t and 1 × p vectors respectively, such that \(\mathbf {u}\left (\begin {array}{c} A \\ B^{X} \end {array} \right ) = \mathbf {0}\Leftrightarrow \mathbf {u}_{1}A+\mathbf {u}_{2}B^{X}=\mathbf {0}\) over the binary field. Note that u 1 is nonzero, otherwise this will imply linear dependence of the rows of B X. Now \(\mathbf {u}_{1}A+\mathbf {u}_{2}B^{X}=\mathbf {0}\Leftrightarrow \mathbf {u}_{1}A\in \) the row space of B X. Also note that if u 1 has an odd (resp. even) number of 1’s then u 1 A will be a row of A 1 (resp. A 2). Then we have that any row of A 1 or A 2 belongs to the row space of B X. On the right of the system (13), \(\mathbf {u}\left (\begin {array}{c} \mathbf {1} \\ \mathbf {0} \end {array} \right )=\mathbf {u}_{1}\mathbf {1}\). If u 1 has an odd (resp. even) number of 1’s, then the system (13) is inconsistent (resp. consistent).

Based on the above discussions and Lemma 1, this lemma is proved. □

Until now, we have seen that given a suitable binary matrix A and a suitable access structure (Γ Qual Forb ), which satisfy the conditions of Lemma 2, we can construct a VCS by solving the two linear systems (11) and (12). In other words, we have concluded the sufficient conditions for constructing VCS by solving linear equations. Then, we are now in a position to give a concrete structure of the coefficient matrix A. Towards this end, we prove the following lemma.

Lemma 3

For an access structure Qual Forb )with Γ0 = {Q 1, Q 2,…, Q t }, let \(A=(\mathbf {v}_{1},\mathbf {v}_{2},\ldots ,\mathbf {v}_{t})^{T}\) of rank r and \(\Re _{\mathbf {v}_{i}}=Q_{i}\) , i = 1,2,…, t. S 0 and S 1 form the basismatrices of a \(({\Gamma }_{Qual},{\Gamma }_{Forb},m=2^{n-r})\) -VCSif the following conditions are satisfied:

  1. 1.

    For any row vof A 1 , R v ∈Γ Qual ;

  2. 2.

    For any row vof A 2 , R v = ∅or \(\Re _{\mathbf {v}}\not \subseteq Q\in {\Gamma }_{0}\) .

Proof

For X ∈Γ Qual , because R v ∈Γ Qual for any row v of A 1, v obviously belongs to the row space of B X.

For X ∈Γ Forb , there are three cases to be considered:

Case 1: For any row v of A 1, R v ∈Γ Qual ; for any row v of A 2, R v = .

In this case, any row vector of A 2 belongs to the row space of B X immediately.

Case 2: For any row v of A 1, R v ∈Γ Qual ; for any row v of A 2, \(\Re _{\mathbf {v}}\not \subset Q\in {\Gamma }_{0}\) and R v ∈Γ Forb .

In this case, any row vector of A 2 also belongs to the row space of B X immediately.

Case 3: For any row v of A 1, R v ∈Γ Qual ; for any row v of A 2, R v ∉Γ0 and R v ∈ Γ Qual .

In this case, no row vector of A 1 and A 2 belongs to the row space of B X, namely, A and B X are independent. □

It should be noted that the sum operation “ + ” over the binary field is actually the Boolean XOR operation “ ⊕”. Therefore, the sum of a number of row vectors, say v 1,⋯ , v i , of the coefficient matrix A equals to v 1 ⊕⋯ ⊕v i . Since \(Q_{i}=\Re _{\mathbf {v}_{i}}\), we have \(\Re _{\mathbf {v}_{1}\oplus \cdots \oplus \mathbf {v}_{i}}=Q_{1}\oplus \cdots \oplus Q_{i}\). So, for clarity, we restate Lemma 3 as follows, and hence omit its proof.

Theorem 1

For an access structure Qual Forb ) with Γ0 = {Q 1, Q 2,…, Q t }, if Γ0 satisfies the following two conditions:

  1. 1.

    The “”edresult of any odd number of elements of Γ0 is an element of Γ Qual .Formally, \({\Gamma }_{0}^{odd}\in {\Gamma }_{Qual}\) .

  2. 2.

    The “”edresult of any even number of elements of Γ0 is an empty set, or not a subset of any element of Γ0 .Formally, \({\Gamma }_{0}^{even}=\emptyset \) or \({\Gamma }_{0}^{even}\not \subseteq Q\in {\Gamma }_{0}\) .

Then the basis matrices S 0 and S 1 of a \(({\Gamma }_{Qual},{\Gamma }_{Forb},m=2^{n-r})\) -VCS are composed of all possible solutions of the systems (11) and (12) respectively, where \(A=(\mathbf {v}_{1},\mathbf {v}_{2},\ldots ,\mathbf {v}_{t})^{T}\) of rank r and \(\Re _{\mathbf {v}_{i}}=Q_{i}\) , i = 1,2,…, t.

Let us try to illustrate the above theory through the following example.

Example 1

Consider the following access structure (Γ Qual Forb ) on a set of 4 participants having Γ0 = {{1,2},{1,3},{1,4}}. Obviously, this access structure satisfies the conditions of Theorem 1. Then we can construct a (Γ Qual Forb , m = 2)-VCS with basis matrices S 0 and S 1, which are obtained by solving the two systems of three linear equations over the binary field as follows:

$$ \left\{ \begin{array}{l} x_{1}+x_{2}=0\\ x_{1}+x_{3}=0\\ x_{1}+x_{4}=0 \end{array} \right. $$
(14)

and

$$ \left\{ \begin{array}{l} x_{1}+x_{2}=1\\ x_{1}+x_{3}=1\\ x_{1}+x_{4}=1 \end{array} \right. $$
(15)

Let S 0 and S 1 be the Boolean matrices whose columns are just all possible solutions of the above two systems of (14) and (15) respectively. Thus, \(S^{0}=\left [ \begin {array}{cc} 0 & 1\\ 0 & 1\\ 0 & 1\\ 0 & 1 \end {array} \right ]\)and \(S^{1}=\left [ \begin {array}{cc} 0 & 1\\ 1 & 0\\ 1 & 0\\ 1 & 0 \end {array} \right ]\). Obviously, S 0 and S 1 satisfy the properties of basis matrices for the access structure (Γ Qual Forb ) determined by Γ0.

5 General construction of VCRG via linear algebraic technique

Based on the above knowledge, we are able to construct the basis matrices of VCS for more chosen minimal qualified sets. Hence, we can construct VCRG for more chosen minimal qualified sets by randomly choosing a column from the corresponding basis matrix. But the conditions of Theorem 1 are not always met by any given strong access structure. Therefore, we can only construct VCRG for some restricted access structures to share a secret pixel at a time. As described in the motivation of this paper, to share a secret pixel, at least one minimal qualified set should be randomly chosen from Γ0 and more minimal qualified sets should be chosen at the same time. Meanwhile, the conditions of Theorem 1 should be satisfied by the chosen minimal qualified sets so that we can apply the proposed linear algebra technique to construct the corresponding basis matrices. Towards this end, we give a choosing algorithm for GAS, which is described as Algorithm 2.

figure f

In Algorithm 2, we choose collections of the largest number of minimal qualified sets satisfying the conditions of Theorem 1. For |Γ0|≥ 2, the worst case is that we can always choose two minimal qualified sets from the basis since any two minimal qualified sets satisfy the conditions of Theorem 1. Therefore, it is always possible to choose the collection of sets needed to construct the scheme.

Then we construct VCRG for GAS (GAS-VCRG) based on the above choosing algorithm. Diagram of the proposed VCRG for GAS is depicted in Fig. 1. The random grid generation is a pixel-wise operation, and n random grids are constructed via the proposed scheme for every given secret pixel. Simply, the proposed scheme consists of three components: the selection of minimal qualified sets, the construction of basis matrices and the assignment of random grids. In the selection of minimal qualified sets, Step 3 of Algorithm 2 is executed for every pixel, which will become time-consuming during encoding all pixels. However, for each chosen minimal qualified set Q from Γ0, the generated λ collections of minimal qualified sets \({{\Gamma }^{1}_{m}},\ldots ,{\Gamma }^{\lambda }_{m}\) from Γ0 are fixed since they are of the largest number of minimal qualified sets. Therefore, after the λ collections of minimal qualified sets \({{\Gamma }^{1}_{m}},\ldots ,{\Gamma }^{\lambda }_{m}\) for a randomly chosen Q are first generated, we can store them so that we can reuse them, instead of generating them again, when the same Q is chosen in next time. In the construction of basis matrices, we are able to obtain the basis matrices S 0 and S 1 for the collection Γ of chosen minimal qualified sets by solving the corresponding systems of linear equations. It should be noted that we could assign the non-essential participants shares completely white (the value 0) and this assignment would not have an influence on the contrast and security conditions of the corresponding basis matrices (please refer to the paper [3]). In the assignment of random grids, we assign the values to n random grids according to the randomly chosen column from the corresponding S 0 and S 1. Detailed information on the proposed scheme is described as Algorithm 3.

Fig. 1
figure 1

Diagram of the proposed VCRG for GAS

figure g

Participants of any qualified set can visually reconstruct the secret image by stacking their random grids together without the aid of any computational devices. Theoretical analysis on the proposed construction is formulated as follows.

Lemma 4

Given a secret pixel s, an access structure Q F )is determined by the collection Γof chosen minimal qualified sets. For X ∈Γ Q ,we have T(R X [s = 0]) > T(R X [s = 1]).For X ∈Γ F ,we have T(R X [s = 0]) = T(R X [s = 1]).

Proof

Given the collection Γ satisfying the conditions of Theorem 1, we could construct the basis matrices S 0 and S 1 of (Γ Q F )-VCS according to Theorem 1. Because a column is randomly chosen from the corresponding basis matrices and assigned to the corresponding random grids, we have \(T(R_{X}[s=0])=\frac {\omega ({S^{0}_{X}})}{m}\) and \(T(R_{X}[s=1])=\frac {\omega ({S^{1}_{X}})}{m}\). For X ∈Γ Q , we have \(\omega ({S^{0}_{X}})>\omega ({S^{1}_{X}})\) and therefore T(R X [s = 0]) > T(R X [s = 1]). For X ∈Γ F , we have \(\omega ({S^{0}_{X}})=\omega ({S^{1}_{X}})\) and therefore T(R X [s = 0]) = T(R X [s = 1]). □

Theorem 2

Given a secret image S and a strong access structure Qual Forb ), n random grids are generated by the proposed Algorithm 3. Algorithm 3 is a valid construction for a Qual Forb )-VCRGfor GAS.

Proof

Given a secret image S and a strong access structure (Γ Qual Forb ), let (Γ Q F ) be an access structure determined by the set Γ of chosen minimal qualified sets when sharing a secret pixel s. S 0 and S 1 denotes basis matrices of the corresponding (Γ Q F )-VCS. Obviously, we have \({\Gamma }_{Q}\subseteq {\Gamma }_{Qual}\) and \({\Gamma }_{F}\supseteq {\Gamma }_{Forb}\). For X = {i 1, i 2,…, i p }∈Γ Qual , suppose that the chance for X ∈Γ Q is ϕ. We can conclude ϕ > 0 since the step 2 of Algorithm 2 guarantees that at least one minimal qualified set is randomly chosen from Γ0 when sharing a secret pixel s. By Lemma 4, we have \(T(R_{X}[s=0])-T(R_{X}[s=1])=\phi (\frac {\omega ({S^{0}_{X}})}{m}-\frac {\omega ({S^{1}_{X}})}{m})>0\). For X ∈Γ Forb , we immediately obtain X ∈Γ F and then we have T(R X [s = 0]) − T(R X [s = 1]) = 0 by Lemma 4. According to Definitions 3 and 4, it is easy to conclude that T(R X [S(0)]) > T(R X [S(1)]) for X ∈Γ Qual and T(R X [S(0)]) = T(R X [S(1)]) for X ∈Γ Forb . □

6 Experiment and comparison

Extensive experimental results by the proposed VCRG are presented in this section. Moreover, some comparisons and further discussions among the proposed VCRG and related schemes are provided as well. Note that, it is quite complicated to choose collections of of the largest number of minimal qualified sets satisfying the conditions of Theorem 1 in Algorithm 2. Here we only give the choosing algorithm by computing search. The computer programs are coded in Matlab 7.0 and run in a PC with MS windows.

6.1 Experimental results

To demonstrate the effectiveness of our VCRG, two experiments are conducted: Experiment 1 focuses on threshold access structure, while Experiment 2 focuses on general access structure.

Experiment 1

An experiment of the proposed (2,4)-VCRG is presented in Fig. 2, where the basis of (2,4) threshold access structure is

$${\Gamma}_{0}=\{\{1,2\},\{1,3\},\{1,4\},\{2,3\},\{2,4\},\{3,4\}\} $$

and the set of forbidden sets is Γ Forb = {{1},{2},{3},{4}}. The secret image is shown in Fig. 2a and the four generated shares are exhibited in Fig. 2b–e. The stacked results of two random grids are exhibited in Fig. 2f–k. The stacked results of three random grids are exhibited in Fig. 2l–o. The stacked results of four random grids are exhibited in Fig. 2p. Furthermore, the contrast for this experiment is listed in Table 1.

Fig. 2
figure 2

Experimental results of our (2, 4)-VCRG

Table 1 Contrast for Experiment 1

Experiment 2

An experiment of the proposed GAS-VCRG is presented in Fig. 3, where Γ0 = {{1,2,3},{1,4},{3,4}} and the set of forbidden sets is Γ Forb = {{1},{2},{3},{4},{1,2},{1,3},{2,3},{2,4}}. The secret image is shown in Fig. 3a and the four generated shares are exhibited in Fig. 3b–e. The stacked results of two random grids are exhibited in Fig. 3f–k. The stacked results of three random grids are exhibited in Fig. 3l–o. The stacked results of four random grids are exhibited in Fig. 3p. Furthermore, the contrast for this experiment is listed in Table 2.

Fig. 3
figure 3

Experimental results of our VCRG for an access structure determined by Γ0 = {{1,2,3},{1,4}, {3,4}}

Table 2 Contrast for Experiment 2

As seen from the above experimental results, visually and quantitatively, the stacked results of random grids owned by forbidden sets of participants reveal nothing about the secret image while the stacked results of random grids owned by qualified sets of participants reveal the secret information to our eyes.

6.2 Visual performance

Contrast is a measurement to evaluate the visual performance of the recovered secret image. Because De Prisco and De Santis [7] pointed out the future works that deal with VCRG and VCS should not ignore each other in comparison of contrast defined by α ES for VCS and α RG for VCRG, we are going to provide comparison of contrast between our VCRG and other schemes to demonstrate the advantage of our construction. Furthermore, to make the comparison clearer, we give the definition of average contrast \(\overline {\alpha }\) as follows:

$$ \overline{\alpha}=\frac{{\sum}_{X\in{\Gamma}_{Qual}} \alpha_{X}}{|{\Gamma}_{Qual}|}, $$
(16)

where α X denotes the contrast of recovered secret image by the qualified set X.

For threshold access structures, Table 3 presents the contrasts of Shyu’s Algorithm 4 [27], Guo et al.’ scheme [10] and the proposed construction, where 2 ≤ kn ≤ 7. Note that, α p denotes the contrast of recovered secret image by stacking p random grids since any p random grids achieve the same contrast. Figure 4 illustrates the average contrast for Table 3. From Table 3 and Fig. 4, we find that our contrast is larger than Guo et al.’s contrast [10]. Moreover, our contrast is almost the same as the contrast achieved by Shyu’s Algorithm 4 [27]. However, Shyu’s Algorithm 4 [27] is confined to threshold schemes. Also note that, Shyu compared his method with the existing VCSs in contrast, and concluded that the contrast of his (k, n)-VCRG is competitive to that of the existing (k, n)-VCSs (please refer to the paper [27]). Hence, we herein omit the comparison of contrast between our VCRG and the existing (k, n)-VCSs.

Table 3 Comparison of contrast among the proposed (k, n)-VCRG, Shyu’s Algorithm 4 [27] and Guo et al.’s VCRG [10] for 2 ≤ kn ≤ 7
Fig. 4
figure 4

Average contrast for Table 3

For general access structures, Table 4 presents the comparison of contrast among the proposed VCRG, Wu and Sun’s GAS-VCRG [32] and Shyu’s VCRG [28], and Table 5 presents the comparison of contrast among the proposed VCRG, Ateniese et al.’s GAS-VCS [3] and Adhikari’s GAS-VCS [2]. In the above two tables, different access structures are adopted, the contrast of recovered secret image by the qualified set {i 1, i 2,…, i p } is represented by \(\alpha _{i_{1},i_{2},\ldots ,i_{p}}\), CA denotes the Ateniese et al.’s construction using cumulative array and SS denotes the Ateniese et al.’s construction using smaller schemes [3]. Note that, because both of Shyu’s method [28] and Ateniese et al.’s CA [3] achieve a constant contrast for an access structure, we omit the subscript {i 1, i 2,…, i p } in \(\alpha _{i_{1},i_{2},\ldots ,i_{p}}\). Figures 5 and 6 illustrate the average contrast for Tables 4 and 5, respectively. From Table 4 and Fig. 5, we find that our contrast is larger than those of Wu and Sun’s method [32] and Shyu’s two methods [28]. From Table 5 and Fig. 6, we also find that our contrast is larger than those of Ateniese et al.’s CA and SS [3] and Adhikari’s contrast [2]. Moreover, the constant contrast achieved by Shyu’s Algorithm 3 [28] and Ateniese et al.’s CA [3] is \(\frac {1}{2^{|Z_{m}|-1}}\), so the contrast is too small when |Z m | is large. For example, when the access structure is (3,5) threshold case, the contrast of Shyu’s Algorithm 3 [28] and Ateniese et al.’s CA [3] is \(\frac {1}{512}\approx 0.002\) while our average contrast is 0.132. Therefore, our construction is preferable when |Z m | is large. In summary, we achieve a better visual performance in the sense that the contrast of our VCRG is larger than those of the existing schemes for GAS.

Table 4 Comparison of contrast among the proposed VCRG, Wu and Sun’s GAS-VCRG [32] and Shyu’s GAS-VCRG [28]
Table 5 Comparison of contrast among the proposed VCRG, Ateniese et al.’s GAS-VCS [3] and Adhikari’s GAS-VCS [2]
Fig. 5
figure 5

Average contrast for Table 4

Fig. 6
figure 6

Average contrast for Table 5

6.3 Functionality

Functionality comparison among the proposed construction and related methods is demonstrated in Table 6. According to Table 6, major advantages of our construction are

  • Flexible sharing strategy. General access structure can be implemented by the proposed construction, more complicated sharing strategy in real world can be conducted. It is superior to the threshold methods [10, 27].

  • Enhanced contrast. Contrast is expected to be as large as possible so that human eyes can identify the visual information easily. Our contrast is enhanced in comparison with the methods [2, 3, 11, 28, 32].

  • No pixel expansion. Our construction does not expand any pixel while the conventional VCSs [2, 3] take large pixel expansions which will increase storage and transmission bandwidth.

  • Wide utility. The methods [10, 27, 28, 32] are elaborately designed for VCRG while the methods [2, 3] are elaborately designed for VCS. However, Theorem 1, supporting our construction, can be better applied to not only VCRG but also VCS. For example, any given access structure can be divided into several certain access structures, each of which satisfies the conditions of Theorem 1. Then we can construct VCS for every access group through solving linear equations and all constructed VCSs constitute a final VCS for the given access structure. The above method to construct VCS, as pointed out in [2], may minimize the pixel expansion of VCS.

Table 6 Comparison of functionality among the proposed construction and related methods

7 Conclusion

In this paper, we exploit the algebraic aspects of VCS and propose an construction of VCRG based on the proposed linear algebraic technique. The experimental results demonstrate the feasibility and advantage of our construction. Moreover, our theory lays a sound and innovate foundation for the construction of VCS and VCRG from the theoretical point of view. There are some further researches including could we put forward an accurate expression of contrast, how does the content of the image affect the visual performance besides the contrast, and so on. For practical applications, our construction would be very useful to develop a good contrast progressive scheme like [15].