I'm looking to expand my blockchain ability to have off-chain channels between different participants (let's say more than 2 participants).
Only the participants of the channel could decrypt messages on the channel, so I need to share some secret between all of them, or somehow I can alter ring-signature/schnorr-ring-signature to encryption/decryption instead of signing signature. bottom line: anyone outside of the channel won't be able to decrypt the messages in the channel.
Some participants in the channel can write data into the channel, some can read (not all writers can read -> reading is more restrict than writing).
I want to allow participants to exchange data between them within the channel but only some of the participants can decrypt it. I'm thinking about something like hierarchical of encryptions. the point of it is to allow communication in all sorts of variations of the channel's members without opening a new channel that includes just the relevant members of the old channel.
- I have the address of each participant that I want to join.
- His address contains his public-key, so I can use it to share a secret or any data with him.
- Reading is restricted more than writing, I don't mind that people send messages to the channel and spam it, my concern is the ability to read sensitivity data, so if a member can write it doesn't mean he can read.
A couple of points regarding this broad question:
I know that I wrote here pretty broad question without any concrete details, so a specific implementation/solution will be impossible to come up with, but interstring thought, potential directions that I can examine will be appreciated.
The engineering solution is less important to me if it's strongly coupled with the crypto-solution that's fine but if not you can leave it out :)
I'm examining two approaches, one is with "central entity", let's say the first participate that creating the channel and the setup for it, generate the shared-key and invite other participants to the channel. The second approach is more decentralized, meaning anyone can create the channel, anyone can invite to the channel.
Approaches that I think of:
sharing a symmetric key with all the participants and that will be the encryption key of the channel.
Using asymmetric key schema for the different access levels to the channel: write-access -> public-key, read-access -> private-key
What I mean when I write "hierarchical of encryptions":
basically, think of PKI with encryption/decryption twist:
I generate a master key, let's call it level-A, then I derived from that key another key, let's call it level-B, then I derived from that key another key, let's call it level-C.
Now, I can encrypt something with the key from level-B and all level-B keys that derived from the same level-A key can decrypt it and the level-A key that used to create the level-B key that encrypted the data, level-C keys derived from the level-B key that encrypted the data can't decrypt.