Zero-Knowledge proofs is one of the key cryptography advancements that is rapidly taking over the blockchain space. Surely you have heard of them and perhaps wonder why there is a lot of hype going on around it. This article will explain briefly its importance and the repercutions of this technology on what’s comming. But even less what are they?

These are a range of crypographic primitives that introduce the idea of indirect demonstration. I can prove to you X, without revelaing X. Or in other words, instead of showing something, I can send to you a proof that demonstrate truthful statements about it. A third party can take this proof and with the use of cryptographic artifacts check that the statements about the secret information is correct.

This is very counterintuitive, my favourite example could help. Let’s say that you want demonstrate to a blind friend of yours the existence of colors. To demonstrate that, you give two pencils to him, which are equal in form but different in color. There is no palpable differences between the pencils. You will ask him to secretly switch or mantain the pencils from hands and to test you each time he does. Since you can see the colors of the pencils you can notice whenver he switch them from hands or not. Thus, he grabs each pencil in his hands; he hide the pencils behind his back; to later show them to you again asking:

-*“Did I change the pencils from hands?”*

If he did or not, you will respond to him. After asking you a few times about it, your blind friend will be convinced that the pens are actually different in color without actually seeing anything! This is called an interactive proof. Very clever right? Well, mathematicians took this notion of demonstration and applied it to build new cryptographic schemes. And the thing is that you can express any program as a Zero-Knowledge proof, this means that they are very versatile and can be adapted a rich range of situations. A legendary and rare feature for a cryptographic primitive.

Right now this clever idea has become very important because is tackling some problems that were very prominent in first gen blockchains. The first problem is privacy. You can use ZKPs to make anonymous applications. For example, you can use them to demonstrate that you are a member of the group without specifying exactly who. Which is crucial for a voting dapp whenever you want to proof that you are able to vote without exposing your identity. Or have credentials with attributes and be able to prove something about them; again without disclosing your data, just sending proofs. The classic example here is a proof that demonstrate that you are over 18 years but without showing you actual age. This way any institution can prove that you are an adult with minimum exposure. Thus, with this technology it is possible to build more private-centric dapps. As you know blockchains were in the beggining transaparent by default, but you can use ZKPs to embed anonymous features on top of them, or even now, we are seeing fully private blockchains leveraging this technology such as midnight.

The second problem addressed is scalability. It is not only possible to proof statements about secret information, also you can hide complexity. This means, instead of verifying a process directly, you send a proof proving the correct execution of a process. Where that proof is cheaper to verify than the process itself. In sum, ZKPs let’s you decrease the amount of computation needed to verify some process. In blockchain this is used to create the famous roll-ups. In short, these are parallel protocols (L2 layers) that manage transactions from the L1, with the aim of extending the transaction capability of the L1. Many parties can lock their tockens and start doing a higher and faster quantity of transactions in the second layer at a cheaper cost. Once these transactions are accomplished the state is updated to the L1 and the tokens distributed accordingly. The L1 instead of directly checking that all the parallel transactions were done correctly, only checks the proof that states that the parallel transactions were done validly. To check this proof rather than the process itself is more efficient for the L1.

As you can see, Zero-Knowledge proofs have novel applications in privacy and scaling. As such these were weak points of the firsts blockchains. For this reason and given its adaptability, this cryptography has become very relevant nowadays. We are excited because in the next Cardano hard-fork, capabilities for smart contracts to support these types of ZK applications will be enabled. This upgrade will take us to a new level of what we can achieve.