Event data in Offen is encrypted before leaving the user’s browser and will also be stored like this at rest. Decryption only happens on the client side. In order to share data between users and operators the following cryptographic entities will be used:
Each account owns a unique RSA keypair. The public key can be accessed by anyone that knows about the account’s
AccountId. This way users can encrypt secrets and make them available to certain accounts only.
Before a user sends data to an instance of Offen for the first time, the following procedure which roughly resembles a PGP exchange will happen:
- in the client, a random symmetric
UserSecretwill be created and persisted locally
- the account’s public key will be used to encrypt the
EncryptedUserSecretis sent to the server and associated with a hashed version of the client’s user id, thus enabling the operator to generate a decrypted
- event data is encrypted using the
UserSecretand sent to the server
Users can decrypt any event they sent using their local version of the respective
Operators can decrypt all events belonging to their account by decrypting the encrypted
UserSecrets and then decrypting the event payloads using these secrets.