Skip to content

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Jul 8, 2025

depends on livekit/protocol#1127

Most importantly for a frictionless adoption this PR ships decryption support.
This means if at a later stage encryption will be turned on by default, all clients that have the decryption support from this PR will continue to work.

Copy link

changeset-bot bot commented Jul 8, 2025

🦋 Changeset detected

Latest commit: 09c8f21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lukasIO lukasIO changed the title data channel e2ee Add e2ee for data channel messages Aug 15, 2025
@lukasIO lukasIO requested review from bcherry and a team August 15, 2025 10:19
@lukasIO lukasIO marked this pull request as ready for review August 15, 2025 10:20
@lukasIO lukasIO removed the request for review from bcherry August 15, 2025 10:21
@cloudwebrtc
Copy link
Contributor

Quick question @lukasIO, is it necessary to do a key ratchet attempt after data decrypt fails?

@lukasIO
Copy link
Contributor Author

lukasIO commented Aug 18, 2025

oh, that's a good point. I'll look at adding that!

Copy link
Contributor

@bcherry bcherry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm besides the todo.

const dcEncryptionEnabled = false;
const e2eeOptions = this.options.e2ee;

// TODO(dc-e2ee): add this back in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this important in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be uncommented once we expose the options.encryption field.

Because this PR doesn't actually declare that, we leave the logic commented out

export function asEncryptablePacket(packet: DataPacket): EncryptedPacketPayload | undefined {
if (
packet.value?.case !== 'sipDtmf' &&
packet.value?.case !== 'metrics' &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory yes, the question is how that would handled for the dashboard were you'd want to see the metrics

Copy link
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 81.54 KB (+0.89% 🔺)
dist/livekit-client.umd.js 87.59 KB (+0.97% 🔺)

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

Successfully merging this pull request may close these issues.

4 participants