Comparison of Common Blockchain Privacy Solutions

The goal of this post is to give an insight to blockchain privacy problems and reveal viable solutions to that particular privacy issue. To see the complete chart check conclusion section.

Author: Chris Slane
“Arguing that you don’t care about the right to privacy because you have nothing to hide is no different than saying you don’t care about free speech because you have nothing to say.”
– Edward Snowden

Politically speaking, the biggest issue with blockchains is privacy. Blockchains are public data structures, meaning everyone can see what is inside the data structures. We can achieve privacy by using a set of technologies.

Table of Contents

Deterministic Wallets

A deterministic wallet is a system of deriving keys from a single starting point known as a seed. The seed allows a user to easily back up and restore a wallet without needing any other information and can in some cases allow the creation of public addresses without the knowledge of the private key.

Deterministic wallets can generate an unlimited number of addresses on the fly. As the addresses are generated in a replicable way, some clients can be used on multiple devices without the risk of losing funds. Users can conveniently create a single backup of the seed in a human-readable format without the worry of this backup becoming stale.

The problem with deterministic wallets is that although they allow the creation of different public keys, their connection can be deduced. If a user has

  1. 10 BTC in address A
  2. and 5 BTC in address B,
  3. but needs to send 13 BTC,

the wallet will combine the two addresses, sending

  1. 10 BTC from address A,
  2. 3 BTC from address B,
  3. and 2 BTC as change to a new address C (which is again deterministically created).

This problem allows anyone looking carefully to find out that addresses A, B and C belong to the same user.

✓✓: Supports privacy | ✓: Support privacy to some degree | ✘: Does not support privacy

Pros

  • Protects the sender or receiver address.

Cons

  • Public keys created by deterministic wallets can be linked if enough data is present.

Stealth Addresses

Monero has a nice video explaining Stealth Addresses. It works as follows:

The receiver generates an address, a secret and then sends this address to someone who he wants payment from.

The sender uses the address and a nonce to generate the address he/she can send funds to.

Sender communicates the nonce to the receiver. By using this nonce and the secret key generated earlier, the receiver can unlock the address with the funds.

✓✓: Supports privacy | ✓: Support privacy to some degree | ✘: Does not support privacy

Pros

  • Protects the receiver address.
  • Unlike deterministic wallets, the receiver can publish a single address to receive payments.
  • 3rd parties can not know who the receiver is.

Cons

  • The sender can track which address he/she sent to and see how the what is done with the payment.

CoinJoin

How CoinJoin works

The goal of CoinJoin is to hide sender addresses. It makes it harder to map between inputs and outputs. However, CoinJoin has the same problem as deterministic wallets. With enough data, it might be possible to link between addresses.

✓✓: Supports privacy | ✓: Support privacy to some degree | ✘: Does not support privacy

Pros

  • Protects sender address, helps to obfuscate payment amount.

Cons

  • Sender addresses can be linked if enough data is present. It’s harder to link than deterministic wallets.
  • There needs to be a CoinJoin server which will know whose coins are joined. If a single party owns enough CoinJoin servers, they might be able to map the transactions accurately.
  • Others should be online and available to mix transactions.

Ring Signature Mixers

Monero has a nice video explaining Ring Signatures.

We can think of ring signature mixers as an improvement to CoinJoin. While CoinJoin needs a server who can see the coins before mixing, ring signature mixers do a similar task without the need for a server.

✓✓: Supports privacy | ✓: Support privacy to some degree | ✘: Does not support privacy

Pros

  • Protects sender address, helps to obfuscate payment amount
  • Unlike CoinJoin, doesn’t need anyone to be online. Mixing can be done locally.

Ring Confidential Transactions

Monero has a nice video explaining Ring CT.

To explain it in simple math terms Ring CT makes sure that

f(a)+f(b)=f(a+b)

where no one except the sender and receiver knows what a and b are. Even though this is not entirely correct, you get the basic idea.

For a complete explanation check out the paper.

✓✓: Supports privacy | ✓: Support privacy to some degree | ✘: Does not support privacy

Pros

  • Hides the payment amount.

Cons

  • Uses range proofs which is a slow cryptographic algorithm.

Zero-Knowledge Proof

I think zero-knowledge proofs are the most exciting technology overall. It’s hard to explain zero-knowledge proofs and it gets more complicated when we include different types such as interactive, non-interactive, zK-SNARKS and zK-STARKS.

The basic property of a zero-knowledge proof is that an entity can verify that they know the answer without revealing what they know using cryptography magic.

To get more information check out Wikipedia.

✓✓: Supports privacy | ✓: Support privacy to some degree | ✘: Does not support privacy

Pros

  • Protects the sender address, receiver address, payment amount and contract payload.

Cons

  • Uses range proofs, thus has similar computational overhead as Ring CT.

State Channels

State channels are private channels between two or more users. These users exchange the signed transactions between each other without broadcasting to the blockchain. Until an actor broadcasts the signed transactions, everything is private by default.

✓✓: Supports privacy | ✓: Support privacy to some degree | ✘: Does not support privacy

Pros

  • Can protect sender address, receiver address, payment amount and total transaction count.

Cons

  • The nodes need to be online.
  • Information is published when a channel is closed or an actor broadcasts.

Hiding IPs

The most common solution is Tor. There are other ways, such as using VPNs or I2P.

Solutions in Private Blockchains

In public blockchains, the system needs to be open thus more secure. Private blockchains do not have this problem. They make possible privacy solutions that public blockchains cannot.

Private Transactions

In Quorum and Hyperledger Fabric, it is possible to hide a smart contract and it’s payload from the ledger by using private transactions. Basically, when calling a contract, one can set who can see the transaction, and only those actors can run the smart contract. The transaction hash is then added to the ledger.

Channels

In Hyperledger Fabric, it is possible to use channels. A subset of users can have a private channel between them. Users outside of that channel cannot see any transactions inside the channel. A ledger can have multiple channels with different users in each of them.

Channels are more appropriate for use cases such as supply chains rather than payments.

Conclusion

✓✓: Supports privacy | ✓: Support privacy to some degree | ✘: Does not support privacy
With privacy, as we see, there is no such magic bullet.
– Vitalik Buterin

There are different technologies each solving different privacy problems. Some have UX overhead, whereas others have computational overheads. Even though there is no magic bullet to solve them all, we can still combine these solutions and achieve privacy to some degree.

Will these solutions be sufficient to protect our privacy and still be usable with their overheads? We don’t have an answer yet; however, we should try our best to keep our data as safe as possible.


If you enjoyed this post, you can follow me on twitter or reach out to me on thellimist.com.