Visual Secret Sharing & Additive Schemes
Explore XOR-based additive sharing and visual cryptography schemes.
Visual Secret Sharing & Additive Schemes is a free Cryptology Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Visual Cryptography Overview
Visual secret sharing (Naor & Shamir, 1994) splits an image into n transparencies such that overlaying k transparencies reveals the secret image, while any fewer reveal nothing — even to a computationally unbounded adversary.
2-of-2 Visual Scheme
Each pixel of the secret is expanded into a 2x2 block. For a black pixel: both shares get complementary patterns (when stacked, all black). For a white pixel: both shares get the same pattern (when stacked, 50% black = grey). The eye perceives the difference.
XOR-Based Additive Sharing
For bit strings: share secret S by generating random R_1, R_2, ..., R_{n-1}. Set R_n = S XOR R_1 XOR ... XOR R_{n-1}. All n shares XORed together = S. Any subset of n-1 shares is uniformly random — reveals nothing about S.
Additive Sharing vs Shamir
XOR/additive sharing is n-of-n (all shares required). Shamir SSS is k-of-n (any k shares). Additive sharing is simpler and faster; Shamir handles arbitrary thresholds. MPC protocols often use additive sharing for arithmetic operations.
Secret Sharing over Integers
For integer secrets: share S as S = s_1 + s_2 + ... + s_n (mod p). Each s_i is a random element of Z_p. To add two shared values A+B: each party locally adds their shares: (a_i + b_i) mod p. No communication needed for addition.
Multiplication in Additive Sharing
Multiplying secret-shared values requires interaction. The classic Beaver triple method: pre-compute shared random (a, b, c=ab). To multiply x*y: reveal (x-a) and (y-b) to all parties (these reveal nothing about x,y), then compute x*y using the triple.
Linear Secret Sharing Schemes
A Linear Secret Sharing Scheme (LSSS) realizes any monotone access structure. Shamir is an LSSS. LSSS are the building block for attribute-based encryption (ABE) and multi-authority access control systems.
Packed Secret Sharing
Packed Shamir shares multiple secrets in one polynomial: encode k secrets as coefficients of a degree-(n-k) polynomial. Allows amortized communication cost in MPC protocols when many values need to be shared simultaneously.
Cheating Detection
Basic sharing schemes offer no protection against malicious shareholders submitting invalid shares. Verifiable Secret Sharing (VSS) adds commitments; Robust Secret Sharing adds error correction so even with t bad shares, reconstruction succeeds.
Applications
Visual cryptography: printed document authentication, secure voting ballots. Additive sharing: SPDZ MPC, Secure aggregation in federated learning (Google). Threshold schemes: hardware wallet seed backup, enterprise key management.
Ramp Schemes
A (k,n) ramp scheme is weaker: fewer than k-d shares reveal partial information (d levels of secrecy). Used when perfect secrecy of partial shares is not required but storage efficiency is critical. Allows shorter shares than Shamir.
Quick Check
In XOR-based additive n-of-n sharing, how many shares are needed to reconstruct the secret?
Recap
Visual cryptography splits images into transparencies; additive sharing uses XOR for n-of-n schemes; Shamir handles k-of-n. MPC uses additive sharing with Beaver triples for multiplication. Next: threshold signatures and real-world use.
Frequently asked questions
Is the “Visual Secret Sharing & Additive Schemes” lesson free?
Yes — the full text of “Visual Secret Sharing & Additive Schemes” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.
What will I learn in “Visual Secret Sharing & Additive Schemes”?
Explore XOR-based additive sharing and visual cryptography schemes. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cryptology Academy?
No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Visual Secret Sharing & Additive Schemes” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cryptology Academy lesson?
Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- The Secret Sharing Problem
- Shamir's Secret Sharing: Polynomial Math
- Visual Secret Sharing & Additive Schemes
- Threshold Signatures & Real-World Use Cases