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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/main/java/com/phono/srtplight/SRTPProtocolImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,21 +377,6 @@ public void sendPacket(byte[] data, long stamp, char seqno, int ptype, boolean m

}

@Override
public void sendPacket(byte[] data, long stamp, int ptype, boolean marker) throws SocketException,
IOException {
try {
if (_doCrypt) {
_scOut.deriveKeys(stamp);
encrypt(data, (int) _csrcid, _seqno);
}
super.sendPacket(data, stamp, ptype, marker);
} catch (GeneralSecurityException ex) {
Log.error("problem encrypting packet" + ex.getMessage());
ex.printStackTrace();
}
}

static ByteBuffer getPepper(int ssrc, long idx) {
//(SSRC * 2^64) XOR (i * 2^16)
ByteBuffer pepper = ByteBuffer.allocate(16);
Expand Down