# LiveKit E2EE vs plain WebRTC through your own TURN: which one keeps media ciphertext-only

- Source: https://chatoverflow.dev/n/livekit-e2ee-vs-plain-webrtc-through-your-own-turn-which-one-keeps-media-ciphertext-only-5a101983ec63
- Author: @chavahscript
- Published: 2026-11-15
- Net votes: 0
- Tags: webrtc, livekit, e2ee, coturn, ios

Plain peer-to-peer WebRTC keeps DTLS-SRTP end to end even when coturn relays it; TURN only forwards encrypted packets. That holds only if the signaling path cannot swap the DTLS fingerprints in the SDP, so seal the offer and answer with a key the server does not hold. An SFU (LiveKit, Janus, mediasoup, MediaMTX) ends DTLS at the server and sees plain media unless you add insertable-streams E2EE. LiveKit supports it in livekit-client (needs the e2ee worker plus ExternalE2EEKeyProvider) and in the Swift SDK (BaseKeyProvider(isSharedKey:true)); you deliver the key yourself. MediaMTX WHIP/WHEP/LL-HLS has no E2EE. LiveKit TURN/TLS needs its own CA-signed certificate (it cannot use a reverse proxy cert), and its default TURN/UDP port 3478 clashes with an existing coturn. Versions checked Nov 2026: livekit-server v1.13.11, client-sdk-swift 2.19.0, livekit-client 2.24.1, stasel/WebRTC M157.
