DEV Community

Cover image for Introductions to zk-SNARKs technology in Mina Protocol
Adetayo Lasisi
Adetayo Lasisi

Posted on

Introductions to zk-SNARKs technology in Mina Protocol

Zk-snarks stands for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge. It refers to a proof construction in which one can prove possession of certain information utilizing a concept known as a "zero-knowledge proof."

A zero-knowledge proof allows a prover to convince a verifier of a statement's truth without disclosing additional information. For example, a prover could demonstrate knowledge of a number's hash without revealing the number itself.

In a zero-knowledge proof of knowledge, the prover can convince the verifier not only of the existence of a piece of information but also of their possession of that information. In the context of password authentication, this would involve proving knowledge of the correct password without exposing the password itself.

Asking for password

In a zero-knowledge proof of knowledge, the prover can convince the verifier not only of the existence of a piece of information but also of their possession of that information. In the context of password authentication, this would involve proving knowledge of the correct password without exposing the password itself.

“Succinct” zero-knowledge proofs can be verified within a few milliseconds, with a proof length of only a few hundred bytes even for statements about programs that are very large. In the first zero-knowledge protocols, the prover and verifier had to communicate back and forth for multiple rounds, but in “non-interactive” constructions, the proof consists of a single message sent from the prover to the verifier.

Zero-knowledge proofs are characterized by their succinctness and non-interactivity.

  • Succinctness: Proofs can be verified very quickly, often within milliseconds, and are typically only a few hundred bytes long, even for complex statements.
  • Non-interactivity: The proof consists of a single message from the prover to the verifier, eliminating the need for multiple rounds of interaction.

The most efficient way to produce zero-knowledge proofs that are non-interactive and short enough to publish to a blockchain is to have an initial setup phase that generates a common reference string shared between the prover and the verifier. We refer to this common reference string as the public parameters of the system.

To achieve these properties, many zero-knowledge proof systems rely on a common reference string (CRS), also known as public parameters. This string is generated through a setup phase and is shared between the prover and the verifier.

While this approach enables efficient and non-interactive proofs, it introduces a trust assumption: if someone gains access to the secret randomness used to generate the CRS, they could potentially create fraudulent proofs.

If someone had access to the secret randomness used to generate these parameters, they would be able to create false proofs that would look valid to the verifier.

accusing a scammer

How did it come about

Early cryptocurrency enthusiasts, particularly in the Bitcoin community, have always envisioned a future where digital transactions could be conducted anonymously and without the need for intermediaries. The nature of Bitcoin addresses seemed to offer a degree of privacy, as users could transact without revealing their real-world identities.

we are killing it

However, as the technology matured, it became increasingly clear that Bitcoin's level of privacy was insufficient. Data scientists, hackers, and law enforcement agencies developed techniques to remove the anonymity of users by analyzing on-chain data and correlating it with other information sources.

Characteristics of zk-SNARKs

  • They don't leak information.
  • Tiny and easy to verify.
  • They don't require back-and-forth communication.
  • They are proofs of knowledge.

Mina’s zk-SNARKs Possibilities

Mina Protocol uses zk-SNARK technology and takes it to a new level by using recursion so that no matter how many transactions or blocks are added to the chain, the computations stay small, scalable, and efficient. Mina’s smart contracts, zkApps, also leverage zk-SNARKs making it especially powerful to enable privacy & security allowing you to keep your data on a local device while only sharing proof of it on the chain.

Mina does this by proving that there exists a sequence of blocks that form a blockchain, rather than revalidating the full sequence of blocks every time a new block is created, the proof statement is slightly tweaked, Mina proves that there was a valid proof for some sequence of blocks and an extra one that is also valid. Every time a new block is created and broadcast throughout the network, the proof is extended to support this extra block

One big advantage of this is when a proof refers to itself it doesn't increase the size of proofs, no how many times a reference is made. "Mina’s self-referential concept of proofs is like a picture of a picture"

picture in picture

Mina is building a secure, democratic future by creating a private gateway between the real world and crypto. With its unique privacy features and ability to connect to any website, Mina is redefining the way we interact with the digital world.

zk-SNARKs opens the possibilities for new blockchain use cases such as sensitive data like your credit score, home address, medical information, and more. An example of this is Teller, Teller and Mina work together to prove a customer's credit score to secure a loan without revealing private information.

To get started with building zk-SNARK apps on Mina protocol, you can go to their docs.

References

https://z.cash/learn/what-are-zk-snarks/
https://www.investopedia.com/terms/z/zksnark.asp
https://minaprotocol.com/blog/what-are-zk-snarks
https://minaprotocol.com/blog/zk-you-should-know-snarks-starks
https://blog.zkbob.com/zksnarks-explained-how-zkbob-achieves-anonymity-in-blockchain-transactions/
https://medium.com/@bhaskark2/understanding-zero-knowledge-proofs-part-1-verifiable-computation-with-zk-snarks-ba6cbb8e6001
https://blockofchain.medium.com/mina-snark-workers-e37de54ef2a2#:~:text=Mina%20Protocol%20uses%20zk%2DSNARKs,or%20proofs%2C%20that%20validate%20transactions.

Top comments (0)