Symbian3/PDK/Source/GUID-922F292E-9420-593B-B226-2764C5F29DF9.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-922F292E-9420-593B-B226-2764C5F29DF9" xml:lang="en"><title>Encrypting
       
    13 RTP Packet Data</title><abstract><p/>SRTP generates SRTP packets from the RTP stream and forwards
       
    14 the packets to the receiver. SRTP transforms incoming SRTP packets to RTP
       
    15 packets and passes them up the stack. To ensure the confidentiality of the
       
    16 packet content, data encryption is used.  <p/> The data packet consists
       
    17 of payload and header. The payload is encrypted. An authentication is performed
       
    18 collectively on the header and the encrypted payload. <p/>  Encrypted RTP
       
    19 packet data is encapsulated for transmission in a single lower-layer packet
       
    20 as a unit. The encrypted SRTP packet consists of the encrypted RTP payload
       
    21 and RTP header. The encrypted packet may be the exact size of the plain packet
       
    22 or larger. <p/>  The presence of encryption and the correct usage of key
       
    23 are confirmed by the receiver through header and payload validity checks. </abstract><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    24 <prereq><p>An SRTP session must be created and initialized before an application
       
    25 requests for a RTP payload encryption. </p> </prereq>
       
    26 <steps id="GUID-7A30F5A3-7CDF-5ED2-92E8-9254446B17FD">
       
    27 <step id="GUID-6F92FF92-7551-5AB0-B7DD-F8DD0866D35D"><cmd>An application requests
       
    28 for encryption of RTP packet. </cmd>
       
    29 </step>
       
    30 <step id="GUID-C38877C6-EEE0-5E63-80A2-5826F8BF826B"><cmd>The SRTP DLL checks
       
    31 for the cryptographic context of the input stream. If a match is not found,
       
    32 SRTP DLL checks for the cryptographic context of the session. </cmd>
       
    33 </step>
       
    34 <step id="GUID-BA67E90F-86E4-579F-8CC5-A6A765F73F92"><cmd/>
       
    35 <info>The packet is encrypted using <xref href="GUID-8B875E75-DD09-3E4D-9FC6-152091869BA2.dita"><apiname>ProtectRTPL()</apiname></xref> API
       
    36 of the class <xref href="GUID-8B875E75-DD09-3E4D-9FC6-152091869BA2.dita"><apiname>CSRTPSession</apiname></xref>.The session
       
    37 keys in the cryptographic context of the current SRTP session are used for
       
    38 encryption. </info>
       
    39 <substeps id="GUID-AF904AE9-50C8-56DF-8F58-B8642036B060">
       
    40 <substep id="GUID-5DE97C1A-88FB-5982-A675-AA9BC2ACF08B"><cmd/>
       
    41 <info>The prototype for the API <xref href="GUID-8B875E75-DD09-3E4D-9FC6-152091869BA2.dita"><apiname>ProtectRTPL()</apiname></xref> is
       
    42 as described below. </info>
       
    43 <stepxmp><codeblock id="GUID-171C1A63-8839-55D6-863A-5149EA60BB4C" xml:space="preserve">
       
    44                      IMPORT_C HBufC8* ProtectRTPL(TUint aSSRC, const TDesC8&amp; aPacket); 
       
    45                   </codeblock> </stepxmp>
       
    46 
       
    47 <info>This API is invoked if the session finds a match stream and protect
       
    48 stream. </info>
       
    49 <info>aSSRC is the input parameter that contains the Synchronisation Source
       
    50 (SSRC). Synchronisation Source is the source for stream of RTP packets identified
       
    51 by a 32 bit numeric. SSRC identifier is a part of the RTP packet header. </info>
       
    52 <stepxmp>aPacket is the input parameter that contains the packet to be protected(encrypted).
       
    53 The packet includes RTP header and the paleout. The length of descriptor should
       
    54 match the actual data length. A mismatch in the length descriptor and actual
       
    55 length may lead to incorrect encryption. </stepxmp>
       
    56 <info>HBufC8 is the output parameter that contains the encrypted packet. </info>
       
    57 <stepresult>The API leaves, if a matching stream is not found. </stepresult>
       
    58 </substep>
       
    59 </substeps>
       
    60 </step>
       
    61 <step id="GUID-80D0973B-232D-5EAC-A9F3-11C039E3401A"><cmd>The SRTP DLL updates
       
    62 the count of packets encrypted. </cmd>
       
    63 </step>
       
    64 </steps>
       
    65 <result><p>On successful execution of the API, encrypted data is returned. </p> </result>
       
    66 </taskbody><related-links>
       
    67 <link href="GUID-06370120-7738-5694-9A8C-3B5B1E3A4352.dita"><linktext>Creating
       
    68 an SRTP                 Session</linktext></link>
       
    69 <link href="GUID-425A208C-5D2D-55FD-8623-9E00006E2781.dita"><linktext>Creating
       
    70 a                 Cryptographic Context</linktext></link>
       
    71 <link href="GUID-372B7A9F-261E-5F3F-B114-4BE2FE2EF7C7.dita"><linktext>Creating
       
    72 an SRTP                 Stream</linktext></link>
       
    73 <link href="GUID-79846EA2-33CD-5D01-8E96-6092C15BD839.dita"><linktext>Encrypting
       
    74                 RTCP Packet Data</linktext></link>
       
    75 <link href="GUID-6E1AC4C9-7CA3-503A-AFC0-BAF29CCA8290.dita"><linktext>Decrypting
       
    76 RTP                 Packet Data</linktext></link>
       
    77 <link href="GUID-F9A24A47-7A0B-5F6E-8B0A-B7A7BCC4EAFC.dita"><linktext>Decrypting
       
    78                 RTCP Packet Data</linktext></link>
       
    79 <link href="GUID-B9BD2E0A-F214-5344-91A6-E4E99F0D74C8.dita"><linktext>Updating
       
    80 Master                 Key</linktext></link>
       
    81 <link href="GUID-F9A24A47-7A0B-5F6E-8B0A-B7A7BCC4EAFC.dita"><linktext>Managing
       
    82                 Master Key</linktext></link>
       
    83 </related-links></task>