Enable ECDH encryption for T8214 and T8425 P2P sessions - #795
Merged
Conversation
This was referenced Feb 16, 2026
Collaborator
|
Might hold off on this one until we release tomorrow, so many things merged and I am running the develop for now to ensure it works |
4 tasks
lenoxys
force-pushed
the
fix/t8214-t8425-ecdh-encryption
branch
2 times, most recently
from
April 30, 2026 09:36
ff288ff to
aaa18e9
Compare
lenoxys
force-pushed
the
fix/t8214-t8425-ecdh-encryption
branch
from
May 21, 2026 19:17
aaa18e9 to
0f8b8e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable ECDH encryption for T8214 and T8425 P2P sessions
Summary
T8214 (Battery Doorbell Plus E340) and T8425 (Floodlight Camera) use ECDH key exchange instead of RSA for P2P session encryption. This PR adds ECDH support, gated exclusively to these two devices.
Depends on #793 (device registration + livestream routing).
What was wrong
When the station sends
CMD_GATEWAYINFO, T8214/T8425 provide an ECDH public key instead of RSA-encrypted data. The RSA decrypt fails and the session falls back to Level 1 encryption, breaking livestream.What this PR does
ecc_private_keyoptional field to the Cipher API model.decryptP2PKeyECDHfunction to derive the session key via ECDH shared secret.CMD_GATEWAYINFOhandling: tries RSA first, falls back to ECDH only ifstation_snstarts withT8214orT8425andecc_private_keyexists.decryptP2PKeyECDH(6 tests, all passing).Testing
decryptP2PKeyECDHcovering compressed/uncompressed pubkeys, ECIES envelopes, determinism, and output size.