Zero-Knowledge Proofs: The Technology That Lets You Prove Without Revealing
Why zero-knowledge proofs are changing the way we think about digital trust.
One of the hardest concepts for me to wrap my head around was zero-knowledge proofs. This powerful cryptographic method allows one party to prove that a statement is true without revealing any of the underlying data.
But how can we truly understand a concept that seems so impossible?
I’ve put together an article designed to help people of all experience levels understand this fascinating technology.
Most of us share far more personal information than a situation actually requires. We’ve become so accustomed to this trade-off that we rarely stop to question it. In Midnight we always talk about this one. Showing your driver’s licence at a bar, and you’ve instantly revealed your name, address, date of birth, licence number, and photograph.
The bartender only needed to confirm your age, yet you’ve shared almost your entire identity to prove a single fact. The same thing happens online every day… Websites often collect your email address, location, browsing activity, and device information when they only need to confirm you’re an authorised user. For decades, this has been the cost of digital trust. If you wanted to prove something, you usually had to reveal the information behind it.
But what if there was another way?
What if you could prove something was true without revealing the information that made it true? That simple question inspired one of the most important breakthroughs in modern cryptography. Today, we know this technology as a zero-knowledge proof.
The Impossible Challenge
Imagine I tell you I know the combination to a safe. Naturally, you’d ask me to prove it before actually believing me. Well i could just tell you the combination, which proves my claim but also then you know the combination haha. Alternatively, I could then refuse to answer, leaving you with no reason to trust me.
Neither option is particularly useful TBH.
A zero-knowledge proof introduces a third possibility, Where i unlock the safe in front of you while keeping the combination completely hidden. You become convinced that I know the secret. At the same time, you never learn what the secret actually is. That’s the idea behind a zero-knowledge proof.
It proves knowledge without revealing knowledge if you know what i mean.
What Makes a Zero-Knowledge Proof?
Every zero-knowledge proof is built on three fundamental principles. Together, they ensure the system remains both trustworthy and private.
Completeness
If a statement is true, an honest prover can always convince an honest verifier.
Soundness
If a statement is false, successfully cheating the verifier should be extraordinarily unlikely.
Zero Knowledge
The verifier learns nothing beyond the fact that the statement is true. No passwords, identities, or unnecessary personal information are ever revealed.
Only the proof is shared.
The Seven-Layer Magic Trick
Try to imagine a magician standing in front of seven curtains. Behind the final curtain is a hidden treasure that only someone who knows the correct path can reach. The audience never sees what happens behind the curtains.
Every performance follows the same pattern. The magician disappears behind the first curtain and, moments later, emerges from the last curtain holding the treasure. After watching this happen again and again, the audience becomes convinced that the magician really does know the path.
They don’t know which turns were taken or what happened behind each curtain. They only know that reaching the treasure would be impossible without knowing the correct route.
That’s the key idea behind a zero-knowledge proof.
The audience learns that the magician knows the secret, but they never learn what the secret is. Confidence is created without revealing the hidden information. In reality, those seven curtains aren’t made of fabric. They’re made of mathematics.
As Charles Hoskinson writes in Proving Nothing, "ZK proofs don't eliminate trust. They decompose it into seven weaker pieces. That decomposition is the real trick." That idea forms the foundation of his seven-layer framework, which explains how each layer contributes to creating a trustworthy zero-knowledge proof.
Author's Note: The "Seven-Layer Magic Trick" analogy in this article is inspired by Charles Hoskinson's book, The Seven-Layer Magic Trick, which was later re-published as Proving Nothing: A Complete Guide to Zero-Knowledge Proof Systems. His work presents zero-knowledge proofs through a seven-layer framework, and this article draws inspiration from that approach while offering my own explanations and examples. https://github.com/CharlesHoskinson/sevenlayer
Behind the Curtains
So what do those mathematical curtains actually represent?
Inside Midnight, they’re called arithmetic circuits. You can think of an arithmetic circuit as a giant mathematical checklist that every proof must satisfy. Your private information, known as the witness, enters this circuit alongside a series of mathematical rules. If every condition is satisfied, the circuit produces a cryptographic proof without exposing the witness itself.
The proof can be verified by anyone and your private information will never leave your device. That’s the real magic behind zero-knowledge proofs.
Enter zk-SNARKs
Midnight uses a specific type of zero-knowledge proof called a zk-SNARK. Although the name sounds intimidating, each word describes an important feature. Zero-Knowledge means your private information always remains private.
Succinct means the proof stays incredibly small, around 128 bytes, regardless of how complex the underlying computation becomes.
Non-Interactive means the proof is generated once without requiring multiple conversations between the prover and verifier.
Argument of Knowledge means the proof demonstrates that you genuinely possess the required information without revealing it.
The result is remarkably efficient. Thousands of mathematical operations happen behind the scenes, while the network verifies the final proof in only a few milliseconds.
Solving Blockchain’s Privacy Problem
Public blockchains were fundamentally designed around transparency. That’s one of their greatest strengths, but it’s also one of their biggest limitations. Anyone can inspect wallet balances, trace transactions, and analyse on-chain activity.
This openness builds trust because anyone can independently verify what happened on the network. However, complete transparency doesn’t suit every application. Businesses don’t want competitors analysing sensitive commercial data.
Patients don’t want their medical records exposed, and most people don’t want their financial history permanently visible for anyone to inspect. Privacy isn’t the opposite of transparency. It’s the missing piece that allows blockchain technology to support real-world applications.
Midnight Takes a Different Approach
Rather than choosing between public and private, Midnight combines both. It does this by maintaining two separate but connected states. The public state contains information that should be visible to everyone.
This includes transaction proofs, deployed smart contract code, and any data that developers intentionally choose to make public. The private state contains encrypted information that always remains under the owner’s control. Identity credentials, confidential business logic, financial records, and other sensitive data never become visible to the network.
So how does the network know everything is correct?
Zero-knowledge proofs provide the answer. They bridge the public and private states, allowing the network to verify every transaction without ever accessing the underlying private information.
Selective Disclosure
This is where Midnight introduces one of its most powerful ideas.
Selective disclosure!
Instead of revealing your entire identity, you reveal only the specific fact that someone needs to verify. Nothing more is shared because nothing more is required.
Imagine proving:
You’re over 18 without revealing your date of birth.
Your company isn’t on a sanctions list without exposing confidential records.
You’ve spent more than $1 million with a supplier without revealing every invoice.
You’ve completed KYC without sharing your passport or driver’s licence with every application you use.
The verifier learns exactly what they need to know.
Making Zero-Knowledge Practical
For many years, building zero-knowledge applications required specialist cryptography knowledge. That complexity made the technology difficult for most developers to adopt. Midnight changes that with Compact, a programming language designed to make privacy-first development far more accessible.
Compact feels familiar to developers who already know TypeScript. Instead of writing complex cryptographic circuits by hand, developers simply write business logic. Behind the scenes, Compact automatically compiles that code into the arithmetic circuits needed to generate zero-knowledge proofs.
Developers focus on building applications while compact handles the cryptography.
Why This Matters
I believe privacy has always been about staying in control of our own information. Every day, we share details about ourselves to build trust. We prove our age, identity, qualifications, and eligibility, often revealing much more information than the situation actually requires.
Zero-knowledge proofs give us another option. They allow us to prove a claim while keeping the underlying information private. You can establish trust without exposing your personal data, giving you greater control over what you choose to share.
As more of our lives move to online, that level of privacy will become increasingly important. Zero-knowledge proofs have the potential to reshape how people, businesses, and governments exchange information.
For Midnight, they are the technology that makes the entire network possible.
Editorial Note: Every Learn Midnight article is researched and written by me. AI is used as an editing assistant to improve spelling, grammar, readability, and to help verify technical accuracy against the official Midnight documentation. Final responsibility for the content remains with me.






