Skip to Content
Applied SciencesApplied Sciences
  • Article
  • Open Access

22 August 2026

41 Pages

Security of Visual Cryptography Techniques: An Overview of Algorithms, Their Properties, Applications, and Potential Attack Vectors

and
Faculty of Information and Communication Technology, Wroclaw University of Science and Technology, Wybrzeze Wyspianskiego 27, 50-370 Wroclaw, Poland
*
Author to whom correspondence should be addressed.

Abstract

This work provides a structured synthesis of visual cryptography, a secret sharing technique that enables image reconstruction only when a specific number of shares are combined, with decryption performed visually by overlaying the shares. Although conceptually simple and distinctive in its reliance on the human visual system rather than complex computation, this method has been predominantly studied from theoretical and construction-oriented perspectives. The work consolidates fundamental concepts, mathematical foundations, operational principles, and security considerations of selected schemes, providing a common context for analyzing their characteristics. Particular attention is given to known attack vectors, including information leakage from individual shares and integrity violations caused by forged shares, together with corresponding mitigation approaches reported in the literature. In addition to this synthesis, the work presents an experimental investigation of the ϕ correlation coefficient and its behavior for genuine and forged shares. Experiments conducted on a dataset of 100 images show that genuine–genuine share pairs consistently exhibit higher mean ϕ correlation values than genuine–forged pairs, although the observed values depend on the underlying scheme. While these results suggest that ϕ correlation may provide useful information for share authenticity analysis, the experiment used the same forged target image throughout the dataset, limiting the variation of the forged samples and potentially making the observed differences partly dependent on the selected target image. Finally, three Proof-of-Concept application scenarios demonstrate possible integrations of visual cryptography into QR code security, physical document verification, and IoT access control, illustrating its potential use in practical security systems.

1. Introduction

The subject of this work is the analysis of Visual Cryptography (VC) techniques with respect to their properties, security aspects, and potential applications. The discussed encryption mechanism was first introduced in publication [1]. VC represents a specific type of secret sharing scheme in which information is encrypted and then divided into fragments referred to as shares, distributed among participants. The secret reconstruction process is possible only for predefined subsets of participants possessing a sufficient number of shares. However, this technique differs significantly from classical secret sharing methods used in modern cryptographic systems.
A ( k , n ) secret sharing scheme in the context of VC is the process of transforming a selected image into n seemingly random, meaningless translucent components referred to as shares. Superimposing any k of these shares enables the reconstruction of information contained in the original encrypted secret. As a result of the sharing process, each of the n participants receives a share that, by itself, reveals no information about the secret image. A share generated by a correctly implemented classical ( 2 , 2 ) scheme should consist of pixels whose color values (black or white) are determined according to a uniform distribution, where the probability of occurrence of each color is equal to 50%. This property applies to both deterministic and probabilistic models of VC; however, the detailed process of share generation differs depending on the selected approach.
Depending on the model, secret reconstruction can be performed by superimposing exactly or at least k shares (see Section 2.1 for further explanation of the correct decryption process). In both cases, the correctly reconstructed message is represented as a secret with a modified pixel contrast compared to the original image. Figure 1 presents an example of a ( 2 , 2 ) scheme illustrating the encryption and secret reconstruction processes.
Figure 1. Example of encryption and decryption in a ( 2 , 2 ) VC scheme.
The first significant difference between classical secret sharing methods [2] and the technique discussed in this work is the manner in which input and output data are represented. In VC, the objects of encryption are images, and more specifically their binary representations in the form of pixel maps (with possible extensions to color images [3]), rather than conventional data vectors represented in a binary format. It should be noted, however, that this technique can be applied to secure any data represented in binary form. The specific nature of raster images as input data enables the utilization of the unique property of VC, namely the ability to reconstruct the secret directly through visual perception without the need for additional cryptographic computations.
The algorithm used in this technique is based on combining the input data with a Random Number Sequence (RNS) according to the rules defined by matrices constructed for the assumed scheme parameters. In this regard, VC exhibits similarities to encryption based on a one-time pad. Furthermore, the property described in Section 2.8 guarantees that no information is disclosed unless the required number of encryption participants is involved in the reconstruction process.
A significant drawback of VC in the deterministic model is the increase in the number of pixels representing the original secret and the potential change in image proportions resulting from its expansion in the horizontal or vertical direction. However, this practically unfavorable property does not occur in the probabilistic model. It should also be noted that neither of the two approaches—deterministic and probabilistic—allows for the full preservation of the original contrast between white and black colors during secret reconstruction performed solely through visual perception. Example shares of the ( 2 , 2 ) deterministic scheme generated from a real 1360 × 1360 pixel grayscale photo of a cat are presented in Figure 2. The corresponding original and the decrypted image are presented side by side in Figure 3 for comparison. It should be noted that the examples presented throughout this work serve primarily as illustrations of the discussed visual cryptography mechanisms. As the encoding process is performed independently for each pixel according to the rules of the selected scheme, the analyzed properties are determined by the scheme construction rather than by the semantic content of the encrypted image. Therefore, the conclusions drawn in this work concern the behavior of the considered VC schemes and are not limited to the particular images used for illustration.
Figure 2. Two shares of a ( 2 , 2 ) scheme encrypting an image of a cat. (a) First share. (b) Second share.
Figure 3. Comparison of the original image with the decryption result. (a) The original image. (b) Result of superimposing shares from Figure 2.
Motivation—Although VC has been extensively described in numerous scientific publications, including those cited in this paper, it has not yet been widely adopted in practical implementations. One possible reason for its limited adoption is the insufficient awareness of its capabilities and limitations. Consequently, one of the primary motivations of this work was to provide a comprehensive description of the operating principles and security properties of VC mechanisms. An additional objective of this paper was to present selected application scenarios, highlighting potential directions for the practical use of this technology.
Contribution—This work provides a structured security-oriented analysis of visual cryptography, integrating its mathematical foundations, scheme properties, attack vectors, and mitigation mechanisms within a common framework. Rather than treating these elements independently, the analysis examines how construction and implementation choices influence security properties, attack feasibility, scalability, and the practical cost of applying certain mechanisms. This perspective allows the security implications and limitations of different approaches to be considered together, providing a basis for evaluating their suitability for practical security applications. The mathematical constructions, attack methods, and countermeasures discussed in Section 2 and Section 4 are not proposed as novel contributions of this work; instead, they are analyzed and synthesized based on previously published results. The presented descriptions were selected from the existing literature based on their clarity and ability to most clearly illustrate fundamental concepts of visual cryptography. Furthermore, by means of appropriately selected and designed visual illustrations, the work aims to provide an intuitive understanding of the discussed concepts and make the fundamental principles of visual cryptography more accessible to the reader. Beyond this synthesis, the work provides a security-oriented analysis of the relationships between VC scheme construction, attack feasibility, and the effectiveness and cost of mitigation mechanisms. In particular, the analysis examines how specific construction choices and implementation assumptions affect the ability of an attacker to recover or manipulate the encrypted information, and how increasing resistance to selected attacks may introduce additional technical costs. The presented analysis therefore does not treat the reviewed attacks and countermeasures as isolated mechanisms, but examines their practical security consequences across different VC models and scheme configurations. The developed implementation was used to support this analysis by constructing and testing schemes with different parameters, reproducing the discussed attack scenarios, and evaluating the resulting characteristics. The original experimental contribution of this work is a quantitative investigation of the ϕ correlation coefficient and its behavior for genuine and forged shares (presented in Section 4.3). Experiments conducted on a dataset of 100 images show that genuine–genuine share pairs consistently exhibit higher mean correlation values than genuine–forged pairs for the investigated schemes, while also demonstrating that the observed correlation values depend on the structure and number of shares in the underlying scheme. These results indicate that the use of ϕ coefficient may provide information relevant to share authenticity. In addition, the work develops three Proof-of-Concept application scenarios demonstrating possible integrations of visual cryptography with practical security systems: QR-code authenticity verification, physical document verification, and IoT access control. These scenarios are intended as application-oriented demonstrations rather than complete ready-to-market solutions. An open-source Python implementation is provided to support reproducibility of the experimental evaluation and facilitate further research on the analyzed visual cryptography schemes.
Related Work Selection Methodology—The literature reviewed in this work was identified through searches of IEEE Xplore, ACM Digital Library, SpringerLink, and Google Scholar, focusing on theoretical and security-related aspects of visual cryptography. The search covered works addressing fundamental VC concepts: deterministic and probabilistic models, construction and optimization of basis matrices, security properties, attack vectors, and corresponding mitigation techniques. No fixed publication date range was imposed. Instead, for works that were not recent, subsequent publications were examined to determine whether the corresponding concept, construction, or security aspect had been further developed, analyzed, or revised in later research. Relevant additional studies were identified by following references and related publications from the initially selected works. The final literature set was selected based on its relevance to the theoretical foundations, security analysis, and development of VC concepts discussed in this manuscript. The literature search was conducted in January 2026 using search queries including “visual cryptography”, “(k, n) visual cryptography”, “deterministic visual cryptography”, “probabilistic visual cryptography”, “visual cryptography constructions”, “optimal visual cryptography”, “visual cryptography contrast”, “visual cryptography pixel expansion”, “visual cryptography security”, “visual cryptography attacks”, “visual cryptography cheating”, “visual cryptography QR”, “visual cryptography IoT”, and “visual cryptography physical documents”. In total, 49 publications relevant to the scope of this work were identified and examined. For the theoretical foundations of VC, the final selection favored publications that provided a clear and representative description of the particular concept or property being discussed. For security-related aspects, all identified publications addressing a given security issue were considered when the issue was related to the general operation or security of VC, rather than to a specific modification, variant, or narrowly defined application of a VC scheme.
Structure—Section 2 presents the theoretical background of visual cryptography, including its mathematical foundations, security properties, encryption models, and scheme parameters. Section 3 describes the methodology, software implementation, and experimental setup used throughout this work. Section 4 evaluates the security of visual cryptography by analyzing selected attack vectors together with representative mitigation techniques. Section 5 presents several proof-of-concept applications demonstrating the practical use of visual cryptography in different security scenarios. Finally, Section 6 summarizes the main findings, discusses the limitations of the presented approaches, and outlines directions for future research.

3. Materials and Methods

To illustrate various concepts related to VC, implementations of the algorithms considered were developed in Python. This enabled analysis of the encryption characteristics for different basis matrices, models, and threat mitigation methods. The implementation also allows the construction of schemes with varying numbers of participants and different threshold values defining the minimum number of shares required for successful decryption. The resulting shares and reconstructed images presented throughout this work were generated using the developed software implementation.
The encryption matrices used in this work were obtained using a linear programming approach for determining the basis matrices B 0 and B 1 of schemes with an optimal γ N S parameter, as described in [5]. In most cases of presented Figures, the obtained matrices were modified in order to preserve the original image scale (i.e., to ensure that the parameter m is a square number). The elements of the linear programming formulation, including the decision variables, objective function, and constraints, together with their detailed descriptions, can be found in [5]. The optimization problem was solved using the linprog solver from the SciPy library (version 1.14.1).
The scalability limitations related to the rapid growth of the parameter m have been previously reported for larger schemes [5]. The implementation developed in this work confirms this observation. In practice, this means that the generated shares become significantly larger, which led to substantial data handling and memory management issues in the Python implementation. For sufficiently large schemes, the program was no longer able to process the generated shares efficiently. Table 1 presents the characteristics of the generated schemes (their basis matrices), including k, n, m, γ N S , runtime, and memory required for their generation.
Table 1. Parameters and computational characteristics of the generated schemes.
The computational performance of tested schemes was evaluated in terms of execution time and memory consumption. The execution time was measured using Python’s time.perf_counter() function, while the memory consumption was estimated based on the process memory usage obtained with the psutil library. Memory consumption was estimated using the resident set size (RSS) of the Python process, obtained with the psutil library, and reported as the increase in RSS measured between the start and end of each experiment. Each experiment was repeated 100 times (with the exception of cases where n > 10 ), and the final results were calculated as the arithmetic mean of all measurements to minimize the influence of individual execution variations.
The obtained values of the optimal contrast parameter γ N S are consistent with those reported in [5], confirming the effectiveness of the linear programming approach for contrast optimization in visual cryptography schemes. In addition to computing the optimal contrast, the implemented algorithm generated and stored the corresponding basis matrices satisfying the required scheme parameters. For sufficiently small numbers of participants n ≤ 10 , the implementation was able to generate the basis matrices while maintaining relatively low computational and memory requirements.
However, as n increased, the execution time and memory consumption grew rapidly due to the significant increase in the number of matrix columns determined by the parameter m. The measured resource consumption depends on the specific experimental environment, including the hardware, software environment, and implementation details. Nevertheless, the rapid, factorial growth of the parameter m constitutes an inherent scalability limitation of the considered scheme construction and may lead to substantial computational and memory requirements for schemes with larger n. For the case of fixed k = 2 , these resource requirements became substantial under the tested implementation and hardware configuration for values of n greater than 27. The largest successfully generated basis matrices correspond to the instance k = 2 , n = 27 .
To verify the remaining results reported in [5], a simplified version of the implementation that computes only the optimal contrast parameter γ N S , without constructing the basis matrices B 0 and B 1 , was used. This version successfully reproduced the published results for n = 50 and n = 100 . All experiments were performed on a computer equipped with an AMD Ryzen 7 3700X 8-core processor (AMD, Santa Clara, CA, USA) (3.60 GHz), 16 GB of RAM, and running a 64-bit Windows 10 operating system on an x64 architecture. The implementation was developed in Python version 3.13.0 using the NumPy (version 2.1.3), SciPy (version 1.14.1), Matplotlib (version 3.9.2), Pandas (version 2.2.3), Pillow (version 11.0.0), and psutil (version 6.1.0) libraries. The complete source code used in this study is publicly available in a GitHub repository: https://github.com/Flyyy777/SecVC (accessed on 7 August 2026).
The ϕ coefficient presented in Section 4.3 was calculated for each pair of shares to quantify their statistical correlation as presented in [10]. For each pair of images, the pixels at corresponding positions were compared across the entire images and classified into four possible combinations of binary values: both pixels are white, both pixels are black, the pixel in the first image ( O 1 ) is white while the corresponding pixel in the second image ( O 2 ) is black, or the opposite case. The total number of occurrences of each combination across the entire pair of images was then recorded according to the arrangement illustrated in Table 2. In this arrangement, the values 0 and 1 correspond to white and black pixels, respectively. The coefficient was then calculated according to Equation (10).
ϕ = A D − B C ( A + C ) ( B + D ) ( A + B ) ( C + D )
where A, B, C, and D denote the numbers of occurrences of the corresponding pixel-value combinations. The resulting coefficient ranges from −1 to 1, with values close to −1 and 1 indicating strong negative and positive correlation, respectively, while a value close to 0 indicates little or no correlation. An example of two binary images exhibiting a ϕ value of −1 is presented in Figure 16.
Table 2. Table illustrating the four possible combinations of black and white pixel values at corresponding positions in images O 1 and O 2 .
Figure 16. Two images with a strong negative correlation of − 1 . (a) O 1 . (b) O 2 .
The solutions presented in this work have been verified both in a software environment and through proof-of-concept physical implementation. The software implementation was used to prepare illustrations demonstrating various concepts. The practical verification involved printing shares using a standard office printer (as described in Section 5.3) and decrypting them by superimposing the sheets of paper for a ( 2 , 2 ) scheme. The physical experiment confirmed the feasibility of reconstructing the secret by superimposing two printed shares of a ( 2 , 2 ) scheme.
During the experiment, it was observed that placing a high-intensity point light source at an appropriate distance behind the superimposed sheets appeared to improve the visual quality of the reconstructed image. This observation was not evaluated quantitatively and should therefore be treated only as a practical observation requiring further experimental verification. The obtained results demonstrate that the reconstruction process can be performed for the ( 2 , 2 ) scheme. The objective of the physical experiment was to demonstrate the feasibility of the proposed approach rather than to provide a comprehensive evaluation of its physical implementation. A systematic analysis of factors such as printer resolution, printing media, alignment accuracy, rotational and translational misalignment, illumination conditions, and reconstruction quality is beyond the scope of this work and constitutes an interesting direction for future research. For applications requiring a larger number of shares or higher reconstruction quality, specialized printing techniques on transparent materials could be investigated as a potential approach to improving practical performance.
PoC presented in Section 5.1, which utilizes the redundant content of a QR code, confirms the practical feasibility of embedding VC shares into such codes. Scanning the modified QR code (Figure 28a) enables the recovery of the correct encoded content in the form of a short text message. The superimposition process of the shares presented in Figure 29 was performed using Python implementation. QR code visible in Figure 28a was constructed and modified using the tool [11].

4. Security Evaluation

This section evaluates the security of VC schemes by analyzing selected attack scenarios that may compromise the confidentiality or integrity of the encryption process. The presented analysis considers several attack scenarios targeting different aspects of VC systems. Additionally, selected mitigation techniques are discussed to demonstrate possible approaches for reducing the impact of identified vulnerabilities. The presented results highlight the importance of considering practical attack scenarios when designing and implementing VC as security mechanisms.

4.1. Known-RNS Attack

Kerckhoffs’s principle states that a cryptographic system should remain secure even if all details of its operation are publicly known except for the key itself. In VC, the confidentiality of information is based on a random sequence of decisions responsible for selecting the encryption matrices. In many discussions of this encryption method, the role of the RNS is not always stated explicitly. The process of random matrix selection is typically described as part of the encryption procedure, while less attention is given to the fact that these random decisions should be considered the secret element of the system. The disclosure of the RNS should not be considered a violation of Kerckhoffs’s principle, as it corresponds to the compromise of the secret key itself. However, in practical implementations of encryption schemes, vulnerabilities may allow information about the RNS to be obtained, for example through side-channel attacks. It is therefore important to additionally examine the threat resulting from an attacker gaining access to the RNS and to understand the impact of such exposure on the confidentiality of the protected information. This analysis concerns a stronger security property, namely the resilience of the system under RNS compromise.
This issue was further explored in [12], where the authors present a method by which an attacker possessing a limited number of shares together with an RNS may partially or completely recover information about the encrypted secret. It can be shown that not all shares in a ( k , n ) encryption scheme allow the same level of decryption when the RNS is known—there exist cases in which possession of both the RNS and certain shares still does not reveal complete information about the image.
The process of making a random decision is described as selecting a matrix with a given index from indexed families of matrices. Each iteration over the RNS, represented as natural numbers from 1 to | C 0 | (or | C 1 | ), results in the selection of a particular matrix based on its position within the indexed family. In order to determine whether a given share allows successful decryption, the following method is introduced:
  • Method for verifying the possibility of decryption based on the shares of participants from the subset F
Let the encryption matrix indexed families be defined such that Roman numerals denote the ordering of matrices within them (corresponding to the decisions made by the RNS; for example, a RNS value equal to 1 indicates that the matrix at position I will be selected for encryption):
C 0 = { M 0 I , M 0 I I , … }
and
C 1 = { M 1 I , M 1 I I , … }
The matrices in C 0 and C 1 are then restricted to the rows corresponding to the participants belonging to the examined unauthorized subset F, resulting in indexed families D 0 and D 1 :
D 0 = { M 0 I F , M 0 I I F , … }
and
D 1 = { M 1 I F , M 1 I I F , … }
If the following equalities hold for all matrices occupying corresponding positions in the resulting index families,
M 0 I F = M 1 I F M 0 I I F = M 1 I I F ⋮
then the participants belonging to set F are unable to obtain information about the secret despite possessing both the RNS and their shares. Otherwise, partial or complete decryption of the image becomes possible. An example verification for a ( 2 , 2 ) scheme with F = { 1 } is presented below.
C 0 = 0 1 0 1 , 1 0 1 0
and
C 1 = 0 1 1 0 , 1 0 0 1
The matrices are restricted to the rows corresponding to participant { 1 } :
D 0 = 0 1 , 1 0
and
D 1 = 0 1 , 1 0
As can be observed, the rows occupying corresponding positions are identical:
0 1 = 0 1
1 0 = 1 0
The presented analysis demonstrates that the first participant, despite possessing both their share and the RNS used to select matrices according to their ordering, is unable to decrypt the message. The participant cannot determine the original color of a secret pixel because, for every possible r i selection, the encryption algorithm assigns the same subpixel pattern regardless of whether the secret pixel is black or white.
The same method can also be applied to the second participant, denoted as {2}. In this case, the indexed families D 0 and D 1 contain the same restricted rows, but located at different positions. Consequently, by combining knowledge of the RNS indicating the selected position with the share indicating the corresponding row, the participant becomes capable of attacking the scheme and recovering information about the original colors of the secret image. It is worth noting that the same situation can also arise by exchanging the positions of the first and second matrices within the corresponding indexed families, which indicates that the ordering of matrices (or equivalently, the method used by the RNS to select them) influences the feasibility of the attack.
Figure 17 illustrates the results of decryption with a known RNS for the two shares of a ( 2 , 2 ) scheme. In cases where the algorithm was unable to determine the value of the original pixel, the color was selected randomly with equal probability, i.e., 50% for black and 50% for white.
Figure 17. Decryption result with a known RNS for the two shares of a classical ( 2 , 2 ) scheme in the deterministic model. (a) First share. (b) Second share.
The feasibility of such an attack is conditioned by the following fact—the matrices from C 0 and C 1 are generated using the same sequence of column permutations applied to the basis matrices. In other words, the construction of matrices encoding a white pixel is based on moving a column of B 0 from its original position to a selected one, and the same permutation is simultaneously applied in the construction of matrices encoding a black pixel from B 1 . As a result, corresponding matrices in C 0 and C 1 are generated using identical column rearrangements.
This method of generating C 0 and C 1 is commonly adopted in many works on VC. However, as demonstrated in [12], using the same permutation sequence increases the scheme’s vulnerability to known-RNS attacks. Naturally, the operation of the encryption algorithm depends on the specific implementation, but the approach described above is often selected because of its simplicity and minimal requirements. In such an implementation, the minimum amount of bits required to select a sharing matrix for encrypting a single pixel is equal ⌈ log 2 m ! ⌉ , since generating all possible permutations requires distinguishing between m ! binary choices. It is also worth noting that the number of bits for whole image depends on its dimensions ( a × b ) and therefore increases with the number of pixels.
It can be shown, as discussed in [12], that for every scheme in which the RNS simultaneously determines the selected column permutation in both B 0 and B 1 , there exists at least one unauthorized subset of participants for which decryption becomes fully correct. In the example presented above, this corresponds to the unauthorized subset generated from the second participant, namely {2}. Consequently, there always exists a configuration of shares that enables an attacker to perform complete decryption, provided that the RNS used during encryption is known.
For more complex schemes (i.e., larger values of n and k), the result of the attack may reveal only a subset of the original pixels correctly. There exist cases in which the restricted matrices corresponding to some positions are identical, while those corresponding to other positions differ. As a consequence, it becomes necessary to introduce a new parameter describing the fraction of matrix selections for which the value of a pixel can be deterministically disclosed by a given unauthorized subset of participants and known RNS. This parameter, denoted by P, can be calculated for a given subset F using Equation (22).
P F = D i f f F D i f f F + C o m m F
where:
D i f f F —the number of positions in the indexed families for which the matrices restricted to F are different;
C o m m F —the number of positions in the indexed families for which the matrices restricted to F are identical.
For the presented example (Figure 17), P { 1 } = 0 and P { 2 } = 1 . However, this parameter describes security only from the perspective of a single subset F. Therefore, in order to perform a complete analysis of the confidentiality of the entire scheme under a known-RNS attack, the following expression is introduced:
P max = max { P F : F ∈ F }
The parameter defined in Equation (23) is considered a quantity to be minimized in order to improve the overall security of the scheme. For the scheme presented in Figure 17, P max is equal to 1.
The known-RNS decryption technique with an arbitrary number of shares can also be applied to probabilistic models. In some cases, this method enables a more accurate reconstruction of the secret than classical decryption without the attack. In particular, an attacker may recover an image identical to the originally encrypted one, whereas superimposing k shares in the standard reconstruction process reveals each pixel correctly only with a certain probability. This difference in the quality of secret reconstruction can be observed by comparing the result of decrypting k shares (Figure 14) with the attack results presented in Figure 18.
Figure 18. Decryption result obtained using a known-RNS attack on two shares of a classical probabilistic ( 2 , 4 ) scheme. (a) First share. (b) Second share.
The verification method presented in this Subsection remain applicable in the case of probabilistic VC schemes. Figure 18 presents the results of a known-RNS attack for a probabilistic ( 2 , 4 ) scheme.

4.2. Known-RNS Attack Mitigation

Although the complete loss of confidentiality in the presence of the random number sequence and a suitable subset of shares is unavoidable, the authors of [12] demonstrated that the negative consequences of such an attack can be mitigated. In particular, it is possible to construct C 0 and C 1 in a manner that reduces the amount of information revealed during known-RNS decryption.
The objective is to minimize the parameter P max , which describes the fraction of deterministically disclosed positions in the worst-case attack scenario, i.e., when the attacker possesses the subset of unauthorized shares revealing the greatest amount of information about the secret while still containing fewer than k shares. Consequently, reducing P max requires constructing C 0 and C 1 such that, for every unauthorized subset of participants F, the corresponding P F is minimized.
This approach generally relies on extending the indexed families of encryption matrices in such a way that matrix pairs revealing information about a secret pixel are balanced by additional matrix pairs for which knowledge of both the RNS-selected position and the shares from F does not allow correct decryption. As a result, improving resistance against known-RNS attacks typically requires increasing the number of matrices used by the scheme, leading to higher storage and computational requirements.
By applying such mitigation techniques, the encryption algorithm increases the probability of selecting matrix positions that do not reveal information about the secret pixel. Shares generated using the mitigated scheme still leak a certain amount of information under a known-RNS attack; however, all shares leak information in a balanced manner, meaning that no individual share reveals significantly more information than the others.
This effect can be observed in Figure 19, which presents the results of a known-RNS attack performed on two shares of a ( 2 , 2 ) scheme encrypted using matrix indexed families constructed with the mitigation approach. In this case, only approximately 50% of the information about the original secret pixel colors can be deterministically recovered, while the remaining pixels are replaced with random noise because their values cannot be determined unambiguously. Consequently, the reconstructed image contains approximately 75% of the pixels matching the original image. The remaining 25% constitute noise caused by the random distribution of pixel values, with each possible color being selected independently with a probability of 50%. Importantly, both shares generated using the improved construction reveal the same amount of information when the RNS used during encryption is known.
Figure 19. Result of a known-RNS attack on two shares of a ( 2 , 2 ) scheme with P max = 1 2 . (a) First share. (b) Second share.
This represents a significant improvement in security compared with the example discussed in Section 4.1, where one share revealed no information while the second share enabled complete recovery of the secret. In practical implementations of VC, reducing P max improves the overall confidentiality of the scheme by limiting the amount of information obtainable from any unauthorized subset of shares. However, this improvement affects the parameter δ , since lowering the probability of successful decryption during a known-RNS attack requires introducing additional redundant matrices into the indexed families C 0 and C 1 .

4.3. Known-Share Attack

Security of information encrypted using VC methods is not solely determined by the correct implementation of its components. In the deterministic encryption model described in Section 2.4 there exists a vulnerability that allows a dishonest participant to mislead other participants by altering the result of share superposition.
In the considered scenario, the attacker possesses a single share from which they generate a set of forged shares. The number of such forged shares depends on the specific scheme and is given by m s − 1 (as shown in [13]), where s denotes the number of black subpixels in a block encoding a single pixel.
When the legitimate participants’ shares are combined together with the forged shares (so that the total number of combined shares equals k), the resulting configuration is insufficient to correctly reconstruct the original secret. Moreover, due to the presence of the fabricated shares, the participants obtain an attacker-chosen F O image instead of the intended secret O.
Shares generated using this method are visually indistinguishable from those produced by classic algorithm (Section 2.4). This follows from the fact that identical subpixel configurations are reused from C 0 and C 1 . Moreover, the frequency distribution of individual subpixel patterns is approximately the same as in the case of genuine shares, since the forged construction is based on an observed legitimate share. The comparison between genuine and forged shares can be seen in Figure 20.
Figure 20. Shares. (a) Genuine. (b) Forged.
A correctly executed attack therefore consists of intercepting information from a single genuine share, generating forged shares, and then using them together with the original and k − m s − 1 genuine shares for decryption. Honest participants, being unable to detect any irregularities in the fabricated shares, accept them as valid.
Since the total number of shares involved in the reconstruction equals k, the participants incorrectly interpret the attacker-selected image as the original secret of the scheme. The outcome of such an attack, together with a comparison to the standard decryption using k genuine shares, is presented in Figure 21.
Figure 21. Decryption results. (a) Using k genuine shares. (b) Attack with a forged share.
An additional experiment based on the correlation coefficient ϕ was performed to examine its statistical properties when applied to genuine and forged shares generated using the considered attack method. The aim of this experiment was to analyze how this statistic behaves when applied to genuine and forged shares generated using the considered attack method. In particular, the analysis focused on determining whether forged shares preserve correlation characteristics similar to those of genuine shares and whether any measurable differences between these two groups can be observed. Such an analysis provides preliminary insight into whether correlation-based methods could potentially be considered as a basis for future share authenticity verification approaches. It should be emphasized that the purpose of this experiment is not to introduce a complete detection mechanism, but rather to evaluate whether the statistical properties of ϕ provide information that could be useful for this purpose.
The experiment was performed using a dataset consisting of 100 real-world images, including photographs and graphical images, obtained from the USC-SIPI Image Database [14]. All images were resized to 256 × 256 pixels and subsequently converted into binary form suitable for visual cryptography processing. Each image was encrypted using four different visual cryptography schemes: ( 2 , 2 ) , ( 2 , 3 ) , ( 2 , 4 ) , and ( 2 , 5 ) . For each encrypted image, one genuine share was selected and used to generate a forged share according to the attack algorithm described previously. In all experiments, the same forged image was used to generate forged shares in order to maintain a consistent attack scenario and isolate the influence of the original secret image on the obtained correlation values. The correlation coefficient was then calculated in two cases: between two genuine shares (genuine–genuine, G-G) and between a genuine share and the corresponding forged share (genuine–forged, G-F). The similarity between shares was evaluated using the Pearson correlation coefficient for two binary variables [10] (referred to as the ϕ coefficient both in this work and in the literature), where the variables correspond to the black and white pixel values of the compared shares. For each tested images, the obtained values were represented as a set of tuples containing the image identifier, G-G correlation coefficient, and G-F correlation coefficient. The resulting distributions were visualized using histograms shown in Figure 22, while the mean value, standard deviation, and standard error were calculated and summarized in Table 3. Standard error was calculated to estimate the uncertainty of the mean value obtained from the tested image set.
Figure 22. Comparison of ϕ distributions in genuine–genuine (blue) and genuine–forged (red) pairs for different schemes: (a) ( 2 , 2 ) , (b) ( 2 , 3 ) , (c) ( 2 , 4 ) , and (d) ( 2 , 5 ) .
Table 3. Statistical characteristics of distributions from Figure 22.
The obtained results indicate that the correlation coefficient ϕ exhibits different behavior for genuine–genuine and genuine–forged share pairs. For all tested schemes, the average correlation value calculated between two genuine shares was higher than the value obtained between a genuine share and a forged share. This indicates that forged shares generated using the considered method do not reproduce exactly the same correlation characteristics as genuine shares. A similar tendency can be observed in terms of the standard deviation. In all analyzed cases, the dispersion of the G-F correlation values was lower than for the G-G pairs. This means that the correlation values obtained for genuine–forged comparisons were more concentrated around their mean value, whereas genuine–genuine comparisons exhibited greater variability depending on the tested image. An increase in the number of shares involved in the scheme results in an increase in the average correlation coefficient values for both types of comparisons. For genuine–genuine pairs, the mean value increases from 0.135 for the ( 2 , 2 ) scheme to 0.459 for the ( 2 , 5 ) scheme. A similar, although less pronounced, trend is observed for genuine–forged pairs, where the mean value increases from −0.021 to 0.177. This indicates that the structure of the underlying visual cryptography scheme has a significant influence on the obtained correlation values.
The observed differences between the G-G and G-F distributions suggests that the ϕ coefficient captures distinct statistical characteristics of the two types of share pairs under the considered experimental conditions. These results suggest that ϕ may contain information that could be relevant to the study of share authenticity. However, the present experiment is exploratory and does not establish a share-authenticity verification method. No decision threshold, classification performance, or independent validation was considered. Therefore, the obtained results should be interpreted as preliminary statistical evidence of differences between genuine and forged shares rather than as evidence of a practical authentication mechanism. A dedicated classification study, including threshold selection and evaluation using measures such as false-acceptance rate, false-rejection rate and ROC curves, would be required to assess whether the observed differences can be reliably used for authentication. Although the use of the same forged image throughout the experiment provides a consistent attack scenario, it also limits the generality of the findings. In particular, the experiment does not establish whether the observed differences between G-G and G-F pairs would persist across different forged target images. Further experiments involving multiple forged target images would therefore be necessary to assess the extent to which the observed results are characteristic of genuine–forged pairs rather than dependent on the particular target image used.

4.4. Attack Without Access to Shares

The attack presented in the previous chapter required the dishonest participant to possess a genuine share. This section describes a vulnerability occurring in specifically constructed schemes, which—similarly to the attack in Section 4.3—allows the decryption outcome to be altered, but without the need for any genuine share. Consequently, this attack can be performed by any participant who does not belong to the set of participants involved in the encryption process ( ∉ P ).
To exploit the described vulnerability, the attacker generates a set of shares encoding a chosen forged image, as presented in Section 2.4 for the ( 2 , 2 ) scheme. In this case, the additional (2,2) scheme is used as a tool enabling an attack against any other scheme. It is essential that the encryption matrices used have the same dimensions as those used in the attacked encryption process (this is often achieved by artificially expanding the rows of the encryption matrices, for example by adding additional columns filled with zeros, in order to match the dimensions of the forged shares to those of the legitimate ones). If the matrix dimensions do not match, correct superposition of shares is not possible.
Subsequently, similarly to the attack described in Section 4.3, the newly generated shares are combined with the genuine shares for decryption, ensuring that their total number equals k. Figure 23 illustrates the procedure of the described attack. The dashed line indicates the process of superimposing the dishonest participant’s share with the forged shares.
Figure 23. Illustration of the forged-share attack using a ( 2 , 2 ) scheme.
As a result of decryption, the participants obtain an image chosen by the attacker, since an insufficient number of genuine shares has been superimposed together with two shares originating from a ( 2 , 2 ) scheme. In this case as well, the forged shares remain indistinguishable from the genuine ones. The performed attack can therefore be described as a situation in which adversaries successfully decrypt a selected, false image, while the shares belonging to honest participants are only incorporated into the superposition process and are insufficient on their own to correctly reconstruct the original image.
An example of such an attack on a ( 3 , 3 ) scheme is shown in Figure 24. The resulting image is obtained by superimposing two shares from dishonest participants not belonging to the set P and one genuine share.
Figure 24. Result of an attack using two forged shares in a ( 3 , 3 ) scheme.

4.5. Forged Shares Attack Mitigation

Authors of [13], in response to the identified vulnerability, propose introducing a mechanism that enables verification of share authenticity prior to performing decryption. In this approach, each participant is assigned two shares: one decryption share denoted by S, and a verification share V S used to validate the integrity of any share used in the encryption process.
Each participant is additionally assigned a unique verification image V O , which becomes visible when the verification share is superimposed with a suspicious encryption share. This approach eliminates the possibility of introducing forged shares by enabling verification of any participant’s share through the corresponding verification share. If the expected image does not appear after superposition, the tested share is considered fraudulent.
The method proposed in [13] in construction increases the pixel expansion parameter m by 2, since each share contains not only columns encoding the secret but also additional consistency columns filled with fixed patterns of zeros and ones. These columns are subsequently extended in the verification shares depending on the color of the participant’s assigned image. Verification is therefore performed using an additional ( 2 , 2 ) scheme applied within these auxiliary columns. The remaining columns in V S , which do not participate in the reconstruction process, are filled with zeros, making verification shares appear generally brighter than decryption shares in most cases. A comparison between a decryption share and a verification share is shown in Figure 25.
Figure 25. Shares (a) used for encryption; (b) used for verification.
The security of this solution is based on the fact that the column permutation selected by a RNS is known only at the time of encryption. In other words, an attacker using a forged share is not able to fabricate the verification columns, even if they have knowledge of the participants’ images.
A correct implementation of this system also assumes that most of the available space in the verification image is utilized. This is intended to prevent dishonest participants (as described in Section 4.3) from copying fragments of the encryption structure into the verification image from a genuine share and filling the remaining area with pixels encoding a forged secret.
If verification images are used only in limited regions of the entire image (as in the approach proposed in [13]), an attacker may still be able to deceive relatively small-scale encryption schemes despite the applied protection.
Figure 26 shows the result of superimposing a verification share with both a genuine and a forged share. In this example, a check-mark symbol is used as the verification image for all encryption shares. The encryption is performed within a ( 3 , 3 ) scheme where the initial pixel expansion parameter is m = 4 . The addition of verification columns increases this parameter by 2; as a result, the presented images do not preserve the original proportions of the secret due to a sixfold enlargement compared to the original.
Figure 26. Result of superimposing the verification share with (a) a genuine share; (b) a forged share.

4.6. Attack as a Collusion of Dishonest Participants

The solution presented in Section 4.5 is not fully secure against all known attacks. In the case where a given scheme is attacked by at least two dishonest participants, the verification shares are not sufficient to guarantee system integrity. This is because two colluding attackers can reveal the positions of black subpixels in the verification columns of their V S shares by superimposing them.
Since the column permutations used to construct verification shares are identical for all participants, colluding users, having access to their own verification images, may in some cases construct forged shares against which the system is not resistant.
A slight modification of the mitigation method proposed in [15] allows prevention of such attacks. The idea is to add t + 1 zero-filled columns to each matrix instead of a single one, where t denotes the maximum number of colluding participants against which the scheme is intended to remain secure (for two colluding participants, three zero columns are added to all encryption matrices). Then, during the construction of V S shares, the increased number of zero columns introduces multiple possible configurations of black subpixels in the S shares that still produce a correct black result upon superposition; therefore, this choice is made randomly. The encryption of white pixels in the verification images V O remains unchanged (for the verification scheme with h = 2 , l = 1 , there exists only one valid configuration producing a white result).
The possibility of participant collusion introduces a significant threat to encryption integrity when the colluding subset belongs to Q . In scenarios where the attackers know the encrypted secret, deception of honest participants in a classical encryption scheme may involve guessing individual subpixels of other participants using information about the secret and their own shares. An example of such an attack is presented for a ( 2 , 3 ) scheme, where participants P = { 1 , 2 } are able to mislead participant number 3.
  • Example of a colluding participants attack in a ( 2 , 3 ) scheme
To replace the decrypted image O with F O during the superposition of a forged share and the remaining participant’s share, the attackers P = { 1 , 2 } analyze the genuine shares they possess. A complete substitution of the secret message is possible if, for every group of subpixels, the dishonest participants are able to determine its arrangement in the share of the third participant. The shares held by the participants are as follows:
S 1 = 1 0 0
and
S 2 = 0 1 0
Knowing that the used scheme was generated using the basis matricies
B 0 = 1 0 0 1 0 0 1 0 0
and
B 1 = 1 0 0 0 1 0 0 0 1
it follows that the missing share must be:
S 3 = 0 0 1
A similar analysis can be performed for the case where a white pixel is being encrypted. The procedure is then repeated until the entire share of the third participant is known. In the next step, the attackers can generate a new forged share F S based on the recovered information about the third participant’s share, which will then be used together with it to encode any chosen image. In this way, superposition of S 3 and F S produces the attacker-selected image F O .

4.7. Colluding Participants Attack Mitigation

An example method for protecting against an attack on system integrity, presented in Section 4.6, was proposed in [16]. The authors address the discussed problem by adding columns filled with zeros to the base encryption matrices of both colors. Such constructed matrices do not allow obtaining full information about the arrangement of subpixels in the shares of the remaining participants. As a result, adding an appropriate number of columns reduces the probability of correctly decrypting a forged image during an attack. Constructions of matrices extended with additional columns providing security were described for the cases of ( k , k ) and ( 2 , n ) schemes. Below, an example from Section 4.6 is presented, in which the mentioned mitigation method was used.
  • Example of protection against fake shares in a ( 2 , 3 ) scheme
In the scheme with an incorporated mechanism for protection against false attacks, the shares of participants P = { 1 , 2 } are as follows:
S 1 = 1 0 0 0
and
S 2 = 0 1 0 0
Used basis matricies are as follows:
B 0 = 1 0 0 0 1 0 0 0 1 0 0 0
and
B 1 = 1 0 0 0 0 1 0 0 0 0 1 0
Due to the addition of a new column filled with zeros, cheating participants are unable to determine exactly where the value 1 is located in the share of the third participant. They can only conclude that it is located either in the third or the fourth column. The presented case therefore does not allow for deterministic image substitution; however, it still enables attempts at a statistical attack.

4.8. Other Attack Vectors

The types of attacks discussed in this section consider manipulation of shares only within groups of subpixel data. However, as shown by the authors of [17], there exists a method of creating fake shares that allows deceiving honest participants in the encryption process by attacking the way the recovered message is perceived. The so-called binocular attack exploits the authors’ observation regarding human image perception—the human visual system does not recognize details based on fixed subpixel groups. The perception of a given image fragment as representing a specific color occurs within certain regions of black or white tones. Thus, generating a fake share involves manipulating pixel values so that a given region, after stacking the shares, exhibits a different color intensity, even though the subpixel groups within it encode a different color. This method therefore does not attack the encryption mechanism itself, but rather human perception—the visual system interpreting the image. In [17], an example illustrating this attack is presented. As a result of the attack, the reconstructed image is altered by the addition of the signature, which, although visually perceptible, does not affect integrity in the theoretical sense.
Modifications of schemes, although they represent a significant extension of encryption capabilities, may at the same time introduce new attack surfaces. For example, in work [18], it was proven that introducing the option of encrypting color images creates additional attack vectors, since the diversity of colors and their mixing reveal more information to an attacker than the classical binary model. For this reason, the implementation of schemes containing additional features should always be accompanied by a detailed security analysis.

5. Potential Applications

This section presents several Proof of Concept (PoC) applications illustrating how VC can be employed to address selected security challenges. The presented examples focus on representative problems encountered in different domains, including Quick Response Code (QR) phishing, verification of the integrity of physical documents, and access control in IoT environments. The proposed solutions should be regarded as generic concepts rather than application-specific mechanisms. Although each PoC targets a particular security scenario, the underlying ideas can be adapted to other domains where the properties of VC may provide practical security benefits.
The following PoCs are intended to illustrate potential application directions of visual cryptography rather than present complete product-level solutions. Further domain-specific analysis and implementation considerations are required before their practical deployment. These Proof of Concept scenarios are intended solely to demonstrate the feasibility of integrating visual cryptography into selected application domains. They are not intended to represent fully validated solutions and therefore do not address all application-specific threats, implementation requirements, or operational aspects that would need to be considered before practical deployment.
Since the presented approaches are conceptual in nature, each subsection concludes with a discussion of its limitations, assumptions, and potential attack vectors. This analysis highlights the conditions under which a given solution may be applicable, as well as the challenges that should be considered before its practical deployment.

5.1. Proof of Concept 1—QR Security

QR codes have become a widely used technology for bridging the physical and digital worlds. Their ease of use, low deployment cost, and compatibility with simple optical sensors have led to widespread adoption across numerous domains, including banking, government services, authentication systems, and online payments. Despite their popularity and practical advantages, QR codes provide no native mechanism for verifying their authenticity. As a result, users are often required to place implicit trust in any QR code they encounter.
This limitation creates opportunities for spoofing attacks, commonly referred to as "quishing” (QR phishing). A particularly concerning attack vector involves physical tampering, where malicious actors replace or cover legitimate QR codes with counterfeit ones. Such attacks have been observed on public infrastructure, including parking meters, electric vehicle charging stations, and bike-sharing terminals. The scale of this threat has grown significantly in recent years. As discussed in [19], the growing popularity of QR codes has been accompanied by an increase in attacks that exploit users’ implicit trust. Since QR codes are visually opaque and their contents cannot be verified prior to scanning, attackers can replace legitimate codes with malicious alternatives without raising immediate suspicion.
As discussed in the cited work [19], current mitigation strategies primarily focus on analyzing the content of a QR code after it has been scanned. For example, security solutions may inspect the embedded URL, compare it against reputation databases, detect suspicious domains, or warn users about potentially malicious destinations. While these approaches can help identify dangerous content, they do not address a fundamental issue: they verify the destination of the QR code rather than its origin. Consequently, a carefully crafted counterfeit QR code pointing to a convincing-looking website may still evade detection.
To address this challenge, this subsection presents an approach that combines QR codes with VC. Instead of relying solely on post-scan content analysis, the proposed method introduces a mechanism for validating the physical authenticity of the QR code itself. In this section, physical QR code authenticity refers to the ability of the proposed VC-based mechanism to detect simple unauthorized physical replacement or modification of a QR code under the considered attack scenario. It does not guarantee the authenticity of the encoded content or prevent an attacker who is able to reproduce or deliberately manipulate the VC-based verification mechanism from creating a QR code that passes the verification process. The goal is to make simple sticker-overlay attacks significantly more difficult by enabling users to verify a QR using VC. The presented concept is based on a QR security enhancing mechanism proposed in [20].
In the suggested scenario, the target QR code scanned by the user (for example, redirecting to a restaurant payment page or a parking payment system) is modified to contain one share of a ( 2 , 2 ) VC scheme. The second, complementary share is then placed in a way that allows any person physically present at the location to easily overlay the two shares.
Figure 27 illustrates an example of this approach, where the modified QR code is printed on a transparent element incorporated into a restaurant menu. To verify the physical authenticity of the QR code, the user overlays it with the complementary share located nearby, for example, printed on the surface of the table. If both shares are authentic, their superposition reveals a predefined verification image. Conversely, if the verification fails—for instance, because the original QR code has been replaced by an attacker with a counterfeit sticker containing a different VC share—the predefined image is not reconstructed, indicating a potential tampering attempt.
Figure 27. The first variant of the QR code verification mechanism.
The proposed method does not require any modifications to the standardized mechanism of codes. The addition of a VC share exploits the high redundancy of QR codes by modifying only a portion of the encoded data while preserving the ability to correctly decode the original content. A similar approach is commonly used to embed an organization’s logo into the central region of a QR code [21].
Figure 28 presents a PoC of the proposed approach: (a) a modified QR code containing one share of the VC scheme and (b) the complementary share. The result of superimposing the modified QR code (a) with the complementary share (b) is shown in Figure 29. It is worth noting that the QR code remains fully readable both before and during the physical authenticity verification process. Therefore, the decision to verify the code depends on the user’s willingness. In the presented PoC, the scanned QR code contains a short text concerning the discussed topic.
Figure 28. System of QR code verification. (a) Modified QR code. (b) Complementary share.
Figure 29. Result of superimposing (a,b) from Figure 28.
The proposed approach allows the user to decide whether to verify the physical authenticity of a QR code. Before scanning the code, the user may superimpose the corresponding VC shares to confirm its validity. However, this physical authenticity verification step is not required to decode the QR code and serves only as an additional security mechanism.
A more restrictive application of the proposed technology is illustrated in Figure 30. In this scenario, the entire QR code, or a significant portion of it (i.e., a portion whose encryption leaves insufficient redundancy for successful decoding), constitutes one of the VC shares. As in the previous scenario, the complementary share is positioned so that it can be precisely aligned with the modified QR code. Only after superimposing both shares is a valid and scannable QR code reconstructed. Consequently, this approach enforces the physical authenticity verification procedure before the information encoded in the QR code can be accessed, preventing the code from being scanned directly without employing the VC mechanism.
Figure 30. The second variant of the QR code verification mechanism.
The fundamental difference between this approach and the previously described one is that the encrypted portion of the QR code prevents it from being scanned successfully. Consequently, before accessing the information encoded in the QR code (for example, to complete a payment for a service in a restaurant), the user is required to superimpose the VC shares to reconstruct the original QR code. Only after this reconstruction can the QR code be scanned and its encoded content accessed.
The proposed mechanism enhances security by requiring physical interaction with the VC shares prior to scanning the QR code. This additional step may facilitate the detection of tampering attempts, for example by making it more likely that a malicious sticker placed over the original QR code will be noticed. The feasibility of the proposed approach has also been experimentally validated, and the corresponding results are presented in Figure 31 and Figure 32.
Figure 31. QR code encryption results. (a) First share. (b) Second share.
Figure 32. Result of superimposing shares from Figure 31.

5.2. Proof of Concept 1—Limitations

The proposed QR code physical authenticity verification mechanism enables the detection of simple attempts to compromise the integrity of QR codes (such as sticker-overlay attack); however, it does not provide complete resistance against all threats. An adversary with publicly available knowledge of both shares and the verification image can still deceive the system by preparing a counterfeit sticker containing an appropriately modified QR code. For example, in the case of the first variant, the adversary may copy the entire QR code (including the embedded share) and modify only the portion of the encoded data corresponding to the stored content. Consequently, an attacker can generate a QR code that produces the expected verification image when the shares are superimposed while encoding malicious content, for example by redirecting the user to a malicious website instead of the legitimate payment service. This attack follows a similar approach to the one discussed in Section 4.5.
Similarly, in the second approach, it is possible to prepare a forged sticker containing a carefully constructed VC share that, when superimposed on the modified QR code, reveals falsified content. Such method was discussed in Section 4.3. However, preparing such an attack is considerably more complex than in the first variant, and the associated cost and complexity may outweigh the potential benefits, thereby discouraging an attacker from attempting it in practice.
The implementation of the second approach must also take into account the limitations inherent to VC. In particular, special attention should be paid to maintaining sufficient contrast in the reconstructed QR code. In VC schemes, a reconstructed white pixel contains black subpixels after the shares are superimposed, resulting in reduced image contrast. Therefore, the adopted VC scheme should ensure that the quality of the reconstructed QR code remains sufficient for reliable decoding by standard QR code scanners.
The proposed method may be suitable for applications where a simple, low-cost verification mechanism that does not require specialized infrastructure is sufficient to verify the authenticity of QR codes. Nevertheless, its limitations should be taken into account, as it does not provide comprehensive protection against deliberate, sophisticated attacks.

5.3. Proof of Concept 2—Paper Documents Verification

The encryption method presented in this work could potentially be applied as a mechanism for verifying the physical integrity of physical documents (contracts, bills, receipts, and similar), where the term “physical verification/integrity” refers to detecting certain forms of manipulation or replacement of the document and does not imply cryptographic verification of its content. The most straightforward approach to comparing two or more documents is a manual inspection of their contents. However, this process is time-consuming, and its automation using Optical Character Recognition (OCR) techniques does not always guarantee accurate results.
Figure 33 presents the first variant of the proposed method for protecting documents against manipulation attempts. In this approach, during the document preparation stage prior to printing, each of the n copies intended for individual parties is supplemented with one share of the ( n , n ) VC scheme encoding a previously selected verification image. As a result, each participant receives a copy of the document containing their assigned share.
Figure 33. The first variant of the document verification mechanism.
The physical verification process consists of superimposing all documents. If all documents are original and have not been modified, the previously defined verification image is reconstructed as a result of share superposition, confirming their physical consistency. However, if at least one of the documents has been tampered with, the verification image cannot be correctly reconstructed. This indicates that at least one participant is not using the original copy of the document, but rather a reprinted or modified version. Additionally, if the decryption process is completed successfully but the resulting image does not match the previously established image, this indicates that manipulation has occurred as a result of collusion between dishonest participants. The proposed mechanism enables the detection of attempts to alter the perceived content of physical documents.
The presented variant does not address certain potential attacks against the verification mechanism. Dishonest participants may attempt to influence the result of the decryption process, for example by modifying it, so that the obtained image only resembles the previously established one. In such a case, the remaining participants may be misled and incorrectly accept the manipulated result as valid.
The stronger variant of the proposed mechanism operates analogously to the previously described solution; however, instead of a verification image, it encrypts a randomly generated value a, known exclusively during the document preparation stage prior to printing. Additionally, each document copy contains the value of a hash function b calculated for a. Figure 34 presents the discussed variant.
Figure 34. The second variant of the document verification mechanism.
The physical verification process begins with the superposition of the documents, similarly to the previous variant. An incorrect result of the share reconstruction is interpreted as an indication of manipulation of at least one document. If the value of a is successfully reconstructed, the hash function is calculated for the obtained value, and the result is compared with the hash value stored on the documents. A match between the two values indicates that the verification process has been successfully completed.
Alternatively, a mismatch between the calculated and stored hash values indicates an attempt to manipulate the verification process, requiring cooperation between at least two participants who are not using the original document copies. In the considered scenario, the hash value remains unchanged, as it is stored on all document copies, including those belonging to honest participants. Consequently, attackers cannot modify this value without revealing the attempted manipulation. The described situation may occur when colluding participants prepare and print fewer than n modified documents (containing altered content), while simultaneously constructing the corresponding shares according to the attack technique described in Section 4.4.

5.4. Proof of Concept 2—Limitations

The mechanism for embedding shares into printed documents should be designed in such a way that users cannot easily modify the inserted share. This approach reduces the risk of intentional or accidental manipulation of the decryption process. The embedding of shares should be performed by dedicated, hardcoded software tightly integrated with the environment responsible for the direct printing of documents. Using external graphic editing tools to insert shares into documents could introduce unnecessary opportunities for modifying their content, which may compromise the physical integrity and security of the entire process.
In both proposed variants, there is a risk that the document content may be substituted despite successful verification. This is because an attacker can copy the share embedded in the original document (for example, by scanning it) and then place it onto a new document with modified content using appropriate image-editing tools. Such an attack scenario is independent of the selected variant and completely bypasses the presented security mechanisms. The proposed mechanism is not intended to verify the integrity of the document’s content but rather to detect certain attempts at physical document forgery. Consequently, to ensure that a verified document corresponds to its original version not only in terms of the validity of the embedded share but also with respect to its content, it is necessary to compare the contents of the documents, for example, by using OCR technology.
In the first variant, the image used for verification should be unambiguously determined and be known to all participants involved in the encryption scheme. A dishonest participant or a group of colluding participants should not be able to convince the remaining participants that a different image was used during the encryption process. This assumption enables the detection of cheating attempts, including the attack described in Section 4.4 for the first variant. Dishonest participants could exploit this attack to print new documents with modified content and a different correctly decrypted image in order to mislead the remaining participants. Therefore, the correctness of the decryption process alone is not sufficient to perform a valid physical verification. The physical verification should be considered successful only if both of the following conditions are simultaneously satisfied: the shares have been correctly decrypted, and the reconstructed image matches the predetermined verification image. Failure to satisfy either condition should be treated as a potential attempt at manipulation by one or more participants. The public availability of the verification image also provides protection against the consequences of the attack involving RNS leakage and the exploitation of an incorrect implementation, as described in Section 4.1.
A correct implementation of the enhanced physical verification variant should ensure that the value a is selected in accordance with cryptographic security principles. This value serves as a cryptographic nonce; therefore, to provide mitigation against attacks such as brute force, it should be generated randomly, originate from a sufficiently large value space, and be used exclusively during the encryption process. Furthermore, the value a should not be disclosed to any participant during the encryption process. This restriction prevents it from being used to perform unauthorized actions that could weaken the security of the mechanism, such as creating new, modified documents containing the shares described in Section 4.4. The second variant also requires the use of a tool capable of computing the hash function value, such as a mobile phone equipped with an appropriate application. Consequently, this solution increases the ability to detect forgery attempts; however, this improvement comes at the cost of losing one of the advantages of the first variant, namely the ability to perform verification without the use of any dedicated device.

5.5. Proof of Concept 3—IoT Access Security

Internet of Things (IoT) devices, operating at the intersection of the digital and physical worlds, impose specific requirements regarding secure access and configuration. Regardless of the device type (for example, sensors, networking devices, or consumer devices), a major security challenge is the risk of unauthorized access resulting from insufficiently secured authentication mechanisms.
One of the most widespread examples of this issue is the use of factory-configured, weak, or widely known default passwords for IoT devices [22]. Information about default credentials is often publicly available, for example in repositories maintained by cybersecurity researchers and enthusiasts, such as [23]. Consequently, an adversary with knowledge of these default credentials may gain remote access to a device over the network if the device owner has not changed the factory settings.
A common approach to improving security is the use of cryptographically strong and unique passwords for each individual device. While this significantly increases the difficulty of attacks based on publicly known credentials, it still requires the secret to be stored on the device, thereby creating a potential attack vector. In practice, passwords are often printed on a label attached to the device. As a result, an individual with physical access to the device, may obtain the authentication credentials and subsequently use them to gain administrative access. The proposed solution, based on VC, aims to provide stronger protection for IoT devices against such attacks.
Figure 35 presents an example scenario illustrating the application of the proposed solution, in which the protected device is a router/access point. In this case, a cryptographically strong password is divided into shares using a ( 2 , 2 ) VC scheme. One of the shares is stored directly on the device, while the second share is provided to the user and stored separately from the device.
Figure 35. User access mechanism for an IoT device.
The decryption share can be stored on a transparent medium, allowing it to be physically overlaid on the device in order to perform the secret reconstruction process. The provided share should be stored in a secure location inaccessible to a potential adversary and made available only during an authenticated and authorized access attempt.
With this approach, an adversary possessing even physical access to the location where the device is deployed is unable to independently reconstruct the password or obtain administrative access. Therefore, the proposed solution shifts the problem of securing passwords stored on IoT devices towards the secure storage of a VC share, eliminating the need to expose complete authentication credentials.
VC can also be used to define different access levels for devices. In the scenario presented in Figure 36, two levels of access to the device configuration are distinguished: a restricted user-level access, implemented for example using the mechanism presented in Figure 35, and an extended administrative-level access, providing full access to the device configuration.
Figure 36. Administrator access mechanism for an IoT device.
The administrator account password is divided into two shares using a VC scheme. One of the shares remains stored on the device, while the second share is stored by an authorized entity, such as a technical support department, in a dedicated database. To perform advanced device configuration, a technician retrieves the device serial number, based on which the corresponding share is obtained from the database and displayed on a dedicated device. The retrieved share is then physically overlaid with the appropriate component of the device (e.g., a removable module containing the second share), enabling secret reconstruction and obtaining the administrator account password.
Such an approach enables the physical separation of access privileges to the device while maintaining security in the event of a potential data breach affecting the database storing the shares. Due to the properties of the VC mechanism, the disclosure of individual stored shares does not allow the direct reconstruction of passwords protecting the devices.

5.6. Proof of Concept 3—Limitations

In the presented scenarios, mechanisms based on VC extend the possibilities for securing IoT devices while simultaneously introducing new organizational challenges, primarily related to the secure storage of VC shares. In practice, the implementation of such a solution should also include procedures for restoring access to a device in the event that a share is lost, for example by involving an appropriate technical support service. Furthermore, implementing the administrative access mechanism illustrated in Figure 36 requires additional infrastructure, including a database storing the shares associated with managed devices and a dedicated tool for retrieving and displaying them. Such a tool may, for example, be implemented as a mobile device running an appropriate application.

6. Conclusions

The conducted analysis indicates that visual cryptography represents a promising class of security mechanisms characterized by considerable design flexibility and practical application potential. This work provides a unified description and synthesis of existing knowledge on VC, covering its theoretical foundations, security properties, operational models, and key design parameters. The presented analysis demonstrates that VC schemes can be tailored to specific requirements by selecting either deterministic or probabilistic models and by adjusting parameters such as contrast, pixel expansion, and resistance to selected attack scenarios. The experimental investigation of the ϕ correlation coefficient showed a difference between genuine–genuine and genuine–forged share pairs, with higher mean correlation values observed for genuine–genuine pairs across all investigated schemes. The obtained values were influenced by the chosen structure and the overlap of the observed distributions indicates that ϕ alone cannot provide reliable share-authenticity verification, although it may serve as a basis for further investigation of correlation-based authenticity assessment. However, the use of a single forged target image throughout the experiment limits the generalizability of these results, as it remains unclear whether the observed differences would also be present for other forged target images. Several Proof of Concept application scenarios further present possible applications of the proposed approaches. The presented PoC applications demonstrate the feasibility of integrating VC into selected security scenarios, but they should not be considered full product-level solutions, as their security and practical applicability have not been comprehensively validated against complete threat models and application-specific requirements. These examples are intended to illustrate the general concept of applying VC in practical scenarios rather than to provide an exhaustive set of application domains or a ready-to-market products. At the same time, any practical deployment of VC should be preceded by a thorough security assessment and adapted to the requirements of the intended use case. Furthermore, the practical applicability of VC requires considering the trade-off between security properties, reconstruction quality, and implementation complexity, as increasing resistance to specific attacks or improving reconstruction characteristics may introduce additional resource requirements. Visual cryptography may find practical applications in scenarios where the security limitations, implementation requirements, and potential attack vectors mentioned in this work are appropriately addressed and the resulting solution is adapted to the requirements of the intended use case. Overall, the conducted analysis suggests that visual cryptography has the potential to serve as an effective security mechanism in appropriately selected application scenarios, particularly considering its lightweight reconstruction through direct visual superposition without requiring dedicated computational decryption procedures.

Future Works

Several directions for future research emerge from the conducted analysis. One important area is the development of effective mitigation techniques against the binocular attack, which remains an open challenge for practical deployments of VC. Another promising direction is the development of improved metrics for describing the perceived contrast of probabilistic VC schemes, allowing visual reconstruction quality to be evaluated more accurately (as described in Section 2.10). Additionally, further optimization of scheme parameters, particularly in the presence of attack mitigation mechanisms, could improve the balance between security, visual quality, computational efficiency, and storage requirements. An interesting direction for future research is the joint optimization of contrast and pixel expansion parameters, as increasing k and n while using γ N S optimizing methods may lead to a significant increase in pixel expansion. Investigating optimization strategies that consider both parameters simultaneously could help achieve more practical trade-offs between reconstruction quality and implementation costs. Another possible direction for future research is the analysis of the applicability of the ϕ coefficient for share authenticity verification. Further investigation could determine whether the differences observed between genuine and forged shares are sufficient to support reliable detection methods based on correlation measurements. Another important research direction is the exploration of new application domains for visual cryptography.

Author Contributions

Conceptualization, M.M. and W.W.; Methodology, M.M. and W.W.; Investigation, M.M.; Software, M.M.; Formal Analysis, M.M.; Validation, M.M. and W.W.; Visualization, M.M.; Writing—Original Draft, M.M.; Supervision, W.W.; Writing—Review & Editing, W.W.; Funding Acquisition, W.W. All authors have read and agreed to the published version of the manuscript.

Funding

The APC was funded by Wroclaw University of Science and Technology, Department of Telecommunications and ICT statutory research funds (No. 8251050500).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The software code for this study and the raw data supporting the conclusions of this article are openly available in GitHub [https://github.com/Flyyy777/SecVC] (accessed on 7 August 2026); any other data will be made available by the authors upon request, without undue reservations.

Acknowledgments

During the preparation of this study, the authors used Chat GPT-5 for the purposes of algorithm coding and text adjustment. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
VCVisual Cryptography
RNSRandom Number Sequence
QRQuick Response Code
PoCProof of Concept
OCROptical Character Recognition

References

  1. Naor, M.; Shamir, A. Visual cryptography. In Proceedings of the Workshop on the Theory and Application of of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 1994; pp. 1–12. [Google Scholar]
  2. Shamir, A. How to share a secret. Commun. ACM 1979, 22, 612–613. [Google Scholar] [CrossRef] [Scilit]
  3. Hou, Y.C. Visual cryptography for color images. Pattern Recognit. 2003, 36, 1619–1629. [Google Scholar] [CrossRef] [Scilit]
  4. Shyu, S.J.; Chen, M.C. Minimizing pixel expansion in visual cryptographic scheme for general access structures. IEEE Trans. Circuits Syst. Video Technol. 2015, 25, 1557–1561. [Google Scholar] [CrossRef] [Scilit]
  5. Hofmeister, T.; Krause, M.; Simon, H.U. Contrast-optimal k out of n secret sharing schemes in visual cryptography. Theor. Comput. Sci. 2000, 240, 471–485. [Google Scholar] [CrossRef] [Scilit]
  6. Krause, M.; Simon, H.U. Determining the optimal contrast for secret sharing schemes in visual cryptography. Comb. Probab. Comput. 2003, 12, 285–299. [Google Scholar] [CrossRef] [Scilit]
  7. Eisen, P.A.; Stinson, D.R. Threshold visual cryptography schemes with specified whiteness levels of reconstructed pixels. Des. Codes Cryptogr. 2002, 25, 15–61. [Google Scholar] [CrossRef] [Scilit]
  8. Cimato, S.; De Prisco, R.; De Santis, A. Probabilistic visual cryptography schemes. Comput. J. 2006, 49, 97–107. [Google Scholar] [CrossRef] [Scilit]
  9. Yang, C.N. New visual secret sharing schemes using probabilistic method. Pattern Recognit. Lett. 2004, 25, 481–494. [Google Scholar] [CrossRef] [Scilit]
  10. Yule, G.U. On the methods of measuring association between two attributes. J. R. Stat. Soc. 1912, 75, 579–652. [Google Scholar] [CrossRef] [Scilit]
  11. QRCode Monkey. QRCode Monkey—The Free QR Code Generator to Create Custom QR Codes with Logo. 2026. Available online: https://www.qrcode-monkey.com/ (accessed on 7 July 2026).
  12. Fu, Z.; Li, X.; Fang, L.; Feng, Y.; Yu, B. Security issues in visual cryptography scheme with known random number sequence. J. King Saud Univ.-Comput. Inf. Sci. 2024, 36, 101983. [Google Scholar] [CrossRef] [Scilit]
  13. Hu, C.M.; Tzeng, W.G. Cheating prevention in visual cryptography. IEEE Trans. Image Process. 2006, 16, 36–45. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  14. SIPI Image Database—sipi.usc.edu. Available online: https://sipi.usc.edu/database/ (accessed on 8 July 2026).
  15. Chen, Y.C.; Horng, G.; Tsai, D.S. Comment on “cheating prevention in visual cryptography”. IEEE Trans. Image Process. 2012, 21, 3319–3323. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  16. De Prisco, R.; De Santis, A. Cheating immune threshold visual secret sharing. Comput. J. 2010, 53, 1485–1496. [Google Scholar] [CrossRef] [Scilit]
  17. Chen, Y.C.; Horng, G. Cheating in (halftone-secret) visual cryptography: Analysis of blind authentication schemes. J. Vis. Commun. Image Represent. 2022, 85, 103489. [Google Scholar] [CrossRef] [Scilit]
  18. Leung, B.W.; Ng, F.Y.; Wong, D.S. On the security of a visual cryptography scheme for color images. Pattern Recognit. 2009, 42, 929–940. [Google Scholar] [CrossRef] [Scilit][Green Version]
  19. Jonderko, W.; Wodo, W. Secure QR Codes: Authenticity Verification via EdDSA Signatures and CBOR Certificates. arXiv 2026, arXiv:2607.08383. [Google Scholar] [CrossRef] [Scilit]
  20. 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] [Scilit]
  21. QR.io. How to Easily Create a Custom QR Code with Logo. 2024. Available online: https://qr.io/blog/how-to-easily-create-a-custom-qr-code-with-logo/ (accessed on 7 July 2026).
  22. Fortinet. IoT Security. 2026. Available online: https://www.fortinet.com/uk/resources/cyberglossary/iot-security (accessed on 12 July 2026).
  23. RouterPasswords.com. Router Passwords Community Database. 2026. Available online: https://www.routerpasswords.com/ (accessed on 12 July 2026).
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.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.