I would like one user to store a file that will only be readable by some different user.
I see that I can use the options.encrypt parameter of putFile to specify an arbitrary public key to encrypt the file contents with (http://blockstack.github.io/blockstack.js/index.html#putfile) but is there an API that I can use to lookup public keys for a given username?
Currently, there is no define standard. It is discussed to publish the key in the user’s profile, similar to gaia bucket.
For now, you can write the public key into a file at a well-known location that is public readable. Once that is done, you can lookup the key using getfile with the user as parameter.
1 Like
Thanks, and yes that’s what I ended up doing. It would be nice if I could get a public key for an arbitrary user before they have even used my app though: I’m building a chat app and would like people to be able to invite a new user, then encrypt their first few messages to that user before they have followed the invite to my app.
– David.
1 Like