Next Article in Journal
Optimal Surface for Elliptical Isolated Footings with Partially Compressed Contact Area
Previous Article in Journal
An η-Power Stochastic Log-Logistic Diffusion Process: Statistical Computation and Application to Individuals Using the Internet in the United States
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Meaningful (n, n)-Threshold Visual Secret Sharing Scheme Based on QR Codes and Information Hiding

1
College of Electronic Engineering, National University of Defense Technology, Hefei 230037, China
2
Anhui Key Laboratory of Cyberspace Security Situation Awareness and Evaluation, Hefei 230037, China
*
Author to whom correspondence should be addressed.
Mathematics 2026, 14(3), 405; https://doi.org/10.3390/math14030405
Submission received: 23 December 2025 / Revised: 11 January 2026 / Accepted: 19 January 2026 / Published: 23 January 2026

Abstract

Visual secret sharing (VSS) schemes can enhance the security of image transmission over networks. Conventional VSS schemes often generate meaningless shares, which can raise suspicion among potential attackers. To address this issue, this paper proposes a novel VSS scheme that integrates information hiding techniques with quick response (QR) codes to generate meaningful shares. The first n 1 shares are encoded as standard QR codes, while the n-th share is embedded into a grayscale carrier image using a reversible information hiding method, ensuring the carrier remains visually meaningful. During transmission, the n 1 QR codes and the hidden image are distributed. At the receiver end, the hidden n-th share is extracted losslessly from the carrier image using the n 1 QR codes, and the original secret image is perfectly reconstructed by bitwise XORing all n shares. Experimental results demonstrate the feasibility, security, and visual quality of the proposed scheme.

1. Introduction

Visual secret sharing (VSS) schemes avoid complex computations and rely on the human visual system (HVS) for decoding [1,2,3,4]. Unlike watermarking or information hiding, which embed information in a carrier image, VSS schemes distribute the secret into multiple shares [5,6,7], requiring a sufficient number to reconstruct it. For example, the  ( n , n ) -threshold VSS schemes can generate n shares [8,9,10], each of which is essential, and the secret cannot be revealed if even one share is missing.
The Naor–Shamir scheme generates n shares using two basic matrices [11]. This is an ( k , n ) -threshold scheme. When receivers obtain k or more shares, they can recover the secret. The reconstructed image is decoded by the HVS. The VSS schemes have been applied to encrypt binary images [12], grayscale images [13], and color images [14], primarily serving to protect secret images.
Most VSS schemes generate meaningless shares. For instance, Liu et al. employed random grids [15], resulting in shares that appear noisy and unreadable to the HVS. Similarly, Yan et al. designed a two-authentication VSS scheme for binary images using polynomials [16]. However, directly encrypting continuous-tone images such as grayscale or color images with VSS schemes remains challenging. To address this, Hou applied halftone technology and color decomposition [17] to convert continuous-tone images into halftone form. Furthermore, Jia et al. proposed a collaborative VSS scheme [18], while Kannojia et al. used pixel vectorization and XOR operations to encrypt grayscale images [19]. All these schemes are pixel-expanded, meaning their shares are larger than the original image.
To reduce the share size, Shyu introduced a no-pixel-expansion VSS scheme based on random grids [20], although the reconstructed image quality was low. Yang et al. improved the reconstruction quality [21], facilitating easier recognition by the HVS. Yan et al. further enhanced recovery quality using the analysis-by-synthesis (AbS) framework [22]. Shyu achieved lossless reconstruction through XOR operations [23], and a perfect recovery VSS scheme was also proposed [24]. High-quality reconstructions enable the HVS to more readily identify the secret content.
Meaningless shares can attract attackers’ attention, thereby compromising security. To mitigate this, several researchers have proposed schemes that generate meaningful shares. For example, Wu et al. designed a color VSS scheme [25], and Shivani et al. used meaningful shares to encrypt secret images [26]. Lo et al. employed XOR operations to produce distinct meaningful shares [27], while Wu et al. formulated VSS schemes using integer linear programming [28]. Meaningful sharing for grayscale and color images was also explored in [29]. Given their widespread use, quick response (QR) codes have emerged as viable candidates for shares.
Using QR codes as shares can help schemes evade detection by attackers [30]. Chow et al. developed an XOR-based VSS scheme [31] that distributes secrets via QR codes, all of which can be reliably decoded by standard decoders. Wan et al. designed a VSS scheme using QR codes [32], and Lu et al. combined XOR with Reed–Solomon codes for VSS schemes [33]. Cheng et al. realized a ( k , n ) -threshold scheme [34], and Tan et al. improved robustness by incorporating padding codewords [35]. In these approaches, secret images are reconstructed using the XOR operation. The built-in error correction code (ECC) of QR codes is leveraged to correct errors, a feature exploited by several schemes [36]. Specifically, shares are embedded into QR codes, and ECC compensates for distortions. Similarly, an  ( n , n ) -threshold VSS scheme utilizes ECC for this purpose [37]. Subsequently, they improved that to the ( k , n ) -threshold scheme [38]. Because QR codes are ubiquitous in everyday applications, attackers are less likely to suspect them as carriers of secret data, thereby enhancing the security of secret image transmission.
Most existing VSS schemes embed shares in QR codes by intentionally introducing correctable errors via ECC, thereby compromising the QR codes’ natural resistance to interference and reducing their robustness and scannability. To address this, this paper presents a novel VSS scheme for binary images that combines information hiding and QR codes. In our approach, the first n 1 shares are scaled, error-free QR codes fully compatible with standard decoding. The n-th share is subtly embedded in a grayscale image using LSB and 2-LSB methods. The resulting set consists of n 1 QR codes and one innocuous grayscale image, which can be publicly shared without suspicion. The recipient first extracts the hidden n-th share from the carrier image, then uses the n 1 QR codes and reconstructs the original secret image losslessly by bitwise XOR across all n shares.
The main contributions of this paper are as follows:
  • Compared to [16], the proposed scheme produces meaningful shares: n 1 QR codes. The n-th share is meaningless and is hidden within a meaningful image. The sender transmits this meaningful image along with the n 1 QR codes to the recipients. The use of meaningful images helps avoid suspicion and enhances the security of the VSS scheme. Furthermore, for both the sender and the receiver, they are easy to manage.
  • The QR code shares are error-free, thereby preserving their full error correction capability. Moreover, because QR codes are widely used in everyday communication, their transmission is less likely to raise suspicion among attackers.
The structure of this paper is as follows: Section 2 presents preliminaries, including the VSS scheme, LSB, 2-LSB and peak signal-to-noise ratio (PSNR). Section 3 details the proposed scheme, covering encryption and decryption processes. Section 4 describes the experimental setup and results, and Section 5 provides the conclusions.

2. Preliminaries

The knowledge about the VSS scheme (Section 2.1), as well as the information hiding methods LSB and 2-LSB, XOR, and PSNR (Section 2.2), is introduced in this section.

2.1. Visual Secret Sharing Scheme

Traditional cryptography uses a key—once the key is obtained, an attacker can easily decrypt the secret. To improve upon this drawback, the VSS scheme is proposed. It distributes the secret into multiple images, called shares. Each share is crucial and acts as a key in the decryption of the secret. Naor and Shamir used two basic matrices to design a scheme for binary images [11]. Shares are printed on transparencies, and the secret image is recovered by stacking them. Let R be the restored image; R (resp. R ) represents white (resp. black) color. The restored color is indicated as a pixel block, each block being 2 × 2 , 3 × 3 , or up to n × n pixels. The VSS scheme satisfies two conditions (using the ( k , n ) -VSS as an example):
Condition 1: Stacking k 1 or less shares, the generated image satisfies n ( R ) n ( R ) = 1 .
Condition 2: If more than k shares are used to stack, the restore image satisfies n ( R ) n ( R ) > 1 .
Here, n ( · ) is the number of black pixels. When n ( R ) n ( R ) = 1 is satisfied, the restored black and white pixel block has the same number of black pixels. Therefore, they are considered the same color without contrast. That cannot express any information. People using HVS cannot identify it. This restored image is meaningless. If  n ( R ) n ( R ) > 1 , the recovered black pixel block has more black pixels than the recovered white pixel block. From the perspective of the human eye, the information represented by the restored image can be seen. The secret information is decoded by the HVS.

2.2. Related Terms

LSB and 2-LSB: LSB is an information hiding technique. The LSB operation replaces the last bit of the pixel with a secret bit. Let s be the secret information and s i , s i + 1 be two binary numbers ( s i s , s i + 1 s ).
Definition 1.
LSB: For a pixel value A in the target image T ( A , B [ 0 , 255 ] ), use the LSB to hide the secret information as follows:
A f ( 10 2 ) a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 , a 8 = s i , a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 f 1 ( 10 2 ) B , C ( x , y ) = B ,
where f ( 10 2 ) denotes the operation of converting the decimal number to the binary number. The → represents the operation of the generation. The secret image is hidden in image T to generate image C . Here, a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 is an eight-bit binary number, such that a 1 is the first bit and a 8 is the last bit of the eight-bit binary number. Information hiding is performed after the pixel values are converted to binary. The information replaces the last bit to generate a new eight-bit binary number. This new binary number is converted to decimal to replace the pixel value at the same location.
Definition 2.
2-LSB: Use the 2-LSB to hide the secret information as follows:
A f ( 10 2 ) a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 , a 7 = s i , a 8 = s i + 1 , a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 f 1 ( 10 2 ) B , C ( x , y ) = B .
XOR: It is the decoding method in this paper. XOR is an operation on colors. For two colors, performing an XOR is
XOR ( 0 / 1 , 0 / 1 ) 0 , XOR ( 0 / 1 , 1 / 0 ) 1 ,
where 0 and 1 denote the black and the white, respectively.
PSNR: It is a standard that describes the difference between two images [39,40,41]. The value of PSNR is denoted by p s n r , and  p s n r has
m s e = 1 p q x = 1 p y = 1 q ( C ( x , y ) T ( x , y ) ) 2 ,
p s n r = 10 × log 10 ( 255 2 m s e ) .
Here, m s e denotes mean squared error. p × q is the size of T . The  p s n r value describes the similarity of two images. A higher p s n r value indicates higher image quality.

3. The Proposed Scheme

Section 3.1 presents the encryption process. The decryption process is described in Section 3.2. Section 3.3 analyzes the security of the proposed scheme.

3.1. The Encryption Process

Figure 1 illustrates the overall process of the proposed scheme. The first n 1 shares are generated as scaled QR codes, while the n-th share is embedded into a carrier image using the LSB and 2-LSB methods. The QR code share will serve as the flag for the n-th share embedded in the carrier image. The flag bit will determine the method of information embedding. Both the carrier image and the n 1 QR codes are meaningful and are distributed across the network by users.
The details of the encryption process are as follows:
Step 1: Let f ( p z × q z p × q ) scale p z × q z QR codes ( z = 1 , , n 1 ) to p × q . Q and H refer to the QR code and secret image, respectively. The scaled QR codes are shares ( S ):
Q z f ( p z × q z p × q ) S z ,
where z = 1 , 2 , , n 1 . In this process, p z and q z are enlarged θ z p times and θ z q times, respectively. The  θ z p and θ z q satisfy θ z p 1 and θ z q 1 . All QR codes are scaled to fit the share. The first n 1 shares are standard QR codes. As long as a QR code meets the required size p × q , no modification to its module pattern is necessary. Alternatively, any QR code of size p × q can be randomly selected to serve as the share.
Step 2: Let f g denote the generation of n-th shares. The black and white are denoted by 0 and 1, respectively. The operation f g is
S n ( x , y ) = 0 , if XOR ( S 1 ( x , y ) , , S n 1 ( x , y ) , 0 ) H ( x , y ) , S n ( x , y ) = 1 , if XOR ( S 1 ( x , y ) , , S n 1 ( x , y ) , 1 ) H ( x , y ) .
Step 3: Hide the n-th share in a carrier image.
a. Generate mark images M 1 and M 2 . Mark images determine that the hiding method is LSB or 2-LSB. The  M 1 and M 2 are generated by
XOR ( S 1 , , S n 1 ) M 1 .
M 1 f ( 0 1 , 1 0 , 180 ) M 2 ,
where f ( 0 1 , 1 0 , 180 ) means that black pixels (0) become white (1), white pixels (1) become black (0), and then the image is rotated 180 degrees counterclockwise.
b. The n-th share is converted to one-dimensional data by
S n f ( p × q 1 × p q ) s ,
where f ( p × q 1 × p q ) denotes that two-dimensional information is converted to one-dimensional information.
c. Embed information into the image T by using mark images M 1 and M 2 to generate a carrier image C . The embedding algorithms are LSB and 2-LSB. The operation of information hiding is
T + s f h C ,
where f h denotes the information hidden method. The information s is hidden in T to generate C . The information hiding method f h is:
f h is LSB , if M 1 ( x , y ) M 2 ( x , y ) , 2 - LSB , if M 1 ( x , y ) = M 2 ( x , y ) = 0 , Nothing , others .
When f h is LSB, the method outlined in Equation (1) is used. Similarly, if  f h is 2-LSB, Equation (2) is used. When f h is ‘Nothing’, no information is embedded in the carrier image. The sizes of M 1 , M 2 , T , C and all shares S 1 , S 2 , ⋯, S n are the same, and they consist of p × q pixels. The bit length of s is p q . n ( M 1 , M 2 ) denotes the number of different colors at the same position in M 1 and M 2 . n ( M 1 , M 2 ) is the number of the same black at the same position in M 1 and M 2 . The total number of bits f h can hide in T is n ( M 1 , M 2 ) + 2 n ( M 1 , M 2 ) . The n-th share S n contains exactly n ( M 1 , M 2 ) + 2 n ( M 1 , M 2 ) bits. For example, as shown in Figure 2, if  n ( M 1 , M 2 ) + 2 n ( M 1 , M 2 ) = 9 , then S n has 9 bits. This method uses M 1 and M 2 as position markers for hiding S n in T . Both M 1 and M 2 are generated from the XOR of the first n 1 shares. No extra information is required to embed S n into T .
Algorithm 1 shows all processes of encryption.
Algorithm 1 Encryption algorithm
Input:
    Secret image H , n 1 QR codes ( Q 1 , Q 2 , , Q n 1 ) and T .
Output:
     S 1 , S 2 , , S n 1 and C .
  1:
Q z f ( p z × q z p × q ) S z .     // The p × q is the size of H . The  p z × q z denotes the size of the QR code ( z = 1 , 2 , , n 1 )
  2:
for x from 1 to p  do
  3:
    for y from 1 to q  do
  4:
        if XOR ( S 1 ( x , y ) , , S n 1 ( x , y ) , 0 ) → H ( x , y )  then
  5:
           S n ( x , y ) = 0 .   //The black and the white are denoted by 0 and 1, respectively
  6:
        end if
  7:
        if XOR ( S 1 ( x , y ) , , S n 1 ( x , y ) , 1 ) → H ( x , y )  then
  8:
           S n ( x , y ) = 1 .
  9:
        end if
10:
    end for
11:
end for
12:
XOR ( S 1 , S 2 , , S n 1 ) M 1 .
13:
M 1 f ( 0 1 , 1 0 , 180 ) M 2 .
14:
S n f ( p × q 1 × p q ) s .
15:
T + s f h C , f h follows Equation (12).
16:
Output: S 1 , S 2 , , S n 1 and C .

3.2. The Decryption Process

Figure 3 shows the decryption process. The receiver obtains n 1 QR codes and C . The n-th share can be extracted from C by using M 1 , M 2 , LSB and 2-LSB. XOR uses all shares to reconstruct the secret image losslessly.
All details of the decryption process are as follows:
Step 1: The receiver can collect n 1 QR codes and C to recover the secret image. If any are missing, the secret image will not be recovered.
Step 2: Generate mark images M 1 and M 2 by using Equation (8) and Equation (9), respectively.
Step 3: Extract the information (s) from C by using M 1 and M 2 . The operation is
C f h 1 s .
The method of f h follows Equation (12).
Step 4: One-dimensional information s is converted to two-dimensional information to generate the n-th share:
s f ( p × q ) 1 × p q 1 S n .
Step 5: Perform the XOR operation on all shares to generate the restored image R , as shown:
XOR ( S 1 , S 2 , , S n ) R .
People can obtain the secret from R by the HVS. Algorithm 2 shows all processes of the decryption.
Algorithm 2 Decryption algorithm
Input:
     S 1 , S 2 , , S n 1 and C .
Output:
    Restored image R .
  1:
XOR ( S 1 , S 2 , , S n 1 ) → M 1 .
  2:
M 1 f ( 0 1 , 1 0 , 180 ) M 2 .
  3:
C f h 1 s , f h follows Equation (12).
  4:
s f ( p × q ) 1 × p q 1 S n .
  5:
XOR ( S 1 , S 2 , , S n ) R .
  6:
Output: R .

3.3. Security Analysis

In the proposed scheme, n 1 QR codes ( S 1 , S 2 , ⋯, S n 1 ) and a carrier image C are transmitted over the network. Each image acts as a key for reconstructing the secret image. The n 1 QR codes are specifically used to extract the n-th share, which is hidden in the carrier image C via a defined extraction process. The first n 1 shares are standard QR codes with random data, scaled for the sharing protocol. Recovery of the secret image requires a bitwise XOR operation across all n shares; individual shares alone reveal nothing. The scheme is secure as long as an adversary does not obtain all n 1 QR codes along with the carrier image C .
When any n 1 shares are obtained by the potential attacker, and they know the decoding method, there are two distinct situations. One situation is that image C is not obtained. The n-th share is hidden in the C , and it cannot be recovered. When using the XOR operation to decode, the secret image cannot be recovered without one of the shares. For example, four pixels, 1, 1, 0, 1 (shares), are used to restore the secret pixel 1 (XOR(1, 1, 0, 1) 1 ). If the last pixel 1 is missing, the attacker makes a guess based on the available information. The result is 50% correct and 50% incorrect. Therefore, they are unable to restore the secret image.
Another situation is that image C is obtained, and any QR code is missed. The loss of any QR code will render it impossible to restore M 1 and M 2 . The absence of M 1 and M 2 makes it impossible to extract the n-th share from C . Based on this, they cannot restore the secret image either.
In conclusion, the proposed method cannot recover the secret image even if the potential attacker obtains only n 1 shares and knows the decryption method. If n 1 shares cannot restore the secret, then even fewer shares will be unable to do so. That is, if the number of shares held by the potential attacker is less than n, they cannot recover the secret image.

4. Experiment

This section presents all experiments conducted in this study. The encoding and decoding of QR codes are designed using ZXing library [42], and test images are from a public website [43] (standard test images). Section 4.1 provides examples using the results of a (4, 4)-threshold VSS scheme. Section 4.2 analyzes the PSNR of carrier images. The scaling test results for QR codes are shown in the table in Section 4.3. Finally, Section 4.4 compares different schemes.

4.1. Experimental Results

Test experiments use QR codes with version 4 and error correction level H (4, H). Figure 4 shows a (4, 4)-threshold VSS scheme. Figure 4a displays H . Figure 4b–d are three QR codes. These codes are scaled and split into three shares, as shown in Figure 4f–h. The target image T is the Lena picture in Figure 4e. The generated fourth share, Figure 4i, contains information about the secret image. This information is hidden in C using the LSB and 2-LSB methods. The carrier image C is in Figure 4g. The restored image appears in Figure 4k. The original secret image and Figure 4l are the same.
The sender transmits Figure 4f–h,j to the recipient on the network. Four images are all meaningful images. Using Figure 4f–h can generate M 1 and M 2 by Equations (8) and (9). The fourth share can be extracted from Figure 4j using Equations (13) and (14). All shares can restore the secret image by performing an XOR operation. Figure 4k is the same as Figure 4a.

4.2. The Test of Carrier Images

This section evaluates image quality using PSNR for different carrier images. The experimental setup is shown in Figure 4a. The tested scheme is a ( 4 , 4 ) threshold. The results for S 1 , S 2 , and S 3 are shown in Figure 4b–d, respectively. Each experiment uses a different carrier image, and they are shown in Figure 5.
Table 1 shows all test results. Tested carrier images have good PSNR in the proposed scheme. All PSNR values ( p s n r ) are greater than 40 dB. The T and C are very close through the HVS. Humans will not perceive differences. This will be more conducive to hiding information from being discovered. The attacker knows it is difficult to notice the difference. They have no doubt that it will improve the scheme’s security.
Figure 6 shows the results of histograms of the original image and the carrier image. The scheme is a ( 4 , 4 ) -threshold VSS scheme, and the n-th share is hidden in different images. The test images show a cameraman, house, jet-plane, mandrill, lake and peppers. Their histograms are shown in Figure 6a,c,e,g,i,k. The n-th share is hidden into them using the proposed method, and histograms of carrier images are shown in Figure 6b,d,f,h,j,l.
From Figure 6, it can be observed that the histogram of the original image is very similar to the plotted histogram of the carrier image, with no significant alteration of the original histogram’s trend. Therefore, through the analysis of the histogram, potential attackers find it relatively difficult to detect the information carried by the carrier image.
The PSNR of the carrier image is approximately 48 dB. Since a PSNR value exceeding 30 dB generally indicates that distortions are imperceptible to the HVS, the embedded modifications are unlikely to be noticed. Furthermore, histogram analysis reveals that the carrier image and the original image exhibit nearly identical intensity distributions, rendering statistical detection based on histogram features ineffective. High PSNR and indistinguishable histograms demonstrate that the proposed method achieves excellent visual and statistical imperceptibility, thereby ensuring security.

4.3. The QR Code Scaling Test

Table 2 shows all test results. The tested QR codes are (4, H), (5, H), and (6, H), respectively. The QR code has anti-rotational distortion characteristics. Its length is the same as its width. Therefore, the length is not changed, and the width is scaled to test its performance on the QR code. The standard decoder follows the Zxing library [42]. The simulation software is MATLAB 2016 b.
The tested scaling factors are 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, and 1.6. The standard decoder struggles to decode QR codes when scaling factors are at the extremes (0.5 or 1.6). For scaling factors between 0.6 and 1.5, decoding is successful. When the scaling factor is less than 0.6 or greater than 1.5, the QR code becomes difficult to decode.
Let c be the scaling ratio, and c has
c = θ z p θ z q .
The c satisfies that 0.6 1.0 c 1.5 1.0 ( 0.6 c 1.5 ). When c < 0.6 or c > 1.5 , the generated share (generated by scaling the QR code) is hard to decode. That will attract the attention of attackers, and the scheme’s insecurity increases. The scale factor satisfies a specific range within which QR codes can be decoded. If c = 1.0 , QR codes are suitable for sharing in the proposed scheme.

4.4. Comparison of Different Schemes

Analysis and comparison are shown in Table 3. Chow et al. used the ECC mechanism to implement a VSS scheme [31]. The QR code contains errors, and its ECC capacity is reduced. Based on the scheme [31], Cheng et al. improved it to propose a ( k , n ) -threshold scheme [34]. Each share is a QR code with some errors, and these errors do not exceed the ECC’s capacity. Tan et al. replaced padding codewords with information to design a scheme [35]. Using XOR, one can fully reconstruct the secret image. When stacking is used as the decoding method, the restored image cannot be fully recovered. Building on XOR and the ECC mechanism, Huang et al. designed another VSS scheme [37]. Subsequently, they achieved the ( k , n ) -threshold scheme by combining polynomials [38]. The QR code contains errors. In contrast, the proposed scheme uses a QR code with no errors as the share. The carrier and n 1 QR codes are transmitted. The proposed scheme can recover secret images losslessly.
Several existing schemes [31,34,37,38] employ ECC to design VSS schemes that embed share information into QR codes. In these approaches, the embedding process intentionally introduces errors into the QR code, relying on the ECC’s error-correction capability to decode. Schemes [31,34,37,38] and the proposed scheme all use the QR code as the share. The difference is that they introduce errors into the QR code to generate shares, while the proposed scheme uses the QR code as shares without introducing any errors. Furthermore, they cannot restore the secret image without errors, whereas the proposed scheme can recover it losslessly. Moreover, unlike the scheme in [35], which uses padding codewords and depends on the QR code version, the proposed scheme is largely independent of the QR code version. It also enables perfect reconstruction of the secret image without any loss or distortion.

5. Conclusions

This paper presents a novel VSS scheme that integrates information hiding techniques with QR codes for secure and secret distribution. The first n 1 shares are standard QR codes that can be directly decoded with decoders. These shares are further used to generate mark images that embed the n-th share into a visually meaningful carrier image using information hiding methods. During transmission, only the n 1 QR code images and the carrier image are shared over the network, reducing the likelihood of raising suspicion from potential attackers. At the receiver side, the n-th share is extracted from the carrier image, and the complete secret image is faithfully reconstructed by performing a bitwise XOR operation across all n shares. The proposed scheme combines the popular QR code with the VSS scheme, treating the QR code as the share to enhance the VSS scheme’s security. As part of future work, the current ( n , n ) -threshold scheme will be generalized to a more flexible ( k , n ) -threshold framework, and to enhance the robustness of the share, enhancing both security and practicality in diverse application scenarios.

Author Contributions

Conceptualization, T.L. and Y.W.; methodology, T.L. and X.Y.; software, T.L. and Y.H.; validation, T.L., Y.W. and X.Y.; formal analysis, T.L. and Y.W.; investigation, T.L. and C.L.; writing—original draft preparation, T.L.; writing—review and editing, Y.W. and X.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work is funded by the Program of the National Natural Science Foundation of China (No. 62271496 and 62502529).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Yang, C.N.; Yang, Y.Y. On the analysis and design of visual cryptography with error correcting capability. IEEE Trans. Circuits Syst. Video Technol. 2020, 31, 2465–2479. [Google Scholar] [CrossRef]
  2. Rong, R.; Shravage, C.; Mary, G.S.; Blesswin, A.J.; Gayathri, M.; Karunya, A.C.E.; Shibani, R.; Sambas, A. Enhanced Semantic Visual Cryptography with AI-driven error reduction for improved two-dimensional image quality and security. Meas. Sci. Technol. 2024, 35, 105405. [Google Scholar] [CrossRef]
  3. Tian, A.Q.; Liu, F.F.; Lv, H.X. Snow Geese Algorithm: A novel migration-inspired meta-heuristic algorithm for constrained engineering optimization problems. Appl. Math. Model. 2024, 126, 327–347. [Google Scholar] [CrossRef]
  4. Gao, S.; Zhang, Z.; Li, Q.; Ding, S.; Iu, H.H.C.; Cao, Y.; Xu, X.; Wang, C.; Mou, J. Encrypt a story: A video segment encryption method based on the discrete sinusoidal memristive rulkov neuron. IEEE Trans. Dependable Secur. Comput. 2025, 22, 8011–8024. [Google Scholar] [CrossRef]
  5. Mohammed, A.; Samundiswary, P. SecMISS: Secured Medical Image Secret Sharing mechanism for smart health applications. Vis. Comput. 2024, 40, 4251–4271. [Google Scholar] [CrossRef]
  6. Karolin, M.; Meyyappan, T. Visual Cryptography Secret Share Creation Techniques with Multiple Image Encryption and Decryption Using Elliptic Curve Cryptography. IETE J. Res. 2024, 70, 1638–1645. [Google Scholar] [CrossRef]
  7. Cheng, X.; Wang, H.; Luo, X.; Guan, Q.; Ma, B.; Wang, J. Re-cropping framework: A grid recovery method for quantization step estimation in non-aligned recompressed images. IEEE Trans. Circuits Syst. Video Technol 2025, 1–15. [Google Scholar] [CrossRef]
  8. Xiong, L.; Han, X.; Yang, C.N. CP-PSIS: CRT and polynomial-based progressive secret image sharing. Signal Process. 2021, 185, 108064. [Google Scholar] [CrossRef]
  9. John, B.; Selva, M.; Gobinath, T.; Divate, M.; Karunya, C.E.; Shahbad, A.A.; Patil, D.; Shibani, R.S. Error-induced inverse pixel visual cryptography for secure QR code communication. J. Auton. Intell. 2023, 7, 1–11. [Google Scholar] [CrossRef]
  10. Hu, P.; Zhu, J. A filter-wrapper model for high-dimensional feature selection based on evolutionary computation. Appl. Intell. 2025, 55, 581. [Google Scholar] [CrossRef]
  11. Naor, M.; Shamir, A. Visual cryptography. In Proceedings of the Workshop on the Theory and Application of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 1994; pp. 1–12. [Google Scholar]
  12. Melkemi, M.; Hammoudi, K. Voronoi-based image representation applied to binary visual cryptography. Signal Process. Image Commun. 2020, 87, 115913. [Google Scholar] [CrossRef]
  13. Kumar, A.; Kumar, A.; Khandelwal, G.; Bhardwaj, Y.; Sharma, V.K.; Sharma, G. Improving the visual quality of a size deterministic visual cryptography scheme for Grayscale Images. J. Discret. Math. Sci. Cryptogr. 2022, 25, 1113–1123. [Google Scholar] [CrossRef]
  14. Sun, R.; Fu, Z.; Yu, B.; Huang, H. A novel color multi-secret visual cryptography scheme. In Proceedings of the 2020 3rd International Conference on Artificial Intelligence and Pattern Recognition, Xiamen, China, 26–28 June 2020; pp. 140–144. [Google Scholar] [CrossRef]
  15. Liu, Z.; Zhu, G.; Ding, F.; Kwong, S. Weighted visual secret sharing for general access structures based on random grids. Signal Process. Image Commun. 2021, 92, 116129. [Google Scholar] [CrossRef]
  16. Yan, X.; Lu, Y.; Yang, C.N.; Zhang, X.; Wang, S. A common method of share authentication in image secret sharing. IEEE Trans. Circuits Syst. Video Technol. 2020, 31, 2896–2908. [Google Scholar] [CrossRef]
  17. Hou, Y.C. Visual cryptography for color images. Pattern Recognit. 2003, 36, 1619–1629. [Google Scholar] [CrossRef]
  18. Jia, X.; Wang, D.; Nie, D.; Zhang, C. Collaborative visual cryptography schemes. IEEE Trans. Circuits Syst. Video Technol. 2016, 28, 1056–1070. [Google Scholar] [CrossRef]
  19. Kannojia, S.P.; Kumar, J. XOR-based visual secret sharing scheme using pixel vectorization. Multimed. Tools Appl. 2021, 80, 14609–14635. [Google Scholar] [CrossRef]
  20. Shyu, S.J. Image encryption by random grids. Pattern Recognit. 2007, 40, 1014–1031. [Google Scholar] [CrossRef]
  21. Yang, C.N.; Wang, D.S. Property analysis of XOR-based visual cryptography. IEEE Trans. Circuits Syst. Video Technol. 2013, 24, 189–197. [Google Scholar] [CrossRef]
  22. Yan, B.; Xiang, Y.; Hua, G. Improving the visual quality of size-invariant visual cryptography for grayscale images: An analysis-by-synthesis (AbS) approach. IEEE Trans. Image Process. 2018, 28, 896–911. [Google Scholar] [CrossRef]
  23. Shyu, S.J. XOR-based visual cryptographic schemes with monotonously increasing and flawless reconstruction properties. IEEE Trans. Circuits Syst. Video Technol. 2017, 28, 2397–2401. [Google Scholar] [CrossRef]
  24. Fu, Z.; Cheng, Y.; Yu, B. Perfect recovery of XOR-based visual cryptography scheme. Multimed. Tools Appl. 2019, 78, 2367–2384. [Google Scholar] [CrossRef]
  25. Wu, H.C.; Wang, H.C.; Yu, R.W. Color visual cryptography scheme using meaningful shares. In Proceedings of the 2008 Eighth International Conference on Intelligent Systems Design and Applications; IEEE: Piscataway, NJ, USA, 2008; Volume 3, pp. 173–178. [Google Scholar] [CrossRef]
  26. Shivani, S.; Agarwal, S. Progressive visual cryptography with unexpanded meaningful shares. ACM Trans. Multimed. Comput. Commun. Appl. (TOMM) 2016, 12, 1–24. [Google Scholar] [CrossRef]
  27. Lo, A.H.; Juan, J.S.T. (n, n) XOR-based visual cryptography schemes with different meaningful shares. In Proceedings of the 2021 International Conference on Computational Science and Computational Intelligence (CSCI), Las Vegas, NV, USA, 15–17 December 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1310–1316. [Google Scholar] [CrossRef]
  28. Wu, X.; Yao, P.; An, N. Extended XOR-based visual cryptography schemes by integer linear program. Signal Process. 2021, 186, 108122. [Google Scholar] [CrossRef]
  29. Chen, Y.H.; Juan, J.S.T. XOR-Based (n, n) Visual Cryptography Schemes for Grayscale or Color Images with Meaningful Shares. Appl. Sci. 2022, 12, 10096. [Google Scholar] [CrossRef]
  30. Ren, L.; Zhang, D. A QR code-based user-friendly visual cryptography scheme. Sci. Rep. 2022, 12, 7667. [Google Scholar] [CrossRef]
  31. Chow, Y.W.; Susilo, W.; Yang, G.; Phillips, J.G.; Pranata, I.; Barmawi, A.M. Exploiting the error correction mechanism in QR codes for secret sharing. In Proceedings of the Australasian Conference on Information Security and Privacy, Perth, Australia, 15 September 2016; Springer: Cham, Switzerland, 2016; pp. 409–425. [Google Scholar] [CrossRef]
  32. Wan, S.; Lu, Y.; Yan, X.; Wang, Y.; Chang, C. Visual secret sharing scheme for (k, n) threshold based on QR code with multiple decryptions. J. Real-Time Image Process. 2018, 14, 25–40. [Google Scholar] [CrossRef]
  33. Lu, J.; Yang, Z.; Li, L.; Yuan, W.; Li, L.; Chang, C.C. Multiple schemes for mobile payment authentication using QR code and visual cryptography. Mob. Inf. Syst. 2017, 2017, 4356038. [Google Scholar] [CrossRef]
  34. Cheng, Y.; Fu, Z.; Yu, B. Improved visual secret sharing scheme for QR code applications. IEEE Trans. Inf. Forensics Secur. 2018, 13, 2393–2403. [Google Scholar] [CrossRef]
  35. Tan, L.; Lu, Y.; Yan, X.; Liu, L.; Zhou, X. XOR-ed visual secret sharing scheme with robust and meaningful shadows based on QR codes. Multimed. Tools Appl. 2020, 79, 5719–5741. [Google Scholar] [CrossRef]
  36. Wan, S.; Qi, L.; Yang, G.; Lu, Y.; Yan, X.; Li, L. Visual secret sharing scheme with (n, n) threshold for selective secret content based on QR codes. Multimed. Tools Appl. 2020, 79, 2789–2811. [Google Scholar] [CrossRef]
  37. Huang, P.C.; Chang, C.C.; Li, Y.H.; Liu, Y. Enhanced (n, n)-threshold QR code secret sharing scheme based on error correction mechanism. J. Inf. Secur. Appl. 2021, 58, 102719. [Google Scholar] [CrossRef]
  38. Huang, P.C.; Chang, C.C.; Li, Y.H. Efficient (k, n)-threshold secret sharing method with cheater prevention for QR code application. J. Internet Technol. 2022, 23, 155–163. [Google Scholar] [CrossRef]
  39. Hore, A.; Ziou, D. Image quality metrics: PSNR vs. SSIM. In Proceedings of the 2010 20th International Conference on Pattern Recognition, Istanbul, Turkey, 23–26 August 2010; IEEE: Piscataway, NJ, USA, 2010; pp. 2366–2369. [Google Scholar] [CrossRef]
  40. Tanchenko, A. Visual-PSNR measure of image quality. J. Vis. Commun. Image Represent. 2014, 25, 874–878. [Google Scholar] [CrossRef]
  41. Sara, U.; Akter, M.; Uddin, M.S. Image quality assessment through FSIM, SSIM, MSE and PSNR-a comparative study. J. Comput. Commun. 2019, 7, 8–18. [Google Scholar] [CrossRef]
  42. Zxing Library. 2025. Available online: https://github.com/zxing/zxing (accessed on 12 November 2025).
  43. Standard Test Images. 2025. Available online: https://www.imageprocessingplace.com/root_files_V3/image_databases.htm (accessed on 1 December 2025).
Figure 1. Design idea of the sharing phase of the proposed scheme.
Figure 1. Design idea of the sharing phase of the proposed scheme.
Mathematics 14 00405 g001
Figure 2. An example of pixel value (pixel block is made up of 3 × 3 pixels). (a) M 1 ; (b) M 2 ; (c) S n .
Figure 2. An example of pixel value (pixel block is made up of 3 × 3 pixels). (a) M 1 ; (b) M 2 ; (c) S n .
Mathematics 14 00405 g002
Figure 3. Design idea of the recovering phase of the proposed scheme.
Figure 3. Design idea of the recovering phase of the proposed scheme.
Mathematics 14 00405 g003
Figure 4. (a) H ; (b) Q 1 ; (c) Q 2 ; (d) Q 3 ; (e) T ; (f) S 1 ; (g) S 2 ; (h) S 3 ; (i) S 4 ; (j) C ; (k) R ; (l) the difference between (a,b), where the white denotes the difference.
Figure 4. (a) H ; (b) Q 1 ; (c) Q 2 ; (d) Q 3 ; (e) T ; (f) S 1 ; (g) S 2 ; (h) S 3 ; (i) S 4 ; (j) C ; (k) R ; (l) the difference between (a,b), where the white denotes the difference.
Mathematics 14 00405 g004
Figure 5. Different carrier images: (a) cameraman; (b) house; (c) jet-plane; (d) mandrill; (e) lake; (f) peppers.
Figure 5. Different carrier images: (a) cameraman; (b) house; (c) jet-plane; (d) mandrill; (e) lake; (f) peppers.
Mathematics 14 00405 g005
Figure 6. Histograms of the original image and the carrier image. (The horizontal axis represents pixel values, and the vertical axis represents quantities.) (a,c,e,g,i,k) are histograms of original images (cameraman, house, jet-plane, mandrill, lake and peppers); (b,d,f,h,j,l) are histograms of carrier images corresponding to (a,c,e,g,i,k).
Figure 6. Histograms of the original image and the carrier image. (The horizontal axis represents pixel values, and the vertical axis represents quantities.) (a,c,e,g,i,k) are histograms of original images (cameraman, house, jet-plane, mandrill, lake and peppers); (b,d,f,h,j,l) are histograms of carrier images corresponding to (a,c,e,g,i,k).
Mathematics 14 00405 g006
Table 1. PSNR of different carrier images.
Table 1. PSNR of different carrier images.
Carrier ImageCameramanHouseJet-PlaneMandrillLakePeppers
p s n r (dB)48.111848.116248.281348.105248.080448.1117
Table 2. Scaling simulation experiment. (The standard decoder can easily decode the QR code (Y) and it can barely decode the QR code (N)).
Table 2. Scaling simulation experiment. (The standard decoder can easily decode the QR code (Y) and it can barely decode the QR code (N)).
Scaling A QR Code
(4, H)
A QR Code
(5, H)
A QR Code
(6, H)
Original image
(the size is [512, 512])
Mathematics 14 00405 i001(Y)Mathematics 14 00405 i002(Y)Mathematics 14 00405 i003(Y)
[length ×   1.0 , width ×   0.5 ]Mathematics 14 00405 i004(N)Mathematics 14 00405 i005(N)Mathematics 14 00405 i006(N)
[length ×   1.0 , width ×   0.6 ]Mathematics 14 00405 i007(Y)Mathematics 14 00405 i008(Y)Mathematics 14 00405 i009(Y)
[length ×   1.0 , width ×   0.7 ]Mathematics 14 00405 i010(Y)Mathematics 14 00405 i011(Y)Mathematics 14 00405 i012(Y)
[length ×   1.0 , width ×   0.8 ]Mathematics 14 00405 i013(Y)Mathematics 14 00405 i014(Y)Mathematics 14 00405 i015(Y)
[length ×   1.0 , width ×   0.9 ]Mathematics 14 00405 i016(Y)Mathematics 14 00405 i017(Y)Mathematics 14 00405 i018(Y)
[length ×   1.0 , width ×   1.0 ]Mathematics 14 00405 i019(Y)Mathematics 14 00405 i020(Y)Mathematics 14 00405 i021(Y)
[length ×   1.0 , width ×   1.1 ]Mathematics 14 00405 i022(Y)Mathematics 14 00405 i023(Y)Mathematics 14 00405 i024(Y)
[length ×   1.0 , width ×   1.2 ]Mathematics 14 00405 i025(Y)Mathematics 14 00405 i026(Y)Mathematics 14 00405 i027(Y)
[length ×   1.0 , width ×   1.3 ]Mathematics 14 00405 i028(Y)Mathematics 14 00405 i029(Y)Mathematics 14 00405 i030(Y)
[length ×   1.0 , width ×   1.4 ]Mathematics 14 00405 i031(Y)Mathematics 14 00405 i032(Y)Mathematics 14 00405 i033(Y)
[length ×   1.0 , width ×   1.5 ]Mathematics 14 00405 i034(Y)Mathematics 14 00405 i035(Y)Mathematics 14 00405 i036(Y)
[length ×   1.0 , width ×   1.6 ]Mathematics 14 00405 i037(N)Mathematics 14 00405 i038(N)Mathematics 14 00405 i039(N)
Table 3. Analysis and comparison.
Table 3. Analysis and comparison.
MethodShares (QR Codes) with ErrorsPixel ExpansionRestored Image Without Errors
[31]ECCYESNONO
[34]ECCYESNONO
[35]Padding codewordsNONOYES and NO
[38]ECCYESNONO
[37]ECCYESNONO
This paperInformation hidingNONOYES
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, T.; Wang, Y.; Yan, X.; Huo, Y.; Lu, C. A Meaningful (n, n)-Threshold Visual Secret Sharing Scheme Based on QR Codes and Information Hiding. Mathematics 2026, 14, 405. https://doi.org/10.3390/math14030405

AMA Style

Liu T, Wang Y, Yan X, Huo Y, Lu C. A Meaningful (n, n)-Threshold Visual Secret Sharing Scheme Based on QR Codes and Information Hiding. Mathematics. 2026; 14(3):405. https://doi.org/10.3390/math14030405

Chicago/Turabian Style

Liu, Tao, Yongjie Wang, Xuehu Yan, Yanlin Huo, and Canju Lu. 2026. "A Meaningful (n, n)-Threshold Visual Secret Sharing Scheme Based on QR Codes and Information Hiding" Mathematics 14, no. 3: 405. https://doi.org/10.3390/math14030405

APA Style

Liu, T., Wang, Y., Yan, X., Huo, Y., & Lu, C. (2026). A Meaningful (n, n)-Threshold Visual Secret Sharing Scheme Based on QR Codes and Information Hiding. Mathematics, 14(3), 405. https://doi.org/10.3390/math14030405

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