@aaron @hologram
I was trying to figure out this problem today and happened to stumble across this thread. Has there been any further discussion about the topic elsewhere? I have some questions and thoughts either way!
putFile('shared.json', {encrypted: [chase.id, jude.id, yknl.id]})
At first glance it seems like a method like this would end up creating multiple copies of the same file, one for each of the users. Am I missing something here?
Also, to encrypt the data for a specific user, it was mentioned that it would use a user’s ‘app-specific public-key’, I think the best approach would allow for a user to share data with someone who hasn’t yet signed into that specific application.
I have some (really rough) ideas for solving this problem in two parts:
Multiplayer Storage Permissions Application
Features:
- An application that all Blockstack users had enabled by default
- Create different permission sets that can be used by other applications:
- Public (unencrypted)
- Public only to signed in users
- Shared only with one profile
- Shared with many profiles
- To allow for easy sharing between many profiles, users should be able to create reusable and extensible lists of profiles.
- (Optional) Can read data from all applications
- Allows for editing the permissions of files used in other applications
This solution still however gets back to the question of, “How can we share keys to encrypt/decrypt data?”
I am unsure if the following makes sense, is safe, or is plausible:
- A user’s permissions are stored in a public file and is “unencrypted” and:
- Has a section dedicated to each permission set
- Under each permission set the shared public/private key is encrypted for each user using their ‘Multiplayer Storage Permissions Application’ public key
- Whenever a user makes a new permission set, create a new ECIES key pair and place it into the permissions file as stated above
A completely unencrypted file
brandonparee.id
{
permissionId: randomId,
publicKey,
privateKey
}
chase.id
{
permissionId: randomId,
publicKey,
privateKey
}
What the public file looks like
JUNK
JUNK
What the file looks like unencrypted to chase.id
STILL JUNK
chase.id
{
permissionId,
publicKey,
privateKey
}
Multiplayer Storage Permissions API
Features:
- Fetch all permissions defined by Multiplayer Storage Permissions application to allow users to encrypt files for a specific group
- Encrypt a file given a permissionId
- Decrypt a file given a permissionId
- Build into
getFile
?
- When
getFile
is used it will check through permissions granted by the owner of the file for a matching permissionId
- The permissionId might need to be stored in encrypted files as a new property
There is a bunch of little details missing, but hopefully its enough to start a conversation!