The way to restrict data access on a blockchain is via encryption of that data, because by design every node has a copy of every piece of data. Even if we were to limit read access to unencrypted data through the MultiChain API, it would not provide genuine privacy, because the data itself is sitting on the node's hard disk drive.
Streams provide a natural way to support encrypted data on a blockchain, as follows: (taken from this blog post)
- One stream is used by participants to distribute their public keys for any public-key cryptography scheme.
- A second stream is used to publish data, where each piece of data is encrypted using symmetric cryptography with a unique key.
- A third stream provides data access. For each participant who should see a piece of data, a stream entry is created which contains that data’s secret key, encrypted using that participant’s public key.
This provides an efficient way to archive data on a blockchain, while making it visible only to certain participants.