Encrypted data accessible to certain users

Not trying to copy bitpatron’s code but I am a bit curious from an engineering perspective on how an individual is able to encrypt/decrypt files and give “access” to subscribers to certain content. (As in decrypt privileges to other user’s files)

From my understanding, if a file is encrypted via { encrypt: true } it will encrypt the data but only YOU as the user has access to decrypt it.

But it seems like this file-key pair can allow some flexibility/workaround for it but having a hard time wrapping my head around it. (shown below)

Ideally I would love to build something similar on debut and only show limited content to “close friends” but as of right now I am currently keeping everything decrypted.

Would love some thoughts or input!


You can also encrypt a file given a certain key of choice but given that when a user unsubscribes you might need to rotate keys. I would suggest you to take a look at Radiks.

It’s definitely possible to achieve that task via radiks but I’m not sure if it solves the encryption decryption aspect of it.

I think my post is somewhat related to this. Multiplayer access -- Sharing with the public vs. just trusted users?

Looks like there was some discussions about extending the putFile api via

{ encrypt: ['id1', 'id2', 'id3'] } etc but not sure if it lost steam

Bitpatron’s code is different than the usual scenario (including in Radiks), because you get access to their private files as soon as you do a payment. To do that, my assumption is that the Bitpatron server has access to the private key for that Bitpatron ‘group’, so they can give access the the new user immediately. I’d love to hear if I’m right or any more details about it.

@kkomaz.id, to do this in Debut, I’d recommend creating a Radiks ‘UserGroup’ for a group of close friends. The user that is doing the posting would have to create a UserGroup, and then save their ‘close friends’ posts to be associated with that user group.

1 Like

@hank I assume this in reference to the radik’s documentation of “Collaboration”? Thanks! This will be a good resource :slight_smile: