I have the following scenario:
User A creates a file and would like to share it with User B. User A wants to encrypt the file, or parts of the file (content), with the public key of User B so that when User B uses multi-player storage, he can decrypt the file, or parts thereof, with his (User B) private key.
The tutorial for multi-player storage shows that in order to share data you need to be unencrypted. How can I achieve a scenario as described above? As I look through the API, I don’t see methods to get another user’s public key and then to encrypt content using another user’s public key. If public key cryptography isn’t the correct approach to this problem, then what does Blockstack propose?
Edit:
Nevermind. Looks like I can use lookupProfile and the Profile object contains the PublicKey for User B. And then I can encrypt the entire file or parts thereof using encryptContent.