matrix-org / matrix-js-sdk

Matrix Client-Server SDK for JavaScript
Apache License 2.0
1.55k stars 583 forks source link

How to enable to end-to-end encryption in react-native using the matrix-js-sdk? #2205

Open AbdullahQureshi1080 opened 2 years ago

AbdullahQureshi1080 commented 2 years ago

The sdk is working without encryption for react-native version v64.2 both on IOS and Android and a guide to making encryption work would be really awesome. The docs do not provide much support that could help with a minimal working example. Any help or support would be appreciated.

The only issue thread that offer some insight or makes some understanding is issue

dimitri-bourreau commented 2 years ago

@AbdullahQureshi1080 Hi! Have you figure out anything since your last post? Thanks!

AbdullahQureshi1080 commented 2 years ago

@AbdullahQureshi1080 Hi! Have you figure out anything since your last post? Thanks!

Hi, Not exactly how I want it, but have been able to make it work with using my client and element.io by creating a room through element on the homeserver and then enabling encryption from element and establishing connection but having issues with making it work with my two clients. Having issues with proper syncing of device ids, same account access on different devices, platforms and browser sessions.

Most common error is Unable to decrypt: The sender's device has not sent us the keys for this message

Using react native v0.64.2 matrix-js-sdk v12.0.0

AbdullahQureshi1080 commented 1 year ago

@dimitri-bourreau Hey, how's it going? Have you been able to achieve this for two separate clients?

dimitri-bourreau commented 1 year ago

@AbdullahQureshi1080 Hi! We dropped the encryption feature for now (I'm no longer working for this client, so I do not follow this).

AbdullahQureshi1080 commented 1 year ago

@dimitri-bourreau Okay that's understandable. Can you suggest some alternatives youve experimented with. That'd he helpful.

greynewell commented 6 months ago

I'm in the same boat. Nothing I've tried has worked for E2EE on react native, there's alwaus a missing Node or browser library at some point in the chain. Also had to drop the encryption feature.

nitesh-habilelabs commented 3 months ago

i am having issue with decryption and cross signing of device in my react native app. is there any update ? @AbdullahQureshi1080 @greynewell @dimitri-bourreau