Enable E2EE from start

Hey there! I love Jitsi Meet and especially its end-to-end-encryption. However, is there any way to enable E2EE so that all conferences automatically use it? I’m not afraid of some “hacking” and editing the source code, so I am open for any ideas you have.

1 Like

I have the same question. Where in the source code can we change this?

Thanks

Isn’t it the case that the clients need to be able and set to support it, so the “automatically” idea won’t work. Under chrome://flags “Experimental Web Platform features” has to be activated, and that has to be done by the user.

This is actually no longer necessary, but you’re right in your first point: not all browsers support E2E, so enabling by default would be a misnomer.

I can confirm that Insertable Streams in Chrome are now enabled by default. No need to do anything.

Obviously most browsers that aren’t Chrome/Chromium/Opera based still don’t have support for Insertable Streams, and so they wouldn’t work with E2EE. However, that can be dealt with if you host your own server and only allow E2EE compatible broswers to join. So the question remains unanswered. Can someone point to where in the code we can enable E2EE by default?

Thanks

True.

However, I am setting up a private browser for my employer and everbody is using Chrome. So in my specific scenario, browser support is no issue (because - as pdarcos has already pointed out - insertable streams are enabled by default in chrome now).
So now I just have to figure out how to enable E2EE automatically. I tried enabling E2EE with toggleE2EE(true) in the handleConnectionEstablished function in conference.js. However, it seems like enabling E2EE at this point is too early as E2EE doesn’t work with this modification. The E2EE toggle indicates that E2EE is on but the green lock doesn’t show and when I manually disable and re-enable E2EE as another participant i can not decrypt the E2EE-encrypted stream.

I have tried manually adding toggleE2EE(true) to the source code at various other locations but I have always experienced the same problem. It seems that I am always firing the toggleE2EE event too soon.

So how can I automatically enable E2EE. Where exactly do I have to modify the source code. I have actually spent a couple of hours looking for a solution but didn’t find any :frowning:

1 Like

Good question. Tagging @saghul hoping he can point us in the right direction.

Doing it when CONFERENCE_JOINED is fired will work, but it might be a bit too late, some bits may fly unencrypted. We’d need to bake this in I think. If selected you’d always start muted (audio / video) and those options would be disabled until E2EE is enabled.

A workaround would be to modify your deployment to do that. Configure it to start with audio and video muted and toggle E2EE on after CONFERENCE_JOINED is emitted.

Thanks for your answer. I tried adding APP.store.dispatch(toggleE2EE(true)) in the part of the constructor of ConferenceConnector in conference.js that handles the CONFERENCE_JOINED event. However, E2EE didn’t properly turn on. Would you mind pointing out where exactly(what file and which line) I have to add toggleE2EE(true) in order to enable it automatically at the start?

That should have worked. What error do you see?


I have added the call to toggleE2EE(true) in the constructor of ConferenceConnector. The screenshot shows where exactly I modified the source code (I added line 280). (just btw, I properly imported toggleE2EE with import { toggleE2EE } from "./react/features/e2ee/actions";)

However, when I now enter a room, E2EE doesn’t work. The green E2EE icon is shown but I can only see the random noise that appears when you don’t have E2EE on.

Did I maybe call toggleE2EE at the wrong spot?

Do you see any errors in the JS console?

Hello, Is it already possible to activate E2E encryption from the beginning of the conversation. By code tweaking as shown above for example. To get the app approved, we need this functionality. Even if we have to exclude some browsers. If not, we will no be allowed to use Jitsi anymore … Any help would be appreciated a lot!! Thx.

You should be able to do it with that piece of code, yes.

OK, thx, we will try to do so!

@saghul, is it possible to enable E2EE from start when installing jitsi using docker?

No, this is not yet possible.

Hi, where can I find conference.js file in my self hosted jitsi?

That is bundled in libs/app.bundle … You can checkout the code from GitHub and then you will have it

Thanks, I will probably move to my own git repository in order to be able to customize everything :slight_smile: