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

Keep packets encrypted on retransmission #94

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

rlpeck
Copy link
Contributor

@rlpeck rlpeck commented Feb 18, 2025

I noticed that SRT packets were being unencrypted when being sent on retransmission.

Each time a packet goes through the func (*srtConn) pop(packet.Packet) function it is run through the c.crypto.EncryptOrDecryptPayload. Since this encryption/decryption is performed on the payload inplace when a packet with an encrypted payload is retransmitted the payload will be decrypted prior to sending. The result is that the receiver will "decrypt" the unencrypted payload which makes it appear to be corrupted.

@ioppermann ioppermann merged commit 68d30ef into datarhei:main Feb 20, 2025
5 checks passed
@ioppermann
Copy link
Member

Thanks a lot for this PR!

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.

2 participants