Repository navigation
Conversation
BaseKeyProvider always derived AES-128 frame keys. The prefixed WebRTC Android library already accepts the key size (a trailing int, in bits, defaulting to 128 in the shorter overload of createFrameCryptorKeyProvider), so this only forwards it. Adds KeyProviderKeySize (BITS_128 default, BITS_256) as the last BaseKeyProvider constructor parameter, so existing callers are unchanged. Every participant in a room must use the same size. Matches KeyProviderOptions.keySize in the JS SDK and the Swift SDK (#1200). Fixes livekit#1060 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bMyZt4jGEfw4YQ5siiMRs
|
|
🦋 Changeset detectedLatest commit: efbc333 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
| keyRingSize: Int = defaultKeyRingSize, | ||
| discardFrameWhenCryptorNotReady: Boolean = defaultDiscardFrameWhenCryptorNotReady, | ||
| keyDerivationAlgorithm: FrameCryptorKeyDerivationAlgorithm = defaultKeyDerivationAlgorithm, | ||
| keySize: KeyProviderKeySize = defaultKeySize, |
There was a problem hiding this comment.
🔴 Precompiled E2EE clients fail after upgrade
Precompiled clients using BaseKeyProvider constructor arguments hit NoSuchMethodError after this upgrade. Adding keySize removes the JVM constructor signatures those clients reference.
Learn more
Kotlin compiles calls with omitted constructor parameters against a synthetic JVM constructor containing every parameter and a default-value mask. Adding keySize replaces that signature, as well as the eight-argument constructor. An already-compiled Android module that calls the old constructor still links successfully during packaging but fails when the call runs. The no-argument constructor remains available, so this affects callers that supply any arguments.
Example: An existing compiled library calls BaseKeyProvider(enableSharedKey = false). An application upgrades this SDK without rebuilding that library; invoking its E2EE setup throws NoSuchMethodError instead of creating a provider.
Recommended fix: Preserve the old JVM constructor signatures, including the synthetic default-argument form, while exposing the new size configuration through a compatible additional API. Verify compatibility against a client compiled using the base SDK.
Was this helpful? React with 👍 or 👎 to provide feedback.
Adds a short example for the new BaseKeyProvider keySize option to the e2eeOptions documentation, as the repository guidelines ask for new public APIs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bMyZt4jGEfw4YQ5siiMRs
|
Thanks. We kept the new parameter last with a default so source compatibility is unchanged. BaseKeyProvider's constructor has grown the same way before (e.g. keyDerivationAlgorithm in #886), so we followed that pattern rather than adding hidden overloads. Happy to add a hidden deprecated constructor with the previous signature if the maintainers prefer binary compatibility here. |
|
Thanks for working on this. I'm already working on an app which uses E2EE and would like this very much ported in android (Web & Swift already provides it, swift-recently merged). Would very much like this feature enabled. Happy to test it out when available. |
Fixes #1060. Android counterpart of the Swift change in #1200.
BaseKeyProvider always derived AES-128 frame keys. The prefixed WebRTC library already used by this SDK (150.7871.04) accepts the key size: FrameCryptorFactory.createFrameCryptorKeyProvider has an overload with a trailing int (bits), and the shorter overload passes 128. This PR only forwards it.
• New KeyProviderKeySize enum (BITS_128 default, BITS_256), added as the last BaseKeyProvider constructor parameter, so existing callers are unchanged.
• Default key provider in E2EEOptions explicitly uses 128.
• Changeset (minor).
Every participant in a room must use the same size; the KDoc says so.
Verified: :livekit-android-sdk:compileDebugKotlin passes. Not verified: runtime behavior (needs a device) and JS ↔ Swift ↔ Android interop with keySize: 256. I'm happy to run the interop test as soon as a release is out.