This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
Real-time Transport Protocol (RTP) is a protocol designed by the Audio-Video Transport Working Group for transmitting real-time data over the Internet. The first RFC created for RTP was RFC 1889 in 1996, but It was then replaced by RFC 3550 in 2003. RFC 3550 standardizes a packet format which can either be transported on top of TCP or UDP. Most of the characteristics of RTP are executed in the user-space or on the application layer which may suggest that it is part of the application layer, however, the generic behavior of RTP is to provide a transport mechanism for any type of application, thereby indicating that it might be a transport layer protocol (as the acronym suggests). In any case, RTP would be best categorized as a transport protocol implemented on the application layer.
The primary function of RTP is to carry multimedia across the network for applications, such as video conferencing. Its role is to contain the multimedia information, which comprise of video and/or audio for the transmission. RTP is designed to work with other protocols such as Session Initiation Protocol (SIP) to setup and teardown connections between the end-users or Real Time Streaming Protocol (RTSP) for media streaming. RTP is loosely defined so that it can interact well with other protocols and easily adapted into various applications.
The next section of this paper will provide an explanation of the RTP packet structure and the inner workings of the protocol. The following section will go through an example of how RTP (data) and RTCP (control) operates and what may be the dependencies for the protocols. Finally, we will discuss and analyze the security aspect of RTP to see how secure it is to carry sensitive real-time data.
RTP (Real-Time Protocol) was developed to provide transportation, primarily media content, for real-time applications. RTP sits on top of UDP thereby including a RTP message inside the UDP payload. RTP is normally established on an even port between 16384 and 32767 with an additional RTCP control port on the next odd port. The following diagram describes the RTP header.
Bits 0-1 Version Normally version 2
Bits 2 Padding Padding for fixed length messages
Bits 3 Extension Extension Header follows fixed header
Bits 4-7 CSRC Count CSRC Identifiers that follows fixed header
Bits 8 Marker Used by some Apps to mark a frame
Bits 9-15 Payload Type Encoding of the RTP payload
Bits 16-31 Sequence Number Increments by 1 for each RTP packet
Bits 0-31 Timestamp Sampling of first octet in RTP data packet
Bits 0-31 SSRC (Synch Src) Random identifier to identify the source
Bits 0-31 CSRC (Contrib. Src) Based on CSRC Count (up to 15)
A very popular streaming application called VLC (VideoLan Media Player) was designed to setup a server and client topology while streaming video and/or audio. The application has a protocol choice of "RTP Unicast" on the server. On the client, the options is "UDP/RTP" to listen on a specific port. The server will send RTP packets (video and/or audio) to the client and the client will output the media.
While taking this VLC session, we can take a Wireshark capture. Initially, Wirehsark decodes the packets as UDP because the application does not know that RTP packet is inside the UDP payload. However, you can tell Wireshark to decode the packet properly by selecting the menu option (Analyze -> "Decode As ...") and select RTP. The following is an example of what a decoded RTP packet would look like.
Wireshark Example (VLC Streaming Server)
SSRC + CRSC via Mixer
The SSRC number is a unique, randomly generated number that identifies the source of the RTP traffic. For example, you can setup three VLC servers, each providing a movie stream: movie1.mpg, movie2.mpg, and movie3.mpg. You can also have one VLC client accepting all three streams. In order for your VLC client to distinguish which server is providing the content, the client looks at the SSRC number in the RTP header.
The CSRC is an identifier that is placed in the header that provides a mechanism of inputting data in the RTP payload via a mixer. An example of CSRC is audio conferencing where several participants provide data into the RTP packet. For example, if you have person1, person2, person3 all on a three-way conference call via RTP, then the packet would have three different CSRC identifiers for each person.
The mixer can accept input from each source and create a new RTP packet. Since it is not possible to synchronize among input sources, there are timing adjustments. These timing adjustments make the mixer the synchronizing source.
RTCP is the control center for the RTP flow. While there are mechanism in the header files to determine the rate of the RTP packets and resolution of multiple sources and/or multiple clients, the RTCP controls how a client enters and leaves the session, and how to utilize the maximum benefit from its bandwidth.
One of the advantages with RTP is the scalability of bandwidth, allowing users with high bandwidth to not pay the plenty when another client with a low bandwidth joins the session. This is done by RTCP's time statistics sent by the receivers and senders. This'll allow RTP to determine the rate it should send the packets to the user.
The RTCP header is the same as the RTP for the first 32 bytes, with the PT field to determine what type of RTCP packet it is. There are several main types:
SR: Sender report which sends out information about the active senders in the session.
RR: Receiver report, which sends out information about the receivers.
SDES: Source description items.
BYE: Termination packet report, to remove participant from the session.
APP: Application-specific functions.
RTCP allows individual or compound packets, which can be a combination of these types in order to lump them together for one packet. The SR and RR packets are set for a specific timed interval, so in these compound packets they are always the first entry. The rest can be tacked on.
Though there are a lot of flexibility and options that RTP provides, RTCP has a few assumptions that must be fulfilled. Furthermore, it also has a general form that the RTCP/RTP packets must take in order to start, continue, and exit a RTP session. The restrictions are as follow:
SR and RR packets must be send in periodical times in order to ensure that the quality of the bandwidth. This allows the maximum benefit from using the bandwidth.
New users entering the session must receive the CNAME, which is located in the SDES packet, as soon as possible in order to identify the RTP packets and begin collecting and receiving them.
The order of the session would be in the follow stages:
Initialization: The first RTCP will contain either the SR or RR packet as the first part of the header packet. It could contain several RR packets, but the SDES packet is required in this package. The SDES portion must contain the same CNAME that will be used to identify the correct RTP packets in their SSRC field.
Communication: During the communication, there will be a series of SR and RR packets at timed intervals in order to determine the best rate of RTP packets. These packets will contain their current time stamp, the previous time stamp of the sent RTCP (in order to ensure that the previous RTCP was received or lost), and the future time stamp of the next RTCP packet. It can also contain the APP packet for application-specific purposes.
Termination: The last RTCP packet needs to contain the BYE packet. It is possible to have the SR or RR packets to validate the RTCP. This will be the last packet recognized for the session. This can be sent at any time if so chooses, and does not have to wait for the timed interval predetermined by the SR or RR packets.
RTP can be used for many different types of data streaming including video and audio from streaming videos on the web, video conferencing, or shared applications, such as white boards or remote desktops. Confidentiality, integrity, and authentication are some of the security issues that need to be addressed for RTP. Being that RTP needs to transfer data at near constant rate, security causes overhead that may cause the video stream to be transferred at a lower rate. RTP relies on lower layers in the stack to deal with security issues.
In RFC 3550 and RFC 1889, confidentiality is addressed using the "Data Encryption Standard (DES) algorithm in cipher block chaining (CBC) mode" to encrypt the data sent over RTP. Encryption for both RTP and RTCP are done by "encrypting as a unit all octets that will be encapsulated for transmission in a single-layer." However, studies have shown that the DES-CBC algorithm is easy to break and other methods have been researched as a possible replacement. The replacements need to be based on DES-CBC algorithms to allow legacy decoders to function with the encrypted stream. Secure Real-Time Transport Protocol (SRTP) has been developed and researched as a possible security extension using multiple loops of DES-CBC to make a stronger encryption for the data.
Authentication and integrity are not defined in RFC 3550 meaning that there is not a standard way to handle those issues. These security issues can be handled by the application running RTP, other network layers, or other protocols. IPsec has been suggested as a security method of authentication for unicast sessions using IPsec authentication headers, but multicast sessions are problematic. SRTP uses HMAC-SHA1 as the authentication transform.
Security for RTP is very complex because of the need to address the above issues, but RTP also needs to transfer data through the firewall. SRTP is an extension to the RTP header to add extra encryption by keys that needs to be decrypted before being read by the RTP protocol on the other side.
RTP is a relatively simple protocol with a standardize packet format for which all of it transports are done. Using the SSRC and CSRC of the RTP header, applications can distinguish the synchronizing and contributing sources of the packets respectively. Applications typically run RTP over UPD to make use of its checksum and multiplexing services but RTP can easily run on top of other transport protocols, such as TCP. Some security issues of RTP involve trying to maintain the current transmission rate while implementing different security capabilities. DES and HMAC-SHA1 can be applied as the security mechanisms for RTP, which ensures that RTP data is encrypted and the end-users are authenticated. RTP is used in conjunction with Session Initiation Protocol (SIP), which provides the set up, and teardown services for connection establishment between the end-users. RTP also works really well with Real Time Streaming Protocol (RTSP) for media streaming.