ZK-Snark technology as the basis of Aleo
Greetings to all, we continue to explore and dive into privacy with Aleo and other private blockchains.
zk-Snark: First coined in 2012 at UC Berkeley by Alessandro Chiesa, zk-SNARKs use a mathematical concept known as elliptic curve bilinear pairing as the basis for their security. An important property of the zk-SNARK is the requirement for a secure installation. This process entails the generation of cryptographic keys, which are the evidence needed to verify and conduct private transactions. The hidden parameter links the verification key and the key that conducts transactions during key generation. At this stage, there is a possibility of a security breach. For example, if we assume that the secret associated with the keys is not destroyed at this stage, then it can be used to falsify the verification process and transactions, no one will know about the duplicitous nature of such transactions. Even though trusted installation only happens once in the process, it still causes concern for users. Another disadvantage of this security solution is its vulnerability to quantum computing. Once quantum computers become widely available, the security features introduced by zk-SNARKs will become invalid.
While SNARK has some distinct advantages over STARK in terms of documentation and developer support, STARK offers some unique advantages. But first, let’s dive a little deeper into what STARK is from a technical standpoint.
Eli Ben-Sasson, Iddo Bentov, Yinon Khoreshi and Michael Ryabzev wrote the first articles describing STARK in 2018, available at https://eprint.iacr.org/2018/046.pdf . Unlike SNARK, STARK’s underlying technology is based on hash functions. From the very beginning, the use of hash functions provides some advantages, such as quantum stability. In addition, no trusted configuration is required to start using STARK on the network.
That being said, STARKs have much larger evidence sizes than SNARKs, which means that STARKs take longer to check than SNARKs and also causes STARKs to require more gas.
In addition, it will be much more difficult for developers to use STARK due to the lack of developer and community documentation. Although there are some projects creating STARK-based scaling solutions such as STARKWARE , the SNARKs community is still much larger.
While both developer communities support both SNARK and STARK, the Ethereum Foundation in particular actively supports STARKware, which uses Starks. In fact, the Ethereum Foundation gave STARKware a $12 million grant , which clearly demonstrates their commitment to new technologies.
Also, although the documentation for STARK pales in comparison to SNARK.
zk-SNARK vs zk-STARK: similarities and differences
Similarities. zk-SNARK and zk-STARK have several things in common.
- These are non-interactive zero-knowledge proof protocols that require little interaction between the prover and the verifier. Generation, sending and verification of evidence are usually performed within a single transaction.
- Both protocols increase the scalability of the blockchain. Zero-knowledge proofs are much smaller than the average bitcoin transaction and are much faster to verify. Faster validation and fewer blocks means more scalability for networks like Ethereum.
Differences. zk-SNARK and zk-STARK differ in at least four main ways:
Transparency. zk-SNARK needs an initial trusted setup to generate the randomness needed to generate zero-knowledge proofs. These settings are usually kept by a small group for their protection. If the parameters fall into the wrong hands, unscrupulous participants can use them to create false evidence.
zk-STARK take a different approach, using collision-resistant cryptography to eliminate the need for private parameter generation ceremonies. Without trusted settings, the randomness generation parameters are public, which limits centralization and increases transparency.
Safety. zk-SNARKs use an initial setup to generate parameters and, according to their setup, are computationally robust. However, their computational consistency suggests that the proofers have limited computational power. However, when the verifier uses an unlimited amount of computing power, he can break the system and create fake evidence. Thus, zk-SNARKs are theoretically vulnerable to quantum computing attacks.
zk-STARK does not need an initial trusted setup, opting for a collision-resistant approach instead. Thus, they are not computationally intensive like zk-SNARKs, eliminating the threat of being compromised by the unlimited processing power of quantum computing.
Scalability. zk-SNARKs are smaller in bytes than zk-STARKs, but their computational needs make them slower in proof generation than zk-STARKs. zk-SNARKs consume less gas than zk-STARKs and check evidence faster due to the difference in byte size.
While zk-SNARKs may appear to be more scalable due to faster proof checking, zk-STARKs generate proofs faster and scale faster, consuming less gas when entering the chain through the use of computation and off-chain storage. However, during periods of low throughput (little evidence is generated), verification of zk-STARKs evidence takes much longer.
Structure. zk-SNARKs are built on elliptic curves that enhance security and privacy, based on the assumption that finding the logarithm of a random element of an elliptic curve with respect to a public base point is not possible.
zk-STARK, on the other hand, uses frugal cryptography — collision-resistant hash functions — to provide scalability and security.
Aleo is the first open source decentralized platform that allows both private and programmable applications.
At its core, Aleo uses Zero Knowledge Proof (ZKP), a cryptographic technique that proves a statement or fact without revealing what makes it true.
The Aleo platform provides end-to-end tools that enable you to develop, deploy, and resiliency privacy-preserving applications. With Aleo, apps and user interactions are private by default.
Aleo’s custom zero-knowledge solution, Zexe, supports full programmability and privacy. Just as importantly, Aleo ensures privacy by ensuring that the ultimate control rests with the user, who can choose what information they want to make public. Aleo allows network members to interact on the public network with complete privacy without sacrificing any degree of performance or power that decentralized networks provide.
In ZEXE, users perform state transitions offline. This process creates a proof that is combined into a transaction on the network. This transaction updates the state of the system by using or creating entries on the chain. Like Zcash, this system provides stronger privacy guarantees because transactions only contain proof, not the input that generated it. And like Ethereum, ZEXE can support smart contracts that allow users to interact or pass values in a predetermined way. You can read more about ZEXE in the article
What is the advantage of switching Aleo to POS?
POS will ensure block accuracy, i.e. once a block is created, it will not come back. In this way, the best experience for application users will be provided. Because he won’t have to wait more than one block to think the transactions are final.
Compatibility with other blockchains will become much easier.
Some issues with decentralization will be resolved.
Aleo moves to PoS mechanism, but the team retains the PoSW mechanism, Aleo network blocks will no longer be based on PoSW.
Normally, only a validator can receive a block reward in a PoS network, but the team has made a change: a portion of the block reward will be given to the verifier, so although Aleo has moved to PoS, the verifier can still be rewarded.
There are two main advantages of the PoS method: efficiency and energy savings. Efficiency means faster transactions, finalization, and better scalability. Finalization is the moment when a transaction is permanently entered into the blockchain.
It is often argued that the disadvantage of PoS is the lack of decentralization, in which large holders of tokens control their bulk and can influence the network.
I want to highlight that Aleo provides zero-knowledge programming tools:
- Leo programming language . To write private applications on Aleo was intuitive and easy. Leo looks and works like a traditional programming language. Leo abstracts away low-level cryptographic concepts and makes it easy to integrate private applications into your stack. Leo introduces a high-level syntax that makes it easy to write and intuitively express zero-knowledge logic. The Leo language has been influenced by traditional programming languages such as JavaScript, Scala and Rust with a focus on readability and ease of use. Leo converts high-level developer code into zero-knowledge schemas.
- Aleo studio. To speed up the development cycle, we created Aleo Studio, the first IDE for writing zero-knowledge applications. Aleo Studio is an interactive development environment for writing zero-knowledge applications on Leo. Aleo Studio is designed for developers to streamline the development cycle and make it easy to publish your Leo project as a package in the ecosystem.
- Aleo Package Manager. To make it easier to combine and share your work, we’ve created a package manager for Leo. Aleo Package Manager is the first package manager for zero-knowledge circuits. It includes collaboration features such as teams and organizations that make it easy to work with friends and colleagues on private apps. In addition, Aleo Package Manager is integrated with Aleo Studio, making it easy to import and publish new packages without leaving the editor.
- snarkOS — Aleo runs on a decentralized operating system for private applications called snarkOS. It forms the logical basis for state transitions and allows applications to validate and store state on the Aleo blockchain in a publicly verifiable manner. snarkOS guarantees the availability of data on Aleo for all programs and transactions. Moreover, the consensus mechanism ensures that verifiers compute zero-knowledge proofs for the checkpoint state in the chain.
| Website ~ https://www.aleo.org/
| Twitter ~ https://twitter.com/AleoHQ
| Community Twitter ~ https://twitter.com/aleocommunity
| GitHub ~ https://github.com/AleoHQ
| Community Forum - https://community.aleo.org/
| Community Calendar ~ https://www.aleo.org/community/calendar
| YouTube - https://www.youtube.com/channel/UCS_HKT2heOC_q88YQLiJt0g
| Developer Documentation ~ https://developer.aleo.org/
| Leo Playground ~ https://play.leo-lang.org/
| Aleo Block Explorer ~ https://www.aleo.network/
| Community Blog ~ https://medium.com/@AleoHQ
| Announcements Blog ~ https://www.aleo.org/blog