Reference11r1:Concept DTLS-SRTP
Applies To
This information applies to
- all innovaphone devices from v11r1 RC2
Overview
SRTP is a standard for encrypting RTP media streams. Before two endpoints can do that encryption they need to exchange secret keys. DTLS-SRTP is a new method how to do so.
SDES
In order to understand the advantages of DTLS-SRTP let's go one step back and take a look SDES - the standard key exchange method for SRTP. SDES transmits the secret keys as part of the signalling messages. That messages go from one endpoint over several PBXes to the other endpoint, hop-by-hop. As the secret keys have to be proteced from eavesdropping the signalling messages have to be encrypted as well. But the signalling messages are only encrypted hop-by-hop, so each PBX can see or even modify the keys.
It is a design problem of SDES that endpoints have to trust the PBXes. This is a managable risk when all PBXes are under control of the customer. But with internet calls across company boundaries it becomes an actual threat. Possible attacks include corrupted signaling nodes that give away the keys together with the call details to an attacker that is then capable of decrypting captured SRTP calls on a large scale.
DTLS-SRTP
DTLS-SRTP was designed to solve that issue. It does not transmit the keys in signalling messages but inband as part of the media stream using end-to-end encryption. Before the media stream starts both endpoints perform a mutual DTLS handshake on the media ports. The shared symmetric key that was established for the resulting DTLS session is then used to derive an SRTP key. Then the encrypted SRTP media stream is started.
The protocol does not rely on the trustability of the certificates that are used for DTLS. They are just considered as a container format for the public key of the remote endpoint.
Instead a fingerprints are used to allow users to manually check if the call is encrypted end-to-end. In this context a fingerprint is a hash value calculated over the certificate. Each endpoint sends the fingerprint of its own certificate to the remote party over the signalling. The VOIP stack checks if the remote fingerprint actually matches the certificate that was used for DTLS. If not the call is disconnected right away. Users that need end-to-end encryption can read the fingerprints that are displayed on the phone and compare them to the fingerprints that are displayed on the other phone. If they match, end-to-end-encryption is running for this call. If the fingerprints do not match, it means the call is decrypted and encrypted again somewhere in the middle. For example this happens with media relay, ISDN legs or when there is an actual man-in-the middle attack.
Pros and cons
At a glance DTLS-SRTP offers the following advantages:
- End-to-end encryption
- Detection of man-in-the-middle attacks
- No need to trust PBXes
- No need to trust certification authorities
On the other hand there are also some negative aspects:
- Adds an additional delay at the begin of calls
- Causes significantly higher CPU load at the begin of calls
Configuration
Priority of SDES and DTLS-SRTP
If nothing is configured, the device offers both SDES and DTLS-SRTP for outgoing calls. For incoming calls it selects SDES if offered. Otherwise it selects DTLS-SRTP or unencrypted RTP, as a fallback. This allows for compatibility with most endpoints.
The admin can change that behaviour at the configuration of the registration. There the key exchange mechanisms (SDES, DTLS-SRTP) and their priority can be selected. For example on phones this is can be done on page Phone/User/General. Please consult the help pages for details.
Certificates
No special configuration is needed regarding certificates. DTLS-SRTP does not require endpoints to have the certificate of the remote endpoint in the trust list. Also it doen't check the names inside certificates.
Disabling DTLS-SRTP
For debugging purposes there are config options at the signalling modules that globally turn DTLS-SRTP off. Normally this should not be needed.
config add H323 /dtls-disabled config add SIP /dtls-disabled config add TSIP /dtls-disabled config add SIPS /dtls-disabled
Tracing
Activation
Traces for debugging DTLS-SRTP can be activated at the signalling module. The trace flags are also available on the debug.xml page.
config add H323 /dtls-trace on config add SIP /dtls-trace on config add TSIP /dtls-trace on config add SIPS /dtls-trace on
Reading traces
Known limitations
References
- RFC5764 - Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)