Protocols zk-SNARKs and zk-STARKs
The modern Internet provides us with many benefits from which we can benefit, but our privacy is nevertheless at risk. This is especially true for cryptocurrencies that are focused on the financial market and offer the implementation of cash transactions.
In Blockchain technology, operations do not require a trusted third party, but such an approach can also lead to the loss or theft of our digital property. To prevent such problems, cryptographic security technologies such as zk-SNARKs and zk-STARKs were created.
Zk-SNARKs (Zero-Knowledge Succinct Non-Interactive ARgument of Knowledge) is the first zero-knowledge proof technology, and zk-STARKs (Zero-Knowledge Scalable Transparent ARguments of Knowledge) is a more advanced version. These arguments of knowledge can be briefly described as follows:
‘The examiner knows some personal information that satisfies some public function.’ This type of cryptographic protection technology is scalable transparent knowledge knowledge with zero knowledge, which allows users to exchange verified data or perform calculations with a third party, without providing data or calculations to a third party.
Simply put, a zero-knowledge proof can prove that something is true without revealing what it proves. For example, ZKs allow A to verify bank information B using cryptographic evidence with zero disclosure, instead of revealing confidential information A.
Features of evidence with zero disclosure
- Completeness. The examiner can verify the accuracy of the data.
- Validity. If the informant is lying, the examiner will find out.
- Zero knowledge. If the statement is true, the verifier will know nothing but the fact that the statement is true.
- Summary. The size of the evidence should be small enough to be verified in a few milliseconds.
- Non-interactive. Only one set of information is sent to the verifier for verification, so there is no feedback between the verifier and the verifier.
- Knowledge. Evidence cannot be built without access to a witness (personal input is needed to confirm the statement).
Differences between ZK-SNARK and ZK-STARK
A more developed version of zk-SNARKS is called zk-STARKs (transparent knowledge argument with zero knowledge). It was created by Eli-Ben Sasson, a professor at the Technion-Israel Institute of Technology. Zk-SNARKs use public key cryptography for security, which means they require more symmetric cryptography and collision-resistant hash functions.
Before the advent of ZK-STARK, ZK-SNARKs were used to create ZK-protected systems, but required the trusted party or parties to initially configure a ZK-protected system that made these trusted parties vulnerable, compromising the confidentiality of the entire system. ZK-STARK enhances this technology by eliminating the need for unreliable installation and offers a suite of solutions superior to zk-SNARK. The main differences between zk-SNARKS and zk-STARK:
- ZK-SNARK requires a trusted installation phase, while ZK-STARK uses publicly verifiable randomness to create reliable verifiable computing systems, which reduces the cost of time and money.
- ZK-STARKs are more scalable in terms of computational speed and size compared to ZK-SNARKs.
- ZK-SNARKs are vulnerable to attacks from quantum computers because of the cryptography they use. ZK-STARKs are currently quantum resistant.
- The complexity of the arithmetic scheme. In zk-SNARK and zk-STARK technologies, code is generated in a form that is broken down into circuits and computed. With increasing computational complexity, the zk-SNARK communication complexity also increases linearly. Zk-STARK develops in the opposite direction and grows slowly with increasing size of computations, which is a great advantage of zk-STARK compared to zk-SNARK.
- The complexity of the prover. Zk-STARK is 10 times faster than zk-SNARK.
- Verifier complexity. As the size of the computations increases, zk-STARK increases more slowly, but SNARK needs less time to confirm the proof. For example, up to 100 ms is required for STARK confirmation, and up to 10 ms for SNARK.
Another thing to keep in mind is that zk-SNARK is difficult to apply with the complexity of the evidence scale.
Scaling benefits of using STARK
STARKs solve two main two blockchain problems at once: scalability and confidentiality, although the current research conducted by StarkWare Industries primarily focuses on scalability and then confidentiality. STARKs improve scalability by allowing developers to move computing and storage off-chain.
Offline services will be able to generate STARK evidence that confirms the integrity of off-chain computing. This evidence is then put in a chain for any interested party to confirm the correctness of the calculations. Moving most of the computing work out of the chain using STARK allows the existing blockchain infrastructure to scale exponentially, while at the same time trusting the integrity of the calculations.