How do current applications on the Ethereum blockchain enforce confidentiality of data?

I know that the state of a contract is visible to any node on the network. Does this imply that there are no way of storing and enforcing confidential data on the blockchain?

Is the only way that applications can store and deliver confidential data to encrypt it under the public key of the receiver?


You are correct that the state of every address and contract is available to all nodes on the network. And you are correct in deducing that that means there is no way of storing or enforcing confidential data on the blockchain.

Because the blockchain is shared freely between all Ethereum nodes, necessarily the only way to keep information private on the blockchain is to encrypt it (or don't put it on the blockchain).

However all of that being said, the blockchain is really not the most efficient way of communicating data for data's sake - since a historical record of the blockchain is stored on each Ethereum node, space is at a premium. As of 2016, the cost of storing data in the Ethereum blockchain was approximately $76,000/GB.

To communicate small amounts of information, DApps can use the upcoming Ethereum Whisper protocol, or to host large amounts of information they can use the Ethereum Swarm network, possibly encrypting data using the receiver's key if it needs to be private.

But don't ever underestimate the utility of just having users communicate peer-to-peer the old-fashioned way, maybe including a state channel if they need to agree about the state of something trustlessly.

Your Answer

