Keywords

1 Introduction

The essence of visual cryptography is that the encryption of a visual secret is done in such a way that the reconstruction can be performed only via sight-reading. So one can easily conclude that visual cryptography does not require many sophisticated cryptographic techniques like polynomial based secret image sharing [18,19,20, 26], yet it produces strong schemes for many practical scenarios. For this reason, throughout time many researchers have developed a strong interest in this specific area of cryptography.

The seminal paper by Naor and Shamir [17] is considered as the starting point of the (kn)-visual cryptographic scheme. They proposed a way to distribute a secret image S among n members, where any k (or more) of them can superimpose their shares to reconstruct S. Obviously, the reconstruction comes with loss of contrast but still it is human readable. Then in 2017 Arungam et. al. [16] extended the idea of (kn)-VCS to incorporate one essential member. This work was further extended by Sabyasachi et. al. [9] by extending it to a \((t,k,n)^*\)-VCS, with t essential members. Some notable works on classical VCS may be found in [1,2,3,4,5,6,7,8, 10,11,12,13,14, 27, 29].

A thorough study of the literature will suggest that at the very initial stage the works in this area experienced huge pixel expansion with very little contrast. Researchers engaged themselves to deal with this problem and introduced the best solution, namely Random Grid Visual Cryptography (RGVCS). In RGVCS, there is no pixel expansion and we can reach the optimal level for contrast. The basic idea of RGVCS is that each pixel of the secret image here is considered to be a random grid with an associated color. The literature study of RGVCS can be found in [15, 22, 24, 25].

In this paper, we have proposed a (tkn) scheme for black and white RGVCS for both “OR” and “XOR” models. Besides constructing the scheme, we have described the closed forms of the corresponding light contrasts. We have deviated a bit from the traditional “OR” operation to “XOR” operation with a motif of increasing the light contrast. The only thing that we have to keep in mind for the scheme with the “XOR” operation is that the reconstruction will no longer be visual. The experimental results presented indicate the efficiency of our proposed schemes.

The rest of the paper is organized as follows. We have started with Sect. 2 to describe the notations and basic concepts of VCS as well as RGVCS which we will need for construction and security analysis of our proposed scheme. In Sect. 3, we have given the construction of schemes with detailed theoretical security analysis. Section 4 deals with the experimental results to justify the theoretical results that we proved for analyzing the security of our scheme. Also, we have performed a comparison of the light contrast of our scheme with that of the modified versions of the schemes that are already proposed. The theoretical study together with the experimental results shows the significance of our scheme in the area of RGVCS. The paper concludes with Sect. 5, where we have pointed out the future direction of research.

2 Preliminaries

This section presents the notations that we will widely use to describe our proposed schemes. To start with let us assume a secret pixel S is to be shared among a set of n members, \(\mathscr {P} = \lbrace M_{1},M_{2},\ldots ,M_{n} \rbrace \). By \(\Gamma _\text {Qual}\), we will denote the collection of all subsets of \(\mathscr {P}\) who are eligible to reconstruct S by superimposing their shares. On the other hand, \(\Gamma _\text {Forb}\) denotes the collection of all those subsets of \(\mathscr {P}\) who are not eligible to reconstruct S. Elements of \(\Gamma _\text {Qual}\) are called qualified set while elements of \(\Gamma _\text {Forb}\) are called forbidden set. The ordered pair \((\Gamma _\text {Qual},\Gamma _\text {Forb})\) is called an access structure for \(\mathscr {P}\) corresponding to S. Now a given access structure is called monotone when \(\Gamma _\text {Qual}\) is monotone increasing and \(\Gamma _\text {Forb}\) is monotone decreasing. For such an access structure, Minimal Qualified set and Maximal Forbidden set are defined as \(\Gamma _{0}=\lbrace A \in \Gamma _\text {Qual}|A^{\prime } \notin \Gamma _\text {Qual},\forall A' \subset A \rbrace \), \({Z}_{M}=\lbrace B \in \Gamma _\text {Forb}|B\cup \lbrace i \rbrace \in \Gamma _\text {Qual},\forall i \in \mathscr {P} \setminus B \rbrace .\) These two sets are, respectively, denoted by \(\Gamma _{0}\) and \({Z}_{M}\). For our schemes, we talk about a special kind members, namely essential members. A member \(a \in \mathscr {P}\) is said to be essential if there exists \(X \subseteq \mathscr {P}\) such that \(X \cup \lbrace a \rbrace \in \Gamma _\text {Qual}\) but \(X \notin \Gamma _\text {Qual}\). The notation of a (kn) threshold access structure is adapted from [24]. For our purpose, we have incorporated the idea of essential members with the notation of a (kn) threshold access structure and have defined (tkn) access structure. By that, we mean that it is a (kn) access structure where t of the n members are essential. Clearly enough, the values of the parameters for which \(0 \le t \le k \le n\) admit a meaningful (tkn) visual cryptographic scheme. Note that in such an access structure, a maximal forbidden set may be of the two types. Type I: Sets containing \(k-1\) members including all the essential members. Type II: Sets having a size exactly \(n-1\) which contains all but one of the t essential members.

Now the notations related to grid based VCS are adapted from [24]. We have considered a binary transparency Y in which each pixel is either transparent (0) or opaque (1). Generally, the value of each pixel is determined by a coin flip where it is assumed that probability of \(y =0\) is \(\lambda \). Keeping in mind the fact that the pixel with \(y =0\) lets through light and the pixel with \(y =1\) stops it, the light transmission of y, denoted by \(\mathscr {t}(y)\), is defined to be \(Pr(y =0)\). The light transmission of a random grid, denoted by \(\mathscr {T}(Y)\), is \(\lambda \) when \(\mathscr {t}(y) =\lambda \) for each pixel \(y \in Y\) [24]. From this definition of light transmission, we can observe that for a random grid X with \(\mathscr {T}(X)=\lambda \), \(X \otimes X\) is a random grid with \(\mathscr {T}(X \otimes X)=\mathscr {T}(X)=\lambda \). Also for two independent random grids with \(\mathscr {T}(X)=\lambda _{1}\) and \(\mathscr {T}(Y)=\lambda _{2}\), we have \(\mathscr {T}(X \otimes Y )=\lambda _{1} \lambda _{2}\). With this setting in our hand, we can now define the formal model of a (tkn) random grid based visual cryptographic scheme.

Notation: As in [21], let S(0) (S(1)) denote the area of all of the transparent (opaque) pixels in the secret image S, i.e., (uv)th pixel S[uv] of the secret S is in S(0) (S(1)) if and only if \(S[u,v]=0\) (\(S[u,v]=1\)) where \(S=S(0)\cup S(1)\) and \(S(0)\cap S(1)=\emptyset \). Likewise, we denote the area of pixels in random grid G corresponding to S(0)(S(1)) by G[S(0)] (G[S(1)]), i.e., (uv)th pixel G[uv] of the random grid G is in G[S(0)] (G[S(1)]) if and only if G[uv]’s corresponding pixel S[uv] is in S(0)(S(1)). Needless to mention, \(G=G[S(0)]\cup G[S(1)]\) and \(G[S(0)]\cap G[S(1)]=\emptyset \).

Definition 1

For valid parameters t, k and n, an \(H' \times W\) binary secret image S and set of n members the set of random grids \(\mathscr {G}\) = \(\lbrace G_{1}, G_{2},\ldots , G_{n} \rbrace \) forms an “OR” based (tkn)-RGVCS if:

  1. 1.

    \(\mathscr {T}(G_{v})=\frac{1}{2}\) for all \(1 \le v\le n\).

  2. 2.

    For each \(F=\{M_{u_1}, M_{u_2},\ldots ,M_{u_p} \} \in \mathscr {F}\), \(\mathscr {T}(G^F[S(0)])=\mathscr {T}(G^F[S(1)])\), where \(G^{F}=G_{u_1} \otimes G_{u_2} \otimes \cdots \otimes G_{u_p}\), i.e., \(\mathscr {t}(G^F[u,v]\mid S[u,v]=0)=\mathscr {t}(G^F[u,v]\mid S[u,v]=1)\), \(\forall \) uv.

  3. 3.

    For \(Q \in \Gamma _0\), \(\mathscr {T}(G^Q[S(0)]) > \mathscr {T}(G^Q[S(1)])\) where \(G^{Q}=G_{1} \otimes G_{2} \otimes \cdots \otimes G_{q}\), i.e., \(\mathscr {t}(G^Q[u,v]\mid S[u,v]=0)>\mathscr {t}(G^Q[u,v]\mid S[u,v]=1)\), \(\forall \) uv.

Definition 2

The light contrast for any given set \(H \subseteq \mathscr {P}\), denoted as \(\alpha ^H_\text {OR}\), is defined as \(\alpha _\text {OR}^{H}\) = \(\mathscr {T}(G^H[S(0)]) - \mathscr {T}(G^H[S(1)])\).

3 Proposed Scheme

In this section, we propose an efficient (tkn)-RGVCS for both monotone and non-monotone access structures. We will first start with describing the constructions and then discuss their light corresponding light transmission. To our knowledge, this is the first ever (tkn)-RGVCS.

3.1 Construction

For a secret \(H'\times W\) binary image S, the dealer first constructs the shares for the members and distributes them in the following manner.

  • The dealer first identifies the essential members and marks them as \(M_{1}\), \(M_{2}\), \(\dots \), \(M_{t}\). The rest of the members are marked as \(M_{t+1}\), \(M_{t+2}\), \(\dots \), \(M_{n-1}\), \(M_{n}\).

  • For each secret pixel S[uv] of S, the dealer selects \(k-1-t\) members randomly from \(M_{t+1}\), \(M_{t+2}\),\(\ldots \), \(M_{n-1}\), and together with \(M_{1}\), \(M_{2}\), \(\dots \), \(M_{t}\) form a set A of size \(k-1\).

  • The dealer assigns 0 or 1 random grids to the members of A.

  • For the remaining members the share is generated as \(g(s,x)=s\oplus x, \text{ for } s,x\in \{0,1 \}\), where \(\oplus \) denotes binary “XOR” operation.

Algorithm 1 is the detailed construction of the share generation phase of our proposed scheme.

figure a

Now in the secret reconstruction phase, the member can adapt one of the following two methods:

  1. 1.

    Either they can superimpose their shares to reconstruct the secret image. The way the random grid is defined superimposition corresponds to classical “OR” operation. Algorithm 1 together with this type of secret reconstruction gives us a scheme for strong monotone access structure.

  2. 2.

    On the other hand, if the members can provide some computational power they can use “XOR” operation in the place of “OR” operation. Algorithm 1 together with this type of secret reconstruction gives us a scheme for non-monotone access structure.

3.2 Discussion on Light Transmission

Now we will prove theoretically that the proposed scheme is a valid (tkn) scheme by showing that it satisfies the conditions of Definition 1.

Before going to the direct proof we will start by proving three lemmas which in turn will take us to the final conclusion.

Lemma 1

The light transmission \(\mathscr {T}(G_{u})=\dfrac{1}{2}~ f\!or\) \(1 \le u \le n.\)

Proof

Note that each \(G_{i}\) is either a random grid or constructed by applying f on \(k-1\) random grids. In both the cases, the randomness is not hampered.

Lemma 2

For a given (tkn)-RGVCS, let F be a maximal forbidden set of members. Then \(\mathscr {T}(G^F[S(0)])=\mathscr {T}(G^F[S(1)]),\) where \(G^{F}\) is obtained by applying any reconstruction function “OR” or “XOR” on \(G_{l_{1}}, G_{l_{2}}, \ldots , G_{l_{m}}\).

Proof

First of all, let us denote the two types of maximal forbidden sets that we mentioned earlier as Type I and Type II sets, respectively. One can now easily observe that the Type I sets are nothing but the sets of size \(\le k-1\) of a (kk)-scheme. The light transmission of this set depends on the choice of A. The length of the intersection of A and F can vary from t to \(k-2\) when \(M_{n} \in F\). But when \(M_{n} \notin F\) the the length of intersection can vary from t to \(k-1\). If we consider the classical “OR” reconstruction then the total light transmission of F is given as \( \mathscr {t}(G^F[u,v] \mid S[u,v]=0) = \mathscr {t}(G^F[u,v]\mid S[u,v]=1) =\frac{1}{\begin{pmatrix} n-1-t\\ k-1-t \end{pmatrix}}\left[ \sum \limits _{h=t}^{k-2} \frac{ \begin{pmatrix} k-2-t\\ h-t \end{pmatrix} \times \begin{pmatrix} n-k+1\\ k-1-h \end{pmatrix} }{2^{h+1}}\right] ,\text { if } M_n\in F \)

\( =\frac{1}{\begin{pmatrix} n-1-t\\ k-1-t \end{pmatrix}}\left[ \dfrac{1}{2^{k-1}} + \sum \limits _{h=t}^{k-2} \frac{ \begin{pmatrix} k-1-t\\ h-t \end{pmatrix} \times \begin{pmatrix} n-k\\ k-1-h \end{pmatrix} }{2^{h+1}}\right] ,\text { if } M_n\not \in F. \) But for Type II sets, their behavior does not vary for different choices of \(\mathscr {A}\). So for them the light transmission will be

$$ \mathscr {t}(G^{F}[u,v]\mid S[u,v]=0)=\dfrac{1}{2^{k-1}} = \mathscr {t}(G^{F}[u,v]\mid S[u,v]=1). $$

The same type of calculation follows for “XOR” operation.

Lemma 3

For a given (tkn)-RGVCS, let Q be a minimal qualified set of members. Then \(\mathscr {T}(G^Q[S(0)])>\mathscr {T}(G^Q[S(1)]),\) where \(G^{Q}\) is obtained by applying any reconstruction function “OR” or “XOR” on \(G_{l_{1}}, G_{l_{2}}, \cdots , G_{l_{k}}\).

Proof

We will proceed again here as in the previous lemma. Here \(\mid Q \cap {A} \mid \) can vary from t to \(k-1\). So depending on number of different choices of \(\mathscr {A}\) for classical reconstruction method “OR” the light transmission for Q is

\( \mathscr {t}(G^Q[u,v] \mid S[u,v]=0) =\frac{1}{\begin{pmatrix} n-1-t\\ k-1-t \end{pmatrix}}\left[ \frac{1}{2^{k-1}} + \sum \limits _{h=t}^{k-2} \frac{\begin{pmatrix} k-1-t\\ h-t \end{pmatrix} \times \begin{pmatrix} n-k\\ k-1-h \end{pmatrix} }{2^{h+1}}\right] ,\text { if } M_n\in Q\)

\(=\frac{1}{\begin{pmatrix} n-1-t\\ k-1-t \end{pmatrix}}\left[ \dfrac{k-t}{2^{k-1}} + \sum \limits _{h=t}^{k-2} \frac{\begin{pmatrix} k-t\\ h-t \end{pmatrix} \times \begin{pmatrix} n-1-k\\ k-1-h \end{pmatrix} }{2^{h+1}}\right] ,\text { if } M_n\not \in Q.\)

And \( \mathscr {t}(G^Q[u,v] \mid S[u,v]=1) =\frac{1}{\begin{pmatrix} n-1-t\\ k-1-t \end{pmatrix}}\left[ \sum \limits _{h=t}^{k-2} \frac{ \begin{pmatrix} k-1-t\\ h-t \end{pmatrix} \times \begin{pmatrix} n-k\\ k-1-h \end{pmatrix} }{2^{h+1}}\right] ,\text { if } M_n\in Q\)

\(=\frac{1}{\begin{pmatrix} n-1-t\\ k-1-t \end{pmatrix}}\left[ \sum \limits _{h=t}^{k-2} \frac{ \begin{pmatrix} k-t\\ h-t \end{pmatrix} \times \begin{pmatrix} n-1-k\\ k-1-h \end{pmatrix} }{2^{h+1}}\right] ,\text { if} M_n\not \in Q.\)

Subtracting this two we get the light contrast for Q as \(\alpha ^Q_\text {{OR}}=\frac{1}{{n-1-t \atopwithdelims ()k-1-t}} \cdot \dfrac{1}{2^{k-1}}, M_{n} \in Q , \) and \(\alpha ^Q_\text {{OR}}= \dfrac{1}{{n-1-t \atopwithdelims ()k-1-t}} \cdot \dfrac{k-t}{2^{k-1}}, M_{n} \notin Q.\) Now to conclude the theorem we notice that the validity condition \(k>t\) makes the light contrast a strictly positive quantity. Similar arguments can be followed to show that for “XOR” reconstruction the light contrast becomes exactly 1. Now we are in good shape two state the following results:

Theorem 1

Let S be a secret image. Then for a (tkn) threshold access structure our scheme in Algorithm 1 gives a (tkn)-RGVCS with light contrast for a minimal qualified set:

\(\alpha ^Q_\text {{OR}} =\dfrac{1}{{n-1-t \atopwithdelims ()k-1-t}} \cdot \dfrac{1}{2^{k-1}}, \text { if } M_{n} \in Q , \) and \(\alpha ^Q_\text {{OR}} = \dfrac{1}{{n-1-t \atopwithdelims ()k-1-t}} \cdot \dfrac{k-t}{2^{k-1}}, \text { if } M_{n} \notin Q \) for classical “OR” reconstruction method and exactly 1 for “XOR” -based reconstruction method.

Proof

From Lemmas 13, the proof is very much obvious.

The following table shows a practical example for the calculations we have just described theoretically.

Now in a nutshell the security of our proposed scheme is given in form of the following theorem.

Theorem 2

Let S be a secret image and n be the number of members, t of them are essential. Let the threshold value be k. Then our scheme produces a (tkn)-RGVCS. If \(\bar{\alpha }_\text {{OR}}^{Q}\) denotes the light contrast of a minimal qualified set \(Q \subseteq \mathscr {P}\) then \(\bar{\alpha }_\text {{OR}}^{Q}\) is given by \(\bar{\alpha }_\text {{OR}}^{Q}=\dfrac{1}{{n-t \atopwithdelims ()k-1-t}} \cdot \dfrac{1}{2^{k-1}}\) for classical “OR” reconstruction and 1 for “XOR” reconstruction method.

3.3 Comparison Among the Schemes Proposed by Wu and Sun [28] and Shyu [23]

To the best of our knowledge, our proposed (tkn)-random grid visual cryptographic scheme for black and white images is the first proposed scheme in the literature of visual cryptography for essential access structures. That is why, it is not possible for us to have a direct comparison with the existing schemes. However, as particular cases, we can construct (tkn)-RGVCS, from the random grid based schemes for general access structures. In this section, we are comparing our proposed Algorithm 1 with the customized schemes, obtained as a particular case from general access structures proposed in [23, 28]. To the best of our knowledge, these schemes are the most efficient schemes that exist in the literature for general access structures.

The following theorem is obtained if we apply the scheme proposed in [28] on the essential access structure for (tkn):

Theorem 3

(customized from [28]) For an essential (tkn) access structure with a given black and white secret image S and valid parameters t, k, and n, the scheme described in [28] produces a (tkn)-RGVCS with light contrast: \(\alpha _w=\dfrac{1}{{n-t \atopwithdelims ()k-t}} \cdot \dfrac{1}{2^{k-1}}\).

Analogously, we can obtain the following theorem, if we apply the scheme proposed by Shyu [23] on the essential access structure for valid parameters t, k, and n:

Theorem 4

(customized from [23]) For an essential (tkn) access structure with a black and white secret image S along with the valid parameters t, k, and n, the scheme described in [23] generates a (tkn)-RGVCS with light contrast: \(\alpha _s=\frac{1}{2^\mathscr {K}}\), where \(\mathscr {K}=1+\displaystyle \sum _{h=t}^{k-1}\) \(\begin{pmatrix} k-t\\ h-t \end{pmatrix} \begin{pmatrix} n-k\\ k-h \end{pmatrix}h.\)

Table 1 Calculation of the light contrast with access structure (2, 4, 6)-RGVCS. Here, \(n_2(A)\) and \(n_3(A)\) denote, respectively, the number of choices of A for which \(|H\cap A|\) is 2 and 3.

Remark 1

Note that the light contrast for our proposed scheme is better than that of the schemes proposed in [23, 28]. Numerical evidence as shown in Table 1 demonstrates that our scheme performs better in terms of light contrast than the existing schemes.

Remark 2

From the construction of our scheme, it is clear that we are doing nothing but repeated application of (kk) scheme. So, to start with, we put \(t=0, k=n\) in our construction as described in Algorithm 1 and apply “XOR” operation in the secret reconstruction phase to get the following theorem.

Fig. 1
figure 1

The results for (2, 3, 5)-XRGVCS are implied. Here (a) the secret.  stands for the random grid (b) \(G_1\)(c) \(G_2\)(d) \(G_3\)(e) \(G_4\)(f) \(G_5\).  The stacked images (g) \(G_1 \oplus G_2 \),   (h) \(G_1 \oplus G_2 \oplus G_3 \oplus G_4\)(i) \(G_1\oplus G_2\oplus G_3\oplus G_4\oplus G_5\)(j) \(G_1\oplus G_2\oplus G_3\), where the operation “\(\oplus "\) represents binary “XOR”

4 Experiment and Discussions

In this section, we have shown the experimental as well as simulation results to validate our theoretical results. Before we proceed, let us first fix up few notations. Corresponding to an essential (tkn) access structure with valid parameters tk,  and n, let us denote \(\mathscr {R}\) to be the set of all n random grids that are generated through the proposed Algorithm 1. Let \(H \subseteq \mathscr {R}\) be such that \(1 \le h(=\mid H \mid ) \le n\). Python code is being used for experimental verification. The analytic light contrasts \(\alpha _\text {{OR}}^H\) and \(\alpha _\text {{XOR}}^H\) are compared in Tables 4 and 5. The comparison table of numerical values as well as the graphical representations of light contrast of our scheme with that of the already proposed general access structures restricted to customized (tkn) scenario are shown in Tables 1 and 2 and in Figs. 2 and 3 (Fig. 1 and Table 3).

The theoretical results \(\alpha ^H_\text {{XOR}}\) and the related experimental results \(e\alpha ^H_\text {{XOR}}\) and their differences are summarized in Table 5. Note that for each cases, \(\alpha ^H_\text {{XOR}}- e\alpha ^H_\text {{XOR}}<0.004\). This explains why the experimental outputs of the light contrast are very similar to the analytical values.

Table 2 Table of comparisons: proposed “OR”- and “XOR” -based schemes (See Fig. 3)
Fig. 2
figure 2

(i) and (ii) display the graphical representation of simulation data from the Table 1

Fig. 3
figure 3

Graphical representation of values, as shown in Table 2, for our “OR”- and “XOR”-based schemes

Table 3 Comparison of contrasts for different access structures (1, 2, 4) (See Fig. 4)
Fig. 4
figure 4

(1, 2, 4)-RGVCS (See Table 3)

Table 4 The proposed (1, 2, 4)-RGVCS
Table 5 The proposed (2, 3, 5)-RGVCS

5 Conclusion

This paper puts forward efficient direct constructions of both “OR”- and “XOR”-based (tkn) schemes for random grid visual cryptographic schemes for black and white images. In the paper, we provide closed forms of light contrasts for both “OR” and “XOR” models. Our theoretical as well as experimental simulated results show that our algorithms work efficiently. As a a challenging future research work in the field of RGVCS, we will consider the problem of obtaining closed forms of the optimal light contrasts for both “OR” and “XOR” based VCSs for (tkn) access structure.