# Novel Visual Secret Sharing Scheme for the QR Code with Meaningful Shares

Authors: Jeng-Shyang Pan; Tao Liu; Bin Yan; Hong-Mei Yang; Shu-Chuan Chu; Meng-Xi Wang
Journal: Security and Communication Networks
 (2022)

---

## Abstract

Visual secret sharing (VSS) scheme can share the secret image with several shares. Shares are performed by the decoding operation to restore the secret image. VSS scheme is mainly used for the secure transmission of images. Quick response (QR) code is often used by people on the Internet. It can be encrypted by the VSS scheme to enhance the security of its transmission. The share is meaningless that will arouse the suspicion of the attacker. The security of the VSS scheme is decreased. This paper proposes a novel VSS scheme for the QR code with meaningful images to solve this problem. Two continue tone images are converted to halftone images. The halftone image is modified to generate the share. Every share is meaningful, not meaningless. Two shares are performed the decoding operation to restore the secret QR code. The restored QR code can be correctly decoded by the general decoder. Experimental results prove that the proposed scheme is feasible.


---

## Body

## 1. Introduction

Visual secret sharing (VSS) scheme is a technology that can increase the transmission security of the secret image in the network [1–3]. Information security has always been a hot topic [4–9]. For example, watermarking [10–13], information hiding [14–16], privacy protect [17, 18], and cryptology [19–21]. There is a flaw in traditional cryptography. When the key is known by the attacker, they can decode the secret information. Naor and Shamir proposed the VSS scheme to solve this problem [22]. The secret image is divided into several shares. Every share is a key. When the attacker knows the decoding method, they will not decode the secret image if they do not obtain enough shares. For example, there is a n,n-threshold VSS scheme. All n shares are performed the decoding operation to restore the secret image. However, n−1 or fewer shares cannot be used to restore the secret image. The quick response (QR) code is often used in the network. It cannot assure the transmission security by oneself on the Internet. The VSS scheme can solve this problem.The VSS scheme mainly has two types. One is the scheme with meaningless shares. Another is the scheme with meaningful shares. Naor and Shamir proposed ak,n-threshold VSS scheme in 1994 [22]. The secret image is divided into n shares. When the receiver obtains k or more shares, they can restore the secret image by the decoding method. The operation is that shares are printed on transparent films. All transparent films are superimposed to restore the secret image. This decoding method is also called OR operation. The restored image has contrast in color. It can be decoded by the human visual system (HVS). The scheme of Naor and Shamir is used to encrypt the binary image. Hou achieved new VSS schemes for the gray-level image and the color image [23]. The halftone technology and color decomposition technology are used in this scheme. Yang proposed a new VSS scheme for the binary image by using the probabilistic method [24]. Shyu used the random grid to achieve the VSS scheme for the color image [25]. Sridhar et al. proposed the k,n-threshold progress VSS scheme [26]. Kannojia et al. proposed a novel VSS scheme by using pixel vectorization [27]. These schemes have the same disadvantage that all shares are meaningless. Meaningless images can attract the suspicion of the attacker that will decrease the security of the VSS scheme.To further improve the security of the VSS scheme, the meaningless share will be designed to be meaningful shares. Ulutas proposed a new VSS scheme that can generate meaningful shares [28]. Yan et al. utilized the random grid to design the VSS scheme with meaningful shares [29]. GAO et al. used the hybrid fractal matrix to achieve a novel 2,3-threshold VSS scheme [30]. These schemes can generate meaningful shares. Using the meaningful share has two advantages: One is that all shares are easy for the sender and the receiver to manage. Another is that meaningful shares own information by the HVS. Meaningful shares will decrease the suspicion of the attacker that will increase the security of the VSS scheme.The QR code is often used by everyone on the Internet. The transmission security of the QR code can be improved by the VSS scheme. The VSS scheme for the QR code is that the secret QR code is divided into several shares. Shares are performed for decoding operation to restore the secret QR code. The restored QR code can be decoded by the decoder. The decoding information of the restored QR code is the same as that of the secret QR code. For example, there is an,n-threshold scheme. The secret QR code is divided into n shares. When all shares are performed for the decoding operation, the secret QR code can be restored. The information of the restored QR code can be decoded by the decoder. Fang applied the VSS scheme to the QR code [31]. The secret QR code is divided into two meaningless shares. The attacker will not obtain the secret QR code from any share. When two shares are performed OR, the secret QR code is restored. The restored QR code can be decoded correctly by the general decoder. However, every share is meaningless. They can attract the suspicion of the attacker. The security of the VSS scheme will be reduced. Wan et al. proposed a novel VSS scheme for the QR code [32]. The share is the QR code (meaningful shares). However, the version of the QR code (shares) is restricted by the version of the secret QR code. The version of the share is bigger than the secret QR code.Meaningful shares can decrease the suspicion of the attacker. Therefore, this paper designs a2,2-threshold VSS scheme for the QR code by using the halftone technology. Two continue tone images are converted to halftone images. Some pixels of two halftone images are modified to become shares. The secret QR code is shared by two meaningful shares in the network. It can be restored by doing OR on two meaningful shares. The restored QR code can be correctly decoded by the general decoder instead of the standard decoder. The proposed VSS scheme only works with QR codes and not general images. The main contributions of this paper are as follows:(1)
Compared with scheme [31], the generated share is meaningful. If the image is meaningless, the attacker will doubt them. The proposed scheme can generate meaningful shares that can decrease the suspicion of the attacker. The security of the proposed scheme is improved. The generated share is meaningful. It is easy for the sender and the receiver to manage shares.(2)
Compared with scheme [32], the proposed scheme used the general image as the share, not the QR code. The proposed scheme does not require the specific version of the QR code as the share.The rest structure of this paper is as follows: Section2 mainly introduces some basic knowledge (the VSS scheme, the QR code, and the error diffusion (ED)). The proposed scheme is shown in Section 3, including the encryption process and the decryption process. Section 4 exhibits some experiments that are used to verify the proposed scheme. The conclusion of this paper is introduced in Section 5.


## 2. Preliminaries

This section mainly introduces the concept of the VSS scheme (Section2.1), the QR code (Section 2.2), and the ED (Section 2.3).


### 2.1. VSS Scheme

Naor and Shamir proposed thek,n-threshold VSS scheme [22]. The secret image is divided into n shares. Every share does not contain information about the secret image. When k or more shares are doing OR, the secret image can be restored. R• and R∘ denote the black pixel-block and the white pixel-block in the restored image, respectively. The k,n-threshold VSS scheme satisfies three conditions as follows:(1)
Every share cannot contain information about the secret image.(2)
If less thank shares are performed OR, n•R•=n•R∘.(3)
Ifk or more shares are performed OR, n•R•>n•R∘.Here,n•R• and n•R∘ represent the black pixel number of R• and R∘, respectively. Shares are performed OR to restore the secret image. If the number of obtained shares is less than k, it is satisfied that n•R•=n•R∘ in the restored image. This restored image has no contrast in color. It is meaningless by the HVS. When the number is k or large than k, the restored image satisfies n•R•>n•R∘ and it has a contrast in color. It is meaningful by the HVS. Therefore, the number of obtained shares is less than k, the secret image cannot be restored.A2,2-threshold VSS scheme is introduced as an example in Table 1. When the color of the secret image is black or white, there are two methods to generate the share. The probability of each method is the same at 50%. The pixel-block is used to represent the pixel of the secret image in the restored image. If the color of the secret image is black, the pixel-block is made up of four black pixels (black pixel-block). When the color of the secret image is white, the pixel-block is made up of black and white pixels (white pixel-block). The black pixel-block and the white pixel-block have a contrast in color. They can denote the black pixel and white pixel by the HVS in the restored secret image.Table 1
2,2-threshold VSS scheme.
Secret pixelPixel-block in share 1 (probability)Pixel-block in share 2 (probability)Pixel-block in the restored image(1/2)(1/2)(1/2)(1/2)(1/2)(1/2)(1/2)(1/2)


### 2.2. QR Code

The QR code was invented by the corporation of Denso Wave. It is made up of black and white modules. Each module is a small square. A module can be one pixel or2×2 pixel-block or n×n pixel-block. The QR code owns 40 versions. The size of the QR code is decided by the size of the version. The relation between them is as follows:(1)l=17+4V,where the size of the QR code is l×l modules and V is the version of the QR code.The structure of the QR code is shown in Figure1. The QR code is made up of the function patterns and encoding region. The function patterns are mainly made up of the finder pattern, the separator, timing patterns, and alignment patterns. The encoding region mainly includes data and error correction codewords, format information, and version information. A codeword is made up of eight modules.Figure 1
Structure of the QR code.The information can be converted to the image information of the QR code. The encoding processes are as follows:(1)
Analyze the information. The type of information is determined.(2)
The information is converted to the bitstream. This bitstream is converted to data codewords in the form of eight bits converted to a codeword.(3)
Divide codewords into blocks as required. Generate corresponding error correction codewords per block. The error correction codewords are added to data codewords.(4)
Structure the final information.(5)
The finder pattern, the separator, timing patterns, and alignment patterns are added.(6)
The mask is added to the region of data and error correction codewords.(7)
Format information and version information are generated. In the end, form a symbol.The information is hidden in black and white modules of the QR code. The QR code can be decoded by the decoder. The decoding processes of it are as follows:(1)
The decoder finds the QR code by the finder pattern.(2)
The black and white modules are converted to the 0–1 matrix (0 denotes the black pixel and 1 represents the white pixel). The black (dark) module is converted to 0 and the white (light) module is converted to 1.(3)
Read the version information.(4)
Remove the mask by XOR.(5)
Recover the data codewords and error correction codewords.(6)
Error correction codewords are used to correct the errors.(7)
Recover the information.The information of the QR code can be decoded by the decoder. People can obtain information by using the decoder. The use of the QR code can facilitate the daily life of people.


### 2.3. ED

The halftone technology can express the continuous tone through the binary image. The continue tone image is converted to the halftone image by the halftone technology. The halftone image is the binary image. However, it has the same visual effect as the continuous tone image by the HVS. The halftone technology mainly concludes three type: ordered dithering [33], ED [34, 35], and iterative algorithms [36].The ED can generate a high-quality image. The diagram of it is shown in Figure2.Figure 2
Diagram of the ED.TheCx,y denotes a pixel value of a continue tone image (C) in the position x,y. Mx,y is the value of modified pixel. Bx,y represents the value of the binary image. The difference between Bx,y and Mx,y is denoted by dyx. The syx is the sum of the error diffusion values of adjacent pixels. The threshold t is set as 128. They are mentioned below::(2)Mx,y=Cx,y+syx,syx=∑m=01∑n=−11dy+nx+m×knm,dyx=Mx,y−Bx,y,Bx,y=0,ifMx,y<t,1,ifMx,y≥t.Here,knm is the value of the kernel. It can influence the quality of the halftone image. As an example, the Floyd–Steinberg kernel is shown in Table 2.Table 2
Floyd–Steinberg kernel.
Cx,y7/163/163/161/16


## 2.1. VSS Scheme

Naor and Shamir proposed thek,n-threshold VSS scheme [22]. The secret image is divided into n shares. Every share does not contain information about the secret image. When k or more shares are doing OR, the secret image can be restored. R• and R∘ denote the black pixel-block and the white pixel-block in the restored image, respectively. The k,n-threshold VSS scheme satisfies three conditions as follows:(1)
Every share cannot contain information about the secret image.(2)
If less thank shares are performed OR, n•R•=n•R∘.(3)
Ifk or more shares are performed OR, n•R•>n•R∘.Here,n•R• and n•R∘ represent the black pixel number of R• and R∘, respectively. Shares are performed OR to restore the secret image. If the number of obtained shares is less than k, it is satisfied that n•R•=n•R∘ in the restored image. This restored image has no contrast in color. It is meaningless by the HVS. When the number is k or large than k, the restored image satisfies n•R•>n•R∘ and it has a contrast in color. It is meaningful by the HVS. Therefore, the number of obtained shares is less than k, the secret image cannot be restored.A2,2-threshold VSS scheme is introduced as an example in Table 1. When the color of the secret image is black or white, there are two methods to generate the share. The probability of each method is the same at 50%. The pixel-block is used to represent the pixel of the secret image in the restored image. If the color of the secret image is black, the pixel-block is made up of four black pixels (black pixel-block). When the color of the secret image is white, the pixel-block is made up of black and white pixels (white pixel-block). The black pixel-block and the white pixel-block have a contrast in color. They can denote the black pixel and white pixel by the HVS in the restored secret image.Table 1
2,2-threshold VSS scheme.
Secret pixelPixel-block in share 1 (probability)Pixel-block in share 2 (probability)Pixel-block in the restored image(1/2)(1/2)(1/2)(1/2)(1/2)(1/2)(1/2)(1/2)


## 2.2. QR Code

The QR code was invented by the corporation of Denso Wave. It is made up of black and white modules. Each module is a small square. A module can be one pixel or2×2 pixel-block or n×n pixel-block. The QR code owns 40 versions. The size of the QR code is decided by the size of the version. The relation between them is as follows:(1)l=17+4V,where the size of the QR code is l×l modules and V is the version of the QR code.The structure of the QR code is shown in Figure1. The QR code is made up of the function patterns and encoding region. The function patterns are mainly made up of the finder pattern, the separator, timing patterns, and alignment patterns. The encoding region mainly includes data and error correction codewords, format information, and version information. A codeword is made up of eight modules.Figure 1
Structure of the QR code.The information can be converted to the image information of the QR code. The encoding processes are as follows:(1)
Analyze the information. The type of information is determined.(2)
The information is converted to the bitstream. This bitstream is converted to data codewords in the form of eight bits converted to a codeword.(3)
Divide codewords into blocks as required. Generate corresponding error correction codewords per block. The error correction codewords are added to data codewords.(4)
Structure the final information.(5)
The finder pattern, the separator, timing patterns, and alignment patterns are added.(6)
The mask is added to the region of data and error correction codewords.(7)
Format information and version information are generated. In the end, form a symbol.The information is hidden in black and white modules of the QR code. The QR code can be decoded by the decoder. The decoding processes of it are as follows:(1)
The decoder finds the QR code by the finder pattern.(2)
The black and white modules are converted to the 0–1 matrix (0 denotes the black pixel and 1 represents the white pixel). The black (dark) module is converted to 0 and the white (light) module is converted to 1.(3)
Read the version information.(4)
Remove the mask by XOR.(5)
Recover the data codewords and error correction codewords.(6)
Error correction codewords are used to correct the errors.(7)
Recover the information.The information of the QR code can be decoded by the decoder. People can obtain information by using the decoder. The use of the QR code can facilitate the daily life of people.


## 2.3. ED

The halftone technology can express the continuous tone through the binary image. The continue tone image is converted to the halftone image by the halftone technology. The halftone image is the binary image. However, it has the same visual effect as the continuous tone image by the HVS. The halftone technology mainly concludes three type: ordered dithering [33], ED [34, 35], and iterative algorithms [36].The ED can generate a high-quality image. The diagram of it is shown in Figure2.Figure 2
Diagram of the ED.TheCx,y denotes a pixel value of a continue tone image (C) in the position x,y. Mx,y is the value of modified pixel. Bx,y represents the value of the binary image. The difference between Bx,y and Mx,y is denoted by dyx. The syx is the sum of the error diffusion values of adjacent pixels. The threshold t is set as 128. They are mentioned below::(2)Mx,y=Cx,y+syx,syx=∑m=01∑n=−11dy+nx+m×knm,dyx=Mx,y−Bx,y,Bx,y=0,ifMx,y<t,1,ifMx,y≥t.Here,knm is the value of the kernel. It can influence the quality of the halftone image. As an example, the Floyd–Steinberg kernel is shown in Table 2.Table 2
Floyd–Steinberg kernel.
Cx,y7/163/163/161/16


## 3. Proposed Scheme

This section mainly introduces the proposed scheme. Section3.1 shows the encryption process. The decryption process is introduced in Section 3.2.


### 3.1. Encryption Process

The encryption process of the proposed scheme is shown in Figure3. Two continue tone images (C1 and C2) are converted to halftone images (C1′ and C2′) by using the halftone technology. The secret QR code (T) and two halftone images are used to generate two shares (S1 and S2) by the modifying operation. Two shares are meaningful. When S1 and S2 are performed OR, the secret QR code can be restored.Figure 3
Encoding process of the proposed scheme.Two halftone images are modified to become two shares. The secret QR code is shared by two shares in the network. Because the size of the QR code is small,3×3 pixel-block is used as a module of the restored QR code. Pixel-block (all black pixels) is the black module in the restored QR code. Pixel-block (black and white pixels) represents the white module in the restored QR code. The position of a module is denoted by u,v in the QR code.Then00 denotes the number of pixels that C1′ and C2′ are black in the same position in a 3×3 pixel-block. Set L00 is composed of positions where the colors of C1′ and C2′ are black in a 3×3 pixel-block. Similarly, the number of pixels that C1′ and C2′ are white in the same position in a 3×3 pixel-block is denoted by n11. Set L11 is composed of positions where the colors of C1′ and C2′ are white in a 3×3 pixel-block. The size of the QR code is l×l. The size of C1′ and C2′ is g×h (g≥3l and h≥3l).For the position of the imageSx,y, the color of it is changed to black:(3)Sx,y=0.The color of it is changed to white:(4)Sx,y=1.Define modifying operation:Modifying operation is divided into three cases:Case 1.
When the color ofTu,v is black, the operation is:(5)S1x,y=C1′x,y,S2x,y=C2′x,y.ifn11=0,Selectn00positions from each set ofL00andL11to generateSwby equation4and equation3,respectivelyifn11≠0,n00<n11,selectn11positions from each set ofL00andL11to generateSwby equation4and equation3,respectivelyifn11≠0,n00≥n11,and(6)selectn11−n00positions fromL11to generateSwby equation3,ifn11≠0,n00<n11,selectn00−n11positions fromL00togenerateSwby equation4,ifn11≠0,n00≥n11,where w is a random number and w=1 or 2. The probability of w=1 and that of w=2 is the same. Every time using change color by equation (4) or equation (3), w is set a random value. The values of x and y have the limit that x∈3u−1+1,3u and y∈3v−1+1,3v. If the colors of C1′x,y and C2′x,y are all black, S1x,y=C1′x,y and S2x,y=C2′x,y are performed. The color is assigned directly without modification. If the colors of C1′x,y and C2′x,y are not all black, equations (5) and equation (6) are used to modify the color. The colors of C1′x,y and C2′x,y are modified and assigned to S1x,y and S2x,y, respectively. Each position is selected in a nonrepetitive way.
TheS1 and S2 can be generated by equations (5) and equation (6). The color of the pixel-block is the black module in the restored image by these two equations.Case 2.
When the color ofTu,v is white, the operation is as follows:(7)S1x,y=1,S2x,y=1,ifC1′x,y=1andC2′x,y=0,S1x,y=1,S2x,y=1,ifC1′x,y=0andC2′x,y=1.
Here, they are satisfied thatx∈3u−1+1,3u and y∈3v−1+1,3v. The pixel-block is made up of black and white pixels in the restored image by equation (7). This pixel-block denotes the white module in the restored QR code.Case 3.
When3l+1≤x≤g and 3l+1≤y≤h are satisfied, the operation is given as follows: If x=l+1 or y=l+1,(8)S1x,y=1,S2x,y=1,ifC1′x,y=1andC2′x,y=0,S1x,y=1,S2x,y=1,ifC1′x,y=0andC2′x,y=1.
Ifx≠l+1, y≠l+1 and C1x,y≠C2x,y, the operation is(9)S1x,y=1,S2x,y=1Pr=12,orS1x,y=1,S2x,y=0Pr=12,where S1x,y=1,S2x,y=1Pr=1/2 denotes that the probability of performing this operation S1x,y=1,S2x,y=1 is 1/2. Others are similar. The brightness of the modified area (these area is generated by Case 1 and Case (2)) will increase. Therefore, the brightness of other areas should also be increased by equations (8) and (9). Using (8) to increase the brightness is to make the restored QR code have a high contrast with other areas in color that will improve the decoding speed of the restored QR code.
The encryption process is as follows:Step 1.
Two continue tone images (C1 and C2) are converted to halftone images (C1′ and C2′) by ED (Section 2.3).Step 2.
Two halftone images are modified to generate two shares (S1 and S2) by using the modifying operation.
All processes are shown in Algorithm 1.Algorithm 1: The encryption of the proposed scheme.
Input: The secret QR code T, two halftone images C1′, C2′.Output: Two shares S1 and S2.(1)
/∗ The size of T is l×l. The size of C1′ and C2′ is g×h. ∗/(2)
foru from 1 to ldo(3)
forv from 1 to ldo(4)
/∗ The black is denoted by 0 and 1 represents the white.∗/(5)
ifTu,v=0then(6)
Equations (5) and (6).(7)
else(8)
Equation (7).(9)
end if(10)
end for(11)
end for(12)
forx from 3l+1 to gdo(13)
fory from 3l+1 to hdo(14)
Equations (8) and (9) and.(15)
end for(16)
end for(17)
Output: S1 and S2.


### 3.2. Decryption Process

S1 and S2 are transmitted on the Internet. Because they are meaningful images, they are easily recognized by the receiver. Two shares are doing OR to restore the secret QR code. The process is shown in Figure 4. The restored QR code can be decoded by the general decoder.Figure 4
Decryption process of the proposed scheme.


## 3.1. Encryption Process

The encryption process of the proposed scheme is shown in Figure3. Two continue tone images (C1 and C2) are converted to halftone images (C1′ and C2′) by using the halftone technology. The secret QR code (T) and two halftone images are used to generate two shares (S1 and S2) by the modifying operation. Two shares are meaningful. When S1 and S2 are performed OR, the secret QR code can be restored.Figure 3
Encoding process of the proposed scheme.Two halftone images are modified to become two shares. The secret QR code is shared by two shares in the network. Because the size of the QR code is small,3×3 pixel-block is used as a module of the restored QR code. Pixel-block (all black pixels) is the black module in the restored QR code. Pixel-block (black and white pixels) represents the white module in the restored QR code. The position of a module is denoted by u,v in the QR code.Then00 denotes the number of pixels that C1′ and C2′ are black in the same position in a 3×3 pixel-block. Set L00 is composed of positions where the colors of C1′ and C2′ are black in a 3×3 pixel-block. Similarly, the number of pixels that C1′ and C2′ are white in the same position in a 3×3 pixel-block is denoted by n11. Set L11 is composed of positions where the colors of C1′ and C2′ are white in a 3×3 pixel-block. The size of the QR code is l×l. The size of C1′ and C2′ is g×h (g≥3l and h≥3l).For the position of the imageSx,y, the color of it is changed to black:(3)Sx,y=0.The color of it is changed to white:(4)Sx,y=1.Define modifying operation:Modifying operation is divided into three cases:Case 1.
When the color ofTu,v is black, the operation is:(5)S1x,y=C1′x,y,S2x,y=C2′x,y.ifn11=0,Selectn00positions from each set ofL00andL11to generateSwby equation4and equation3,respectivelyifn11≠0,n00<n11,selectn11positions from each set ofL00andL11to generateSwby equation4and equation3,respectivelyifn11≠0,n00≥n11,and(6)selectn11−n00positions fromL11to generateSwby equation3,ifn11≠0,n00<n11,selectn00−n11positions fromL00togenerateSwby equation4,ifn11≠0,n00≥n11,where w is a random number and w=1 or 2. The probability of w=1 and that of w=2 is the same. Every time using change color by equation (4) or equation (3), w is set a random value. The values of x and y have the limit that x∈3u−1+1,3u and y∈3v−1+1,3v. If the colors of C1′x,y and C2′x,y are all black, S1x,y=C1′x,y and S2x,y=C2′x,y are performed. The color is assigned directly without modification. If the colors of C1′x,y and C2′x,y are not all black, equations (5) and equation (6) are used to modify the color. The colors of C1′x,y and C2′x,y are modified and assigned to S1x,y and S2x,y, respectively. Each position is selected in a nonrepetitive way.
TheS1 and S2 can be generated by equations (5) and equation (6). The color of the pixel-block is the black module in the restored image by these two equations.Case 2.
When the color ofTu,v is white, the operation is as follows:(7)S1x,y=1,S2x,y=1,ifC1′x,y=1andC2′x,y=0,S1x,y=1,S2x,y=1,ifC1′x,y=0andC2′x,y=1.
Here, they are satisfied thatx∈3u−1+1,3u and y∈3v−1+1,3v. The pixel-block is made up of black and white pixels in the restored image by equation (7). This pixel-block denotes the white module in the restored QR code.Case 3.
When3l+1≤x≤g and 3l+1≤y≤h are satisfied, the operation is given as follows: If x=l+1 or y=l+1,(8)S1x,y=1,S2x,y=1,ifC1′x,y=1andC2′x,y=0,S1x,y=1,S2x,y=1,ifC1′x,y=0andC2′x,y=1.
Ifx≠l+1, y≠l+1 and C1x,y≠C2x,y, the operation is(9)S1x,y=1,S2x,y=1Pr=12,orS1x,y=1,S2x,y=0Pr=12,where S1x,y=1,S2x,y=1Pr=1/2 denotes that the probability of performing this operation S1x,y=1,S2x,y=1 is 1/2. Others are similar. The brightness of the modified area (these area is generated by Case 1 and Case (2)) will increase. Therefore, the brightness of other areas should also be increased by equations (8) and (9). Using (8) to increase the brightness is to make the restored QR code have a high contrast with other areas in color that will improve the decoding speed of the restored QR code.
The encryption process is as follows:Step 1.
Two continue tone images (C1 and C2) are converted to halftone images (C1′ and C2′) by ED (Section 2.3).Step 2.
Two halftone images are modified to generate two shares (S1 and S2) by using the modifying operation.
All processes are shown in Algorithm 1.Algorithm 1: The encryption of the proposed scheme.
Input: The secret QR code T, two halftone images C1′, C2′.Output: Two shares S1 and S2.(1)
/∗ The size of T is l×l. The size of C1′ and C2′ is g×h. ∗/(2)
foru from 1 to ldo(3)
forv from 1 to ldo(4)
/∗ The black is denoted by 0 and 1 represents the white.∗/(5)
ifTu,v=0then(6)
Equations (5) and (6).(7)
else(8)
Equation (7).(9)
end if(10)
end for(11)
end for(12)
forx from 3l+1 to gdo(13)
fory from 3l+1 to hdo(14)
Equations (8) and (9) and.(15)
end for(16)
end for(17)
Output: S1 and S2.


## 3.2. Decryption Process

S1 and S2 are transmitted on the Internet. Because they are meaningful images, they are easily recognized by the receiver. Two shares are doing OR to restore the secret QR code. The process is shown in Figure 4. The restored QR code can be decoded by the general decoder.Figure 4
Decryption process of the proposed scheme.


## 4. Experiments

The result of the experiment is shown in this section. The ISO [37] and ZXing Library [38] are used to design the QR code. The operation OR is simulated by MATLAB R2016b. Section 4.1 introduces the experimental results of the proposed scheme. The analysis and discussion about the proposed scheme are shown in Section 4.2.


### 4.1. Experimental Results of the Proposed Scheme

The experimental results of the proposed scheme are shown in Figure5. The secret QR code T is shared by S1 and S2. C1 and C2 are converted to halftone images C1′ and C2′ by ED. Two halftone images are modified to generate S1 and S2 by the modifying operation. The restored QR code R is generated by doing OR on S1 and S2. R can be decoded by the general decoder instead of the standard decoder.Figure 5
Experimental results: (a)T; (b) C1; (c) C2; (d) C1′; (e) C2′; (f) S1; (g) S2; (h) R; (i) It is the magnified R.
(a)(b)(c)(d)(e)(f)(g)(h)(i)The size of the QR code is smaller than the size of the share. The restored image is also larger than the restored QR code. When the restored image is enlarged, the restored QR code can easily be decoded by the general decoder. The black module of the secret QR code is restored completely. It is represented by the black pixel-block (all black pixels) in the restored image. The white module of the secret QR code is represented by the pixel-block module (black and white pixels) in the restored image. In the3×3 pixel-block, the colors of all pixels are not black. It contains black and white pixels. Therefore, the black pixel-block and white pixel-block of the restored QR code have a contrast in color. The restored QR code can be decoded by the general decoder. The generated share is meaningful and the restored QR code can be correctly decoded. The proposed scheme is feasible.


### 4.2. Analysis and Discussion

Comparison results of different schemes are shown in Table3. Fang proposed the VSS scheme for the QR code [31]. The scheme of Fang can divide the secret QR code into two meaningless shares. Compared with it, the proposed scheme can generate two meaningful shares to share the secret QR code. Wan et al. proposed a novel VSS scheme for the QR code [32]. The QR code is used to share the secret QR code as shares. However, the version of the QR code is limited in the share. Only a specific version of the QR code can be used as the share. Compared with the scheme of Wan, the proposed scheme uses the halftone image as the share. There are many options for images as shares. When the proposed scheme chooses the share, it is not restricted by the scheme of Wan.Table 3
Comparison results of different schemes.
SchemeMeaningful sharesPixel expansionRestored QR code can be decodedRef. [31]NOYESYESRef. [32]YESNOYESProposed schemeYESYESYESWhen meaningless images are transmitted in the network, they will be suspected by the attacker. Meaningful images can reduce the suspicion of the attacker. The proposed scheme can generate meaningful shares. Meaningful images can improve the security of the scheme. The image information of the share can be any image and is not limited to the QR code. Meaningful images are easily managed by the receiver and the sender.


## 4.1. Experimental Results of the Proposed Scheme

The experimental results of the proposed scheme are shown in Figure5. The secret QR code T is shared by S1 and S2. C1 and C2 are converted to halftone images C1′ and C2′ by ED. Two halftone images are modified to generate S1 and S2 by the modifying operation. The restored QR code R is generated by doing OR on S1 and S2. R can be decoded by the general decoder instead of the standard decoder.Figure 5
Experimental results: (a)T; (b) C1; (c) C2; (d) C1′; (e) C2′; (f) S1; (g) S2; (h) R; (i) It is the magnified R.
(a)(b)(c)(d)(e)(f)(g)(h)(i)The size of the QR code is smaller than the size of the share. The restored image is also larger than the restored QR code. When the restored image is enlarged, the restored QR code can easily be decoded by the general decoder. The black module of the secret QR code is restored completely. It is represented by the black pixel-block (all black pixels) in the restored image. The white module of the secret QR code is represented by the pixel-block module (black and white pixels) in the restored image. In the3×3 pixel-block, the colors of all pixels are not black. It contains black and white pixels. Therefore, the black pixel-block and white pixel-block of the restored QR code have a contrast in color. The restored QR code can be decoded by the general decoder. The generated share is meaningful and the restored QR code can be correctly decoded. The proposed scheme is feasible.


## 4.2. Analysis and Discussion

Comparison results of different schemes are shown in Table3. Fang proposed the VSS scheme for the QR code [31]. The scheme of Fang can divide the secret QR code into two meaningless shares. Compared with it, the proposed scheme can generate two meaningful shares to share the secret QR code. Wan et al. proposed a novel VSS scheme for the QR code [32]. The QR code is used to share the secret QR code as shares. However, the version of the QR code is limited in the share. Only a specific version of the QR code can be used as the share. Compared with the scheme of Wan, the proposed scheme uses the halftone image as the share. There are many options for images as shares. When the proposed scheme chooses the share, it is not restricted by the scheme of Wan.Table 3
Comparison results of different schemes.
SchemeMeaningful sharesPixel expansionRestored QR code can be decodedRef. [31]NOYESYESRef. [32]YESNOYESProposed schemeYESYESYESWhen meaningless images are transmitted in the network, they will be suspected by the attacker. Meaningful images can reduce the suspicion of the attacker. The proposed scheme can generate meaningful shares. Meaningful images can improve the security of the scheme. The image information of the share can be any image and is not limited to the QR code. Meaningful images are easily managed by the receiver and the sender.


## 5. Conclusions

This paper proposed a novel scheme that can generate two meaningful shares for the QR code. Two meaningful shares are performed for the operation OR to restore the secret QR code. The restored QR code can be decoded by the general decoder. Meaningful shares have two advantages. One is that it is easy for the sender and the receiver to manage shares. Another is that meaningful shares can decrease the suspicion of the attacker that will improve the security of the VSS scheme. However, the restored QR code is not completely restored. The proposed scheme is a2,2-threshold scheme. The outline of the QR code is recognized in every share. In the future, a scheme that can completely recover the secret QR code and generate meaningful shares will be designed. The 2,2-threshold will be improved to 2,n, k,k, or k,n threshold schemes. The generated share of the new VSS scheme will not contain the outline of the QR code.



---

*Source: 4927239-2022-04-13.xml*