Share on facebook
Share on twitter
Share on linkedin

Trinsic Basics: What Are Zero-Knowledge Proofs?

Last week, the Decentralized Identity Foundation announced work on interoperable zero-knowledge proof schemes that Trinsic participated in. Since then, we’ve had some folks ask us, “What are zero-knowledge proofs?” It’s a great subject for our first Trinsic Basics post—a series of blog posts geared toward educating people who are new to the community about the powerful aspects of self-sovereign identity (SSI) and verifiable credentials. So let’s kick it off!

 

In short, zero-knowledge proofs (ZKPs) allow you to prove a piece of information is true (like, that you’re over 18) without revealing the information itself (your birthdate). For this post, we’ll talk about ZKPs in the context of SSI.

The concept

Suppose there’s a circular cave that has a door in the back (see the drawings below for detail). The door in the back requires a 4-digit code to unlock, and the only way from one side to the other is through the door. If you want to prove to your friend that you know the code without revealing the code, how could you do it? Easy! Hangout at the back by the door and come out whichever side your friend asks you to. If you do this enough times successfully, your friend will feel confident you know the code. Through this process, you will have proven you know the code without revealing the code.

When your friend isn't looking, you go into one side of the cave.¹
You wait for your friend to tell you which side to come out of.²
If you succeed enough times, your friend will trust that you know the code.³

Applying ZKPs to verifiable credentials and SSI gives individuals the ability to leverage this power in their everyday lives.

When would ZKPs be helpful?

Consider a simple proof-of-age scenario. In the United States, for example, you must be 21 years old to rent a car. What if you could prove you are at least 21 years old to the rental car company without revealing your actual birthdate? Instead of handing them your driver’s license (which includes your birthdate and other personal information such as your home address), a ZKP would allow you to send a digital proof that simply states you are 21 or older.

 

Other potential use cases for ZKPs include the following:

 

  • Qualifying for a loan. Instead of revealing your actual credit score to the bank, you can use a ZKP to prove that your credit score is above a certain number. The bank can trust that your credit is above a certain threshold that it defines, and you don’t have to reveal more than is necessary.
  • Proof of Address. If you needed to prove you lived in a certain voting district, you could use a ZKP to prove you lived in the correct area, without disclosing your address.
  • Not a Bot. Using ZKPs, you could prove that you are a verified person through any business flow, without disclosing any information about yourself.

These scenarios center around human traits, but there are plenty of industrial, medical, automotive, and other interesting use cases as well. ZKPs are useful any time privacy or data minimization is a priority.

How you can use ZKPs

Trinsic allows you to take advantage of the power of ZKPs through our platform. First, you will need a digital wallet. The Trinsic Wallet is a great place to start.

 

Second, you’ll need some credentials in that wallet. You can use the Trinsic Studio to create your own credentials in less than 5 minutes. Or you can get some sample credentials by doing a demo or two.

 

Once you have a digital wallet with credentials, you’re ready to prove some stuff about yourself! To create a verifier, head to the Trinsic Studio and click on “Verifications.” Click the “Create Verification Template” button, then the “+ Policy” button, then select “Predicate.”

There are a lot of powerful things you can do with these verification templates, but we’ll just focus on the ZKP for now. As you can see, in this example we’re setting up a verification policy that will ask someone to prove their age is ≥ 18.

After I’ve set up the policy, I can send it to the digital wallet. Here’s what it looks like:

From here, the digital wallet allows you to select from any credential that satisfies the policy you sent to it. It’s that easy! You’ve successfully presented a proof of age without revealing any personal data.

Closing

While this was a lightweight introduction to zero-knowledge proofs, the topic is rich with technical complexity. At Trinsic, we strive to take complex topics and make them simple to implement. If you’d like to get started with zero-knowledge proofs in less than 10 minutes, head to the Trinsic Studio and get started!

Notes