Secure Real-time Transport Protocol

From Wikipedia, the free encyclopedia

The five layer TCP/IP model
5. Application layer

DHCPDNSFTPHTTPIMAP4IRCNNTPXMPPMIMEPOP3SIPSMTPSNMPSSHTELNETBGPRPCRTPRTCPTLS/SSLSDPSOAPL2TPPPTP

4. Transport layer

TCPUDPDCCPSCTPGTP

3. Network layer

IP (IPv4IPv6) • ICMPIGMPRSVPIPsec

2. Data link layer

ATMDTMEthernetFDDIFrame RelayGPRSPPPARPRARP

1. Physical layer

Ethernet physical layerISDNModemsPLCSONET/SDHG.709Wi-Fi

This box: view  talk  edit

The Secure Real-time Transport Protocol (or SRTP) defines a profile of RTP (Real-time Transport Protocol), intended to provide encryption, message authentication and integrity, and replay protection to the RTP data in both unicast and multicast applications. It was developed by a small team of IP protocol and cryptographic experts from Cisco and Ericsson including David Oran, David McGrew, Mark Baugher, Mats Naslund, Elisabetta Carrara, Karl Norman, and Rolf Blom. It was first published by IETF in March 2004 as RFC 3711.

Since RTP is closely related to RTCP (RTP control protocol) which can be used to control the RTP session, SRTP also has a sister protocol, called Secure RTCP (or SRTCP); SRTCP provides the same security-related features to RTCP, as the ones provided by SRTP to RTP.

Utilization of SRTP or SRTCP is optional to utilization of RTP or RTCP; but even if SRTP/SRTCP are used, all provided features (such as encryption and authentication) are optional and can be separately enabled or disabled. The only exception is the message authentication feature which is indispensably required when using SRTCP.

Contents

[edit] Data flow encryption

For encryption and decryption of the data flow (hence providing confidentiality of the data flow), SRTP (together with SRTCP) standardizes utilization of only a single cipher, AES, which can be used in two cipher modes, which turn the originally block AES cipher into a stream cipher:

  • Segmented Integer Counter Mode - a typical counter mode, which allows random access to any blocks, which is essential for RTP traffic running over unreliable network with possible loss of packets. In the general case, almost any function can be used in the role of "counter", assuming that this function does not repeat for a long number of iterations. But the standard for encryption of RTP data is just a usual integer incremental counter. AES running in this mode is the default encryption algorithm, with a default encryption key length of 128 bits and a default session salt key length of 112 bits.
  • f8-mode - a variation of output feedback mode, enhanced to be seekable and with an altered initialization function. The default values of the encryption key and salt key are the same as for AES in Counter Mode. (AES running in this mode has been chosen to be used in UMTS 3G mobile networks.)

Besides the AES cipher, SRTP allows the ability to disable encryption outright, using the so called "NULL cipher", which can be assumed as the second supported cipher (or the third supported cipher mode in sum). In fact, the NULL cipher does not perform any encryption (i.e. the encryption algorithm functions as though the key stream contains only zeroes, and copies the input stream to the output stream without any changes). It is mandatory for this cipher mode to be implemented in any SRTP-compatible system. As such, it can be used when the confidentiality guarantees ensured by SRTP are not required, while other SRTP features (such authentication and message integrity) may be used.

Though technically SRTP can easily accommodate new encryption algorithms, the SRTP standard states that new encryption algorithms besides those described cannot simply be added in some implementation of SRTP protocol. The only legal way to add a new encryption algorithm, while still claiming the compatibility with SRTP standard, is to publish a new companion standard track RFC which must clearly define the new algorithm.

[edit] Authentication, integrity and replay protection

The above-listed encryption algorithms do not secure message integrity themselves, allowing the attacker to either forge the data or at least to replay previously transmitted data. Hence the SRTP standard also provides the means to secure the integrity of data and safety from replay.

To authenticate the message and protect its integrity, the HMAC-SHA1 algorithm (defined in RFC 2104) is used, which produces a 160-bit result, which is then truncated to 80 bits to become the authentication tag appended to the packet. The HMAC is calculated over the packet payload and material from the packet header, including the packet sequence number. To protect against replay attacks, the receiver maintains the indices of previously received messages, compares them with the index of each new received message and admits the new message only if it was not played before. Such an approach heavily relies on the integrity protection being enabled (to make it impossible to spoof message indices).

[edit] Key Derivation

A key derivation function is used to derive the different keys used in a crypto context (SRTP and SRTCP encryption keys and salts, SRTP and SRTCP authentication keys) from one single master key in a cryptographically secure way. Thus, the key management protocol needs to exchange only one master key, all the necessary session keys are generated by applying the key derivation function.

Periodical application of the key derivation function will result in security benefits. It prevents an attacker from collecting large amounts of ciphertext encrypted with one single session key. Certain attacks are easier to carry out when a large amount of ciphertext is available. Furthermore, multiple applications of the key derivation function provides backwards and forward security in the sense that a compromised session key does not compromise other session keys derived from the same master key. This means that even if an attacker managed to recover a certain session key, he is not able to decrypt messages secured with previous and later session keys derived from the same master key. (Note that, of course, a leaked master key reveals all the session keys derived from it.)

SRTP relies on an external key management protocol to set up the initial master key. Two protocols specifically designed to be used with SRTP are ZRTP and Mikey.

There are also other methods to negotiate the SRTP keys. There are several vendors which offer products that use the SDES key exchange method.

[edit] SRTP Interoperability

Hard-IP-phones table
Manufacturer Model SRTP SIP TLS/IP-sec H323 KEY-exchange Note
Avaya S8300 Y
Avaya S8700 Y
Cisco 79xx Y
Ericsson 442x Y Y TLS Y -
Siemens HiPath4000 Y
Sipura/Linksys All Y Y
Snom 190 Y
Snom 300 Y Y
Snom 320 Y Y TLS N -
Snom 360 Y Y TLS N - there is also 360 soft-phone
Soft-IP-phones table
Name SRTP SIP TLS/IP-sec H323 KEY-exchange Note
Gizmo Project Y Y Seems to only want to use SRTP with other Gizmo clients
Kphone Y Y Y
Snom360 Y Y TLS N - Free for private
minisip Y Y TLS - MIKEY
CounterPath eyeBeam Y Y TLS N SDES
Hard-IP-PBX table
Manufacturer Model SRTP SIP TLS/IP-sec H323 KEY-exchange Note
Alcatel OmniPCX Y Y -
Ericsson MX-One Y Y -
Soft-IP-PBX table
Manufacturer SRTP SIP TLS/IP-sec H323 KEY-exchange Note
Asterisk N Y - Y GPL
pbxnsip Y Y Y N RFC 4568 (SDES) Buy/1month trial
Session Border Controller / SIP Firewall table
Manufacturer SRTP SIP TLS/IP-sec H323 KEY-exchange Note
Covergence Y Y Y Y RFC 4568 (SDES)

Legend : Y (yes), N(no), -(no info)

[edit] See Also

[edit] External links

  • Covergence Session Border Controller / SIP Firewall with full SRTP support
  • counterpath popular softphone offers SRTP in the version 1.5
  • InGate SIP-aware firewalls do SRTP using the SDES key exchange method
  • Voxilla A free Certificate authority for Sipura ATAs. Has a SRTP certificate wizard.
  • snom technology SIP phones use SRTP to encrypt the voice
  • RFC 3711, Proposed Standard, The Secure Real-time Transport Protocol (SRTP)
  • RFC 3551, Standard 65, RTP Profile for Audio and Video Conferences with Minimal Control
  • RFC 3550, Standard 64, RTP: A Transport Protocol for Real-Time Applications
  • RFC 2104, Informational, HMAC: Keyed-Hashing for Message Authentication
In other languages