Skip to content

Fix SRTP double-encryption on send#2

Open
DerGuteMoritz wants to merge 1 commit intosteely-glint:mainfrom
bevuta:fix-srtp-double-encryption
Open

Fix SRTP double-encryption on send#2
DerGuteMoritz wants to merge 1 commit intosteely-glint:mainfrom
bevuta:fix-srtp-double-encryption

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