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

Optimize SRTP/SRTCP encryption/decryption #477

Merged
merged 20 commits into from
Aug 10, 2023

Conversation

logist322
Copy link
Contributor

@logist322 logist322 commented Aug 7, 2023

Optimization of encryption and decryption of SRTP and SRTCP packets. Also adds ability to use OpenSLL for these purposes, that makes those processes much faster.


BEFORE NO OPENSSL WITH OPENSSL
RTP encrypt 1.7006 µs 1.2812 µs 1.0104 µs
RTP decrypt 1.5056 µs 1.2890 µs 1.0157 µs
RTCP encrypt 476.51 ns 284.18 ns 220.90 ns
RTCP decrypt 470.61 ns 319.27 ns 265.27 ns

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage: 80.00% and project coverage change: -0.03% ⚠️

Comparison is base (dd340dd) 61.61% compared to head (9833c77) 61.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #477      +/-   ##
==========================================
- Coverage   61.61%   61.59%   -0.03%     
==========================================
  Files         541      542       +1     
  Lines       49903    49914      +11     
  Branches    12406    12394      -12     
==========================================
- Hits        30748    30743       -5     
- Misses       9938     9943       +5     
- Partials     9217     9228      +11     
Files Changed Coverage Δ
srtp/src/error.rs 0.00% <ø> (ø)
srtp/src/cipher/cipher_aes_cm_hmac_sha1/mod.rs 65.71% <65.71%> (ø)
srtp/src/context/srtcp.rs 76.00% <80.00%> (+13.93%) ⬆️
...rc/cipher/cipher_aes_cm_hmac_sha1/opensslcipher.rs 81.45% <81.45%> (ø)
srtp/src/context/srtp.rs 85.71% <82.35%> (+17.29%) ⬆️
srtp/src/cipher/cipher_aead_aes_gcm.rs 84.68% <100.00%> (+1.04%) ⬆️
srtp/src/context/context_test.rs 80.92% <100.00%> (+0.65%) ⬆️
srtp/src/key_derivation.rs 90.62% <100.00%> (+6.75%) ⬆️

... and 16 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@logist322
Copy link
Contributor Author

@rainliu please take a look at this

@rainliu rainliu merged commit 3f1c67e into webrtc-rs:master Aug 10, 2023
5 checks passed
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.

3 participants