How Does Blockchain Deal With Privacy?
Discover how blockchain tackles the privacy dilemma. Learn about Anonymous State Pinning, a solution that combines the best of both worlds; transparency and privacy.
Co-authored with Mayra Munguia, Daniel Modesto, Jeffy Yu, and Charles Sheinin
TL;DR Summary
It’s a classic dilemma in Information Technology:
On one side, convenience and rich features.
On the other, security and stability.
While blockchain technology boasts transparency and trust by pairing mathematically-controlled auditability with unshakeable transactions, customers will always demand a certain degree of privacy. On public blockchains, everyone can see everything — and that’s the whole point, right? So how can a blockchain system balance both transparency and privacy at the same time?
🔎 Enter Anonymous State Pinning (ASP)
Anonymous State Pinning allows us to maintain a secure, private blockchain, which pins a hash of its current state to a public blockchain. This ensures that the transactional history of the private blockchain remains anonymous yet still verifiable on the public blockchain.
Put more simply, ASP works by attaching a special code representing information of the private blockchain to a public blockchain. This way, the private blockchain's transaction history stays anonymous, but we can still verify its trustworthiness using the public blockchain.
Let’s take a look at this diagram showing the state of the private blockchain being “pinned” to the public blockchain.
Table of Contents
Blockchain Basics
Typically, a blockchain is a public, transparent system of nodes that records transactions. For a public blockchain, anyone with a computer and internet connection can connect and use it to make transactions. Additionally, anyone can participate more directly by running their own node(s).
💡 Node: a device running the software of a specific blockchain. Nodes moderate a network and make sure that users play by the rules.
Building Blocks 🧱
When we talk about using a blockchain, the most basic interactions are:
- 📖 Reading from the history of transactions already recorded in the blockchain
- 📝 Writing new transactions to it
All new transactions that are to be added to a blockchain are sent to nodes for processing. When nodes receive transactions, they group them into “blocks”. The entire blockchain is made up of these blocks, which contain transactions. After building a new block, nodes need to propose it to the blockchain to process it.
When a node has a new block to propose, a random group of nodes votes on whether the block and its transactions are valid. If they agree, then that block is recorded on the blockchain. If not, then that block is not added to the blockchain.
Security Through Consensus
Here’s the theory: the more nodes you have in the blockchain network that all agree with one another, the more likely it is that every transaction written will be accurate and legitimate.
🗳️ If one or even just a few nodes try to propose a new incorrect or malicious transaction to the blockchain, the combined weight of every single other node, all of which agree with each other, will easily outmatch the wrong or malicious node. To overcome the difference in voting power, potential hackers would require more computing power than is likely to be worth the successful outcome of the malicious transaction.
However, companies make a tradeoff when they decide to use a public blockchain. While public blockchains boast security and transparency, they fall short in one area: privacy.
Private Blockchains
Companies often want to use blockchains in their business for the security and auditability benefits. However, they usually have information that needs to remain private as well as secure. Therefore a private blockchain may be better suited than a public blockchain.
Private blockchains are almost exactly the same as public blockchains:
- 🧱 Nodes process transactions into blocks
- ✔️ Nodes check with other nodes for consensus
- ➕ If consensus is reached, the blocks are added to the blockchain.
The differences lie in who controls the blockchain nodes, and also who can access those nodes. In a private blockchain the company has full control of both aspects. In the case where a company might use a private blockchain to drive an app or service that customers depend upon, the customers have no choice but to trust the information from the company and its blockchain.
📢 Public Blockchains: An open network system where all the devices can freely access without any kind of permission. The ledger is shared and transparent.
🔒 Private Blockchains: A user has to be permitted by the blockchain authority before accessing the network. The user might join only with an invitation.
Because of this condition, this system is not perfect, as control of the entire blockchain is in the hands of the few people that run the company. This means that the company could conceivably change the data in the private blockchain whenever they want, even in ways that may harm their customers.
What is Anonymous State Pinning?
In order to solve these problems, Anonymous State Pinning (ASP) comes in. ASP combines the security of public blockchains and the privacy of private blockchains into a single solution. All transactions are processed on the private blockchain. The information is later recorded on a public blockchain to guarantee accountability. The way ASP accomplishes this can be broken down into four concepts: State, Pinning, Voting and Anonymity.
State 🟢
For all blockchains, whenever a block is added to the blockchain, the state of the blockchain changes. The state represents the information in the blockchain at a specific point in time, like a snapshot. 📸 It is simply a hash that doesn’t reveal any of the actual information in the blockchain.
Every single transaction and block also has one of these hashes, starting from the very first transaction on the blockchain. Whenever a new transaction or block is added, its hash is mathematically generated based on the values of the previous transactions and blocks. This means that, whenever you look at any of these hashes, you are also looking at a specific, verifiable state for that blockchain.
Now that we have a collection of verifiable states of specific moments in time that we can capture from the private blockchain, we just need some neutral, unchangeable place to record them. This brings us to “pinning”.
Pinning 📍
“Pinning” is the term that refers to taking a snapshot of the private blockchain at any given moment in time, and recording that snapshot to a public blockchain.
Think of it like preserving an insect in amber (only much, much faster). Pinning preserves a verifiable state of the private blockchain to the public blockchain as a “pin”.
This is where the magic happens, because now:
- The private blockchain and its data are still kept private
- Anyone who wants to audit can simply compare the unique phrases to verify that the state is the same at a given moment of time
- The owner of the private blockchain doesn’t necessarily need to give access to all their data to an auditor, only to reveal that the latest hash matches on both chains
If at any time the latest pins on both blockchains do not match, this would be proof that the private blockchain’s history can’t be trusted.
What happens when there is no match and we suspect something has been changed? Enter voting.
Voting 🗳️
To provide a way for users to contest pins they believe are dishonest, a system of voting is put in place in ASP.
- When a pin is created and uploaded to the public blockchain, users of the system can contest it.
- Once a pin is contested, the users of ASP get together to vote on whether that pin is valid.
- If the majority agree that the pin should be contested, the information in the pin is deleted.
Anonymity 🕶️
So all of this is well and good: we have privacy, we have accountability; but how do we actually make the pins in such a way that all of these concepts work? After all, when someone reports a transaction to the public blockchain, everyone can see their wallet, track their activities, etc.
To solve this without revealing all the users of the private blockchain, a single private blockchain representative is chosen to create and upload the pins from there to the public blockchain. The chosen representative can only read the private blockchain, but not write to it. Also, their identity must be publicly known to write to the public blockchain. Meanwhile, everyone else who does write to the private blockchain can remain anonymous to the public blockchain.
Additionally, ASP is not limited to just using one private blockchain. If the company has multiple private blockchains, one representative could be creating pins for all of them. In conclusion, all pins produced from ASP can be trusted by everyone while keeping the users and underlying information anonymous.
The State of The Future
Anonymous State Pinning utilizes both a public blockchain and a private blockchain to let customers check the correctness of their transactions without actually seeing the details of it.
At Paystand, Anonymous State Pinning is implemented to maintain a decentralized, confirmable B2B payments history. Partnering companies using the system generate a pinned state of their transactions for verification. In this way, businesses are provided transparency and privacy in a single blockchain solution.