Secure High Definition Video Conferencing Master of Science Thesis Guillem Cabrera Añón Stockholm / Kista June 2008 Telecommunication System Laboratory KTH Microelectronics and Information Technology
i Preface This job was carried out as part of a final degree project in the Telecommunication Systems Laboratory (TSLab), Royal Institute of Technology (KTH), Stockholm and was developed in the framework of the HDVIPER Celtic project, in collaboration with Fundació i2Cat. I would like to thank the following people either for their contribution to this study or for the opportunity they gave me to make it: • Erik Eliasson My project advisor, for all the knowledge about SIP and network security he transmitted me. Also for all his practical advice, his stimulating ideas and his help on the C++ implementation using miniSIP libraries. • Björn Pehrson, Jesús Alcober and Flaminio Minerva TSLab director and i2cat HDVIPER coordinators, for giving me the opportunity to work in this project at the TSLab in collaboration with i2cat. • Xavier Calvo and Javier López i2cat HDVIPER developing team, for all their advice on the video conferencing environment and their work in the RTP Packet Reflector.
ii Abstract The aim of this review is to study technologies involved in a video conference through Internet. Some security issues and solutions to them are also covered in this report. At first, several video conference environments are presented to clarify concepts. Also some commercial solutions are mentioned. Secondly, signalling protocols, specially SIP, are studied to be used in the set up of a video conference. Possibilities to secure SIP are also covered in the theoretical study. Thirdly, the Secure RTP protocol is presented to be used to protect the media flows. Then a key agreement mechanism, MIKEY, is stated to make the key agreement needed to establish a crypto session for SRTP. After the background study, an implementation of a secure video conferencing platform using miniSIP and RTP Packet Reflector is proposed. Then, the final implementation is detailed, showing up the problems appeared during this process and possible solutions to them. Possible new features for the system are also proposed. Finally, some measurement results taken using the new software are presented and analyzed.
iii Table of Contents 1. Introduction .................................................................................................1 2. Background.................................................................................................2 2.1. Video conferencing ..............................................................................2 2.1.1. History...........................................................................................2 2.1.2. Videoconferencing architectures...................................................3 2.1.3. Current solutions...........................................................................7 2.2. Signalling protocols for Internet conferences.......................................8 2.2.1. H.323............................................................................................8 2.2.2. The Session Initiation Protocol (SIP) ............................................8 2.3. Dealing with media in video conference environments ......................17 2.3.1. Real-time Transport Protocol (RTP)............................................17 2.3.2. Delays and Video coders............................................................19 2.4. Security issues...................................................................................20 2.4.1. Security definitions......................................................................20 2.4.2. Securing SIP...............................................................................22 2.4.3. Securing Media: Secure RTP (SRTP).........................................25 2.4.4. Key Agreement: MIKEY..............................................................28 3. Background study conclusions..................................................................34 3.1. Video conferencing ............................................................................34 3.2. Signalling protocol..............................................................................34 3.3. Security..............................................................................................34 4. Implementation proposal...........................................................................36 5. Implementation..........................................................................................38 5.1. SIP layer ............................................................................................38 5.1.1. Conferences................................................................................38 5.1.2. SIP calls......................................................................................39 5.1.3. SDP media dealing.....................................................................39 5.1.4. SIP State machine......................................................................40 5.1.5. Key exchange: MIKEY................................................................41 5.2. Packet Reflector.................................................................................43 5.2.1. Integration with the SIP Layer.....................................................43 5.2.2. Securing media flows: SRTP ......................................................45 5.3. Alternative implementation.................................................................46 5.3.1. Calling process ...........................................................................46 5.3.2. Configuring rooms.......................................................................47 5.3.3. Signalling the conference............................................................47 5.3.4. Media parameters negotiation.....................................................47 5.3.5. Announcing new participants......................................................48 5.3.6. SRTP key generation for new flows............................................50 6. Tests and Measurements..........................................................................52 6.1. Testbed..............................................................................................52 6.2. Measuring tools..................................................................................53 6.3. Measurements...................................................................................53 6.4. Measurement results..........................................................................54 6.4.1. Unsecured flows .........................................................................54 6.4.2. SRTP secured flows ...................................................................55 6.4.3. Alternative measurements with unsecured flows........................56 7. Final conclusions.......................................................................................60
iv 8. References................................................................................................62 9. Appendix A – miniSIP................................................................................64 9.1. miniSIP libraries used by the MCU.....................................................64 9.2. Getting miniSIP..................................................................................64 9.3. Compiling miniSIP..............................................................................65 10. Appedix B – Using the new MCU application ........................................66 11. Appendix C – Terms and abbreviations.................................................67
v Table of Figures Figure 1 Video conferencing in a Multicast Network........................................... 3 Figure 2 Full Mesh video conferencing...............................................................4 Figure 3 MCU forwarding all flows......................................................................5 Figure 4 MCU forwarding one flow.....................................................................6 Figure 5 Media mixing MCU...............................................................................7 Figure 6 SIP packet schema ..............................................................................9 Figure 7 SIP packet with SDP..........................................................................12 Figure 8 Video phone call establishment SIP dialog ........................................13 Figure 9 RTP packet schema...........................................................................18 Figure 10 Video conferencing delays...............................................................19 Figure 11 Secure SIP dialog using TLS ...........................................................22 Figure 12 SIP digest challenge authentication .................................................23 Figure 13 Securing the whole SIP message ....................................................24 Figure 14 SRTP schema..................................................................................25 Figure 15 AES counter-mode...........................................................................26 Figure 16 SRTP HMAC generation..................................................................27 Figure 17 SRTP crypto context creation...........................................................27 Figure 18 MIKEY operation..............................................................................28 Figure 19 MIKEY PSK key agreement.............................................................30 Figure 20 MIKEY PKE key agreement.............................................................31 Figure 21 MIKEY Signed DH key agreement...................................................32 Figure 22 SIP and MIKEY ................................................................................33 Figure 23 MCU layer proposed design.............................................................36 Figure 24 SRTP capable MCU.........................................................................37 Figure 25 Director Functionality........................................................................37 Figure 26 SDP media dealing...........................................................................40 Figure 27 Implemented SIP state machine ......................................................40 Figure 28 Dynamic SRTP key generation........................................................42 Figure 29 Packet Reflector orders in a SDP negotiation.................................. 44 Figure 30 Flow result........................................................................................44 Figure 31 MCU operating with SRTP flows......................................................45 Figure 32 MCU as a server ..............................................................................46 Figure 33 MCU as a caller................................................................................46 Figure 34 MCU re-Inviting operation ................................................................49 Figure 35 MCU re-Inviting operation with sendonly attributes..........................50 Figure 36 Testbed topology..............................................................................52 Figure 37 Flow result........................................................................................53 Figure 38 Flow result in a secure scenario.......................................................55 Figure 39 Alternative testbed............................................................................57 Figure 40 Flow result........................................................................................58 Figure 41 MCU in a multicast network..............................................................61
1 1. Introduction In a global situation, where companies and institutions operate all over the world and Internet is present in almost all countries, video conferencing is becoming an essential tool to communicate people in very far locations. It is a clear example of how technology can be applied to solve real needs of the society. Nowadays, video conferencing can be used in business meetings, telemedicine or medical councils and even in distant education. To all these reasons can be added that, since video conferences suppress the need to travel in order to have a meeting, it also contributes to environmental preservation-care. In order to increase the feeling of the participants in a video conference to be in the same room, new media technologies can be used. High Definition video technologies can improve the user experience, since details can be noticed. The quick development underwent by Internet technologies in last years increased the bandwidth available for user applications. This fact, linked with the growth of the SIP protocol and the H.323 specifications in the VoIP environment, has allowed the manufacturers to build simple-to-use video conference solutions. Finally, the use of Internet to transmit the media of a video conference shows some security issues to be solved. Doctors and businessman of any corporation probably would like to be sure only authorized people can watch and listen the conference, so some security measures must be implemented to protect this information.
2 2. Background This section presents a theoretical study about technologies and products involved in secure High Definition video conferencing. Firstly, current solutions in video conferencing are analyzed. It is also presented the concept of a centralized solution for multi point conferences. After that, signalling protocols to control media sessions and media issues (basically video coders) are studied. Finally, security solutions for media and signalling are discussed, making several proposals to provide different security levels to video conferences. 2.1. Video conferencing A video conference is usually defined as a meeting of three or more people placed in different locations using any technology that enables them to see and to hear each other almost as if they were in the same room. The difference between a video conference and a video call is the number of participants in the meeting: two people would be considered just a video call (mainly because it can be done as a peer-to-peer call), whereas three or more people would be considered as a video conference. A video conference could also include file sharing, white board sharing and instant messages, which helps to have the feeling of being in a real meeting. Thanks to all these functionalities, video conferencing is a very valuable tool for telemedicine, distance education and business, because it allows to communicate people at different and very far locations without the need to travel. 2.1.1. History The first approach for a video conference was made using two different UHF radio channels to send the signal obtained from television cameras. This system was used in the first space flights by the NASA and some television channels in the 60s and the 70s [1]. Few years after, television channels moved to mobile links to satellites using special trucks for their live connections outdoors. This was a very expensive technology, so it was not common in uses such as education, medicine or business. For that reason, during the 70s, the American operator AT&T developed the Picturephone, which was a telephone able to send low quality video and a telephone audio channel in a 6Mbps bit rate. Unfortunately, the equipments and the line costs were very high so the system did not succeed [1].
3 In the 80s, Integrated Services Digital Network (ISDN) links deployed a digital telephony network, so operators started selling few models of videophones. Those devices were used to compress the video and the audio and to transfer that data to another videophone through the digital telephony line [1]. It was in the 90s, with the Internet Protocol (IP) networks deployment and the appearance of new standard based technologies when video calls or video conferencing became popular. Low quality video and audio channels were used as part of most the instant messaging platforms. Also, dedicated and expensive devices were made for big companies, in order to allow their people to meet with no time loose and avoiding travelling costs. Nowadays, video conferencing is used very often in big corporations, telemedicine and some educational environments. The research efforts in that area are focused on the use of High Definition (HD) video or high quality media, offering secure solutions and the combination of both. 2.1.2. Videoconferencing architectures Depending on the way the media flows are treated and sent, several solutions have been proposed in videoconferencing environments through IP networks. Videoconferencing seems to be a perfect scenario to use multicast, since media flows generated by one source must be delivered to several destinations (see Figure 1). Unfortunately, in many situations multicast will not work between users so alternative solutions must be considered in case it is not available [2] [3]. Figure 1 Video conferencing in a Multicast Network
10 In the protocol definition, there is a set of SIP methods defined. The most used ones are the following: • INVITE is used to request the start of a session to another user • REGISTER is used to get registered into the client’s registrar • ACK is used to acknowledge the receipt of a message • BYE is used to end the session • OPTIONS is used to request client or server capabilities • CANCEL is used to cancel a request • INFO is used to exchange control info once the session is established Apart from these messages, there is a code defined for the responses to the messages. It is similar to the code defined for responses in HTTP and is based on a number and an optional explanation sentence [7]: • Codes 100 to 182: informational messages, such as 100 Trying or 180 Ringing • Code 200: success message, 200 OK • Codes 300 to 302: redirection messages, like 301 Moved Permanently • Codes 400 to 486: client error messages, such as 401 Unauthorized • Codes 500 to 505: server error messages, like 500 Not Implemented • Code 600 to 606: global failure messages, as 603 Decline Also, any message could be added. This is one of the most important features of SIP and what gives its flexibility. By adding new messages, it is possible to perform different behaviours in the User Agents (sending instant messages, sending files, sending XML parameters, …), so then SIP can be used as a signal protocol for lots of applications. The second parameter in the first line is called the SIP Uniform Resource Identifier (SIP-URI). This is the identifier of a user or a device and it is like the phone number in the traditional phone networks or the email address in the email system. Its structure is very similar to email addresses, using @ symbol to separate the user name from the domain name or the network address. The main structure of the SIP-URI would be this: sip:[user:password@]hostname|ipv4addr|ipv6addr[:port; params] Some examples of SIP-URIs could be the following: • sip:[email protected] • sip:[email protected]:5060 • sip:user:[email protected] • sip:[email protected];user=Dave To enable everybody to contact with a SIP-URI, a mechanism to translate a SIP-URI to the current location network address of the user must be performed.
11 For that reason, every user should register to the SIP registrar of his or her domain. To find a user given his or her SIP-URI, a client should find first his or her SIP registrar. To achieve this, the process is similar to the one done in SMTP mail exchanges and it usually involves a Domain Name Server (DNS) request to get the SRV entry for that domain. This operation can also be done by a SIP proxy on behalf of the original client. After the first line of the SIP packet, a structured header of the packet is enclosed. It is very similar to HTTP or SMTP headers and it describes the caller, the callee, the path and the message type. There are 37 different headers and they can be divided into 4 main groups [5] [7]: • General headers: used both in request and response messages • Request headers: used in request messages to add extra information • Response headers: used in response messages to add extra information • Entity headers: indicates the length and the content type in the body of the message The most important and most used headers are explained below: • Via: indicates the path (SIP proxies) the message took to arrive to the destination • Max-Forwards: indicates the number of hops the message can do before to arrive to destination. Each proxy server that forwards this message would decrease by one this parameter • To: indicates the name and the SIP-URI of the destination of the message • From: indicates the name and the SIP-URI of the source of the message • Call-ID: unique identification number of the session • Command-sequence: sequence number of the message and SIP method o Incremented by one for each new message o The same number for the responses to a message • Subject: indicates the subject of the session established • Contact: indicates the SIP-URI to contact directly the source of the message • Content-type: indicates the type of content in the message body • Content-length: indicates the length of the body of the message • Accept: indicates if the message body is accepted by the client • Accept language: indicates the preferred language of the user to receive messages • Date: time of the first request • Encryption: indicates the preferred algorithm to encrypt the body of the messages • Record-route: used by proxies to demand all messages to go through it
12 • Require: indicates the functionalities the client needs to be performed to accept the session • Supported: indicates the features supported by a server • Timestamp: used by the clients to calculate the round trip time delay Finally, a SIP message can also include a body. It is optional and it usually carries information about the session established or non-SIP parameters to be exchanged. Session Description Protocol (SDP) In order to use SIP to establish a media session (i.e. a phone call), it is necessary to agree upon parameters for the session. The caller and the callee must agree which CODEC and which protocols to use, where to send the media flows and where to receive them. These parameters are not agreed in the SIP message exchange, so another protocol should be used in the SIP message body to do so (see Figure 7). This protocol is the Session Description Protocol (SDP), which is another IETF protocol designed to define media session initialization parameters [8] [9]. Figure 7 SIP packet with SDP Using SDP, participants can define information related to the type of media (audio, video, …), the CODEC (MPEG, PCM, GSM, …), the transport protocol (UDP, RTP, SCTP, …) and port numbers. Nowadays, the protocol is described in the RFC 4566 and it defines the following list of attributes to define media sessions: Session description • v: protocol version • o: originator and session identifier • s: session name • i: extra session information • u: URI of description • e: email address • p: phone number • c: connection information • b: bandwidth information • z: time zone adjustments • k: encryption key
13 • a: session attribute Time description • t: time the session is active • r: repeat times Media description • m: media name and transport address • i: media title • c: connection information • b: bandwidth information • k: encryption key • a: media attributes SIP dialog As said above, SIP is a protocol based in the message exchange between SIP User Agents in the clients. Attending to this and taking into account all explained about SIP, an example of a SIP dialog to establish a video phone call is presented. Imagine two users, Alice and Bob, with their SIP-URIs,
[email protected] and [email protected]. Alice wants to make a video phone call to Bob and she knows about Bob’s SIP-URI but not about his IP address, his location nor his SIP Proxy Registrar. The dialog to establish a call will be the one shown in Figure 8. Figure 8 Video phone call establishment SIP dialog The messages in Figure 8 would be the following:
14 • Message 1: Bob is registering in the SIP Proxy Registrar responsible for the domain minisip.org, which is sip.minisip.org. The content of the SIP message would be this: REGISTER sip:sip.minisip.org SIP/2.0 Via: SIP/2.0/UDP 2.3.4.5:5060 From: sip:[email protected] Contact: Bob <sip:[email protected]:5060> CSeq: 1 REGISTER Call-ID: [email protected] Expires: 7200 • Message 2: when Alice wants to contact Bob, she sends an INVITE message through her SIP Proxy. This message contains an SDP message in the body, in order to offer Bob several options to establish the media session. INVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP 1.2.3.4:5060 From: sip:[email protected] To: sip:[email protected] Call-ID: [email protected] CSeq: 1 INVITE Content-type: application/sdp v=0 s=Video phone call [email protected] c=IN IP4 1.2.3.4 t=0 0 m=audio 10000 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 m=video 10001 RTP/AVP 34 a=rtpmap:34 H263/90000 In this SDP, Alice is offering Bob to use either PCMU or PCMA audio codec in her UDP port 10000 over RTP and H263 video codec in her UDP port 10001 also over RTP for the video phone call. • Message 3: since Alice SIP proxy (sip.kth.se) does not know about Bob’s SIP Proxy, it makes a DNS Request in order to get its address. The proxy would ask for the SRV entry and it would indicate to find a SIP and UDP capable server. • Message 4: the DNS response would include the name of the SIP proxy for minisip.org domain as well as its IP address. • Message 5: now, sip.kth.se can forward the Alice INVITE message to sip.minisip.org, adding a Via header in the SIP header:
15 INVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP sip.kth.se:5060 Via: SIP/2.0/UDP 1.2.3.4:5060 From: sip:[email protected] To: sip:[email protected] Call-ID: [email protected] CSeq: 1 INVITE Content-type: application/sdp v=0 s=Video phone call [email protected] c=IN IP4 1.2.3.4 t=0 0 m=audio 10000 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 m=video 10001 RTP/AVP 34 a=rtpmap:34 H263/90000 • Message 6: the INVITE message would be finally delivered to Bob by his SIP Proxy, adding another Via header: INVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP sip.kth.se:5060 Via: SIP/2.0/UDP 1.2.3.4:5060 From: sip:[email protected] To: sip:[email protected] Call-ID: [email protected] Cseq: 1 INVITE Content-type: application/sdp v=0 s=Video phone call [email protected] c=IN IP4 1.2.3.4 t=0 0 m=audio 10000 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 m=video 10001 RTP/AVP 34 a=rtpmap:34 H263/90000 • Messages 7, 8 and 9: Bob’s User Agent would send a 180 Ringing to Alice in order to inform her User Agent the INVITE message was received. This message is going to be forwarded back to Alice through the SIP Proxies, each one of them adding a Via Header.
16 SIP/2.0 180 Ringing Via: SIP/2.0/UDP 2.3.4.5:5060 From: sip:[email protected] To: sip:[email protected] Call-ID: [email protected] Cseq: 1 INVITE Content-length:0 • Messages 10, 11 and 12: as soon as Bob picks up the phone, his User Agent would send a 200 OK response to Alice. This message is also going to be delivered through the proxies, since Bob does not know yet Alice’s address. SIP/2.0 200 OK Via: SIP/2.0/UDP 2.3.4.5:5060 From: sip:[email protected] To:sip:[email protected] Call-ID: [email protected] Cseq: 1 INVITE Content-type: application/sdp v=0 s=Video phone call [email protected] c=IN IP4 2.3.4.5 t=0 0 m=audio 20000 RTP/AVP 0 8 a=rtpmap:8 PCMA/8000 m=video 20500 RTP/AVP 34 a=rtpmap:34 H263/90000 In the SDP message, Bob chooses to use PCMA over RTP in his 20000 UDP port for the audio flow and H263 over RTP in his 20500 UDP port for the video flow. • Message 13: when Alice gets the 200 OK message from Bob, she sends an acknowledgement for this message to tell Bob she accepts the parameters Bob chose. At this moment and thanks to the Via headers, Alice knows Bob’s location, so this message is sent directly to Bob. ACK sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP 1.2.3.4:5060 From: sip:[email protected] To: sip:[email protected] Call-ID: [email protected] Cseq: 1 ACK Content-length: 0 If Alice did not accept Bob’s SDP offer (either for the CODEC, the port or anything else), she would send a CANCEL message instead. Then, the connection would be closed.
17 • Message 14: Alice and Bob will be sending each other 2 RTP flows containing audio and video information. They should use the CODECs and the ports they agreed in the SIP dialog, thanks to the SDP protocol. • Message 15: when the video phone call ends, Alice would hang up and media flows would stop sending. At this moment, her User Agent is going to send a BYE message to Bob’s User Agent, so it notices the call is over. BYE sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP 1.2.3.4:5060 From: sip:[email protected] To: sip:[email protected] Call-ID: [email protected] Cseq: 345 BYE Content-length: 0 • Message 16: finally, Bob would accept the end of the call by sending a 200 OK message to Alice. SIP/2.0 200 OK Via: SIP/2.0/UDP 2.3.4.5:5060 From: sip:[email protected] To: sip:[email protected] Call-ID: [email protected] Cseq: 345 BYE Content-length: 0 2.3. Dealing with media in video conference environments Once the signalling protocol agrees the parameters to establish a media session, data flows containing audio, video or other kind of information can be sent by participants. However, it is necessary to define some protocols to allow participants to read correctly these media flows. 2.3.1. Real-time Transport Protocol (RTP) The Real-time Transport Protocol (RTP) is a standardized packet format designed to deliver media contents (mostly video and audio, but also images) over an IP network [10]. It was first defined in 1996 as RFC 1889, which was replaced by RFC 3550 in 2003. It was originally thought as an add-on for the UDP protocol in media environments, although it can be also delivered over a TCP layer. It has no defined port to be delivered, so it is usually delivered in the wide area of nondefined ports. However, it is said in the standard that RTP must use an even port and the Real-time Transport Control Protocol (RTCP) use the next odd port.
18 An RTP packet is divided into a 12-bytes header and a payload (see Figure 9). The payload would carry the data of the packet and in the header the following information is provided [5]: • RTP Version [V] (2 bits): indicates the version of the protocol. Current version is 2 • Padding [P] (1 bit): indicates if there is extra information at the end of the packet, in order to exactly fit on an 8 bit alignment • Extension [X] (1 bit): indicates if any extension of the protocol is used in the packet • Contributors [NCSRC] (2 bits): indicates the number of contributors to that session. It is used to read the CSRC optional headers • Marker bit [N] (1 bit): it is used to inform the application that something special is in that packet. Usually is always off in audio streams and 1 in video packets containing the last information of a frame • Payload type [PT] (7 bits): identifier of the type of data in the payload of the packet. Usually it is an identifier of the codec used in the media transported, defined in the RFC 3551 • Sequence number [SN] (8 bits): sequence numbers increased by one at each packet • Timestamp [TMP] (16 bits): time of the acquisition of the first sample carried by the packet • Synchronization source identifier [SSRC] (16 bits): identifier of the source of the packet • Contributing source identifier [CSRC] (16 bits): identifier of the contributors to the media session. It is optional and it will be one for each participant when the media goes through a mixer Figure 9 RTP packet schema The RTCP protocol was designed as a brother protocol of RTP in the same RFC 3550. It is usually transmitted periodically together with an RTP flow and provides quality of service feedback and control information to the source and
19 the receiver of the media flow, like timestamps linking to Network Time Protocol (NTP) times or changing CODEC requests. 2.3.2. Delays and Video coders In a video conference, video flows should be treated in a special way. In these environments the delay must be as small as possible, in order to give the participants the feeling that they are in front of each other. Attending to the interactivity ITU recommendation, the maximum delay between each part should not be longer than 150ms (Round Trip Time <= 300ms). This means that a participant should see and listen what happened in the other participants’ rooms 150ms before. This is really difficult to achieve with nowadays technologies if one consider using HD video, but gives the idea on how the delay should be considered. To measure the delay, several times must be taken into account: acquisition time, compression time, packetizing time, network transmission time, unpacketizing time, decompression time and jitter-control display buffer time (Figure 10). Figure 10 Video conferencing delays Regarding to this time schema, it is easy to realize that the less is the compression/decompression time, the less is the total delay of the system. So then, it is a good idea to use media CODECs that do not take too much time to compress media or even not to compress it, always trying to compromise compression time and network transmission time. Digital Video (DV) This format of video is the one used by most of the domestic video cameras. It consists in raw PAL/NTSC images usually obtained through the Firewire interface (IEEE 1394). It mixes in a single 25Mbps flow video and audio signals. Since no compression is applied and the output bit rate seems quite reduced, it could be valid for a first approach in video conferencing. However, having the audio and video flows mixed could be a problem if the sound is the parameter
26 • NULL cipher: it can be used to disable encryption, when authentication and integrity protection are needed, but not confidentiality. The operation of this mode is very simple: it just copies the input to the output, with no changes in the payload of the RTP packet. • Segmented Integer Counter Mode: this mode is based in typical counter mode behaviour, using one-time-pad keys to cipher the plaintext. The main advantage of this mode is that one-time-pad keys can be precomputed and then used in the XOR with the plaintext [13]. This is the default algorithm for SRTP and it uses a 128 bits default encryption key and a 112 bits default session salt key. In the below schema (Figure 15), it is shown how the default AES Block Cipher is used in counter-mode. The Initialization Vector (IV in the figure) depends on the source identifier (SSRC), the packet index (Sequence Number) and the salting key. Figure 15 AES counter-mode Authentication and Integrity: HMAC Although the RTP packets were ciphered, anybody in the network could manipulate them or even replace them. This could be a big security hole, because reply attacks can be done against a receiver, making impossible to him or her to receive any media. To solve these issues, authentication and integrity protection must be provided. This is achieved by a keyed-Hash Message Authentication Code (HMAC) based on a Security Hash Algorithm 1 (SHA-1) hashing function. This function returns a Message Authentication Code (MAC), which is added to the RTP packet with a ciphered payload.
27 A keyed-Hash Message Authentication code is obtained applying a hash function to the content to be protected, an authentication key and two defined padding (opad, ipad) [13]. Note that the hash is applied after the encryption is done and it protects also the RTP headers. The default authentication key should be 128 bits and the HMAC-SHA-1 algorithm will generate a 160-bit hash code. In SRTP this hash code is truncated to the last 32 bits (4 bytes) [19], in order not to add too much overhead to the media flow (Figure 16). Finally, a 4-byte Master Key Identifier is also added to the packet, in order to inform the receiver which crypto context (encryption key, authentication key and salt key) was used to protect that packet (Figure 16). Figure 16 SRTP HMAC generation SRTP cryptographic issues As stated, SRTP uses a master key to obtain the other keys used to protect the RTP packets, but the draft says nothing about how to share this master key between the source and the destination. In order to get an encryption key, an authentication key and a salt key from the same master key, a derivation function is used to generate this crypto context (Figure 17) [19]. By this way, only a master key needs to be exchanged. Figure 17 SRTP crypto context creation
28 Moreover, SRTP could become insecure if the same key is used to cipher more than 2 48 packets, a number fixed because of the rollover counter and the sequence number lengths. With this amount of ciphered data, the possible attacker could obtain information and break the cryptographic session. In order to avoid this, a re-keying protocol to generate a new crypt context is needed too. 2.4.4. Key Agreement: MIKEY There are some existing key agreement implementations, such as the Internet Security Association and Key Management Protocol (ISAKMP) framework and the Internet Key Exchange (IKE) protocol [14]. Both of them provide several levels of security. However, there is a very specific option for protecting multimedia exchanges: the Multimedia Internet Keying (MIKEY) [20]. It is been revealed as the best option when using SIP to establish secured multimedia sessions [14] [18]. The purpose of MIKEY is to exchange cryptographic parameters in the media negotiation process. This, when using SDP over SIP to establish media sessions, means that MIKEY should be able to perform a mutual authentication and agree a master key in just one roundtrip. MIKEY defines a way to exchange a master key, called Transport Generation Key (TGK). From this TGK, MIKEY is able to get a Transport Encryption Key (TEK), which will be the one used as the SRTP master key (see Figure 18) [14] [20]. The protocol also provides a mechanism to exchange other security parameters. Figure 18 MIKEY operation Solved security issues Several security issues can be protected by using MIKEY. The most important ones are the following:
29 • Mutual authentication: it allows the authentication of both parts in the media session by the use of a challenge/response scheme. To fit the challenge/response scheme in the offer/answer model, basically reducing by one the number of exchanged messages, MIKEY uses timestamps as challenges. Using timestamps in combination with an authentication key, allows the participants to verify the identity of each other. • Replay protection: it prevents the use of the same timestamp to authenticate for twice. When a timestamp is received, it is stored locally and every new MIKEY message should use a later timestamp than the stored ones. • Perfect forward secrecy: using Diffie-Hellman agreement schema, it is possible to assure that even if a private key is revealed, there is no chance to compromise the keys used in a crypto session. This is possible because a completely new and random TGK is agreed every time a connection starts. Key agreement types Depending on the computational resources and the authentication procedures available, MIKEY describes three types of key agreements [20]: • Pre-shared key (PSK): in this type of agreement, Alice and Bob must share a secret in advance. Assuming K as the pre-shared secret, RAND as random generated string, ID as the user identifier, constant1 and constant2 as two wellknown byte strings and f() as a pseudo-random function defined in the MIKEY draft, the key agreement would work as shown in Figure 19.
30 Figure 19 MIKEY PSK key agreement Alice generates an encryption key and an authentication key. Then she sends a Timestamp, a random string, her user identifier, the MIKEY TGK key encrypted with the generated encryption key and a MAC to protect the whole message using the generated authentication key. Then, Bob generates the encryption key and the authentication key with the parameters he received from Alice. These keys should be the same as Alice generated, since the parameters used to generate them are the same. So then, Bob can decrypt the TGK key and can check the MAC Alice sent. After that, Bob answers with a Timestamp, his user identifier and a MAC to protect the message with the generated authentication key. Finally, Alice checks the MAC to make sure that Bob is the one who sent this message. • Public-key encryption (PKE): in this type of agreement, Alice and Bob must have each a pair of public/private keys. It is also needed a PKI in order to validate user keys in front of other users. Assuming rand() as a random function that generates a random byte stream, RAND as random generated string, ID as the user identifier, constant1 and constant2 as two well-known byte strings and f() as a pseudo-random function defined in the MIKEY draft, the key agreement would work as shown in Figure 20.
31 Figure 20 MIKEY PKE key agreement Alice generates an envelope key with a random function. With the result of that function, an encryption key and an authentication key are generated. Then she sends a Timestamp, a random string, her user identifier, the MIKEY TGK key encrypted with the generated encryption key, a MAC to protect the whole message using the generated authentication key and the envelope key encrypted with Bob’s public key. Then, Bob decrypts the envelope key using his private key. With the clear envelope key, he generates the encryption key and the authentication key with the other parameters he received from Alice. These keys should be the same as Alice generated, since the parameters used to generate them are the same. So then, Bob can decrypt the TGK key and can check the MAC Alice sent. After that, Bob answers with a Timestamp, his user identifier and a MAC to protect the message with the generated authentication key. Finally, Alice checks the MAC to make sure that Bob is the one who sent this message. • Signed Diffie-Hellman (DH): in this type of agreement, Alice and Bob must have each a pair of public/private keys. It is also needed a PKI in order to validate user keys in front of other users and complicate man-in- the-middle attacks, since the attacker would need both Alice an Bob private keys.
32 Figure 21 MIKEY Signed DH key agreement Alice generates a random number (x) and sends to Bob a Timestamp, a random byte stream, her user identifier or her certificate, g x mod p, a set of parameters used in the Diffie-Hellman algorithm (basically g and p, defined by a DH_group identifier) and a signature of the message. Bob generates a random number (y) and answers Alice with a Timestamp, his user identifier or his certificate, g y mod p, g x mod p, the DH_group and a signature of the whole message. Then, both Alice and Bob can calculate a TGK as g xy mod p. This TGK is generated randomly, so that is why is said that Signed Diffie-Hellman key exchange preserves the perfect forward secrecy, since a new key agreement would generate a completely different TGK [13] [20]. MIKEY in the SIP dialog One of the main design goals of MIKEY is to fit the key agreement in the media negotiation process, usually done by SIP. The reason why MIKEY should perform the key agreement and the mutual authentication in just one roundtrip is that the SIP call establishment is done in just one roundtrip. To achieve that, MIKEY key agreement is performed in the INVITE transaction, by adding a new SDP attribute: key-mgmt. This attribute can be set as a session attribute or as a media attribute (see Figure 22) [14]. In the first case, the exchanged TEK will protect all the streams agreed in that session. In the second, a TEK will be exchanged for every flow described and it will be used only to protect only media in that flow.
33 Figure 22 SIP and MIKEY In case re-keying is needed, it should be performed by a RE-INVITE transaction, conducted the same way as the INVITE transaction did. Dealing with non-secured SIP UAs should also be considered. If a secured UA invites a non-secured UA, the latter is going to omit the key-mgmt attribute in the SDP of the 200 OK message. In that case, the first UA should give the user the option to fall back to an unsecured session initiation (adding another SDP media descriptor in the INVITE message) or to cancel the communication. In the last case, when the callee UA does not accept a non-secure call and the caller policy is do not accept unsecured calls, the receiver could suffer from ghost ringing. Since the 200 OK message is not sent until the callee accepts the call, he doesn’t know if Alice will reject the non-secure session and close the establishment. The solution to this problem is achieved by using the 1XX SIP responses, provisional responses, to carry the MIKEY response. If the 180 Ringing is used to carry the MIKEY response, the ringing delay could be big, since the callee should process all the crypto session. The solution for that is to use a 183 Session in Progress message, sent after the 180 Ringing but before the 200 OK [16].
34 3. Background study conclusions After looking at the state of the art of several technologies linked to the area of this study, several conclusions in the different subjects covered can be proposed. 3.1. Video conferencing Looking at the current video conference solutions, their problems and some solutions proposed in other studies and the lack of multicast capabilities of most networks, I conclude that a Multi-point Conference Unit is nowadays the best option for video conferencing over Internet. This system allows the users to send their media flows just once, but these are finally delivered to all other participants in the video conference. However, most of the commercial solutions are based in proprietary systems integrated in dedicated devices. Although most of them use standard protocols (such as H.323 and SIP), solve some security issues and can deal with High Definition media, they are closed solutions. Also, it is necessary to work in the video CODEC issue in order to minimize the delay introduced in the compression process. Finally, the need of a High Definition video conference system comes up to give the user the feeling he or she is in a real meeting with other participants. Adding other capabilities such as sharing files or digital shared blackboards could really make the difference in front of traditional video conference systems. 3.2. Signalling protocol In this study I dealt with the signalling of a media session establishment, looking at the two main protocols used for that, H.323 and SIP. After my analysis, I come to the conclusion that because of its flexibility and its simplicity, SIP is the right protocol to use in the development of a new video conference environment. Moreover, SIP offers several options to secure the signalling messages and to perform user authentication, even though it is done using other protocols, and the possibility to establish a secure media session using SRTP and MIKEY. 3.3. Security Several studies [18] show that using SRTP is the best option to secure a media session. This option does not add too much overhead and the security standards used on it are quite fast. Also, security is added at the application layer and can be platform-cross, since other options such as IPSec are usually linked to the operating system.
35 These reasons make me think that SRTP should be a very good solution for video conferencing, where minimizing the delays is one of the most important issues to solve. Also, thinking about High Definition or high quality media flows and their high bit rate, reducing the overhead is also important in order to save network bandwidth. SRTP needs an external mechanism to perform the key exchange, and previous studies at TSLab were focused on the use of MIKEY to do so. Since MIKEY is thought to be used over SIP and I stated that SIP is the best option for video conference signalling, I see no reason not to use also MIKEY as the exchange mechanism for SRTP master keys.
42 does not know about it. The MCU will use the TEK generated for this call and is going to generate the SRTP keys using the newly appeared SSRC. Finally, the client will read the SSRC in the first packet of the SRTP flow, will generate the new keys and will decrypt and authenticate the flow. We also needed to change that in the miniSIP client. Figure 28 Dynamic SRTP key generation Re-Keying feature In the theoretical study of the SRTP is stated that a re-keying mechanism is needed if more than 2 48 packets are encrypted with the same key. Although MIKEY is capable to do that, we realised this feature is not needed in our MCU. We made some calculations in different cases to demonstrate that the re-keying feature is not needed. We calculate how much time would take to send 2 48 packets with some well-known bandwidth rates of some media generators. • PCMU ~ 64kbps (8 Kbytes/s) yearspacketstT ms sbytes packetbytes t packet packets packet 1785102·10·202· 20 /10·8 /160 48348 2 3 48 ≈== == − • HDV over IP (DVTS) ~ 25Mbps (3,125Mbytes/s) yearspacketstT s sbytes packetbytes t packet packets packet 42272·10·6,4732· 6,473 /10·125,3 /1480 48648 2 6 48 ≈== == − µ
43 • SMTPE 292M over IP (UltraGrid) ~ 1,5Gbps (187,5Mbytes/s) yearspacketstT s sbytes packetbytes t packet packets packet 702·10·893,72· 893,7 /10·5,187 /1480 48648 2 6 48 ≈== == − µ Even if we consider using the same key for the flow sent and the flow received (the time would be the half), we realise that the re-keying feature is not needed at all. Moreover, a possible attacker should sniff all the traffic during 35 years in the worst case and then analyse this traffic in order to calculate the keys used to secure that information. 5.2. Packet Reflector This piece of software was developed by the i2cat HDVIPER team. It is an RTP packet bouncer that is capable to forward several RTP media flow, each one to several destinations. This software is also written in C++, so it was easy to integrate in the new MCU application created with miniSIP libraries. 5.2.1. Integration with the SIP Layer The packet reflector is compiled in the same binary file as the SIP Layer does, so the result of the application is just one executable file. In order to build a complete MCU, it is needed not only the establishment but also to deal with media. In this case, we are building a forwarding MCU, so we need to tell the Packet Reflector what and where to forward it. To do so, an API was defined with the i2cat team. With this API, we should be able to add or delete sources and destinations in the Packet Reflector. These sources and destinations are agreed between participants and the MCU using SIP and SDP. When the MCU receives a valid incoming call (that is allowed and supports the required media), the information related to the media flows (the type of media, the IP address and the port) is read and an SDP answer is sent. After that and taking into account the parameters agreed in the SDP negotiation, the flows are set up in the Packet Reflector. The basic API for the Packet Reflector has the following methods and parameters: • addSource(flowId, source IP, destination Port) addSource(flowId, source IP, destination Port)addSource(flowId, source IP, destination Port) addSource(flowId, source IP, destination Port) : adds a media flow as a source • addDestination(sourceFlowId, flowId, destination IP, addDestination(sourceFlowId, flowId, destination IP, addDestination(sourceFlowId, flowId, destination IP, addDestination(sourceFlowId, flowId, destination IP, destination Port) destination Port)destination Port) destination Port) : adds a destination where to forward one of the source flows • removeSource(flowId) removeSource(flowId)removeSource(flowId) removeSource(flowId) : removes one of the created sources and all the destinations for it
44 • removeDestination(sourceFlowId, flowId) removeDestination(sourceFlowId, flowId)removeDestination(sourceFlowId, flowId) removeDestination(sourceFlowId, flowId) : removes a destination of one of the sources Using the same example used in SDP media dealing, the Packet Reflector would receive the next orders: Figure 29 Packet Reflector orders in a SDP negotiation After that, the MCU will forward the media flows as shown in Figure 30. Figure 30 Flow result The addSource and addDestination methods are called when a user joins the conference (see room(add_user) in Figure 27). The SIP Layer reads the SDP information and sets up the flows in the Packet Reflector using that information. Finally, the removeSource and removeDestination methods are called when a user leaves the conference (see room(del_user) in Figure 27). The
45 SIP Layer keeps track of the flows assigned to a certain user, so when it leaves, these flows are deleted in the Packet Reflector. 5.2.2. Securing media flows: SRTP In order to add security to the media flows forwarded by the MCU, we will use the SRTP protocol. Since the users are establishing the session with the MCU but the real destination of their flows is not the MCU, we need it to decrypt and re-encrypt all the secured media flows. The keys will be generated as explained in 5.1.5 (Key exchange: MIKEY) and the operation will work as shown in Figure 31. Figure 31 MCU operating with SRTP flows In order to generate the right keys for each user, we added new methods to create secured flows in the Packet Reflector. These methods just added a link with the MIKEY information exchanged with the user, so the right TEK can be used to generate the SRTP keys. The new methods added are the following ones: • addSource(flowId, source addSource(flowId, source addSource(flowId, source addSource(flowId, source IP, destination Port, MIKEY IP, destination Port, MIKEY IP, destination Port, MIKEY IP, destination Port, MIKEY info) info)info) info) : adds a media flow as a source, telling the Packet Reflector that all packets from this source should be decrypted and authenticated using the given MIKEY information • addDestination(sourceFlowId, flowId, destination IP, addDestination(sourceFlowId, flowId, destination IP, addDestination(sourceFlowId, flowId, destination IP, addDestination(sourceFlowId, flowId, destination IP, d dd destination Port, MIKEY info) estination Port, MIKEY info)estination Port, MIKEY info) estination Port, MIKEY info) : adds a destination where to forward one of the source flows, telling the Packet Reflector that all packets sent to this destination should be encrypted and authenticated using the given MIKEY information
46 5.3. Alternative implementation We had several other ideas to solve the problems shown up during the design and implementation process. Although we did not implement them, they should be taken into consideration for future improvements on the software. 5.3.1. Calling process At the beginning of the design process, we considered two options for the MCU operation: • Make the MCU to act as a server, so users could call to get into a conference. Figure 32 MCU as a server • Create a mechanism to make the MCU to call the participants in a conference, so they just have to answer the call to be in a conference scheduled at a certain time. Figure 33 MCU as a caller Both ideas were right, but we preferred the first one, since we wish the user to require being in a conference. Moreover, in the second option we would have to build a mechanism to schedule the MCU to call to certain users at a certain time, although it could also have been good for resource planning purposes.
47 However, would be nice to mix both in future versions. This would allow the system to invite new participants during a conference. 5.3.2. Configuring rooms In this first implementation, we chose a command line system to add and configure conferences in the MCU, as explained in 5.1.1 (Conferences). We implemented this because it was very simple and we did not need something more complex at that time. A very good improvement for this system would be to create a web interface in order to allow the administrator to manage conferences. From this interface, it would be possible to add or delete rooms, allow or deny users and define schedules for the conference, so the resources could be booked. The best advantage of this option is that just a browser would be needed to manage the MCU. We did not look much into this feature, but we thought that a good system would be to use a database system to store data and a small daemon reading it, as done in ComCloser [4]. For this purpose, SQLite [25] seems to fit perfectly, since only a single file is needed and there is a small driver implemented in C++ that offers the possibility to push an alarm when content is modified. 5.3.3. Signalling the conference In order to signal to the MCU to which conference the user wants to get in, our first thought was to use a different SIP URI for each room. Our idea was to make the MCU to register as a new SIP URI against the Registrar for each room created in the system. Then, the users just had to call to a simple SIP URI, such as room_n[email protected]. We discarded this idea because it was needed for the MCU to register the same contact info for several SIP URIs. We believed that using SIP parameters in the SIP URI was a better solution for this problem. 5.3.4. Media parameters negotiation In 5.1.3 (SDP media dealing), it is explained the problem appeared when dealing with the media session negotiation in a conference using an MCU. We thought about different possibilities, a part of the chosen one, to solve this issue: • Check just the media name and save the media type identifier. After that, modify the forwarded packets with the media type negotiated with the destination. We discarded this idea because it was not the most efficient one since media packet should be analyzed and modified on the fly. • Find the common CODECs between the MCU and a new participant. If there is any common CODEC, accept the call but delete from the accepted media list the CODECs that this new user does not support.
48 The problem of this solution is that we needed to update the former users in the conference about the changes. We finally chose to require the new calls to accept, at least, all the media in the room in order to simplify this process. 5.3.5. Announcing new participants In our implementation, when a client joins a conference, it is not announced to the former participants. The MCU starts forwarding the RTP flows and the clients just show or play them. This requires the clients to be capable to receive multiple RTP streams in the same port, but keeps simple the signalling plane. However, some previous research had been done in this area. In [21], it is proposed to announce the entrance of a new participant in a conference by a re-invite message to all the former participants. They suggest announcing the flows from the new participant as a hold media line offer (using 0.0.0.0 as IP and 0 as port). Then, the client should answer with an SDP announcing where and how (IP, port and RTP media type) it wants to receive these new flows (see Figure 34).
49 Figure 34 MCU re-Inviting operation Another possibility related to this option would be to use the SDP media attributes sendonly and/or recvonly (a=sendonly, a=recvonly), as proposed in [22]. On one hand, sendonly defines a media flow that the announcer wants to send, but not to receive it. On the other hand, recvonly defines a flow the announcer just want to receive, not to send. Back to the example in Figure 34, if these attributes were used, the negotiation would follow as shown in Figure 35.
50 Figure 35 MCU re-Inviting operation with sendonly attributes Despite these options, receiving multiple streams in the same port make everything easy when dealing with NAT traversal features. Also, it requires for the clients to understand these attributes, which is something not always happens. 5.3.6. SRTP key generation for new flows We modified miniSIP in order to be capable to create new SRTP keys for a RTP flow that was not announced in the MIKEY negotiation. However, we thought about another possibility to solve the same problem. Instead of changing the client, we could make the MCU to re-invite the client when starting sending a new SRTP flow (see 5.3.5, Announcing new participants). Doing this, the MCU would send a new MIKEY message
51 announcing to the user the new SSRC, so it could create the keys to decrypt the new secured flow. Nevertheless, we thought the solution we chose to be simplest, although this could be a problem with other MIKEY capable SIP phones.
58 Figure 40 Flow result Looking at the results, we can make some calculations in order to figure up how much bandwidth the MCU can deal with in this situation. • Average delay introduced in each packet packetst /5,24 3 2 146814 4 2 146814 4 2 861513 5 µ = +++ ++ +++ ++ +++ + = • Maximum theoretical throughput Mbps byte bits packet bytes s packet BW 67,463 1 8 · 1 1420 · 5,24 1== µ Once we calculate the theoretical throughput, and defining a certain bandwidth to be sent from each user, it is easy to find how many users can be supported by the MCU. If we assume each user is just sending 22,72Mbps again, we can find the number of users supported by our MCU in this scenario: usersNN user Mbps Mbps 5 72,22 67,463 ; 72,22 67,463 2 ≈== Unfortunately, and due to the lack of computers with a 1Gbps Ethernet interface, we could not check if these calculations were right or if we could add more users to the conference. We could neither test this scenario with secured flows, since the design of the old version of the Packet Reflector was not ready to add the parameters needed for it. However, we could make some theoretical calculations based on the measurements took in 6.4.2 (SRTP secured flows).
59 We applied the average time to unsecure or secure a packet and other times obtained in 6.4.2 (SRTP secured flows) to this scenario, so we obtained the average time to deal with a packet: st packet µ 575,245,32 =+= With this time is easy now to calculate the theoretical maximum throughput and the number of users the system can handle: usersNN user Mbps Mbps Mbps byte bits packet bytes s packet BW 3 72,22 3,199 ; 72,22 3,199 3,199 1 8 · 1 1420 · 57 1 2 ≈== == µ Taking into account these calculations were just theoretical and that we mixed times obtained using either a good computer but bad software or better software and a slow computer, we feel that the use of security has an affordable cost in terms of computing time, unless a weak computer is used as the MCU.
60 7. Final conclusions This chapter of conclusions will focus on the signalling layer and security issues of my implementation, since they were the main targets of this study. During the early stages of the design and the implementation of the MCU we took some decisions that now do not seem to have been the best ones. I will try to explain our vision in the next paragraphs. In our implementation, we assumed that the SIP client was able to receive several RTP streams in the same UDP port. Our decision was done thinking about miniSIP, which can do that, but later tests showed that most other SIP clients (such as Ekiga or hardware SIP phones) can not do that. This is a problem for our software, since these clients will be able to play only one of the flows received and the user will be able to communicate just with one of the participants in the conference. The announcement of new participants joining the conference is linked to the multiple streams issue. In our implementation, the MCU does not inform the former participants that a new user joined the conference, it just starts forwarding the flows coming from this new user to the other ones. As explained in 5.3.5 (Announcing new participants), using re-invite messages and announcing new media flows in the SDP with the sendonly attribute seems to be the optimal solution to solve this problem, since the SIP clients would not need to support multiple streams in the same port. Also, we avoid the problem of ensuring everyone in a conference can receive all types of media sent (5.1.3, SDP media dealing), since the clients would reject all re-invites with SDP offers including unsupported media types. Moreover, thinking about MIKEY integration in this last solution, MIKEY messages could be sent in every re-invite, so the new RTP SSRCs would be announced in the SDP. By this way, SRTP keys could be generated before any media is sent and we would not need to modify miniSIP to read the SSRC from the first received packet. Despite all these issues appeared during the development of this thesis, we built a working system. All the knowledge acquired will be used for further implementations within the HDVIPER project, taking into account these conclusions. If the test results are analyzed, one could think that the MCU could be a limitation in terms of bandwidth. That is probably true, but the lack of multicast in most of the public networks drove us to choose this system. The good point about this is that it can also be used in a multicast environment to allow nonmulticast capable users to join a conference (see Figure 41). Furthermore, in this situation the MCU could also act as the central signalling point needed in multicast conferences.
61 Figure 41 MCU in a multicast network Also, we showed that using a forwarding MCU is convenient for videoconferencing, since the delay introduced by this element is very short. Although we didn’t implement them, we found some solutions to solve the problems appeared with the signalling of different types of media. We also discovered that the weakness of this system is not in the software itself but in the bandwidth available in the computer running the MCU. We made some calculations to prove that the maximum number of users the system can handle by a 1Gbps full duplex Ethernet is 7 users: MbpsMbpsMbpsBW MbpsMbpsMbpsBW BWusersBWusersBW users users useruserupload 32,127272,22·872,22·8 14,95472,22·772,22·7 ·#·)(# 2 8 2 7 2 =−= =−= −= Finally, although we only could test the new software with two users and a slow computer due to the problems in the Packet Reflector, we proved that using SRTP to secure media flows can be used to protect high bandwidth flows when using an MCU, since the delay added by this feature was short enough for videoconferencing. Moreover, if we think using a powerful computer to run the MCU or even using AES hardware en/decrypters, the delay would be shorter, more users could be supported and the performance could be better than in our tests.
62 8. References [1] Wikipedia. Videoconferencing. Wikipedia <http://en.wikipedia.org/wiki/Videoconferencing>. Published 12-2007, read 12-2-2008. [2] López Rubio, Javier; Oller Arcas, Antoni. MCU para multiconferencias en alta definición. Universitat Politècnica de Catalunya, Escola Politècnica Superior de Castelldefels, 2007. [3] Alcober Segura, Jesús; López Rubio, Javier; Oller Arcas, Antoni; High- Definition Video Conferencing MCU with SIP signaling capabilities. Department of Telematics Engineering, Universitat Politècnica de Catalunya / Fundació I2cat, 2007. [4] Anagrius, Jimmy; Bishaj, Blerta; Ngelja, Leonard James; Rajwani, Sanjay. ComCloser < http://www.tslab.ssvl.kth.se/csd/projects/0727/> Read 12-2- 2008. [5] Rincon Rivera, David. Intensificació en Serveis Telemàtics: Protocols IP relacionats amb multimèdia. Universitat Politècnica de Catalunya, Escola Politècnica Superior de Castelldefels, February 2007. [6] Wikipedia. H.323. Wikipedia <http://en.wikipedia.org/wiki/H.323>. Published 10-2006, read 15-2-2008. [7] Rosenberg, J. and others. SIP: Session Initiation Protocol. Internet Engineering Task Force, RFC 3261, 2002. [8] Handley, M; Jacobson, V; Perkins, C. SDP: Session Description Protocol. Internet Engineering Task Force, RFC 4566, 2006. [9] Wikipedia. Session Description Protocol. Wikipedia <http://en.wikipedia.org/wiki/Session_Description_Protocol>. Published 7- 2004, read 19-2-2008. [10] Schulzrinne, H. and others .RTP: A Transport Protocol for Real-Time Applications. Internet Engineering Task Force, RFC 3550, 2003. [11] Schulzrinne, H; Casner, S. RTP Profile for Audio and Video Conferences with Minimal Control. Internet Engineering Task Force, RFC 3551, 2003. [12] HDV format. Main Specifications <http://www.hdvinfo.org/HDVSpecifications.pdf>. Read 22-2-2008. [13] Kaufman, Charlie; Perlman, Radia; Speciner, Mike. Network Security. Private Communication in a PUBLIC World. Prentice Hall PTR, Second Edition, 2002.
63 [14] Bilien, Johan. Key Agreement for Secure Voice over IP. Royal Institute of Technology (KTH), Center for Wireless Systems and Telecommunication Systems Laboratory, 2003. [15] Wikipedia. S/MIME. Wikipedia < http://en.wikipedia.org/wiki/S/MIME>. Published 11-2004, read 24-2-2008. [16] Bilien, Johan; Eliasson, Erik; Orrblad, Joachim; Vatn, Jon-Olov. Secure VoIP: call establishment and media protection. Royal Institute of Technology (KTH), 2005. [17] Svensson, Mikael. Countering VoIP Spam: Up-Cross-Down Certificate Validation. Royal Institute of Technology (KTH), Telecommunications System Laboratory, 2007. [18] Orrblad, Joachim. Alternatives to MIKEY/SRTP to secure VoIP. Royal Institute of Technology (KTH), Telecommunications System Laboratory, 2005. [19] Baugher, M. and others. The Secure Real-time Transport Protocol (SRTP). Internet Engineering Task Force, RFC 3711, 2004. [20] Arkko, J. and others. MIKEY: Multimedia Internet KEYing. Internet Engineering Task Force, RFC 3830, 2004. [21] Rosenberg, J. and others. Models for Multi Party Conferencing in SIP. Internet Engineering Task Force, Internet Draft, 2001. [22] Rosenberg, J. and Schulzrinne, H. An Offer/Answer Model with the Session Description Protocol (SDP). Internet Engineering Task Force, RFC 3264, 2002. [23] miniSIP Web Page < http://www.minisip.org >. Last visit on 28-5-2008. [24] Subversion Web Page < http://subversion.tigris.org/ >. Last visit on 28-5- 2008. [25] SQLite Project Web Page < http://www.sqlite.org/ >. Last visit on 11-6- 2008. [26] SIP Express Router Web Page < http://www.iptel.org/ser/ >. Last visit on 13-6-2008.
64 9. Appendix A – miniSIP miniSIP is an Open-Source SIP User Agent (also known as SIP phone or Internet Phone) oriented to provide security to the calls done over Internet. It is designed in different code modules, called libraries, that join together to build a complete SIP phone. These libraries can be used separately to create new applications and that is what we did to develop the MCU. More information can be found on the miniSIP project webpage [23]. 9.1. miniSIP libraries used by the MCU In order to make the new MCU application works, we used the following miniSIP libraries. All of them need to be compiled to use the MCU. • libmutil: cross platform support for threads, semaphores, mutex and other utilities. Used by all the other libraries. • libmnetutil: cross platform support for threads and networking utilities. Used by libmsip and libminisip. • libmcrypto: cross platform support for security utilities, such as AES encryption/decryption or SmartCard based authentication. Used by libminisip. • libmstun: support for NAT traversal using a STUN server. Used by libminisip. • libmikey: support for MIKEY protocol. Used by libminisip. • libmsip: full state SIP stack and utilities to create simple SIP applications. Used by libminisip. • libminisip: full SIP phone without a GUI. In the development of the MCU, we used directly tools from libmutil, libmikey, libmsip and libminisip. However, all the other libraries are needed for the right behaviour of the mentioned ones. 9.2. Getting miniSIP miniSIP uses Subversion (also known as SVN) [24] as a version control and repository system, so to get the latest version of the code a SVN client is needed. In Linux, we can use the terminal SVN client to get it: svn co svn://svn.minisip.org/minisip/trunk Once it finishes downloading it, the source code of the latest version of miniSIP will be in the local computer.
65 9.3. Compiling miniSIP Once we obtained the source code via SVN, we need to compile the libraries to use them in the MCU. To do so, the following compiling tools are needed: • g++ • make, automake and autoconf • libtool A part of that, miniSIP has some dependency on other packages that must be solved before installing it: • libglademm and libgtkmm, used in the GTK GUI. • libssl-dev and openssl, used for security. • libltdl-dev, used for the plugin system. Before starting compiling, some settings must be written in the .bashrc file of the user. To do so, open the /home/user/.bashrc file and add the following lines at the end: export ACLOCAL_FLAGS="-I /home/user/share/aclocal" export LD_LIBRARY_PATH=/home/user/lib export CPPFLAGS=-I/home/user/include export LDFLAGS=-L/home/user/lib export PKG_CONFIG_PATH=/home/user/lib/pkgconfig/ After that, run the next command to update the changes: bash And create the following folders (use the mkdir command): • /home/user/share/aclocal • /home/user/lib/pkgconfig • /home/user/include • /home/user/bin Finally, the computer is ready to start compiling miniSIP libraries. Run the following commands in a terminal and wait for it to end: cd libmutil for i in libmutil libmnetutil libmcrypto libmstun libmikey libmsip libminisip minisip ; do cd ../$i; ./bootstrap && ./configure --enable-debug --disable- gconf --enable-gtk --enable-textui --enable-video prefix=/home/$USER && make && make install ; done By this command we configure and compile all the libraries needed by the MCU and the two GUIs (text based and GTK based) for the SIP phone. We enable the debug mode, the two GUIs and the video support, and we disable the configuration through the GConf configuring tool.
66 10. Appedix B – Using the new MCU application In order to use the new MCU application, it is first needed to compile the miniSIP libraries listed in 9.1 (miniSIP libraries used by the MCU). To do so, follow the instructions in 9.3 (Compiling miniSIP). Once the miniSIP libraries are correctly compiled and installed, the following packages should be installed, since they are dependencies of the Packet Reflector: • libboost-devel • libboost-thread As soon as these packages are correctly installed, the system is ready to compile the MCU application. To do so, the Makefile provided with the software can be used, so it is just needed to run make in a terminal. Once it is compiled, it can be run by the following command: ./bin/mcu –u [SIP URI] –p [SIP PORT] -i [network interface] This will run an instance of the software, using the SIP URI specified, listening on the SIP port specified and using the network interface specified.
67 11. Appendix C – Terms and abbreviations 3GPP 3rd Generation Partnership Project ADSL Asymmetric Digital Subscriber Line AES Advanced Encryption Standard CA Certificate Authority DH Diffie-Hellman DNS Domain Name Server GSM Groupe Spécial Mobile HMAC keyed-Hash Message Authentication Code HTTP Hyper-Text Transfer Protocol IETF Internet Engineering Task Force IKE Internet Key Exchange IP Internet Protocol IPSec Internet Protocol Security ISDN Integrated Services Digital Network ISAKMP Internet Security Association and Key Management Protocol ITU International Telecommunication Union MAC Message Authentication Code MCU Multipoint Conference Unit MIKEY Multimedia Internet Keying MPEG Moving Pictures Experts Group MTU Maximum Transfer Unit NASA National Aeronautics and Space Administration NAT Network Address Translation NTP Network Time Protocol NTSC National Television System Committee PAL Phase Alternating Line PCM Pulse Code Modulation PDA Personal Digital Assistant PKE Public Key Encryption PKI Public Key Infrastructure PSK Pre-Shared Key PSTN Public Switched Telephone Network RFC Request for Comments RTCP Real-time Transfer Control Protocol RTP Real-time Transfer Protocol SCTP Stream Control Transmission Protocol SDP Session Description Protocol SHA-1 Security Hash Algorithm 1 SMTP Simple Mail Transfer Protocol SIP Session Initiation Protocol SIP-URI Session Initiation Protocol Universal Resource Identifier SRTCP Secure Real-time Transfer Control Protocol SRTP Secure Real-time Transfer Protocol SVN Subversion TCP Transmission Control Protocol TEK Transport Encryption Key TGK Transport Generation Key TLS Transport Layer Security UA User Agent UAC User Agent Client UAS User Agent Server UDP User Datagram Protocol UHF Ultra High Frequency VoIP Voice over Internet Protocol