Buy Crypto
Markets
Contract
Spot
Earn
Web3 new
Learn
Academy > Crypto Insights > What Is zkSNARK: A Beginner-Friendly Explainer >

What Is zkSNARK: A Beginner-Friendly Explainer

2022-11-27 07:16:26

Summary

  • zkSNARKS is a zero-knowledge proof system that allows one party to prove to another party that they know a value x without conveying any other information about x.
  • The key idea is that it should be impossible for the verifier to derive any information about x from the mere fact that the prover was able to prove they knew it. This protects the prover’s data privacy.
  • Zero-knowledge proof systems are used in a variety of applications, including secure communications, cryptography, and privacy-preserving data analysis.

zksnark

What Is zk-SNARK?

zkSNARK is a zero-knowledge proof system that allows a user (the “prover”) to prove something–either their identity, their ownership of funds–to another party (the “verifier”) without revealing any information about those assets.

For example:

  • A user should be able to prove that he has enough balance in his account to buy a product or service, without having to share the exact amount of money in his possession.
  • A user should be able to verify his identity prior to accessing an app, without having to share his personal data.

In other words, zkSNARKS allows you to prove that you have the required validatory information, without revealing the specific values of that information.

The key idea is that it should be impossible for the verifier to derive any information about that proof (hence the term “zero-knowledge” proof).

Get 180 welcome bonus at Phemex

Why zkSNARKS are important

zkSNARKS is particularly important in the crypto-sphere given that many blockchains are public in nature–privacy hence becomes an increasingly important concern.

The most prominent example is to look at Zcash, which is a privacy cryptocurrency. When transactions take place on public blockchains like Bitcoin and Ethereum, they are validated with details like sender and receiver addresses, as well as input and output values i.e. how much is spent, how much remains unspent.

Wirth zk-SNARK, Zcash can prove that a transaction is valid without disclosing information such as addresses and values involved.

How Zcash uses zkSNARKS

How Zcash uses zkSNARKS to provide a layer of privacy for crypto users (Created by Valentin Kalinov and Shermin Voshmgir; Blockchainhub.net)

“Explaining zkSNARK to a 5-year-old”

This is one of the easiest-to-understand explanations about what zkSNARK is, from Horizen, a cross-chain ecosystem that is using zkSNARK technology to maintain privacy for the blockchains and DApps built on its platform.

“Imagine that you’re playing a game of “Where’s Waldo?” with three friends, with a $1,000 betting pool to be split among the winners. You and your friends are sitting around a table, and you’re all given a sheet of paper with the image of Waldo on it.

You have to find Waldo in the picture — and as soon as you find Waldo, you need to show that you’ve found him, but without giving away his location or any hints. In other words, you want to prove knowledge of a fact without revealing any information beyond the validity of your claim.

In our metaphor, you can take a piece of paper of the same size and mark a spot in the same position Waldo would be on the game sheet. You can then hide the sheet in a puzzle box, and once your friends solve the puzzle, they can see for themselves that you marked the point where Waldo would be.”

How Does zkSNARK Work?

Two words make up how zkSNARK works: digital signatures. Digital signatures, in turn, use cryptographic algorithms to scramble up sensitive information so that it is hidden from the other party, while providing that party with the necessary proof requested for.

Here’s how it’s done:

  1. The prover first generates a pair of keys, one public and one private. He uses the private key to sign on a transaction.
  2. The prover then encodes this transaction into a zk-SNARK, which is a mathematical proof that the transaction is valid.
  3. The proof is sent to the verifier, along with the public key. The verifier then checks that the formula is correct using the public key, without learning any other information about the transaction. This check can be done very quickly since only a small amount of information is being verified. He then confirms that the transaction is valid.
get free crypto by just watching videos

Which Coins Use zk-SNARKs?

A SNARK crypto is a type of cryptocurrency that uses zk-SNARKs to improve privacy, otherwise known as a privacy coin.

Examples of such coins are:

Further reading: Which Is The Best Privacy Coin? Monero vs Zcash- Phemex Academy

The main challenge with zk-SNARKs is that if the private key is compromised, fake proofs can be created. This could allow the creator of the fake proof to commit fraud, for example, create and spend counterfeit privacy coins.

Other Applications for zkSNARKS

zkSNARKs can also be used for other things, such as:

  1. Identity verification: User credentials can be verified without passwords, removing the need for documentary proof such as passports, birth certs and others, to safeguard sensitive information like place and date of birth.
  2. Voting systems: Voters’ identities can be validated without personal identifiers, such that even if the ballots were leaked, voters cannot be identified, thus protecting their privacy.
  3. Data compression: This is such an intriguing use of zkSNARKS it deserves its own expanded section.

Filecoin is a decentralized storage provider, a.k.a. a blockchain version of Dropbox, if you will. There are several parties involved.

First, the storage provider on the Filecoin network (who offers their storage space in return for block rewards)–the “prover,” has to prove they are storing the data on-chain properly.

On the other end, we have the “verifiers” i.e. the nodes, who have to verify that the storage providers are storing and securing the data properly. These verifiers must be satisfied with the proof given by the storage providers.

This requires the storage providers and nodes to communicate whenever data changes hands. As one can imagine, the process will be resource-intensive.

“The amount of data that an individual storage provider has to prove today in order to verify their storage is enormous, and will only grow with time. The Filecoin network has a block time of 30 seconds. In order to maintain that blocktime and enable a scalable method, the network needs a solution that allows for quick, efficient, and robust verification,” a Filecoin blog post explains.

With zk-SNARKs, the Filecoin network can improve its scalability and efficiency by slashing the amount of time needed for parties to verify storage.

For the storage providers, zk-SNARKs reduce the amount of data they need to transfer for them to prove their storage, lowering operating costs.

What does zk-SNARK stand for?

ZK: Zero-Knowledge

Zero-knowledge means that someone who is verifying a statement cannot gain any new information from the verification process.

In other words, during a zero-knowledge proof, the verifier only learns whether the statement is true or false, but nothing else about it.

S: Succinct

A succinct zk-SNARK proof is one that is short and easy to verify. This is in contrast to a regular zero-knowledge proof, which can be very long and complex. Typically, the proof can be verified in a matter of milliseconds.

N: Non-interactive

A non-interactive zk-SNARK proof does not require any interaction between the prover and verifier. This means that there is only one message being sent from the prover to the verifier. This is in contrast to an interactive proof, where the prover and verifier must interact with each other back and forth in order to complete the proof.

AR: Argument

An argument is a reason or set of reasons given to support a point. In the context of zk-SNARKs, an argument is a series of mathematical operations that are used to prove that a statement is true.

K: Knowledge

Knowledge refers to the idea that the prover knows certain information that is required to complete the proof. This could be, for example, the private key of an account.

start copy trading with one click

Who Created zk-SNARKs?

The term “zk-SNARKs” was created by a team of cryptographers, including Nir Bitansky, Alessandro Chiesa, and Eran Tromer. They first published their work on zk-SNARKs in a paper. Since then, zk-SNARKs has been developed and improved upon by a number of different projects and teams.

Conclusion

Zero-knowledge proof systems are a relatively new area of research, and there are still many open questions about their feasibility and practicality. However, they have already been used to create some impressive results, including a working prototype of a fully secure Internet communication system called the “ZKP IP protocol.” The protocol is designed to allow two parties to communicate with each other over the Internet without revealing their identities or location.

The ZKP IP protocol is still in development, and it has not yet been deployed on a large scale. However, the researchers who developed it believe that it has the potential to be used for a wide range of applications, including secure email, file sharing, and online banking.


For any inquiries contact us at support@phemex.zendesk.com
Follow our official Twitter | Join our community on Telegram
Trade crypto on the go: Download for iOS | Download for Android
Phemex | Break Through, Break Free
giftRegister to get $180 Welcome Bonus!
Email
Password
Invitation code (Optional)
  • Facebook
  • Twitter
  • LinkedIn
  • Telegram
  • Discord
  • Youtube
Subscribe Phemex

Register on Phemex and begin your crypto journey today

Get $180 to Sign Up