header-langage
简体中文
繁體中文
English
Scan to Download the APP
Partnered With:

How does Aleo protect data privacy? Introduction to its technology (1)

Read this article in 13 Minutes
Aleo is a privacy-oriented blockchain platform project. This article introduces its core technology.
Original Title: "Part I Aleo Technical Introduction (I)"
Original Source: AleoSwap powered by ZenoX Labs


1. Aleo Project Overview


Blockchain is a distributed system, and its data is open and transparent, which means anyone can view it. This also exposes users' privacy information. How to protect data privacy has become an urgent problem to be solved in the blockchain industry. Zerocash is a privacy transaction protocol based on Bitcoin's UTXO model, while Zether is a privacy transaction protocol based on Ethereum's account model. These protocols use zero-knowledge proof technology to some extent to protect the privacy of transaction data and achieve complete hiding of the sender, receiver, and transaction amount. However, these protocols cannot achieve privacy at the smart contract/function level.


Aleo is a privacy-oriented blockchain platform project that aims to provide highly private smart contracts and decentralized applications. By using cryptographic techniques such as zero-knowledge proofs, users are allowed to verify the validity and rationality of privacy data without revealing the original data. This means that the generation of off-chain zero-knowledge proofs is achieved, while the efficient verification of on-chain zero-knowledge proofs is implemented (the simplicity of transactions).


Aleo mainly includes the following major modules:


· Smart Contract: Similar to platforms like Ethereum, Aleo supports the development and execution of smart contracts. The difference is that Aleo's smart contracts focus on providing a higher level of privacy.


· Language: Aleo provides a programming language called Leo, designed specifically for privacy protection. The Aleo language enables developers to create privacy-preserving smart contracts while ensuring data integrity and protecting user data.


· Aleo instructions: Aleo provides a set of instructions that offer developers an easy-to-use environment to write programs that support privacy and integrity.


2. account model


Similar to Ethereum accounts, Aleo accounts are used to manage users' private keys, which can be derived into public keys/addresses. As the name suggests, public keys/addresses can be made public, allowing users to transact with others. With the private key, users can access and control their funds. Therefore, the security of the private key is particularly important. Once lost, all control over the account's funds is lost as well.


The role of an account is to perform signature and encryption operations. Aleo's account mainly consists of privateKey, viewKey, and address. The following diagram shows the relationship between the account keys.



2.1 privateKey


Aleo privateKey represents the user's unique identity. Its main function in Aleo is to


· Derive Public Key


· Participate in transaction signing, which authorizes the execution of a transaction with zero-knowledge proof.


· Participate in certain cryptographic algorithm operations.


privateKey mainly consists of three parts:



2.2 computeKey


Computed from the private key, where G is the generator of the elliptic curve group. This will not be discussed in detail here. computeKey is part of the signature structure and can represent the generation and verification of a user's signature for a transaction. See section 2.6 for more details.



2.3 viewKey


The viewKey of Aleo account is calculated by PrivateKey, which is mainly used to encrypt/decrypt the input/output data of transactions on the Aleo chain. For more information, please refer to the Record model.



2.4 Address


In Aleo, the address is the user's unique public identity. It is used to receive/send official tokens (Aleo credits) and can interact with other users or applications. There are several ways to calculate the address:



2.5 graphKey



2.6 Signature Algorithm


When users interact with each other, they need to confirm the identity of the sender. The purpose of signing is to confirm the identity of the message sender and the integrity of the message content. Therefore, Aleo introduces the Schnorr signature algorithm for signing transactions.



Generally, signature algorithms mainly include four algorithms.



2.7 Encryption Storage of Private Keys


Similar to mnemonic phrases, private keys are crucial to users as they grant absolute control over their accounts. Once lost, they cannot be recovered. According to Aleo's private key derivation algorithm, we have found that the seed is extremely important. The core of the privateKey lies in this random seed. Once we have the seed, we can fully generate the account's $$sk_{sig},r_{sig}$$.


Usually, when creating an account, the generated private key is stored locally. For security reasons, the private key needs to be encrypted when stored. The specific algorithm is shown in the figure. The core idea is to introduce randomness to hide/blind seed, and then introduce PRF deterministic generation of multiple random numbers, and further randomize/encrypt each element on each plaintext field/field.



3. Record Model



In a transaction, there can be many inputs and outputs, and these inputs and outputs can be of the record type. Records are private by default, meaning they are encrypted. Aleo records are similar to UTXOs. If a record is used as an input for a function, it means that the record will be consumed and cannot be used again. Its unique identifier, the serial number (sn), will be made public. In most cases, the output of a function will create new records.


3.1 Record Plain Text Fields



























4.1 Program





















· transfer_private_to_public: Implements the function of transferring funds from a private sender to a public receiver. For example, if user1 spends their two records, record3 and record4, and transfers funds to the public user3, the state of user3 will be recorded using the mapping account since user3 is a public user.



· transfer_public: Fully transparent trading.



· transfer_public_to_private: Implements the function of transferring funds from a public sender to a private receiver.




Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit