RFC 3711: SRTP: Confidential real-time media
Summary
In March 2004, Mark Baugher, David McGrew, Mats Näslund, Elisabetta Carrara and Karl Norrman described the Secure Real-time Transport Protocol, SRTP for short, in RFC 3711. It encrypts the payload of RTP and RTCP, protects packets against tampering and detects replayed packets without noticeably enlarging them. SRTP deliberately leaves key exchange to other schemes, which turned out to be the most important point in practice.
Protection with little overhead
By default SRTP encrypts with AES in counter mode, which encrypts by XOR with a keystream and therefore does not change the packet size. Integrity is secured by HMAC-SHA1 with a short tag. The RTP header remains readable but is also protected, so network devices can still evaluate it.
From a master key, SRTP derives separate session keys for encryption and integrity. The receiver keeps a list of packets already seen in order to detect replays; the window for this must cover at least 64 packets.
Where do the keys come from?
RFC 3711 states explicitly that SRTP is only secure with appropriate key management, but does not define it itself. In SIP telephony, keys are often transmitted with SDES in the SDP text (RFC 4568), which is only as secure as the encryption of the signalling.
DTLS-SRTP according to RFC 5764 from May 2010 negotiates the keys directly between the endpoints and is mandatory in WebRTC. RFC 7714 added AES-GCM as authenticated encryption in 2015.
Ideas
- SRTP encrypts the payload of RTP and RTCP.
- AES in counter mode does not change the packet size.
- HMAC-SHA1 protects packets against tampering.
- A replay window detects replayed packets.
- Session keys are derived from a master key.
- Other protocols handle the key exchange.
Insights
- An encryption format is only as strong as the way its keys arrive.
- Real-time security has to balance protection and delay; SRTP succeeded because it adds only a few bytes per packet.
Facts
- RFC 3711 appeared in March 2004.
- The default algorithms are AES in counter mode and HMAC-SHA1.
- The replay window must cover at least 64 packets.
- DTLS-SRTP is described in RFC 5764 from May 2010.
References
- RFC 3711: The Secure Real-time Transport Protocol (SRTP)
- RFC 5764: DTLS Extension to Establish Keys for SRTP (2010)
- RFC 4568: SDP Security Descriptions for Media Streams (2006)
- RFC 7714: AES-GCM Authenticated Encryption in SRTP (2015)
Remarks
- Several of the authors worked at Cisco and Ericsson, two of the major manufacturers of telephony infrastructure.
Recommendations
- Use SRTP only together with encrypted signalling (SIP over TLS) or DTLS-SRTP.
- Avoid SDES over unencrypted signalling.
- In phone systems, check whether calls really are encrypted, for example with a capture.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.