Skip to content

Enable E2EE key-size configuration via ExternalE2EEKeyProvider options#1841

Merged
1egoman merged 2 commits intolivekit:mainfrom
MariusBernhardt:enable-config-for-256-bit-key-for-e2ee
Mar 24, 2026
Merged

Enable E2EE key-size configuration via ExternalE2EEKeyProvider options#1841
1egoman merged 2 commits intolivekit:mainfrom
MariusBernhardt:enable-config-for-256-bit-key-for-e2ee

Conversation

@MariusBernhardt
Copy link
Copy Markdown
Contributor

Hello,

I have a client with a hard requirement to 256-bit key-size for the E2EE of media streams.

With this PR I would like to add the option of enabling 256-bit key length instead of the default 128-bit length via the constructor options of the ExternalE2EEKeyProvider.
So 256-bit key length can be configured like so:

const keyProvider = new ExternalE2EEKeyProvider({keySize: 256});

thanks

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 15, 2026

🦋 Changeset detected

Latest commit: dee4386

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

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 15, 2026

CLA assistant check
All committers have signed the CLA.

@MariusBernhardt MariusBernhardt force-pushed the enable-config-for-256-bit-key-for-e2ee branch 2 times, most recently from c6c6e1c to 5e6113c Compare March 15, 2026 11:02
Copy link
Copy Markdown
Contributor

@1egoman 1egoman left a comment

Choose a reason for hiding this comment

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

Hi, thanks for the contribution!

Reading through the change it generally makes sense to me, but before merging it let me check with the wider team to see if there are plans to support > 128 bit keys on other clients.

ratchetWindowSize: number;
failureTolerance: number;
keyringSize: number;
keySize: 128 | 256;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Introducing this might add confusion as-is if the web sdk is the only sdk which supports longer keys (and from a quick search I believe this is the case).

Could you add a docstring above this new keySize parameter which mentions its default value of 128 and that 128 is the only value supported by other non web sdks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cool, no problem. I added the comment with the hint.

@MariusBernhardt MariusBernhardt force-pushed the enable-config-for-256-bit-key-for-e2ee branch from 5e6113c to 281d47e Compare March 20, 2026 18:13
Copy link
Copy Markdown
Contributor

@1egoman 1egoman left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@1egoman 1egoman merged commit 79f0c16 into livekit:main Mar 24, 2026
2 checks passed
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.

3 participants