After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797305 - srtp: Add support for MKI
srtp: Add support for MKI
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-10-18 19:29 UTC by Olivier Crête
Modified: 2018-11-03 14:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
srtpdec: Add support for MKI (9.09 KB, patch)
2018-10-18 19:35 UTC, Olivier Crête
none Details | Review
srtpenc: Add support for adding a MKI (5.73 KB, patch)
2018-10-18 19:36 UTC, Olivier Crête
none Details | Review
srtp: Add unit tests for MKI support (6.27 KB, patch)
2018-10-18 19:36 UTC, Olivier Crête
none Details | Review
libsrtp: Update to v2.2 (4.07 KB, patch)
2018-10-18 19:42 UTC, Olivier Crête
none Details | Review
srtpdec: Add support for MKI (9.98 KB, patch)
2018-10-19 15:28 UTC, Olivier Crête
none Details | Review
srtpenc: Add support for adding a MKI (6.20 KB, patch)
2018-10-19 15:28 UTC, Olivier Crête
none Details | Review

Description Olivier Crête 2018-10-18 19:29:58 UTC
Currently, our SRTP elements don't support MKIs. This patch series adds support for them.

It has 2 parts:

* Encoder

I just added an MKI property and then it puts a "mki" element in the caps with the MKI in a buffer. This still only allows for one MKI.

* Decoder

This may be a bit more controversial, as I'm allowing multiple MKIs, instead of having separate CAPS, I'm putting them all in one with "srtp-key=X, mki=X, mki2=Y, srtp-key2=Y, mki3=Z, srtp-key3=Z", up to 15, which is the maximum allowed by libsrtp.


The other thing that could be controversial is that support for MKIs were added in libsrtp 2.1. So I put the whole thing behind ifdeds, included the extra MKI property. If no one yells, I would be tempted to just drop the ifdefs and require libsrtp 2.1 at least for everyone.

I'm also attaching a patch against Cerbero to bump libsrtp to 2.2.
Comment 1 Olivier Crête 2018-10-18 19:35:56 UTC
Created attachment 373963 [details] [review]
srtpdec: Add support for MKI

Add support for MKIs which allow multiple keys to be used with a single SRTP stream.
Comment 2 Olivier Crête 2018-10-18 19:36:01 UTC
Created attachment 373964 [details] [review]
srtpenc: Add support for adding a MKI
Comment 3 Olivier Crête 2018-10-18 19:36:05 UTC
Created attachment 373965 [details] [review]
srtp: Add unit tests for MKI support

Both as a srtpenc ! srtpdec pipeline and as a test that uses
fake packets for multiple mixed MKIs.
Comment 4 Olivier Crête 2018-10-18 19:42:29 UTC
Created attachment 373966 [details] [review]
libsrtp: Update to v2.2
Comment 5 Mathieu Duponchelle 2018-10-19 12:45:08 UTC
Review of attachment 373964 [details] [review]:

Simply reviewing the code, I don't know enough about SRTP to give an opinion on the API I'm afraid :))

::: ext/srtp/gstsrtpenc.c
@@ +649,3 @@
   filter->ssrcs_set = NULL;
 
+  if (filter->mki)

gst_buffer_replace ? :)
Comment 6 Olivier Crête 2018-10-19 15:28:07 UTC
Created attachment 373973 [details] [review]
srtpdec: Add support for MKI

Add support for MKIs which allow multiple keys to be used with a single SRTP stream.
Comment 7 Olivier Crête 2018-10-19 15:28:10 UTC
Created attachment 373974 [details] [review]
srtpenc: Add support for adding a MKI
Comment 8 Olivier Crête 2018-10-19 15:28:59 UTC
Mathieu's comment reminded me that I had failed to document how this work, hopefully it also answers what a MKI is.
Comment 9 GStreamer system administrator 2018-11-03 14:36:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/803.