paint-brush
How Ola Recognizes the Urgent Need for Robust Privacy Across the Blockchain Spaceby@sin7y
263 reads

How Ola Recognizes the Urgent Need for Robust Privacy Across the Blockchain Space

by Sin7YMarch 30th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In August 2022, the Office of Foreign Assets Control (OFAC) announced sanctions against Tornado Cash. OFAC’s sanctions cast a shadow on protocols aiming to achieve privacy on public blockchains. This led to discouragement in the market towards privacy and raised regulatory concerns. Ola, an Ethereum Layer 2 network that supports programmable privacy, still recognizes the urgent need for robust privacy across the blockchain space. This report aims to provide an update on the latest developments and news related to Ola and zero-knowledge cryptography, which has the potential to revolutionize the way we approach privacy and security in the digital age.
featured image - How Ola Recognizes the Urgent Need for Robust Privacy Across the Blockchain Space
Sin7Y HackerNoon profile picture


In August 2022, the Office of Foreign Assets Control (OFAC) announced sanctions against Tornado Cash, which directly cast a shadow on protocols aiming to achieve privacy on public blockchains. This led to discouragement in the market towards privacy and raised regulatory concerns. However, Ola, an Ethereum Layer 2 network that supports programmable privacy utilizing its ZK-ZKVM architecture, still recognizes the urgent need for robust privacy across the blockchain space.


Ola is not the first project dedicated to bringing privacy to blockchains, nor will it be the last. As a member of the blockchain community, Ola is committed to interpreting the privacy technologies used in most projects and the regulatory compliance issues involved in privacy transactions, in order to help the market understand privacy on top of public blockchains more comprehensively.

1. Why was Tornado Cash Banned?

The reason for Tornado Cash’s blacklisting by OFAC is obvious: its transactions can not be tracked. This has made Tornado Cash widely used for illegal activities.


The principle of privacy in Tornado Cash differs from that of Zcash, which is entirely based on ZK technology. Tornado Cash combines coin mixing and ZK technology, with coin mixing making transactions untraceable. As the coin-mixing pool grows larger, the chances of tracking it approach zero. ZK is only used to realize its own asset proof once the coin mixing is complete.


Therefore, Tornado Cash is called a haven for hackers and black money, as it is impossible to track the addresses to which non-performing assets are withdrawn after entering the mixing pool. This is also the underlying reason for Tornado Cash’s blacklisting. Many articles interpret the principle of coin-mixing in Tornado Cash, which readers can find for themselves.


In the following sections, we will explain how private transactions based solely on ZK technology can not only protect privacy but also allow transaction information to be reviewed and tracked when required (through the design of the view key).

2. Why do Blockchains Need Privacy?

Although blockchain technology provides anonymity to user identity, it does not offer privacy protection for data such as transaction volume. This leaves users vulnerable to revealing their real identity and intentions through behavior-based clustering analysis and other methods, which has led to various emerging fraud and attacks, such as front-running and replay attacks, causing significant losses to many users.


Furthermore, the lack of privacy on the blockchain limits its potential applications in real-world business scenarios. Without adequate privacy, the mainstream adoption of blockchain technology is unlikely. For instance, in financial infrastructure, if sensitive financial information such as users’ salaries or payments for services like healthcare is publicly viewable, potential users of blockchain-based payment systems may be hesitant to use them. The same goes for social networking services, decentralized lending protocols, philanthropic platforms, and any other cases where users value the privacy of their information.


Currently, privacy and data protection have become some of the most discussed and concerning issues in various industries, and data protection is now being legislated in many countries. Consequently, adding privacy protection features will become the future development trend of blockchain technology. Numerous cross-disciplinary and cross-industry giants are focusing on privacy and data protection.

3. Definition of Regulated Private Transactions

A blockchain transaction is primarily composed of sender information, transaction data (amount), and recipient information. Currently, blockchain transactions are open and transparent, allowing anyone to view and analyze transaction details at any time. Private transactions, on the other hand, use zero-knowledge technology and cryptography to conceal transaction information (sender information, transaction data, and recipient information) and protect user privacy.


The crackdown on Tornado Cash reveals the fact that the industry does require privacy, but it must be regulated, and private transaction information should be available if needed to enable tracking of private asset transfers. Zcash provides a good starting point for the privacy track, enabling both privacy and regulatory compliance. Zcash has published a separate article outlining the compliance of the project. Other ZK-based privacy projects like Ola, Aleo, Aztec, and the Manta network, which use similar privacy architectures to Zcash but with differences in programmability implementations, are on par with regulatory issues (See Design Principles of Private Transactions in Aleo and Zcash).

4. Implementation Principle of Private Transactions

There are four technical solutions for private transactions: CoinJoin (DASH), hidden address + ring signature (Monero), Mimblewimble (Litecoin), and zero-knowledge proof (Zcash). In this article, we will only focus on the principle of private transactions based on zero-knowledge technology.

4.1 Encryption Process of Private Transactions

A transaction typically consists of the sender address, the receiver address, and the transaction data (such as which method of the contract is called). In a private transaction, each of these three pieces of information is encrypted using various keys.


4.1.1 Introduction to the Key System

The key system is the basis for private transactions. The current key system of the latest version of Zcash is shown in Figure 1:


Figure 1: Zcash Key System (Orchard)


The key system contains a variety of keys for different purposes, the most important of which are the following:


  • sk: Spending key, used to derive other keys, similar to the private key in Bitcoin, must not be shared with others
  • ask: Spend authorizing key, used to generate the signature spendAuthSig of Spend transfer, must not be shared with others
  • (ak, nk, rivk): Full viewing key, used to view all transactions of the user, needs to be shared with the delegator to generate zkSNARK proof
    • ak: Spend validating key, used to verify the transfer signature spendAuthSig
    • nk: The recipient’s nullifier deriving key, used to generate the nullifier
    • rivk: Used to generate shielded payment addresses
  • (dk, ivk): Incoming viewing key, used to view all transactions sent to the user, privacy will be leaked after disclosure
    • dk: Diversifier key, used to generate diversified parameters in shielded payment addresses d
    • ivk: Private key in the key agreement scheme, used to generate the symmetric encryption key, and transmission key pkd
  • ovk: Outgoing viewing key, used to view transactions issued by all users, privacy will be leaked after disclosure
  • (d, pkd): Shielded payment address, used as the recipient’s address of the transaction, needs to be given to the sender

4.1.2 The UTXO Model

Zcash uses the Unspent Transaction Output (UTXO) model, similar to Bitcoin, and expands on Bitcoin’s transparent transfer mechanism. In Zcash, a user’s funds are stored in a data structure called a note, with each note representing a certain amount of ZEC tokens. To transfer funds, the sender selects some notes received in previous transactions, destroys them (by calculating and revealing their nullifiers), creates new notes (by revealing their note commitments), encrypts these new notes, and sends the ciphertexts to the blockchain. The recipient can then use their viewing key to decrypt the note ciphertexts and view the amount, while others are unable to access the plaintext of the notes.


The newly created note can be expressed as (d,pkd,v,ρ,ψ,rcm)


where:

  • (d, pkd): The owner address of the note, that is, the shielded payment address of the recipient
  • v: Value, i.e. the amount of ZEC tokens
  • (ρ,ψ): Two random numbers, used to generate a nullifier when the recipient consumes this note in the future
  • rcm: Used to check whether the note commitment is correct

4.1.3 Structure of Transactions


Zcash transactions comprise zero or more Action transfers, each of which is encoded into an Action description, representing a transfer that involves destroying an old note and creating a new one. Each Action description requires generating a proof, and the zero-knowledge proof algorithm is utilized to verify that the data is accurate. Eventually, all proofs are condensed into a final proof using the Halo2 algorithm and stored in the transaction.


The data contained in the Action description are the following:



rt, enableSpends, OutputSpends are three attributes that are the same for all Action transfers within a transaction, so they are actually stored in the body of the transaction, not in the Action description. π is the aggregate proof of all Action proofs stored in the transaction’s proofsOrchard field.

4.1.4 Process of Sending a Transaction


To initiate a transfer in Zcash, the sender needs to create a transaction that includes one or more Action descriptions. In order to encrypt the note plaintext, the sender generates an ephemeral key pair using the recipient’s shielded payment address (d, pkd) and derives a symmetric encryption key by combining the ephemeral private key and the recipient’s public key pkd. The encryption process can be outlined as follows:




  • If there is no real note spent in this Action description, you need to create a dummy note to spend, using the nullifier of the dummy note as ρ.
  • Randomize the order of Action descriptions
  • Send the transaction to the network

4.1.5 Hiding Sender Information

The sender generates an ephemeral key pair each time and generates a symmetric encryption key K^nec in the key agreement scheme, uses K^nec to encrypt the note plaintext, and does not use his own sk (spending key) or ask (spend authorizing key), so the sender’s information can be hidden.

4.1.6 Hiding Recipient Information

The recipient generates different new shielded payment addresses for different transactions, so the destination addresses in the transactions are different, and other users on the network can not decrypt the note ciphertext, nor can they see the recipient’s address, so the recipient’s information can be hidden.

4.1.7 Hiding the Transfer Amount

The transfer amount is stored in the note and encrypted by the sender using a symmetric encryption key, denoted as K^nec, to generate a ciphertext of the note. This means that besides the sender and receiver, other users on the network, including the validator, can only verify that the input amount and output amount in the transaction are balanced, but can not view the specific transfer amount. Therefore, the transfer amount can be hidden.

4.2 Decryption Process of Private Transactions


The recipient can use their incoming viewing key or full viewing key to decrypt the note ciphertext in the transaction. Additionally, the recipient can use the ephemeral public key stored by the sender in the transaction to generate the same symmetric encryption key K^nec as the sender. By using the decryption algorithm in the symmetric encryption scheme, the recipient can generate the note plaintext.

4.2.1 Decrypting Using an Incoming Viewing Key

The decryption process using an incoming viewing key is as follows:


4.2.2 Decrypting Using a Full Viewing Key

The decryption process using a full viewing key is as follows:



5. Compliance-Friendly Design in Ola

The purpose of private transactions in a blockchain setting is to address the issues of fraud, social engineering, asset theft by malicious actors as well as other attacks and manipulations of applications, all resulting from the complete transparency of current blockchains, as well as the potential risks associated with the exposure of sensitive financial data to third parties. It is essential to maintain regulatory and compliance standards to ensure the healthy development of the entire industry.


Ola has adopted a “view key” design that is friendly not only for developers and common users but also for regulatory compliance, as depicted in the figure below:




If you have any questions about regulatory compliance with private transactions, please feel free to contact us at <[email protected] >. Welcome to follow Ola’s official Twitter, join our Discord server, and get the latest updates from Ola!


About


This report aims to provide an update on the latest developments and news related to Ola and zero-knowledge cryptography, which has the potential to revolutionize the way we approach privacy and security in the digital age. We will continue to monitor and report on the latest developments in this field. Please write to [email protected] if you’d like to join or partner with us.