0

I want to make an open source "Basket In" software (the concept from GTD) so I can quickly capture offline text, voice and pics on the go, then get them synced on all my devices to sort them out the next morning.

However, I don't want the server to know what I, or any user really, is capturing, so I will encrypt it on the client side.

The problem is, I also want to provide a Web API, so that people can write their own client for it.

The server, however, can only send encrypted data to new clients. How do I solve this problem? Do I just share the encryption key with each client, including 3rd party site? What if a user suddenly distrust a client? Do I need to encrypt again the whole content with a new key?

Bite code
  • 578,959
  • 113
  • 301
  • 329
  • 1
    I'm afraid that your use case model isn't all that clear to me. Are you trying to share data from a single user to other users? If so, how do they authenticate and get permission? And as this doesn't include so much programming as system design, it might be better asked at [IT Security](https://security.stackexchange.com). – Maarten Bodewes Nov 25 '19 at 15:59
  • (API design comes after system design, and I am sure you haven't moved past that goalpost yet). – Maarten Bodewes Nov 25 '19 at 16:02
  • No, but imagine you want the service to integrate with slack, telegram, dynalist, rememberthelist, github, etc. Authentication and permissions are a solved problem: I setup openid connect, OAuth, whatever, and I can autorise the app to interact with it. The problem is, they can't read or write any content if they don't have the private key. – Bite code Nov 25 '19 at 16:19
  • If you split the problem into two: distrusting the server with plain data and providing access to the clients. In that case you can implement access conditions on the server and indeed share the decryption key(s) with the client (you may need to transport it yourself for a particular client that joins). You may need more than a single key, to maybe derive other keys from it, etc.. Designing a whole key management scheme is a bit much for an answer or comment though (but now you know the term at least). – Maarten Bodewes Nov 25 '19 at 16:33
  • Writing a long answer on a complicated topic is perfectly ok on SO. I should know, I'm semi famous for being the first having reached the char limit with one of mine. Probably https://stackoverflow.com/a/6581949/9951 or the one on decorators. Anyway, if we can't have those geeky talks on SO, where are we gonna have them :) – Bite code Nov 25 '19 at 18:01

0 Answers0