roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

SRTP encoder and decoder

Open gavv opened this issue 6 years ago • 7 comments

Last revised: Oct 2023

Create SRTP encoder and decoder using libSRTP. See #229 for background.

Steps:

  • Add libSRTP dependency to SConstruct and build-3rdparty.py. Add target_libsrtp to SConstruct and enable it when libSRTP is enabled. It should be enabled by default and disabled by --disable-libsrtp scons option. An example of adding a new dependency can be found in #246 and #265.

  • Add rtp::SrtpWriter (for sender), implementing packet::IWriter, and rtp::SrtpReader (for receiver), implementing packet::IReader. The idea is that we write unprotected packets to the writer and it protects them and in turn writes to the next writer. The opposite for the reader. Place them to roc_rtp/target_libsrtp.

  • Add unit tests for SrtpWriter and SrtpReader to roc_rtp.

  • Integrate SrtpReader and SrtpReader into roc_pipeline. They should be enabled conditionally. An example of conditionally enabled pipeline element is packet::Interleaver. We should also add necessary configuration to roc_pipeline/config.h.

  • Add command-line options to enable SRTP in roc-recv and roc-send and configure it. We can start with a pre-shared key specified via command-line.

  • It would be also desirable to add integration tests for SRTP to roc_pipeline and public_api. See src/tests/roc_pipeline and src/tests/public_api.

Notes:

  • SrtpWriter will need to obtain the byte representation of packet::Packet. We'll have to use packet::IComposer for that. An example can be found in fec::Writer. It uses IComposer for the same reason.

  • SRTP sender and receiver need some way to exchange the key material. Several key management schemes and protocols exist that can be used for that. I didn't read the corresponding RFCs yet and for know can't say which of them we want to implement. In this task, we should start with some simple form of pre-shared keys or certificates provided via command-line.

gavv avatar Jan 13 '20 10:01 gavv

@gavv taking this up

Caynosadler avatar Jan 13 '20 10:01 Caynosadler

@Caynosadler Do you still have plans on this?

gavv avatar Apr 07 '20 07:04 gavv

Unassigning this so that someone else could pick it up. @Caynosadler feel free to ping me if you decide to come back.

gavv avatar Apr 29 '20 11:04 gavv

Hey, @gavv would like to pick this up!

nikhilk1701 avatar Jun 05 '20 03:06 nikhilk1701

@NikeHill1701 Great!

gavv avatar Jun 05 '20 06:06 gavv

@NikeHill1701 Do you still plan to work on this?

gavv avatar Sep 23 '20 10:09 gavv

@gavv, No I do not.

nikhilk1701 avatar Sep 24 '20 12:09 nikhilk1701