Recent from talks
Contribute something
Nothing was collected or created yet.
Visual cryptography
View on Wikipedia
Visual cryptography is a cryptographic technique which allows visual information (pictures, text, etc.) to be encrypted in such a way that the decrypted information appears as a visual image.
One of the best-known techniques has been credited to Moni Naor and Adi Shamir, who developed it in 1994.[1] They demonstrated a visual secret sharing scheme, where a binary image was broken up into n shares so that only someone with all n shares could decrypt the image, while any n − 1 shares revealed no information about the original image. Each share was printed on a separate transparency, and decryption was performed by overlaying the shares. When all n shares were overlaid, the original image would appear. There are several generalizations of the basic scheme including k-out-of-n visual cryptography,[2][3] and using opaque sheets but illuminating them by multiple sets of identical illumination patterns under the recording of only one single-pixel detector.[4]
Using a similar idea, transparencies can be used to implement a one-time pad encryption, where one transparency is a shared random pad, and another transparency acts as the ciphertext. Normally, there is an expansion of space requirement in visual cryptography. But if one of the two shares is structured recursively, the efficiency of visual cryptography can be increased to 100%.[5]
Some antecedents of visual cryptography are in patents from the 1960s.[6][7] Other antecedents are in the work on perception and secure communication.[8][9]
Visual cryptography can be used to protect biometric templates in which decryption does not require any complex computations.[10]
Example
[edit]
In this example, the binary image has been split into two component images. Each component image has a pair of pixels for every pixel in the original image. These pixel pairs are shaded black or white according to the following rule: if the original image pixel was black, the pixel pairs in the component images must be complementary; randomly shade one ■□, and the other □■. When these complementary pairs are overlapped, they will appear dark gray. On the other hand, if the original image pixel was white, the pixel pairs in the component images must match: both ■□ or both □■. When these matching pairs are overlapped, they will appear light gray.
So, when the two component images are superimposed, the original image appears. However, without the other component, a component image reveals no information about the original image; it is indistinguishable from a random pattern of ■□ / □■ pairs. Moreover, if you have one component image, you can use the shading rules above to produce a counterfeit component image that combines with it to produce any image at all.
(2, n) visual cryptography sharing case
[edit]
Sharing a secret with an arbitrary number of people, n, such that at least 2 of them are required to decode the secret is one form of the visual secret sharing scheme presented by Moni Naor and Adi Shamir in 1994. In this scheme we have a secret image which is encoded into n shares printed on transparencies. The shares appear random and contain no decipherable information about the underlying secret image, however if any 2 of the shares are stacked on top of one another the secret image becomes decipherable by the human eye.
Every pixel from the secret image is encoded into multiple subpixels in each share image using a matrix to determine the color of the pixels. In the (2, n) case, a white pixel in the secret image is encoded using a matrix from the following set, where each row gives the subpixel pattern for one of the components:
{all permutations of the columns of} :
While a black pixel in the secret image is encoded using a matrix from the following set:
{all permutations of the columns of} :
For instance in the (2,2) sharing case (the secret is split into 2 shares and both shares are required to decode the secret) we use complementary matrices to share a black pixel and identical matrices to share a white pixel. Stacking the shares we have all the subpixels associated with the black pixel now black while 50% of the subpixels associated with the white pixel remain white.
Cheating the (2, n) visual secret sharing scheme
[edit]Horng et al. proposed a method that allows n − 1 colluding parties to cheat an honest party in visual cryptography. They take advantage of knowing the underlying distribution of the pixels in the shares to create new shares that combine with existing shares to form a new secret message of the cheaters choosing.[11]
We know that 2 shares are enough to decode the secret image using the human visual system. But examining two shares also gives some information about the 3rd share. For instance, colluding participants may examine their shares to determine when they both have black pixels and use that information to determine that another participant will also have a black pixel in that location. Knowing where black pixels exist in another party's share allows them to create a new share that will combine with the predicted share to form a new secret message. In this way a set of colluding parties that have enough shares to access the secret code can cheat other honest parties.
Visual steganography
[edit]
2×2 subpixels can also encode a binary image in each component image. For example, each white pixel of each component image could be represented by two black subpixels, while each black pixel represented by three black subpixels.
When overlaid, each white pixel of the secret image is represented by three black subpixels, while each black pixel is represented by all four subpixels black. Each corresponding pixel in the component images is randomly rotated to avoid orientation leaking information about the secret image.[12]
In popular culture
[edit]- In "Do Not Forsake Me Oh My Darling", a 1967 episode of TV series The Prisoner, the protagonist uses a visual cryptography overlay of multiple transparencies to reveal a secret message – the location of a scientist friend who had gone into hiding.
See also
[edit]References
[edit]- ^ Naor, Moni; Shamir, Adi (1995). "Visual cryptography". Advances in Cryptology – EUROCRYPT'94. Lecture Notes in Computer Science. Vol. 950. pp. 1–12. doi:10.1007/BFb0053419. ISBN 978-3-540-60176-0.
- ^ Verheul, Eric R.; Van Tilborg, Henk C. A. (1997). "Constructions and Properties of k out of n Visual Secret Sharing Schemes". Designs, Codes and Cryptography. 11 (2): 179–196. doi:10.1023/A:1008280705142. S2CID 479227.
- ^ Ateniese, Giuseppe; Blundo, Carlo; Santis, Alfredo De; Stinson, Douglas R. (2001). "Extended capabilities for visual cryptography". Theoretical Computer Science. 250 (1–2): 143–161. doi:10.1016/S0304-3975(99)00127-9.
- ^ Jiao, Shuming; Feng, Jun; Gao, Yang; Lei, Ting; Yuan, Xiaocong (2020). "Visual cryptography in single-pixel imaging". Optics Express. 28 (5): 7301–7313. arXiv:1911.05033. Bibcode:2020OExpr..28.7301J. doi:10.1364/OE.383240. PMID 32225961. S2CID 207863416.
- ^ Gnanaguruparan, Meenakshi; Kak, Subhash (2002). "Recursive Hiding of Secrets in Visual Cryptography". Cryptologia. 26: 68–76. doi:10.1080/0161-110291890768. S2CID 7995141.
- ^ Cook, Richard C. (1960) Cryptographic process and enciphered product, United States patent 4,682,954.
- ^ Carlson, Carl O. (1961) Information encoding and decoding method, United States patent 3,279,095.
- ^ Kafri, O.; Keren, E. (1987). "Encryption of pictures and shapes by random grids". Optics Letters. 12 (6): 377–9. Bibcode:1987OptL...12..377K. doi:10.1364/OL.12.000377. PMID 19741737.
- ^ Arazi, B.; Dinstein, I.; Kafri, O. (1989). "Intuition, perception, and secure communication". IEEE Transactions on Systems, Man, and Cybernetics. 19 (5): 1016–1020. doi:10.1109/21.44016.
- ^ Askari, Nazanin; Moloney, Cecilia; Heys, Howard M. (November 2011). Application of Visual Cryptography to Biometric Authentication. NECEC 2011. Retrieved 12 February 2015.
- ^ Horng, Gwoboa; Chen, Tzungher; Tsai, Du-Shiau (2006). "Cheating in Visual Cryptography". Designs, Codes and Cryptography. 38 (2): 219–236. doi:10.1007/s10623-005-6342-0. S2CID 2109660.
- ^ M. Pramanik, Kalpana Sharma, Analysis of Visual Cryptography, Steganography Schemes and its Hybrid Approach for Security of Images, Computer Science, 2014
External links
[edit]- Java implementation and illustrations of Visual Cryptography
- Python implementation of Visual Cryptography
- Visual Cryptography on Cipher Machines & Cryptology
- Doug Stinson's visual cryptography page
- Liu, Feng; Yan, Wei Qi (2014) Visual Cryptography for Image Processing and Security: Theory, Methods, and Applications, Springer
- Hammoudi, Karim; Melkemi, Mahmoud (2018). "Personalized Shares in Visual Cryptography". Journal of Imaging. 4 (11): 126. doi:10.3390/jimaging4110126.
Visual cryptography
View on GrokipediaHistory and Background
Invention by Naor and Shamir
Visual cryptography was introduced in 1994 by Moni Naor and Adi Shamir in their seminal paper titled "Visual Cryptography," presented at the EUROCRYPT '94 conference and published in the proceedings.[1] The scheme provides a method to encrypt visual information, such as images or text, into multiple shares that appear as random noise when viewed individually, but reveal the original secret only when a sufficient number of shares are stacked together, allowing human vision to decode the information without any computational devices.[1] The primary motivation behind the invention was to create a simple, accessible form of encryption for protecting visual secrets like maps, blueprints, or printed documents, particularly in scenarios where decryption tools are unavailable or impractical.[1] Naor and Shamir drew inspiration from traditional secret sharing protocols, including Shamir's own polynomial-based threshold scheme from 1979, but adapted the concept to a visual paradigm that relies on physical superposition rather than mathematical reconstruction.[1] This approach enables non-experts to participate in secure information distribution using everyday materials like printed pages or transparencies, making it suitable for applications in secure printing or visual authentication.[1] A key innovation of the original proposal is the use of transparencies or printed shares where the pixels of the secret image are subdivided into blocks of black and white sub-elements, generating shares that look uniformly random to the naked eye.[1] When aligned and superimposed, these blocks combine to reconstruct the secret image through the alignment of dark and light areas, ensuring that the revelation occurs solely via optical means.[1] The scheme focuses on (k,n) threshold access structures, where any collection of k out of n shares suffices to reveal the secret, while any fewer than k shares yield no discernible information about it, providing perfect secrecy for unauthorized subsets.[1] The initial constructions emphasized practical implementations for small values of k and n, such as the basic 2-out-of-2 case, along with extensions to scenarios like 2-out-of-n sharing, demonstrating the feasibility of the method for binary black-and-white images.[1] These foundational designs laid the groundwork for visual cryptography as a branch of information security, highlighting its potential in human-perceptible encryption without relying on digital processing.[1]Subsequent Developments up to 2025
Following the foundational (2, n)-threshold scheme introduced by Naor and Shamir in 1994, visual cryptography saw significant extensions in the late 1990s and 2000s aimed at improving practicality and reducing limitations such as random-looking shares and pixel expansion. One key advancement was the development of extended visual cryptography (EVC), which generates meaningful shares that resemble legitimate images to avoid suspicion during transmission, as proposed in early works like those by Ateniese et al. in 1996 and further refined by Ching-Nung Yang in subsequent schemes around the early 2000s. These meaningful shares embed cover images into the shares while preserving the security of the secret, enhancing usability in real-world scenarios. Additionally, probabilistic models emerged to mitigate pixel expansion, where shares are constructed using probability distributions rather than deterministic matrices, achieving up to 50% reduction in share size compared to traditional methods, as demonstrated in Yang's 2004 probabilistic visual secret sharing scheme. In the 2010s, visual cryptography integrated with emerging technologies like QR codes and biometrics to broaden its applications in secure data handling. Schemes combining visual cryptography with QR codes allowed embedding secrets into scannable, meaningful QR share images, enabling authentication without computational decryption, with early implementations appearing around 2012 and refined in works like Lee et al.'s 2018 probabilistic (k, n)-scheme for larger secrets. Similarly, integration with biometrics addressed privacy concerns in template storage; for instance, a 2010 scheme by Othman and Ross used visual cryptography to split biometric features like face images or iris codes into shares, ensuring that even if one share is compromised, the original template remains secure without reversible computation. These developments improved accessibility for mobile and biometric systems. Concurrently, progressive visual cryptography was introduced in 2011 by Hsu et al., allowing partial revelation of the secret as more shares are stacked, with image quality improving incrementally (e.g., contrast increasing from 1/8 to full with additional shares), thus supporting flexible access structures.[4] The 2020s marked a shift toward scalable and application-specific innovations, including size-invariant schemes that maintain original image dimensions without expansion. A 2022 modified deterministic approach by Chaturvedi, Thepade, and Ahirrao achieved size invariance for (n, n)-threshold schemes while minimizing mean squared error in reconstruction to under 0.01 for binary images, enabling efficient handling of varying resolutions.[5] Comprehensive reviews in 2024 highlighted visual cryptography's role in high-security domains like online banking, emphasizing robustness against tampering with average detection rates over 95% in share verification. In 2025, a modular inverse visual cryptography scheme by Mary et al. was proposed specifically for medical imaging, such as CT scans, balancing security, quality (PSNR > 30 dB), and efficiency for IoT transmission by using modular arithmetic to reverse shares without loss.[6] By 2025, visual cryptography had inspired numerous research papers, reflecting its evolution into a mature field with applications in blockchain for secure voting (e.g., anti-phishing protocols combining shares with distributed ledgers) and IoT security for mutual authentication.[7] Recent emphases include computational efficiency in digital implementations, such as XOR-based stacking that reduces processing time on resource-constrained devices compared to matrix-based methods.[8]Fundamental Principles
Visual Secret Sharing Concept
Visual secret sharing, a variant of secret sharing tailored for visual media, was inspired by earlier cryptographic protocols designed to distribute secrets among participants such that reconstruction requires a minimum coalition size. Classical secret sharing schemes, introduced independently by George Blakley using a geometric approach involving hyperplanes in a vector space and by Adi Shamir employing polynomial interpolation over finite fields, enable the division of a secret into n pieces where any k pieces suffice for reconstruction, but fewer than k reveal no information.[9][10] These methods typically require computational reconstruction, such as solving equations, to recover the secret. Visual cryptography adapts this threshold concept to binary images, allowing a secret image to be encoded into n shares—often printed as transparencies or rendered as digital images—such that the superposition of any k shares visually reveals the secret through alignment of patterns, while any subset of fewer than k shares appears as indistinguishable noise.[1] Formally, this operates under a (k, n) threshold access structure, where the secret is a black-and-white image, and each share consists of seemingly random pixel patterns designed so that their optical overlay produces contrasting black and white regions corresponding to the original image only when the required threshold is met.[1] This visual adaptation, pioneered by Moni Naor and Adi Shamir, emphasizes human perception over algorithmic processing, making it suitable for scenarios where computational resources are unavailable.[1] A key distinction of visual secret sharing lies in its decoding mechanism: no cryptographic computations or devices are needed; the secret emerges immediately upon stacking the shares under normal light, leveraging the human eye's ability to perceive the resulting superposition as the intended image.[1] This contrasts sharply with traditional secret sharing, where reconstruction demands mathematical operations, and introduces considerations like pixel expansion in share design to ensure visual fidelity, though the core principle remains the threshold-based revelation without electronic aid.[1]Pixel Models and Contrast Metrics
In visual cryptography, the pixel model for binary secret images expands each original pixel into a set of sub-pixels distributed across the shares to enable visual reconstruction without computation. Each secret pixel is represented by a block consisting of m sub-pixels in each share, where m denotes the pixel expansion factor; for the basic (2,2) scheme, the minimum m is 4 to achieve perfect reconstruction while maintaining security and aspect ratio. This expansion ensures that individual shares appear as random noise, with the stacking of qualified shares revealing the secret through the superposition of sub-pixels.[1] The basic pixel model treats sub-pixels as binary (black or white), typically arranged in a 2 × 4 matrix for the (2,2) case to form square blocks after expansion. For a white secret pixel, the sub-pixel patterns in the shares are aligned such that both shares have black sub-pixels in the same two positions out of four, resulting in the stacked image showing two black sub-pixels overall. For a black secret pixel, the patterns are complementary, with each share having black sub-pixels in disjoint positions covering all four, yielding four black sub-pixels upon stacking. This arrangement balances randomness in individual shares (each with exactly two black sub-pixels) and differential revelation in the superposition.[1] Contrast serves as a key performance metric, quantifying the visual distinguishability between revealed black and white pixels in the stacked image. It is formally defined as , where is the average Hamming weight (number of black sub-pixels) for revealed black pixels, for revealed white pixels, and m is the number of sub-pixels per block; higher values of C improve clarity by maximizing the relative difference in darkness levels. In the Naor-Shamir (2,2) scheme, , , and m = 4, yielding C = 1/2, which provides sufficient distinction for human visual decoding despite the lossy nature of the reconstruction.[1] Security in pixel models relies on ensuring that unauthorized subsets of shares reveal no information about the secret, measured via the Hamming distance between possible superposition patterns derived from white and black secret pixels. For unauthorized sets (fewer than the threshold, e.g., a single share in (2,2)), the Hamming weights of patterns from white and black secrets are identical (e.g., 2 out of 4 sub-pixels black), resulting in zero average Hamming distance in weight distribution and thus perfect indistinguishability, as the shares appear uniformly random. This metric guarantees that the entropy of unauthorized views matches random noise, preventing any statistical inference of the secret.[1]Core Schemes
The (2,2) Threshold Scheme
The (2,2) threshold scheme in visual cryptography is the foundational construction introduced by Naor and Shamir, where a binary secret image is divided into exactly two shares such that the secret can only be revealed by stacking both shares together. In this scheme, each pixel of the secret image is expanded into a 2×2 block of subpixels, resulting in a pixel expansion factor of . For a white secret pixel, both shares are generated with black subpixels in the same positions within their 2×2 blocks, leading to two subpixels being black upon superposition (uniform medium gray appearance with density 0.5). For a black secret pixel, the two shares use complementary patterns, ensuring that every subpixel position has exactly one black subpixel from one of the shares, producing all four subpixels black (density 1).[1] The share generation algorithm relies on two collections of basis matrices, for white pixels and for black pixels, each consisting of 2×4 Boolean matrices (where 1 denotes black and 0 denotes white; note the 4 columns for m=4 subpixels). The collection includes all matrices where the two rows are identical after random column permutations, ensuring each row has exactly two 1's and the OR has two 1's (e.g., both rows with 1's in columns 1 and 2, 0's in 3 and 4, then permute columns for randomness), so shares appear as random noise with exactly two black subpixels each. For , the matrices have complementary rows with disjoint supports (each row two 1's, covering all four columns), such that the OR operation yields four 1's (e.g., row 1: 1's in 1 and 2, row 2: 1's in 3 and 4, then permute columns). To generate shares, the dealer randomly selects a matrix from the appropriate collection based on the secret pixel value, assigns one row to each share (randomly permuting columns for randomness), and replicates this process independently for every secret pixel. This construction guarantees perfect secrecy, as each individual share is statistically indistinguishable from uniform random noise with 50% black density.[1] Key properties of the (2,2) scheme include a contrast metric , defined as the relative difference in black subpixel density between black (density 1) and white (density 0.5) regions in the superimposed image, which is optimal for this threshold as proven by the basis matrix construction minimizing expansion while maximizing visual distinction. The scheme achieves no computational requirements for decoding, relying solely on human visual perception or simple digital overlay. Upon stacking, the shares align subpixels such that black secret pixels appear as solid black blocks (four black subpixels), while white ones appear as checkered or dotted gray (two black subpixels), enabling immediate revelation of the secret image without loss of the original pixel model.[1]The (2,n) Sharing Scheme
The (2,n) visual cryptography scheme extends the basic (2,2) threshold access structure to distribute a secret binary image among n participants such that any two shares can reconstruct the image via superposition, while any single share reveals no information about the secret.[1] This construction ensures perfect secrecy for individual shares and leverages the human visual system for decoding without computation.[1] In the construction, n-1 shares are generated randomly, and the nth share is derived to ensure that every possible pair of shares forms a valid (2,2) superposition capable of revealing the secret pixel.[1] To achieve this, the scheme employs basis matrices defined column-wise with 2(n-1) columns, where the columns are permuted randomly for each pixel of the secret image.[1] For a secret white pixel, the selected basis ensures that in every column corresponding to a qualified pair (any two shares), the number of black sub-pixels is even; for a secret black pixel, it is odd.[1] This pairwise alignment guarantees reconstruction when any two shares are stacked, while maintaining randomness in isolation.[1] The pixel expansion in this binary scheme is m = 2(n-1), meaning each secret pixel is represented by 2(n-1) sub-pixels in each share, which accommodates the increased randomness required for n participants.[1] The resulting contrast is C = \frac{1}{2(n-1)}, reflecting the trade-off due to the probabilistic distribution of black sub-pixels across multiple shares.[1] All shares exhibit identical random appearances, with each containing exactly 50% black sub-pixels on average, ensuring that no single share provides any discernible information about the secret.[1] However, when any two shares are superimposed, the aligned sub-pixels reveal the secret through the even or odd parity of blacks in the relevant positions, producing a clear reconstruction visible to the naked eye.[1] The algorithm for generating shares proceeds as follows: For each secret pixel, randomly permute the 2(n-1) columns of the basis matrices; assign the first n-1 rows to the random shares and derive the nth row such that every pair of rows (including those involving the derived share) satisfies the even-black condition for white pixels or odd-black for black pixels.[1] This process is repeated independently for each pixel, resulting in n transparent shares printed or displayed on overhead transparencies for physical stacking.[1]Examples and Illustrations
Binary Image Decomposition Example
To illustrate binary image decomposition in visual cryptography, consider a simple 2×2 secret image consisting of a single black pixel in the top-left position and white pixels in the top-right, bottom-left, and bottom-right positions. This example employs the (2,2) threshold scheme with 2×2 pixel expansion, where each secret pixel is decomposed into a 2×2 block of sub-pixels distributed across two shares.[1] The decomposition process begins by replacing each secret pixel with sub-pixel patterns chosen from a collection of 2×2 arrays, each containing exactly two black sub-pixels to maintain balanced contrast. For a white secret pixel, both shares receive identical patterns randomly selected from this collection; when stacked, the overlapping black sub-pixels number two out of four, producing a medium-gray appearance visible to the human eye. For a black secret pixel, the shares receive complementary patterns from the collection, such that the black sub-pixels in one share occupy the white positions of the other; stacking results in all four sub-pixels being black. This approach aligns with pixel block models that ensure meaningful contrast without computational decoding.[1] A representative set of patterns includes four basis arrays corresponding to different arrangements of two black sub-pixels (denoted B for black and W for white):| Pattern | Row 1 Col 1 | Row 1 Col 2 | Row 2 Col 1 | Row 2 Col 2 |
|---|---|---|---|---|
| Horizontal (top) | B | B | W | W |
| Horizontal (bottom) | W | W | B | B |
| Vertical (left) | B | W | B | W |
| Vertical (right) | W | B | W | B |
| Diagonal (main) | B | W | W | B |
| Diagonal (anti) | W | B | B | W |
B W B W
W B W B
B W B W
W B W B
B W B W
W B W B
B W B W
W B W B
W B B W
B W W B
B W B W
W B W B
W B B W
B W W B
B W B W
W B W B