Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] is it possible to implement end-to-end encryption with anycable? #209

Open
0xMostafa opened this issue Oct 17, 2024 · 1 comment

Comments

@0xMostafa
Copy link

I'm evaluating anycable for a new project that requires end to end encryption of chats.

Is it possible to implement end to end encryption with anycable?

@palkan
Copy link
Member

palkan commented Oct 17, 2024

Yes, that should be possible. We don't have anything built-in for that (yet), but all you need from AnyCable is a transport, the actual logic (keys exchange, encrypting/decrypting messages) can be implemented independently.

The way I thought about this is as follows:

  • A dedicated channel (channel class + unique identifiers) is created for participating peers and is used to exchange public keys. Probably, special message types must be added to manage keys. So, it could be a protocol extension.

  • Clients responsible for storing keys; there, probably, must be some key recovery mechanism.

  • A custom encoder is implemented at the client side (anycable JS SDK) to make encryption/decryption transparent to the user application; that is, your code doesn't really care about encryption.

So, the data flowing through AnyCable is encrypted (and, probably, base64 encoded, since the protocol is text-based), clients can decrypt it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants