# Color Visual Secret Sharing for QR Code with Perfect Module Reconstruction
## 6 Extension to \((k,n)\)-threshold VSS-QR  
The proposed \((3,\ 3)\)-threshold VSS-QR can be extended to \((k,\ n)\)-threshold VSS-QR. This section presents a design of \((k,\ n)\)-threshold VSS-QR. To design \((k,\ n)\)-threshold VSS-QR, the value of \(n\) and \(k\) need to be determined. The range of \(n\) is \(3\leq n\leq max(\hat{n}_{0},\ \hat{n}_{1})\), where \(\hat{n}_{0}\) is the number of black modules and \(\hat{n}_{1}\) is the number of white modules in \(\mathbf{H}\). In order to determine \(k\), we need determine the following four parameters:  
1. \(l\): the number of modules that can be modified in every share. 2. \(\hat{r}\): the ECC capability of QR code in every block. 3. \(\hat{n}_{b}\): the number of block in QR code. 4. \(\Pr(e_{c})\) from Equation (49). The number of changeable modules \(l\) can be calculated as  
\[l=\left\lceil\frac{max(\hat{n}_{0},\ \hat{n}_{1})}{n-2}\right\rceil. \tag{51}\]  
Assuming that 8 modules in a codeword are all wrong, we can determine \(k_{1}\) as  
\[\frac{\Pr(e_{c})\cdot D^{2}-k_{1}\cdot l}{D^{2}} = \frac{8\hat{r}\cdot\hat{n}_{b}}{D^{2}} \tag{52}\] \[0.767D^{2}-k_{1}\cdot l = 8\hat{r}\cdot\hat{n}_{b}\] \[k_{1} = \left\lceil\frac{0.767D^{2}-8\hat{r}\cdot\hat{n}_{b}}{l}\right\rceil.\]  
When \(k\geq k_{1}\), the reconstructed QR code may be decoded by using \(k\) shares. However, this QR code has some errors. If we want to completely reconstruct the secret QR code, all shares must be obtained. Encoding algorithm for \(\mathbf{S}_{1}\) and \(\mathbf{S}_{2}\) are the same as proposed in Section 3.1. Therefore, \(\mathbf{S}_{1}\) and \(\mathbf{S}_{2}\) must be obtained when decoding. In the following shares, encoding rule is changed. Only \(l\) modules are modified in next every share. The encoding algorithm is shown in Algorithm 2. Decoding method is the same as proposed in Section 3.2. \begin{table}
\begin{tabular}{l l l l} \hline \hline  & \multicolumn{2}{c}{**Secret Image is**} & \multicolumn{1}{c}{**Run Time**} & \multicolumn{1}{c}{**Restored QR Code**} \\  & **Completely Restored** & **Can Be Decoded** \\ \hline
[24] & Yes & Slow & Yes \\
[26] & No & Fast & Yes \\ VSS-QR & Yes & Fast & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Analysis of different algorithms. ```
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:



The security of VSS-QR does not belong to perfect security but belongs to the computational security. It is secure under the assumption that the attacker's tool is limited to QR code decoder. The method we proposed is to use multiple colors that can also be extended. In our future work, a method will be designed to improve the security of QR code, and VSS will utilize multiple tones instead of multiple colors. Conceptualization, T.L. and B.Y. ; software, T.L., B.Y. ; Formal analysis, T.L., B.Y. and J.-S.P. ; Methodology, T.L., B.Y. and J.-S.P. ; Writing--original draft, T.L. and B.Y. ; Writing--review & editing, T.L., B.Y. and J.-S.P. This research was funded by NATURAL SCIENCE FOUNDATION OF CHINA 61571139 and 61272432, SHANDONG PROVINCIAL NATURAL SCIENCE FOUNDATION ZR2014J1044. The authors declare no conflict of interest. ## References

* [PERSON] et al. (2019) [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON] A secure authentication protocol for Internet of vehicles. _IEEE Access_**2019**, \(7\), 12047-12057. [CrossRef]
* [PERSON] et al. (2019) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Attacks and solutions on a three-party password-based authenticated key exchange protocol for wireless communications. _J. Ambient. Intell. Humaniz. Comput._**2019**, _10_, 3133-3142. [CrossRef]
* [PERSON] et al. (2018) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] \(\alpha\)-Fraction first strategy for hierarchical model in wireless sensor networks. _J. Internet Technol._**2018**, _19_, 1717-1726. * [PERSON] et al.