Zero-knowledge proofs in blockchain. Example: Iron Fish network

Val Savchuk
6 min readAug 22, 2022

--

Today I’ve picked up a very interesting but complex question. I would label it as advanced level. Nevertheless, if you do study blockchain, you should notice zero-knowledge proofs(ZKP) from time to time. That is why, I decided to bring all my skills together to explain the bases. Thus, in this article you will read about zero-knowledge proofs, how it works, why it is needed with the example and details.

Hello, my crypto friends! My name is Val Savchuk, and I am from Ukraine. I am Ph.D. and university teaching assistant in a maternity leave and want to teach you a bit today. I do write a lot: a new article every Monday. Therefore, stay tuned and read more in my blog.

Right, I decided to be minimalistic in my images today:) Have a nice time reading!

Twitter LinkedIn Youtube Medium

What are ZKP?

When I first heard the therm, I thought of smth you shouldn’t know much about, nevertheless limitlessly use it. I was close!

“Zero-Knowledge Proof is a cryptographic technique where no information is revealed during a transaction except for the interchange of some value known to both the prover and verifiers (the two ends of the process).” [Source]

So, it’s all about privacy. I’ve told you the bases in this article: “How does blockchain support data privacy. Aleo privacy features. | by Val Savchuk | Medium

We are taught, that blockchain is kind of a private space. However, in the majority of cases, a lot of information during transactions are revealed. Namely, I am talking about wallet address, the amount of money it holds, transactions it was used for and even their details. Does it sound private to you? Not to me. This is the reason the ZKP are being developed.

Privacy was always an issue, thus the idea of ZKP occurred, or was mentioned for the first time in 1985 [Source #1, Source #2]. But only today it got the support it is worthy of. That is because we got to the point we can’t give up information any longer for public use, taking into account the power of online life.

Functioning of ZKP

The algorithm of functioning involves a prover and verifier. In fact, the prover generates a proof that should be verified by a specifically chosen verifier. The algorithm vary from technology that represents it. I used to study zk-SNARK and zk-STARK, but there are more. The differences are in ways the verifier is selected, verification time, proof size, etc. [Source]

The most popular example of ZKPs is the cave, with two different ways inside and one door with the code. Ivanka selects one way, Petro doesn’t know which way Ivanka comes. When he sees her, he randomly gives her a task to go a specific way. If she comes back, he can assume, she knows the code from the door. To be sure, the task is repeated for several times. Here Ivanka is the prover, and Petro — verifier.

To dive deeper, I’ve found the great schema for you. It is below.

Figure uploaded by Slawomir Grzonkowski [Source]

Features of ZKP

“The crucial feature of ZKPs involves that both parties may verify the truthfulness of a piece of information while remaining ignorant of the contents of the proven information.” [Source]

No matter what specific technology to use it should have the following features, that make it truly zero-knowledge. They are [Source]:

  • Completeness
  • Soundness
  • Zero-Knowledge

When the quest between prover and verifier is completed successfully, the statement is agreed to be true. That leads to acceptance of the proof by the verifier. This what completeness tells us about.

As for the soundness, nothing can make the verifier accept the statement if it is false indeed.

And zero-knowledge, of course. No one should know a thing about the other one, but the work should be fulfilled anyway.

Types of ZKP

Zero-Knowledge Proofs are two types:

  • Interactive
  • Non-interactive

The difference is in choosing verifier algorithms. In interactive type there is the separate verifier, that conducts the series of actions, as described in the example above, to prove the proof is true.

Non-interactive types differs a bit. Anyone can be its own verifier. In fact, the challenge for the prover is chosen randomly.

Pros and cons of ZKP systems

Reading all above, you can assume, that ZKP should be everywhere, and it has only advantages. I feel like the technology has that future we want it to have, and that is why let’s summarize pros, you already know or some new:

  • Private
  • Secure
  • Simple
  • Scalable

But still, as any useful and important tool, it has its cons, for sure! Here are some of them, according to the source:

  • Limited: use mathematics and numbers only, as verification.
  • Resources: it needs a lot of computing resources to work fast and correct.
  • Restricted: if the “door code” is forgotten, say “good buy” to your data.
  • Vulnerability: does not fully support advanced technologies.

Iron Fish Network

“We’re building a new Layer 1 blockchain to become the universal privacy layer for all of web3. Using zero-knowledge proofs (zk-SNARKs) and the highest industry standards for encryption, we enable users to have fully private transactions — a true SSL layer for all blockchains.” Iron Fish official website

So, a first layer blockchain with fully private transactions and, even, private coin. I have told you a bit about the project here: Iron fish — new chain, new coin. | by Val Savchuk | Medium

The ZKP base of Iron Fish is “Zero-Knowledge Succinct Non-Interactive Argument of Knowledge” or zk-SNARKs. Succinct means brief and clear. The algorithm is based on non-interactive type of ZKP, when prover and verifier does not interact in any way. The verification algorithm is simple and clear, but strong enough to work out.

To be more precise, Iron Fish used Sapling protocol as a background for its own functioning.

The functioning is described on the image [Source]:

And zk-SNARKs is described here:

Iron Fish Official Sources:

Official website Twitter Reddit Telegram

Conclusion

Privacy matters! We came to privacy through revealing all our data online. Zero-Knowledge can make everything simply private. What do you think?

Resources

What is Zero Knowledge Proof and its role in blockchain?

What Is a Zero-Knowledge Proof (ZKP)?

The Knowledge Complexity of Interactive Proof-Systems

Zero Knowledge Proof: A Introductory Guide — 101 Blockchains

ZKP implementation on the Web | Download Scientific Diagram

Fundamentals: Zero-Knowledge Proofs, What Are They?

What are Zero Knowledge Proofs?

Zero-knowledge proofs — a powerful addition to blockchain

--

--

Val Savchuk

Ph.D in Computer sciences. Crypto enthusiastic. Crypto ambassador. Business analyst