Proof Systems zkSNARKs

About Scalability

For the new generation of users of blockchain platforms, in particular Ethereum, it is probably difficult to imagine the period ten years ago, when few people knew anything about cryptocurrency and when the number of its adherents was easily quantifiable. Naturally, the first steps of both this platform and other blockchain networks did not give rise to problems related to the load on them. However, as Ethereum developed, it came to not only a significant increase in its popularity, but also a serious problem associated with scalability. In search of a solution to this problem, developers considered and tried to implement a variety of options and approaches. The optimal way out of the impasse at that and this moment became a model which uses the L2 solution in the network. The proposed model involves the creation of an auxiliary blockchain layer above the main one. Due to the two-level approach, the speed of transactions significantly increases without reducing security requirements. In turn, the L2 solution received its own technology – Rollups, which became a practical tool for improving scalability. Based on this, we can say that today the most optimal way to speed up transaction processing has been found. The demand for the use of Rollups tools is growing, which means that the demand for rollups as a service for launching these tools is also growing.

Touching upon issues related to the scalability and security of blockchain networks, we cannot ignore the so-called proof systems, which are built using a group of mathematical algorithms called zkSNARKs (more details). It is no secret that cryptography as a science existed even before the advent of blockchain, but at that time it was more of an academic rather than an applied tool. Most often, cryptography was used in the military sector, a little on the Internet, but most people did not understand where and in what capacity it could be effectively applied. The arrival of blockchain technology in the web sector has changed the situation dramatically, and now cryptography has become an integral part of decentralized network processes. And the hottest topic in modern cryptography has become the zero-knowledge direction, including the zkSNARKs family of algorithms.

Example of zkSNARK Protocol Operation

It will be useful to consider how the zero-knowledge protocol – zkSNARK works using the Zcash blockchain network as an example. Let’s assume that two participants A and B use the network for the purpose of interaction, and B has some secret asset. Since the zero-knowledge protocol is a non-interactive protocol, then, in principle, A and B may not communicate with each other in the process of proving that B really has this secret asset. Since there is no communication between A and B, some trusted third party must exist on the network to generate this proof. The proof process is controlled by a C program that takes two data values as input – public and private, and returns one of two other data values as output – true or fake. The output value true can only be when the input values public and private match each other. In this case, the private value of the data will be the secret asset that B holds. In the blockchain, any data that forms a block is protected by its hash function, which represents public information. Participant B can distribute information about the hash without revealing the secret of his asset. Participant A, knowing the hash value, wants, in turn, to make sure that B’s secret asset was not invented by him, but actually exists. The zkSNARK protocol exists to implement this task. The zkSNARK protocol consists of 3 algorithms (source).

The first algorithm of the protocol is the G (Generator) algorithm, which is a trusted third party`s tool. At the input of algorithm G there is the program C and a special secret parameter “lambda”. “Lambda” is a parameter that should not be known to any of the network participants. It is “lambda” that is the basis for generating two main keys – proof key (pk) and verification key (vk). These keys are formed at the output of algorithm G, with key pk going to the input to participant B and key vk going to the input to participant A.

The second algorithm of the protocol is the P (Proofer) algorithm, which works on the side of participant B and receives three data values as input: pk, public data and private data. The output of the algorithm P is the very proof that is necessary to confirm the existence of a secret asset.

The third algorithm of the protocol is the V (Verifier) algorithm, which works on the side of participant A, and also receives three data values as input: vk, public data and proof. Algorithm V must output one of two data values: true or fake. And this result will be the final decision of the zkSNARK protocol.

This example demonstrates an obvious problem with the zkSNARK protocol in the Zcash blockchain network, when, in order to maintain anonymity, the developers partially abandoned the principle of decentralization by creating a third trusted party, which itself generates the secret key “lambda”.