Hello friends

Namada is a layer-1 proof-of-stake blockchain protocol that provides multi-chain, asset-agnostic privacy. As you know from the previous article about MASP, this is one of the main technologies of the project, which ensures confidentiality using the modernized ZKP technology based on the Sapling model from Zcash. Since there are several implementations of ZKP, plus there are also rollups that also use this solution, we will look specifically at the option that Namada uses. In one form or another.

CPC

Zero-knowledge proofs are mechanisms that allow one party to reveal knowledge of information to another party without revealing the information itself. ZK proofs, also called proofs of validity, were originally used to hide transaction details on privacy-focused blockchains.

But ZK proofs have another interesting use case: scaling general-purpose blockchains. With proofs of validity, blockchain nodes can verify transactions without storing details or replaying calculations. This reduces confirmation time and increases network throughput.

Due to its scalability benefits, ZK proofs have become the core infrastructure for blockchain scaling projects, especially zero-knowledge rollups.

ZK-SNARK Zero-Knowledge Succinct Non-Interactive Argument of Knowledge

ZK-SNARK is a zero-knowledge proof generation protocol for verifying the authenticity of information without revealing the underlying data. The acronym stands for “Zero Knowledge Short Non-Interactive Argument.”

The ZK-SNARK protocol involves two parties: the prover (A) and the verifier (B). The prover is the party making the claim, and the verifier is the party responsible for verifying the claim.

The information, let's call it secret, is indicated inside the message. The prover uses the ZK-SNARK mechanism to create a proof that shows the verifier that the statement is true... without revealing said information.

A hypothetical use case for ZK-SNARK is to authenticate a user's identity. A person can prove a claim (for example, I am a citizen of a certain country) without revealing personal information (for example, a passport or social security number).

ZK-SNARK are so named because they have the following parameters:

1. Zero-knowledge: This means that the verifier knows nothing about the statement other than whether it is true or false.

2. Succinct: A proof small enough that a verifier can review it in a short period of time.

3. Non-interactive: SNARKs are non-interactive because provers and verifiers do not need to exchange additional information beyond the original evidence provided. Early zero-knowledge proof systems required provers and verifiers to exchange multiple messages to verify statements.

4. Argument: A SNARK is a “mathematically based” statement that meets strict requirements, making it difficult to deceive (i.e. create false evidence).

5. Knowledge. SNARK-based evidence cannot be created with access to underlying (secret) information.

ZK-SNARK in blockchains

Distributed computing systems, such as public blockchains, must solve the so-called “computational integrity problem.” Computational integrity (CI) refers to the correctness of the results obtained from a particular calculation.

In public blockchains, computational integrity refers to the correctness of transactions carried out on the network. Most blockchains achieve this by having other computers (nodes) re-execute each transaction.

However, this approach is problematic. Forcing every node to replay every transaction slows down the network and limits scalability. Nodes must also store transaction data (otherwise they cannot replay calculations), which causes the size of the blockchain to increase exponentially.

But what if nodes could verify the validity of calculations without reproducing them? This will improve network throughput and eliminate the need for nodes to store redundant transaction data. How to do it?

Use ZK-SNARK:

Proofs of validity generated by ZK-SNARK can confirm the validity of a transaction without revealing the input data. This is why privacy-focused cryptocurrencies such as Zcash and Monero, and of course Namada, use SNARKs to hide transaction information.

SNARK can also prove the correctness of off-chain calculations without nodes having to repeat each step of the calculation. This is where ZK-SNARK becomes useful for scaling blockchains.

Verifying off-chain calculations using SNARKs is a complex process that begins with encoding the calculations into a mathematical statement. This mathematical statement forms the basis of the proof of validity.

The verifier then performs an operation on the proof to verify its correctness. If a proof passes all tests, the underlying calculation is considered valid. This is why SNARKs are short: the size of the proof of validity is many times smaller than the computation it verifies.

Example of ZK-SNARK operating algorithms

  • Key generator
    The key generator sets the parameter to generate a key pair. Here, a trusted source can remove personal information after generating a private or public key pair. Another key pair is then generated using the publicly available information. Of this pair, one will be used for proof and the other for verification.

  • Proving
    Receives a proof key and must prove his knowledge. It will receive and verify the private key and then send the application.

  • Inspector
    The verifier will receive data from the prover and verify the authenticity of the statement. The reviewer will not know anything other than the approval. If there is a task that needs to be brief, it should only take a few milliseconds to complete.

Options for using ZK-SNARK?

  • Messengers on the blockchain
    With the guarantee of a secure ZKP solution on the blockchain, it is possible to create a valuable messaging platform that is secure for anyone and everyone.

  • Next Generation File System Controls
    ZKPs can help add multiple layers of security to files and logins. As a result, ZKPs can create serious obstacles for hackers or manipulators to modify and obtain data.

  • Storage protection (MASP?)
    ZKPs include a security protocol with the information contained in the storage unit. Access channels have robust security measures that create a highly secure and uninterrupted environment.

  • Transfer of private blockchain transactions
    The most noticeable problem in private blockchain transactions is the numerous loopholes evident in normal procedures. Integrating ZKP with private transactions on the blockchain can create a powerful process that is secure from hackers.

  • Data Security Organizations
    Organizations that control sensitive data, such as banks and hospitals, must protect it from access by third parties. ZKP and blockchain together can make data access impossible.

Advantages of ZK-SNARK

  • Simplicity
    Simplicity in terms of use for ordinary blockchain users, you don't need to know what's under the hood, you just go.

  • Safety
    ZKPs are extremely secure when it comes to exchanging information.

  • Rapidity
    Reduce the time required for transactions on the blockchain.

  • Confidentiality
    Protecting user privacy is ZKP's most valuable feature. It never requires the exchange of sensitive data and is therefore overall highly private.

Application of ZK-SNARK

Namada uses secure transactions that do not reveal information about the amount and type of asset, as well as information about the recipient and sender.

For example, smart contracts based on ZK-SNARK allow banking and financial institutions to offer loans with insufficient collateral if the borrower has proven his creditworthiness. Borrowers can generate credentials based on records from authoritative sources without revealing sensitive personal or professional information.

Decentralized identity protocols based on ZKP, where users can obtain their information and credentials without relying on a third party. These credentials are signed by issuers who can authoritatively associate claims with users, including nationality, profession, education, etc.

The ability to monetize proprietary and confidential data sets to traditional institutions and data providers. Instead of publishing all the data in the chain, these service providers can use the confirmations received from the ZKP to confirm the facts about the data that will be published. This creates a new market for data providers to monetize and grow revenue from their data sets with zero leakage.

Conclusion

ZKPs have great development potential, including in the area of ​​maintaining user privacy, scaling and many other processes. Technologies using ZKP are very effective and this is clearly seen in the growing number of projects that use them in their stack. This includes Namada, a project focused on asset confidentiality in which zero-knowledge proofs play a big role.