-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Implement end-to-end encryption for Private Chat with NEAR MPC + Cloud API.
As now we have supported end-to-end encryption in Cloud API, we can implement the end-to-end encryption for any users who can safely manage their private key, e.g. with NEAR MPC if the user has a NEAR account.
The encrypted chat process for streaming
- The user logins with NEAR wallet;
- Request a private key with NEAR MPC;
- Encrypt content with model's public key, and call Responses API with the user's public key in header;
- Decrypt the received chunk with user's private key.
Remaining issues:
- For loading the conversations, some changes will be required in cloud-api for storing the conversations. Now all the encrypted chunks are concatenated with no easy way to distinguish each chunk, making it hard to decrypt the messages by the user.
- Another solution is decrypting each chunk at frontend, encrypting the concatenated message and inserting the whole message (conversation item) back into the conversation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request