cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.19k stars 469 forks source link

libsrtp + openssl + certificates #673

Closed gbernaldo82 closed 5 months ago

gbernaldo82 commented 6 months ago

Hi, good morning!

I don't know if this question has been asked here before so please, point me to the correct place if that's the case. I've been looking for similar questions here but I have found nothing.

First of all, let me tell you I'm completely new in the world of SSL, RTP, OpenSSL, ... So maybe this questions it's so dumb. I'm so sorry if this is the case.

My question is about how to use libSRTP with OpenSSL and custom certificates. I'm writing a program where I need to send speech from one point to other point using an embedded device. In the embedded device (which is a Beaglebone) everything works as expected using the internal algorithms to encrypt the audio, but I need to use certificates instead of the algorithms used by libSRTP. I need to use those certificates cause this hardware needs to be in contact with other systems from our clients with their own certificates.

So, my question is about how to use those certificates instead of the internal algorithms used by libSRTP. Do you have some example about this please?

Thank you so much in advance!

pabuhler commented 6 months ago

Hi, SRTP is based on symmetric keys, these keys are effectively just a random 16 byte number that is know to both the sender and receiver. So it is not inside of SRTP that certificates can be used. Certificates can be used in the process of generating and exchanging these keys between the sender and receiver but that is out side the scope of libSRTP. One example would be DTLS-SRTP rfc5764, there is is possible using OpenSSL and certificates to generate and exchange keys that can then be used with libSRTP . Otherwise if you have any other secure channel created via TLS between the devices then you can send keys over that channel.

gbernaldo82 commented 5 months ago

Thank you so much for your comment @pabuhler!