zk-SNARKs vs. zt-STARKs: The Next Level of Privacy

Applicature
Applicature
Published in
8 min readOct 2, 2018

Blockchain Secures the Data

The appearance of blockchain technology on the market has taken us to the point where any transaction may be performed without a third party, such as a bank or dealer. All nodes become their own blockchain-access service providers. Moreover, the ledger is distributed over the nodes. By trusting the data as the intermediary, however, we literally put it under the threat of being lost, stolen, or hacked, which may result in awful consequences for all parties.

Let’s consider a transaction between nodes A and B. A wants to transfer a certain amount of money to B. With blockchain technology, the money goes directly from node A to node B, involving no intermediaries. When the block has been executed, anyone in the network can see that A paid B the amount of money mentioned in the block. The transparent nature of blockchain is positioned as its biggest advantage, because now, the end customer can check the transaction history behind the product he or she is purchasing. But what if there is a huge corporation that requires the transaction to be included on the blockchain, but the sender and receiver must remain invisible due to confidentiality? How is blockchain going to comply with this requirement? Thankfully, this issue is no longer a problem.

Give it up for Zcash blockchain, which introduced Zero Knowledge Proof technology. Zcash is the first blockchain to solve the issue of confidential data on the public ledger. Now, the transaction can be encrypted while still remaining valid as it is added to the blockchain.

zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge) protocol provides the option of sender and receiver encryption. This means that the end customer of the supply chain will see the same full history, starting from the raw-materials origin and ending with the product purchase. The only thing he or she won’t be able to track are the attributes of encrypted transactions. However, these will become a part of the blockchain.

zk-SNARKs are based on Black2b cryptography for ring-signature verification. Its function requires parties to know a specific secret to verify its knowledge by one of the parties, and ring-signature verification is used as proof of that knowledge. For now, it is implemented only in Zcash, but could be implemented in Ethereum with a smart contract in Solidity. Key issues for implementation include the cost of Gas fees upon execution of the ring signatures.

Cryptoworld has made everything possible to allow business to flow more smoothly. Now that third parties have become unnecessary, the Ethereum blockchain has introduced smart contracts and their potential in the business sphere. One of the advantages of smart contracts is their self-execution. So, let’s consider that party A is doing business with a party B. A has to send money to B after it meets the conditions of the contract. As soon as B completes its part of agreement, a smart contract self-executes the transaction. However, there is some data that should be encrypted, and it can be tracked only by the sender and receiver of the transaction. At this very moment, we involve zero-knowledge technology.

With the development and updating of this technology, zk-SNARKs has been created in response to the requirement that smart-contract logic be encrypted. As a result, we get zk-STARKs, which allows parties A and B to record the transaction on the blockchain but leave its participants, sum, and logic undefinable.

zk-STARKs technology requires the implementation of a trusted execution environment that is not limited by the scalability and latency of blockchain itself. This means that ZKP is the perfect solution for any DApp that involves machine learning or complex business-logic execution processes based upon computations. At the same time, proof of smart-contract execution and validity also requires a significant number of ring-signature verifications. It has no implementation in public blockchain like Ethereum, EOS, Stellar, NEM, NEO, etc. It’s worth mentioning that private blockchains also require encrypting transactions from internal shareholders. Even in one organization (side chain), there are different stakeholders. Let’s take a look at real business. For example, if there is a procurement process going, not all stakeholders should be aware of the procurement details. Still, trust should take place with proof verification. This is the simplest example of zk-SNARKs use.

On the other hand, projects like Mixin are based upon the connection of these types of blockchains and DApps to TEE. Secure API layers makes this a tool for zk-STARKs implementation.

Why Is zk-SNARKs Technology So Important for Data Security?

Before, in order to prove that you were a data owner, you had to type in a password. If the password matched the one in the system, you got in; if it didn’t, the system wouldn’t let you get through. This meant that the system stored your password. People continue to trust their keys to systems, even though they have a hallmark: soft spots that hackers can break through. This makes data vulnerable.

With zero-knowledge-proof technology, you don’t have to trust your password to the system, thereby putting your data under threat. You are able to prove that you are the data holder just saying, “I know the password,” so to speak.

zk-SNARKs Work Specifics

The aim of zero-knowledge-proof technology is for the verifier to make sure that the prover knows the secret parameter without mentioning what, exactly, it is.

To be more precise, imagine having a programme ©, that accepts two parameters (x and w). The x parameter is a public key, while only the real data holder knows the value of the w parameter (a secret parameter). Hence, for the system to be sure that the prover is honest, the following conditions should be met: c(x,w)= true.

Accepting that a hacker can find the w parameter by trying the c(x,w)= true algorithm until the w matches, the system checks the prover several times, so there is no possibility for fraud activities.

How zk-STARKs Differ From zk-SNARKs

No new technology is perfect in its first version. It is the same with zk-SNARKs. The next version of the same technology is zk-STARKs (Zero-Knowledge Succinct Transparent Argument of Knowledge).

In contrast to zk-SNARKs, zk-STARKs don’t require a trusted setup, and are generally less costly in terms of time and money. When it comes to specific differences between these two technologies, we can define four:

  • complexity of arithmetic circuit
  • complexity of communication
  • complexity of prover
  • Complexity of verifier

ZKP Technology Implementations on Blockchain

When it comes to the abilities blockchain provides us, we’ve got some controversial issues. Blockchain came on board as a breakthrough for transparent and fraud-free business. But what about privacy? That is exactly what ZKP fixes. To go deeper into how this technology can enhance blockchain, let’s check out some use cases.

Balance Proof

There is a man called Bob. He likes traveling a lot. The next country he is going to visit is the Czech Republic. Obviously, he needs to apply for a visa before going there. As we all know, one of the requirements of the visa office is proof of sufficient funds for the trip. So, Bob will have to go to his bank and request a statement proving that he has the money. The bank will prove that Bob has X amount of money in his bank account. Here, however, we are talking about a privacy issue. What if Bob doesn’t want the visa office to know how much money he owns? Or the bank to know about his expenses? What Bob needs is to be able to prove the state of his bank account without asking the bank to sign documents.

With Zero-Knowledge technology, the bank provides Bob with a signed statement that says: “Bob has X amount of money for today’s date.” Later, he will be able to use this to prove his payment capacity without mentioning how much money he has, exactly. It’s rather like saying: “I am Bob. I know my bank account balance, and it is equal to or greater than the minimum you require.” Sounds pretty secure, doesn’t it?

Voting

Everybody has participated in the voting process, whether it was during a presidential election, raising your hand in the classroom, or some other context. All forms of voting require personal verification. What if there were the possibility to make the voting process faster, capable of public verification, cheaper, and anonymous? It is possible with ZKPs.

With Zero-Knowledge proofs, people will be able to vote without fear of judgment. The only required thing will be saying, ”I am Bob, and I am participating in this voting process. I have made my decision.” Bob doesn’t need to uncover who or what he has chosen.

Companies Using ZKP Technology

Technology is developing faster than ever, and you’d better keep up to stay on board. ZKP has fixed privacy issues forever, and there are already some pioneers:

  • QED-it — an Israeli startup that integrated Zero Knowledge Proof technology to provide audits for financial institutions. QEDit service makes it possible to perform multi-party transactions with the ability to prove selected facts without revealing the underlying data.
  • NuCypher — an ICO project that works on proxy re-encryption. The idea behind it is as follows: if you have a confidential document you’d like to share with your co-worker, you have to give them your private key (NOT A GOOD IDEA). Instead, NuCypher suggests using an re-encrypted key towards somebody’s public key. In this case, you can share the data safely with the re-encrypted key, and your co-worker uses his or her private key to reach the data.
  • Nuggets is one more project that uses ZKP technology to encrypt information. The аNuggets team works on the idea of securing the data of online shops, as centralized databases tend to be an easy target to hit.

Say Yes to Privacy

Blockchain is definitely a remarkable technology that answers a lot of questions and provides a spectrum of opportunities. It makes business relationships trustworthy and eliminates fraud, but it can barely be used by parties that store confidential information in the ledger.

Issues of privacy have now been resolved with Zero-Knowledge-Proof technology. It enables nodes to prove the knowledge they have without sharing it. ZKPs allow us to secure vulnerable data and confidential statements. For sure, the list of its implementations could be endless with the further development of zk-STARKs.

If you have more questions about securing your data or implementing Zero-Knowledge technology on the blockchain, contact Applicature to guide you.

Be the first to know more: join Applicature’s Twitter and Telegram!

--

--

Applicature
Applicature

Applicature is a Venture Builder and Accelerator of Blockchain companies. Since 2017, we’ve helped more than 270 companies grow.