### Learning ZK from Zero

Zero-Knowledge proofs are helping add both privacy and scalability to blockchains like Ethereum. Learn all you need to know about this technology, starting from zero.

### What are Zero-Knowledge proofs?

Zero-Knowledge proofs are a type of cryptography that allows something to be proven without actually revealing the information that proves it.

Let’s go over a simple example to understand this. A deck of cards contains 52 cards (26 red & 26 black). Alice and Bob will play a game in this example of zero knowledge – with Tom being the dealer. Tom shuffles the deck of cards and tells Alice to choose a card. Alice picks a random card, without looking, from the deck Tom is holding and gets a red card. Alice has to convince Bob she got a red card without showing Bob the card she got. To do this, she tells Tom to show Bob only the 26 black cards he still has in the deck. Bob seeing the 26 cards, agrees that Alice has a red card and is convinced. Alice has just given Bob a Zero-Knowledge proof of her picking up a red card without actually showing him she got a red card.

### How does it work?

The way Zero-Knowledge proofs work is that one person (the prover) proves that he has ownership of some information to the other person (the verifier) without reveling what that information is.

#### A Zero-Knowledge proof must satisfy the following properties:

Completeness: if the statement is true, the verifier will be convinced of the fact by the prover.

Soundness: if the statement is false, the prover cannot cheat to convince the verifier.

Zero-Knowledge: if the statement is true, the verifier does not learn anything other than the fact that the statement is true.

#### There are two types of Zero-Knowledge proofs:

Interactive: in this case the prover has to perform a series of actions to the verifier in order to convince him of a fact. More like an interrogation without revealing information.

Non-Interactive: a proof can be verified by the verifier himself. no interaction is required between the prover and the verifier.

### ZK-Proofs and Blockchains: Privacy, Security and Scalability

Privacy: increases privacy of users by avoiding the revelation of personal information in public blockchains.

Security: strengthens security by replacing authentication methods such as passwords with proofs.

Scalability: increases blockchain throughput by verifying and storing proofs for transactions instead of verifying and storing each transaction resulting in quicker transactions processed hence improving scalability.

### Applications of Zero-Knowledge proofs:

Private transactions: ZK proofs can be used to validate transactions on the blockchain without revealing data about which wallet a payment came from, how much value was sent and to which wallet it was sent. Traditional blockchains like Ethereum store information about any transaction publicly. Zcash is a blockchain that uses ZK proofs to validate its transactions and stores them privately on the blockchain.

A transaction between 2 wallets on Ethereum where all transaction details are publicly stored.

A transaction between 2 wallets on Zcash where all transaction details are privately stored.

DeFi: applying for an uncollateralised loan online and proving that your credit score meets the minimum requirement without actually revealing your credit score. Teller finance is a DeFi lending service on Ethereum. Mina and Teller work together, so using Mina’s ZK proofs you can proof your credit score for an unsecured loan.

Visit Teller and select private credit score powered by Mina.

Mina proves your credit score is above 700, meeting Teller’s requirement. Your scores proof is uploaded privately so Teller never sees your score.

Once Mina verifies your credit proof, you can apply for an unsecured loan.

Finally, Teller takes it from there and provides you with an unsecured loan.

### Scaling Layer 1 blockchains such as Ethereum:

ZKSync is a blockchain that uses ZK proofs and works as a layer 2 for Ethereum. Zk-rollups, a type of ZK technology that takes hundreds of transactions off the main chain (Ethereum) and bundles them into a single transaction and stores a validity proof for each bundle on the main chain (Ethereum). This reduces the amount of transactions sent through the main chain (Ethereum), resulting in faster and cheaper transactions with lower gas fees.

Passwordless logins: an application confirming a password’s validity without actually processing any password.

Digital identifications mechanisms: ID schemes could also allow people to prove that they meet a minimum age requirement without sharing their date of birth. Proving a valid driver’s license without handing over your driver’s license number.

Online voting: ZK proofs can allow voters to vote anonymously and to verify that their vote was included in the final tally.

## Comentarios