Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SRTP double-encryption on send #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DerGuteMoritz
Copy link

It turns out that the SRTP send implementation was redundantly encrypting payloads when using the 4-ary sendPacket method. The override for that method in SRTPProtocolImpl would encrypt the payload data and then proceed to invoke its parent's implementation. That one in turn would invoke the 5-ary sendPacket method which is also overriden in SRTPProtocolImpl. That override would encrypt the payload a second time, resulting in garbled data on the receiver's end.

Fixed by removing the 4-ary override from SRTPProtocolImpl.

Confirmed to work by testing against a real-world VoIP provider's SRTP implementation. However, I was unable to run the rtpw-based manual tests which I assume either need to be adjusted or must have been failing before?

It turns out that the SRTP send implementation was redundantly encrypting payloads when using the
4-ary `sendPacket` method. The override for that method in `SRTPProtocolImpl` would encrypt the
payload data and then proceed to invoke its parent's implementation. That one in turn would invoke
the 5-ary `sendPacket` method which is also overriden in `SRTPProtocolImpl`. That override would
encrypt the payload a second time, resulting in garbled data on the receiver's end.

Fixed by removing the 4-ary override from `SRTPProtocolImpl`.
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.

1 participant