Next Article in Journal
Central Limit Theorems for Combinatorial Numbers Associated with Laguerre Polynomials
Next Article in Special Issue
Practical Secret Image Sharing Based on the Chinese Remainder Theorem
Previous Article in Journal
aSGD: Stochastic Gradient Descent with Adaptive Batch Size for Every Parameter
Previous Article in Special Issue
Changing the Threshold in a Bivariate Polynomial Based Secret Image Sharing Scheme
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Implementation of Image Secret Sharing Scheme Based on Matrix Operations

Department of Mathematics and Physics, North China Electric Power University, Baoding 071003, China
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(6), 864; https://doi.org/10.3390/math10060864
Submission received: 24 January 2022 / Revised: 4 March 2022 / Accepted: 6 March 2022 / Published: 9 March 2022

Abstract

:
The image secret sharing scheme shares a secret image as multiple shadows. The secret image can be recovered from shadow images that meet a threshold number. However, traditional image secret sharing schemes generally reuse the Lagrange’s interpolation in the recovery stage to obtain the polynomial in the sharing stage. Since the coefficients of the polynomial are the pixel values of the secret image, it is able to recover the secret image. This paper presents an implementation of the image secret sharing scheme based on matrix operations. Different from the traditional image secret sharing scheme, this paper does not use the method of Lagrange’s interpolation in the recovery stage, but first identifies the participants as elements to generate a matrix and calculates its inverse matrix. By repeating the matrix multiplication, the polynomial coefficients of the sharing stage are quickly derived, and then the secret image is recovered. By theoretical analysis and the experimental results, the implementation of secret image sharing based on matrix operation is higher than Lagrange’s interpolation in terms of efficiency.

1. Introduction

Secret sharing is an important research direction in the field of modern cryptography. The use of a secret sharing scheme to transmit or save the secret information can prevent excessive concentration of power on the one hand, and ensure the integrity, reliability and security of secret information on the other. Only when the attacker has a certain number of shared keys is it possible to recover the original secret information correctly, so the recovery of the original secret information is very difficult. Moreover, when some shared keys are lost or damaged due to subjective or objective factors, the remaining participants can still jointly recover the secret information through the shared keys they hold. Thus, the secret sharing technology has a wide range of applications in data security, key management, bank network management and other aspects.
A secret sharing scheme with a threshold of (k, n) means sharing a secret message into n shares, where any k or more shares can recover the secret. Shamir [1] first introduced this concept in 1979, in which a secret message is embedded as a constant term of a polynomial of order k − 1, and random numbers are used for the other coefficients of the polynomial. Thien and Lin [2] proposed an image secret sharing scheme, (k, n)-SIS, based on Shamir’s scheme in 2002. K secret pixels are used at a time embedded into the coefficients of a (k − 1) order polynomial in their scheme. In 2004, Lin and Tsai [3] used a steganography approach to embed the shadow image in [2] in a steganographic image, which improves the security of the scheme and has verifiable functionality. In 2007, Yang et al. [4], based on [3], used a hash function instead of parity to rearrange the positions of shared bits and authentication bits to improve the authentication capability and quality of steganographic images. Polynomial based image secret sharing schemes have attracted a lot of attention, and new secret sharing algorithms based on polynomial sharing schemes have been developed.
The concept of an image secret sharing scheme with essential participants, like (t, s, k, n)-ESIS, was first proposed in 2013 by Li et al. [5]. It was designed to address the inconsistent power of participants in the practical application of image secret sharing schemes. Essential participants have higher levels of power than non-essential participants when performing image restoration. This concept has since been implemented by many researchers in different ways [6,7,8,9,10], such as polynomial differentiation in (k, n)-SIS to obtain new polynomials [8]. Considering that a dynamic threshold k has a greater role in some cases, Yuan et al. first proposed a polynomial-based image secret sharing scheme with variable thresholds in 2016 [11]. Liu has improved on this by allowing the threshold to be varied over a range of values [12].
In recent years, image secret sharing schemes with new functions have been researched. In 2016, Maroti Deshmukh et al. proposed a (n, n)-Multi Secret Image Sharing Scheme [13], which uses Boolean XOR and Modular Arithmetic to share n secret images as n shares. This idea has since been continuously improved. [14,15,16,17,18,19] In response to the verifiability of participant identity and shadow, researchers also proposed a verifiable ISS on the polynomial-based ISS [20,21,22,23]. In 2017, Adnan Gutub et al. proposed a counting-based secret sharing technique for multimedia applications [24]. By performing parallel counting on binary secret information, the sharing and recovery of secret information can be achieved quickly. This method provides a new idea for fast sharing of binary images.
For polynomial-based image secret sharing, it often uses Lagrange’s interpolation when performing secret image recovery to reconstruct one polynomial and thus obtain the grayscale values of the original secret image. A simple way to implement Lagrange’s interpolation and construct the polynomial is by solving a linear system of equations. Many researchers just simply adopted this method in the revealing process of the SIS scheme [1,2,3,5,8,10,11,12,16,17,19,22,23]. In practice, many secret image pixels and a large amount of data require solving many linear systems until all pixels are recovered. This requires a large amount of computation, which shows the disadvantage of low efficiency when encrypting larger images. Actually, these linear systems are only different in their constant terms. They have the same coefficient matrix and the coefficient matrix is invertible. This coefficient matrix is only determined by IDs of the participants involved in the revealing process.
This paper proposes a more efficient implementation method of SIS based on matrix operation: using matrix multiplication instead of Lagrange’s interpolation based on the properties of polynomial coefficients. This not only greatly reduces the computational complexity but also improves the efficiency of secret image recovery.
The structure of this article is as follows. The classical secret image sharing scheme proposed by Thien and Lin is reviewed in Section 2. In Section 3, the implementation of the SIS scheme based on a matrix operation is proposed, and Section 4 shows the advantages of our method in efficiency compared with the SIS scheme with Lagrange’s interpolation by experiments. Finally, concise conclusions are formulated in Section 5.

2. Thien and Lin’s Secret Image Sharing Scheme

2.1. Secret Sharing Stage

In Thien and Lin’s image secret sharing scheme, the threshold is k, the number of participants is n, and the participant identifiers are id1, id2, … , idn. The secret image to be shared is S and its number of pixels is w. The allocator first takes n distinct non-zero elements (id1, id2, … , idn) in the finite field as identifiers for the n participants. id1, id2, … , idi and its correspondence with each participant is public. The allocator takes the grayscale value of the first to kth pixels in S as the value of a0, a1, … , ak−1, forming the polynomial:
f ( x ) = ( a 0 + a 1 x + a 2 x 2 + + a ( k 1 ) x ( k 1 ) ) m o d p
The allocator generates n secrets to share with n participants based on each participant’s identifier as the first pixel Si1 of each shadow image Si1
S i 1 = f ( i d i ) , i = 1 , , n
The allocator then repeats the above operation for the kth + 1st to 2kth pixel in S as the value of a0, a1, …, ak−1 to obtain Si2, i = 1, … , n. And so on until all pixels in S have been secretly shared to obtain Siw/k, i = 1, … , n.
The specific algorithm of Thien and Lin’s image secret sharing scheme is described in Algorithm 1.
Algorithm 1 Thien and Lin’s secret image sharing scheme
Input: S, id1, id2,, idn
Output: S1, S2, … , Sn
Step1: Let j = 1
Step2: The k pixels from k(j−1) + 1 to k(j−1) + k are selected in S and assigned to a0, a1, …, ak−1
Step3: Construct the polynomial (1) where p > 0
Step4: Calculate Sij = f(idi), i = 1, … , n.
Step5: If j < w/k, let j = j + 1 and skip to Step2; if j < w/k, skip to Step6.
Step6: Using Sij, j = 1, … ,w/k as the pixel gray value of image Si and obtain the shadow image Si, i = 1, … , n.

2.2. Secret Recovery Stage

In Thien and Lin’s image secret recovery scheme [2], secret recovery is performed using k shadow images S1, S2, … , Sn, id1, id2, , idn are known, taking the first pixel of each shadow image S1, S2, … , Sn.
From the Lagrange’s interpolation formula,
f x = i = 1 k f x i h i 1 h k x x h x i x h
we have,
f x = i = 1 k S i 1 h i 1 h k x i d h i d i i d h
The grayscale value of the first to kth pixel of the secret message as a secret image (a0, a1, … , ak−1) can be obtained according to the coefficient of f (x). Take the second pixel of each shadow image (S12, S22, … , Sk2) for Lagrange’s interpolation.
f x = i = 1 k S i 2 h i 1 h k x i d h i d i i d h
From the coefficients of f (x), obtain a0, a1, … , ak−1 as the kth + 1st to 2kth pixels in the secret image. Hence, the above process is repeated until all pixels in S have been recovered to obtain the secret image S.
The specific algorithm of Thien and Lin’s image secret recovery scheme is described in Algorithm 2.
Algorithm 2 Thien and Lin’s secret image recovery scheme
Input: id1, id2, …, idk; S1, S2, …, Sk.
Output: S
Step1: Denote the jth pixel gray value of Si as Sij and let j = 1.
Step2: Substitute id1, id2, … , idk and S1j, S2j, … , Skj into the Lagrange’s interpolation polynomial (4).
Step3: Take the coefficient a0, a1, … , ak−1 of f (x), let Sk(j−1) + 1 = a0, Sk(j−1) + 2 = a1, … , Sk(j−1) + k = ak−1.
Step4: If j < w/k, let j = j + 1 and skip to Step2; if j = w/k, then skip to Step5.
Step5: Get the secret image S

3. Implementation of SIS with Matrix Operation

3.1. Motivation

An image secret sharing scheme is a technique to share a secret image among a group of participants. In a polynomial-based SIS scheme, the shadows are generated by polynomials, and the secret pixels are derived from the coefficients of a Lagrange interpolating polynomial. Actually, to determine the coefficients of a Lagrange interpolating polynomial, we need to solve linear equations. In a real life application, sometimes the secret image has a large size with a high resolution, such as the CT and MR medical image, and a confidential image in military or in commerce. Therefore, in the revealing process, we need to repeatedly solve linear equations many times. This operation is inefficient, since solving linear equations has computation complexity O(n3). Therefore, improving the efficiency of the secret sharing scheme is crucial for the practical application of image secret sharing.
In the case of Thien and Lin’s experiments, due to the large number of pixels in the secret image, the sharing and recovery of the image secret was done in many iterations. The id value in each operation is the same, in particular during the secret image recovery stage, each time the same id value is substituted into the Lagrange’s interpolation polynomial calculation. Optimization and improvement are attempted for this property.
First, in the image secret sharing process as shown in Algorithm 1, Step2, Step3 constructs f(x) = (a0 + a1x + a2 × 2 +…+ a(k−1)x(k−1))modp and computes Sij = f(idi) separately at i = 1, … , n. This process is equivalent to calculating:
  { a 0 + a 1 i d 1 + a 2 i d 1 2 + + a k 1 i d 1 k 1 = S 1 j a 0 + a 1 i d 2 + a 2 i d 2 2 + + a k 1 i d 2 k 1 = S 2 j a 0 + a 1 i d n + a 2 i d n 2 + + a k 1 i d n k 1 = S n j
Equation (6) can be rewritten in the form of the product of matrices in linear algebraic terms:
  1 i d 1 i d 1 2 i d 1 k 1 1 i d 2 i d 2 2 i d 2 k 1 1 i d n i d n 2 i d n k 1 a 0 a 1 a k 1 = S 1 j S 2 j S n j
Denote that,
D = 1 i d 1 i d 1 2 i d 1 k 1 1 i d 2 i d 2 2 i d 2 k 1 1 i d n i d n 2 i d n k 1
A = a 0 a 1 a k 1 T
R = S 1 j S 2 j S n j T
The formula (7) can be written as: DA = R.
In the image secret recovery process shown in Algorithm 2, Step2 and Step3 substitute id1, id2,, idk and S1j, S2j, … , Skj into a Lagrange’s interpolation polynomial, and the obtained coefficients a0, a1, … , ak−1 of function f (x) are used as the pixel values of the secret image S. The purpose of this process is to solve for the value of a0, a1, … , ak−1.
Solving for the value of a0, a1, … , ak−1 in terms of linear algebra means solving for the matrix A. If any k rows are taken out of the matrix D to form a new matrix F, the pixel values involved in the recovery form a new vector G. Then we have FA = G. Calculate the inverse matrix F−1 of F, both sides of the equation FA = G are simultaneously multiplied left by F−1 to obtain F−1FA = F−1G. Thus, we get A = F−1G and a0, a1, … , ak−1.
This paper provides a procedure for solving F−1 in [25] is as follows:
Step1: Construct e1, e2, e3 as shown (11) below.
Step2: Solve the system of linear equations separately to obtain x1, x2, … , xk.
Step3: Get F−1 = (x1, x2, … , xk).
e 1 = 1 0 0 T , e 2 = 0 1 0 T , , e k = 0 0 1 T
F x 1 = e 1 , F x 2 = e 2 , , F x k = e k
The following scheme is proposed after the theoretical derivation of the feasibility of matrix operations (see Section 3.2).

3.2. Agrithm of Secret Image Sharing Scheme with Matrix Operatio n

The implementation method of matrix operation-based image secret sharing scheme proposed in this paper is as follows: the allocator substitutes id1, id2,, idn into the (8) construction matrix D, and the grayscale values of the first to kth pixels in S are substituted as the values of a0, a1, … , ak−1 to form the vector A as shown in (9). The allocator calculates R = DA to obtain the vector R as shown. The allocator can generate n secret messages to share with n participants based on each participant’s identifier as the first pixel of each shadow image Si: Si1.
The allocator then repeats the above operation by using the grayscale values of the kth + 1st to 2kth pixels in S as the value of a0, a1, … , ak−1 to obtain Si2, i = 1, … , n. Until all pixels in S have been shared to obtain Siw/k, i = 1, … , n. Thus, get the shadow image S1, S2, … , Sn.
The proposed algorithm of secret image sharing based on matrix operation (ISSMO) is shown in Algorithm 3. When n = 5, k = 3, the schematic diagram of the sharing process is shown in Figure 1.
Algorithm 3 Image secret sharing algorithm based on matrix operations
Input: S; id1, id2, … , idn
Output: S1, S2, … , Sk
Step1: Construct matrix D from (8).
Step2: Let j = 1
Step3: Select the k pixels from k(j−1) + 1 to k(j−1) + k in S and assign a0, a1, … , ak−1 to each pixel
Step4: Construct the column vector A and calculate R = DA.
Step5: Get S1j, S2j, … , Snj
Step6: If j < w/k, let j = j + 1 and jump to Step3; if j = w/k, skip to Step7.
Step7: The shadow image S1, S2, … , Sn is obtained by using Si1, Si2, … , Siw/k as the pixel grayscale value of image Si
When using k shadow images S1, S2, … , Sk for secret recovery, its corresponding participant identifiers id1, id2, … , idn are known. First, the matrix F is obtained by taking the k rows corresponding to id1, id2, … , idk in the matrix D.
F = 1 i d 1 i d 1 2 i d 1 k 1 1 i d 2 i d 2 2 i d 2 k 1 1 i d 3 i d 3 1 i d 3 k 1 1 i d k i d k 2 i d k k 1
Next, follow the method mentioned in Section 3.1 to derive F−1. Take the first pixel S11, S21, … , Sk1 of each shadow image to form the vector
G = S 1 1 S 2 1 S k 1 T
Then calculate A = G−1R to get the column vector A. From the coefficients of A, we can get the secret information a0, a1, … , ak−1, as the gray value of k pixels from 1 to k of the secret image.
Next, the second pixel S12, S22, … , Sk2 of each shadow image is taken to form the vector G = (S12, S22, … , Sk2)T, and A = F−1G is calculated to obtain the column vector A. From the coefficients of A, the secret information a0, a1, … , ak−1, as the grayscale values of kth + 1st to 2kth pixels of the secret image, is obtained. The above process is repeated until all pixels of S are secretly recovered and obtain the secret image S.
In this paper, the proposed image secret sharing algorithm based on matrix operations is shown in Algorithm 4. A schematic diagram of the recovery process is shown in Figure 2. We assume that the identities of the participants involved in recovery are id1, id2, and id3.
Algorithm 4 Image secret recovery algorithm based on matrix operations
Input: id1, id2, …, idk, S1, S2, … , Sk
Output: S
Step1: The matrix F is obtained by taking out the k rows corresponding to id1, id2, … , idk in the matrix D.
Step2: Calculate the inverse matrix F−1 of F according to the method in Section 3.1. Motivation
Step3: Denote the jth pixel gray value of Si as Sij and let j = 1.
Step4: Construct G = (S1j, S2j, … , Skj)T and compute A = F−1G to obtain the column vector A.
Step5: Get a0, a1, … , ak−1 from (9), let Sk(j−1) + 1 = a0, Sk(j−1) + 2 = a0, … , Sk(j−1) + k = ak−1
Step6: If j < w/k, then let j = j + 1 and skip to Step4; if j = w/k, skip to Step7.
Step7: Obtain S by using S1, S2, … , Sw. as the pixel gray value of the image S.

3.3. Example of (3, 3)-SIS

This section will assign id1 = 1, id2 = 2, id3 = 3 to each participant’s identity without loss of generality under the finite fields GF (28) and GF (251), respectively. Share a set of secret pixels through an image secret sharing scheme with threshold conditions: k = 3, n = 3. The shared secret pixel grayscale values are: 25, 156, 7, 210, 54, 134.The secret image recovery algorithm based on matrix operations is shown more specifically by the following example.

3.3.1. Example of (3, 3)-SIS Scheme in GF (28)

In the SISMO sharing process, first construct matrix D according to the value of each participant’s identity.
D = 1 1 1 1 2 4 1 3 9
Construct the column vector A1 = (25 156 7)T using the first three numbers in the secret message. Through R1 = DA1 to get the column vector R1.
R 1 = D A 1 = 1 1 1 1 2 4 1 3 9 25 156 7 = 130 32 187
The first element of the three shadow images S11 = 130, S21 = 32, S31 = 187 can be obtained according to the elements of the vector R. Then use the last three numbers in the secret message to construct the column vector A2 = (210 54 134)T, and R2 is obtained by calculate R2 = DA2.
In the recovery process, first construct the matrix F according to the formula.
F = 1 1 1 1 2 4 1 3 9
Then construct e1, e2, e3.
e 1 = 1 0 0 T , e 2 = 0 1 0 T , e 3 = 0 0 1 T
Solve the linear equations Fx1 = e1, Fx2 = e2, … , Fxk = ek separately as follows.
  1 1 1 1 2 4 1 3 9 x 1 , 1 x 1 , 2 x 1 , 3 = 1 0 0   1 1 1 1 2 4 1 3 9 x 2 , 1 x 2 , 2 x 2 , 3 = 0 1 0   1 1 1 1 2 4 1 3 9 x 3 , 1 x 3 , 2 x 3 , 3 = 0 0 1
Get x1, x2, x3 and calculate F−1 as follows.
x 1 = 1 122 122 , x 2 = 1 245 244 , x 3 = 1 143 142
F 1 = ( x 1     x 2     x 3 ) = 1 1 1 122 245 143 122 244 142
The next step is to construct G1 = (130 32 187)T and calculate A1 = F−1G1.
A 1 = F 1 G 1 = 3 248 1 123 4 124 126 250 126 130 32 187 = 25 156 7
The first three numbers of the secret information are known. Next is to build G2 = (98 156 44)T and calculate A2 = F−1G2.
A 2 = F 1 G 2 = 3 248 1 123 4 124 126 250 126 98 156 44 = 210 54 134
So far, the complete secret information is obtained: 25, 156, 7, 210, 54, 134.

3.3.2. Example of (3, 3)-SIS Scheme in GF (251)

In the secret sharing process, first construct the matrix D as shown,
D = 1 1 1 1 2 4 1 3 9
Then construct the column vector A3 = (25 156 7) T, calculate R3 as follows and get the first pixel of the three shadow images: S11 = 188, S21 = 114, S31 = 54.
R 3 = D A 3 = 1 1 1 1 2 4 1 3 9 25 156 7 = 188 114 54
Next, construct the column vector A4 = (210 54 134) T and calculate R4 according to the following formula, S12 = 147, S22 = 101, S32 = 72, we can get S1 = (188 147) T, S2 = (144 101) T, S3 = (54 72) T,
R 4 = D A 4 = 1 1 1 1 2 4 1 3 9 210 54 134 = 147 101 72
In the recovery process, first construct the matrix F and e1, e2, e3 as shown in the formulas:
F = 1 1 1 1 2 4 1 3 9
e 1 = 1 0 0 T , e 2 = 0 1 0 T , e 3 = 0 0 1 T
Solve the linear equations Fx1 = e1, Fx2 = e2, … , Fxk = ek separately as shown:
  1 1 1 1 2 4 1 3 9 x 1 , 1 x 1 , 2 x 1 , 3 = 1 0 0   1 1 1 1 2 4 1 3 9 x 2 , 1 x 2 , 2 x 2 , 3 = 0 1 0   1 1 1 1 2 4 1 3 9 x 3 , 1 x 3 , 2 x 3 , 3 = 0 0 1
Get x1, x2, x3 and F−1 as shown:
x 1 = 3 123 126 , x 2 = 248 4 250 , x 3 = 1 124 126
F 1 = ( x 1     x 2    x 3 ) = 3 248 1 123 4 124 126 250 126
Then construct G3 = (118 114 54)T and calculate A3, construct G4 = (147 101 72)T and calculate A4 as follows:
A 3 = F 1 G 3 = 3 248 1 123 4 124 126 250 126 118 114 54 = 25 156 7
Finally, the secret information: 25, 156, 7, 210, 54, 134 is obtained. Thus it can be seen that the restoration process is more effective compared with the original secret information.

3.4. Computational Efficiency Analysis

The complicated step of the calculation in this scheme is to construct the matrix D and calculate D−1. Since id1, id2, … , idn and its correspondence with P1, P2, … , Pn are public in the secret sharing process, the process of constructing the matrix D and calculating D−1 only needs to be done before recovering the first set of pixels. In this way, the process of recovering all secret pixels afterwards only needs to be performed to calculate A = D−1S, which greatly reduced the computation complexity of the secret recovery. In this section, the efficiency of the two algorithms is analyzed in terms of the number of operations (+, −, ×, ÷) required by the two schemes.

3.4.1. Efficiency Analysis of Thien and Lin’s (k, n)-SIS Scheme

In Thien and Lin’s image secret sharing process, as described in Algorithm 1, no operation occurred in Step1 to Step3 and it takes place in Step4, the calculation of a polynomial of degree k−1 is performed. The number of operations that have occurred is:
O 1 S 1 = 1 2 n k 2 + 1 2 n k n
Step5 makes a judgment and loops Step1 to Stpe4 for w/k times; no operation occurs in Step6. After collating the above steps, the number of operations occurred during the secret sharing of images of Thien and Lin is obtained as:
O 1 S = w k O 1 S 1 = 1 2 w n k + 1 2 w n w n k 1
In Thien and Lin’s image secret recovery process Algorithm 2, no operation occurs in Step1. Step2 involves the calculation of Lagrange’s interpolation polynomials, which is equivalent to constructing a linear equation system first, and then solving it. The number of operations that occurred in this step is:
O 1 R 1 = 1 2 k 3 + 1 2 k 2 + 2 3 k 3 + 1 2 k 2 7 6 k = 7 6 k 3 + k 2 7 6 k
No operation occurred in Step3, Step1~Step3 are looped for w/k times after the judgment of Step4. Collating all the steps, the number of operations occurred during the Thien and Lin’s image secret recovery process is:
O 1 R = w k O 1 R 1 = 7 6 w k 2 + w k 7 6 w
Integrating the number of operations of the sharing process with the recovery process, the total number of operations occurring in Thien and Lin’s image secret sharing scheme is:
O 1 = O 1 S + O 1 R = 7 6 w k 2 + 1 2 n + 1 w k + 1 2 w n 7 6 w w n k 1

3.4.2. Efficiency Analysis of (k, n)-SIS Scheme Based on Matrix Operations

In Algorithm 3, a secret sharing process for images based on matrix operations, the number of operations that occur in Step1 is:
O 2 S 1 = 1 2 n k 2 3 2 n k + n
No operation occurs in Step2 and Step3 and one matrix multiplication operation occurs in Step4. Since it is a matrix of n rows and k columns multiplied by a column vector of k rows, the number of addition operations that occur is:
O 2 S 2 = 2 n k 2 n
No operation occurred in step5 and Step7, and Step6 made a judgment and cycled Step3 to Step5 w/k times. In summary, the total number of operations that occurred in Algorithm 3, a secret sharing process for images based on matrix operations, is:
O 2 S = O 2 S 1 + w k O 2 S 2 = 1 2 n k 2 3 2 n k + 2 w n + n 2 w n k 1
And in the matrix operation-based image secret recovery process Algorithm 4, the number of operations occurring in Step1 is:
O 2 R 1 = 1 2 k 3 3 2 k 2 + k
In Step2, the process of solving the system of linear equations is performed k times and the total number of operations performed is:
O 2 R 2 = 2 3 k 4 + 1 2 k 3 7 6 k 2
No operation occurs in Step3. The number of operations that occur in Step4 is:
O 2 R 3 = 2 k 2 k
In Step5, no operation occurred. Step6 made a judgment and looped Step4 and Step5 w/k times. No operation occurred in Step7. To sum up, the total number of operations occurred in Algorithm 4 of the image secret recovery process based on matrix operations is:
O 2 R = O 2 R 1 + O 2 R 2 + w k O 2 R 3 = 2 3 k 4 + k 3 8 3 k 2 + 1 + 2 w k w
By integrating the number of operations of the sharing process with the recovery process, the total number of operations occurring in the implementation of image secret sharing scheme based on matrix operations is:
O 2 = O 2 S + O 2 R             = 2 3 k 4 + k 3 + n 2 8 3 k 2 + 2 w 3 2 n + 1 k + 2 w n w + n w n k 1

3.4.3. Operation Time Comparison

In this paper, the number of operations of the classical secret sharing scheme compared with the secret sharing scheme proposed in this paper is plotted using MATLAB 2016a. Figure 3 shows the image of the number of operations performed by the two different schemes varying with the value of k, where w = 256 × 256, n = 10, and k is taken from 2 to 10.
And Figure 4 shows the images of the number of operations performed by the two schemes with different w when w is taken from 128 × 128 to 512 × 512 and k = 5, n = 10.
According to the comparison of operation times as shown in Figure 3 and Figure 4, the number of operations of the implementation method proposed in this paper is smaller than that of Thien and Lin’s image secret sharing scheme in the range of threshold values from 2 to 10 and secret image sizes from 128 × 128 to 512 × 512. Moreover, the difference between the number of operations of both methods is proportional to the threshold and secret image size.

4. Experiments and Comparisons

4.1. Feasibility Experiment of the Implementation Proposed in This Paper

The implementation of image secret sharing scheme based on matrix operations proposed in this paper was programmed using MATLAB 2016a. The (5, 7)-secret sharing is performed on the original image Figure 5a with image size 256 × 256 pixels, and the values of id1, id2, … , id7 are: idi = i, i = 1, … , 7.
The shadow images obtained from the experiment are shown in Figure 5b. The secret image is recovered according to the matrix operation-based image secret recovery algorithm, and the recovered image obtained is shown in Figure 5c. Comparing the recovered Figure 5a with Figure 5c shows that the image secret sharing scheme based on matrix operation proposed in this paper is effective.

4.2. Comparison Experiment of Computing Efficiency under Different Thresholds

In this experiment, a 256 × 256 size image is used for secret sharing, and the same shares are selected for secret sharing using two different implementation methods: Thien and Lin’s image secret sharing scheme based on Lagrange’s polynomials, and the implementation of image secret sharing scheme based on matrix operations for secret sharing and recovery. The running times of the two schemes are calculated separately.
The experiment used MATLAB2016 for programming, and selected GF(28) as the finite field. The irreducible polynomial used in the operation is x8 + x4 + x3 + x2 + x+1.The running time is recorded when the threshold is k = 2, 3, 4, 5 respectively, as shown in the following Table 1, and the comparison of the running time is shown in Figure 6.
Under the finite field GF(251), the running times for threshold values of k = 2, 3, 4, 5 are recorded respectively as shown in the following Table 2, and the running time comparison graphs are shown in Figure 7.

4.3. Comparison Experiments of Computing Efficiency under Secret Image Recovery of Different Sizes

This experiment used images of different sizes for secret sharing. The same shares are selected to perform (5, 5) secret sharing and recovery using two different secret sharing schemes: the classical Thien and Lin’s image secret sharing scheme (Classic scheme), and the matrix operation-based secret sharing scheme (Developed scheme) proposed in this paper, and the running times of the two are calculated separately.
The experiments were programmed using MATLAB2016 with the finite field selection GF(28). The irreducible polynomial used in the operation is x8 + x4 + x3 + x2 + x+1.The running times when the secret image size is 128 × 128, 192 × 192, 256 × 256, 384 × 384, 512 × 512 are recorded respectively as shown in the following Table 3, and the running time comparison graphs are shown in Figure 8.
Under the finite field GF(251), the running time when the recording size is 128 × 128, 192 × 192, 256 × 256, 384 × 384, 512 × 512 is shown in the following Table 4, and the running time comparison chart is shown in Figure 9.

4.4. Analysis of Experimental Results

A comparison of the operation times of the two schemes under GF(251) and GF(28) finite fields with different thresholds k is shown respectively in Section 4.2. Section 4.3 shows the comparison of the computation time of the two schemes under two finite fields (GF(251) and GF(28)) with different secret image sizes. Experiments show that the operation time of the matrix operation-based secret image sharing scheme proposed in this paper is smaller than that of the polynomial interpolation-based secret image sharing scheme. And the time difference between the two schemes is proportional to the threshold value k and the size of the secret image. The experimental results are consistent with the theoretical results in Section 3.4.

5. Conclusions

Thien and Lin’s ISS scheme uses Lagrange’s interpolation polynomials in the secret reconstruction process, which requires a lot of calculations in practice, which affects the efficiency of the schemes. This paper proposes an implementation method of a secret sharing scheme based on matrix operations instead of the traditional polynomial calculation method to reduce the number of operations in the revealing process. Compared with Lagrange’s interpolation, the proposed implementation method has better performance through theoretical analysis, which is also confirmed by experimental results. The implementation in this paper is still valid for general polynomial based secret sharing schemes, and may have better results for image secret sharing schemes with different functions. For example, for an image secret sharing scheme with essential participants, the implementation of this paper may provide new ideas for building essential participants. This direction still deserves further research.

Author Contributions

Conceptualization, Z.R. and P.L.; Formal analysis, Z.R. and X.W.; Methodology, Z.R.; Writing–original draft, Z.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Natural Science Foundation of Hebei Province (Grant number: F2019502173), National Natural Science Foundation of China (Grant number: 61602173) and the Fundamental Research Funds for Central Universities (Grant number: 2019MS116).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors would like to thank the editor and the anonymous reviewers for their valuable comments.

Conflicts of Interest

The authors declare that they have no conflict of interest.

References

  1. Shamir, A. How to share a secret. Commun. ACM 1979, 22, 612–613. [Google Scholar] [CrossRef]
  2. Lin, T. Secret image sharing. Comput. Graph. 2002, 26, 765–770. [Google Scholar]
  3. Lin, C.C.; Tsai, W.H. Secret image sharing with steganography and authentication. J. Syst. Softw. 2004, 73, 405–414. [Google Scholar] [CrossRef]
  4. Yang, C.N.; Chen, T.S.; Yu, K.H.; Wang, C.C. Improvements of image sharing with steganography and authentication. J. Syst. Softw. 2007, 80, 1070–1076. [Google Scholar] [CrossRef]
  5. Ma, K.Y. Essential secret image sharing scheme with different importance of shadows. J. Vis. Commun. Image Represent. 2013, 24, 1106–1114. [Google Scholar]
  6. Yan, X.; Wang, S.; Niu, X.; Yang, C.N. Essential Visual Cryptographic Scheme with Different Importance of Shares; Springer International Publishing: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
  7. Chen, C.C. Essential Secret Image Sharing Scheme. In Proceedings of the CSCIST 2010, CrossStrait Conference on Information Science and Technology, Qinhuangdao, China, 9–13 July 2010; Department of Information Management, Hsuan Chuang University: Hsinchu, Taiwan, 2010. [Google Scholar]
  8. Li, P.; Liu, Z. An Improved Essential Secret Image Sharing Scheme with Smaller Shadow Size. Int. J. Digit. Crime Forensics 2018, 10, 78–94. [Google Scholar] [CrossRef] [Green Version]
  9. Li, P.; Yin, L.; Ma, J. Visual Cryptography Scheme with Essential Participants. Mathematics 2020, 8, 838. [Google Scholar] [CrossRef]
  10. Yadav, M.; Singh, R. Essential secret image sharing approach with same size of meaningful shares. Multimed. Tools Appl. 2021, 2021, 1–18. [Google Scholar] [CrossRef]
  11. Yuan, L.; Li, M.; Guo, C.; Hu, W.; Luo, X. Secret Image Sharing Scheme with Threshold Changeable Capability. Math. Probl. Eng. 2016, 2016, 9576074. [Google Scholar] [CrossRef] [Green Version]
  12. Liu, Y.X.; Yang, C.N.; Wu, C.M.; Sun, Q.D.; Bi, W. Threshold changeable secret image sharing scheme based on interpolation polynomial. Multimed. Tools Appl. 2019, 78, 18653–18667. [Google Scholar] [CrossRef]
  13. Deshmukh, M.; Nain, N.; Ahmed, M. An (n, n)-Multi Secret Image Sharing Scheme Using Boolean XOR and Modular Arithmetic. In Proceedings of the IEEE International Conference on Advanced Information Networking & Applications, Crans-Montana, Switzerland, 23–25 March 2016. [Google Scholar]
  14. Singh, N.; Tentu, A.N.; Basit, A.; Venkaiah, V.C. Sequential secret sharing scheme based on Chinese remainder theorem. In Proceedings of the 2016 IEEE International Conference on Computational Intelligence and Computing Research (ICCIC), Chennai, India, 15–17 December 2016. [Google Scholar]
  15. Rajput, M.; Deshmukh, M. Secure (n, n + 1)-Multi Secret Image Sharing Scheme Using Additive Modulo. Procedia Comput. Sci. 2016, 89, 677–683. [Google Scholar] [CrossRef] [Green Version]
  16. Deshmukh, M.; Nain, N.; Ahmed, M. A Novel Approach for Sharing Multiple Color Images by Employing Chinese Remainder Theorem. J. Vis. Commun. Image Represent. 2017, 49, 291–302. [Google Scholar] [CrossRef]
  17. Basit, A.; Kumar, N.C.; Venkaiah, V.C.; Moiz, S.A.; Tentu, A.N.; Naik, W. Multi-stage Multi-secret Sharing Scheme for Hierarchical Access Structure. In Proceedings of the International Conference on Computing, Communication and Automation (ICCCA2017), Greater Noida, India, 5–6 May 2017. [Google Scholar]
  18. Meng, K.; Miao, F.; Huang, W.; Xiong, Y. Tightly coupled multi-group threshold secret sharing based on Chinese Remainder Theorem. Discret. Appl. Math. 2019, 268, 152–163. [Google Scholar] [CrossRef]
  19. Bisht, K.; Deshmukh, M. A novel approach for multilevel multi-secret image sharing scheme. J. Supercomput. 2021, 77, 12157–12191. [Google Scholar] [CrossRef]
  20. Liu, Y.; Yang, C.N. Scalable secret image sharing scheme with essential shadows. Signal Process. Image Commun. 2017, 58, 49–55. [Google Scholar] [CrossRef]
  21. Liu, Y.; Yang, C.; Wang, Y.; Zhu, L.; Ji, W. Cheating Identifiable Secret Sharing Scheme Using Symmetric Bivariate Polynomial. Inf. Sci. 2018, 453, 21–29. [Google Scholar] [CrossRef]
  22. Liu, Y.; Sun, Q.; Yang, C.N. (k, n) secret image sharing scheme capable of cheating detection. Eurasip J. Wirel. Commun. Netw. 2018, 2018, 72. [Google Scholar] [CrossRef] [Green Version]
  23. Yan, X.; Gong, Q.; Li, L.; Yang, G.; Lu, Y.; Liu, J. Secret image sharing with separate shadow authentication ability. Signal Processing Image Commun. 2019, 82, 115721. [Google Scholar] [CrossRef]
  24. Gutub, A.; Al-Juaid, N.; Khan, E. Counting-based secret sharing technique for multimedia applications. Multimed. Tools Appl. 2019, 78, 5591–5619. [Google Scholar] [CrossRef]
  25. Strang, G. Matrices and Gaussian Elimination. In Linear Algebra and Its Applications, 4th ed.; Thomson Learning: Stamford, CT, USA, 2005; pp. 52–53. [Google Scholar]
Figure 1. The schematic diagram of the sharing process.
Figure 1. The schematic diagram of the sharing process.
Mathematics 10 00864 g001
Figure 2. The schematic diagram of the recovery process.
Figure 2. The schematic diagram of the recovery process.
Mathematics 10 00864 g002
Figure 3. Comparison of the number of operations performed by the two schemes on the change of k.
Figure 3. Comparison of the number of operations performed by the two schemes on the change of k.
Mathematics 10 00864 g003
Figure 4. Comparison of the number of operations performed by the two schemes with respect to changes in w.
Figure 4. Comparison of the number of operations performed by the two schemes with respect to changes in w.
Mathematics 10 00864 g004
Figure 5. The proposed implementation of (5,7)-ISS scheme based on matrix operations: (a) the secret image; (b) the recovered image; (c) 7 shadows.
Figure 5. The proposed implementation of (5,7)-ISS scheme based on matrix operations: (a) the secret image; (b) the recovered image; (c) 7 shadows.
Mathematics 10 00864 g005
Figure 6. Running time comparison chart with different threshold in GF(28).
Figure 6. Running time comparison chart with different threshold in GF(28).
Mathematics 10 00864 g006
Figure 7. Running time comparison chart with different threshold in GF(251).
Figure 7. Running time comparison chart with different threshold in GF(251).
Mathematics 10 00864 g007
Figure 8. Running time comparison chart with different size in GF(28).
Figure 8. Running time comparison chart with different size in GF(28).
Mathematics 10 00864 g008
Figure 9. Running time comparison chart with different sizes in GF(251).
Figure 9. Running time comparison chart with different sizes in GF(251).
Mathematics 10 00864 g009
Table 1. Running time with different threshold in GF(28).
Table 1. Running time with different threshold in GF(28).
Threshold k = 2Threshold k = 3Threshold k = 4Threshold k = 5
Developed scheme
Running time (second)
21.318516.423013.553812.4131
Classic scheme
Running time (second)
50.002857.674566.070765.6301
Table 2. Running time in different threshold in GF(251).
Table 2. Running time in different threshold in GF(251).
Threshold k = 2Threshold k = 3Threshold k = 4Threshold k = 5
Developed scheme
Running time (second)
0.34530.29600.24480.2524
Classic scheme
Running time (second)
0.40620.36330.32870.3622
Table 3. Running times with different sizes in GF(28).
Table 3. Running times with different sizes in GF(28).
Secret Image Size
128 × 128
Secret Image Size
192 × 192
Secret Image Size
256 × 256
Secret Image Size
384 × 384
Secret Image Size
512 × 512
Developed scheme
Running time (second)
3.12635.71939.342511.343238.2335
Classic scheme
Running time (second)
16.914536.307964.6712151.6507269.1568
Table 4. Running times with different sizes in GF(251).
Table 4. Running times with different sizes in GF(251).
Secret Image Size
128 × 128
Secret Image Size
192 × 192
Secret Image Size
256 × 256
Secret Image Size
384 × 384
Secret Image Size
512 × 512
Developed scheme
Running time (second)
0.15170.17780.22080.35580.5600
Classic scheme
Running time (second)
0.20080.22030.40600.58030.9693
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ren, Z.; Li, P.; Wang, X. An Implementation of Image Secret Sharing Scheme Based on Matrix Operations. Mathematics 2022, 10, 864. https://doi.org/10.3390/math10060864

AMA Style

Ren Z, Li P, Wang X. An Implementation of Image Secret Sharing Scheme Based on Matrix Operations. Mathematics. 2022; 10(6):864. https://doi.org/10.3390/math10060864

Chicago/Turabian Style

Ren, Zihan, Peng Li, and Xin Wang. 2022. "An Implementation of Image Secret Sharing Scheme Based on Matrix Operations" Mathematics 10, no. 6: 864. https://doi.org/10.3390/math10060864

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop