diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-372B7A9F-261E-5F3F-B114-4BE2FE2EF7C7.dita --- a/Symbian3/PDK/Source/GUID-372B7A9F-261E-5F3F-B114-4BE2FE2EF7C7.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-372B7A9F-261E-5F3F-B114-4BE2FE2EF7C7.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,205 +1,205 @@ - - - - - -Creating -a SRTP Stream

SRTP library generates SRTP packets from the RTP or RTCP stream -and forwards the packets to the receiver. SRTP transforms incoming SRTP packets -to RTP/RTCP packets and passes them up the stack.

The cryptographic -state information associated with each SRTP stream is termed the cryptographic -context. The state information is maintained by both the sender and receiver -of SRTP streams. If multiple SRTP streams exist within a given RTP session, -then separate cryptographic contexts must be maintained for each stream. Each -stream is identified by a Synchronisation Source (SSRC). The stream can be -a incoming or outgoing.

-

Prior to stream creation:

    -
  • A SRTP session must -be created and initialised.

  • -
  • Values to populate the -cryptographic context for the stream shall be available.

    The callback -object (for MSRTPReKeyingObserver) shall be implemented .

  • -
- -Create a SRTP stream -(incoming) by invoking the NewL() of -the class CSRTPStreamIn. - -The functions NewL() has six -variants. Each of the variants are explained below. - - - - IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, - TUint aSSRC); - -This API is appropriate when the stream uses the cryptographic context -of the session. -aSession is the input parameter that contains the session. The stream -will use the cryptographic context of the session. -aSSRC is the input parameter that contains the synchronization source -ID of the SRTP stream. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - - IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, - TUint aSSRC, - CSRTPCryptoContext* aCon, - MSRTPReKeyingObserver& aObs ); - -This API is appropriate when the stream will have a cryptographic context -of its own. -aSession is the input parameter that contains the session. -aSSRC is the input parameter that contains the synchronization source -ID of the SRTP stream. -aCon is the input parameter that contains cryptographic context of -the SRTP stream. -aObs is the callback object. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - - IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession); - -This API is appropriate when the stream will use the cryptographic context -of the session. No synchronisation source id is provided at the time of stream -creation. The stream uses late binding. -aSession is the input parameter that contains the session. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - - IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, - CSRTPCryptoContext* aCon, - MSRTPReKeyingObserver& aObs ); - -This API is appropriate when the stream will have a cryptographic context -of its own. No synchronisation source id is provided at the time of stream -creation. The stream uses late binding. -aSession is the input parameter that contains the session. -aCon is the input parameter that contains cryptographic context of -the SRTP stream. -aObs is the callback object. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - - IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, - TUint aSSRC, - MSRTPReKeyingObserver& aObs ); - -This API is appropriate when the stream will have a cryptographic context -of its own. The cryptographic context is set later using SetCryptoInL(). -aSession is the input parameter that contains the session. -aSSRC is the input parameter that contains the synchronization source -ID of the SRTP stream. -aObs is the callback object. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - - IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, - MSRTPReKeyingObserver& aObs ); - -This API is appropriate when the stream will have a cryptographic context -of its own. The cryptographic context is set later using SetCryptoInL(). No -synchronisation source id is provided at the time of stream creation .The -stream uses late binding. -aSession is the input parameter that contains the session. -aObs is the callback object. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - -Create a SRTP stream -(outgoing) by invoking the NewL() of -the class CSRTPStreamOut. - -The functions NewL() has three -variants. Each of the variants are explained below. - - - - IMPORT_C static CSRTPStreamOut* NewL( CSRTPSession& aSession, TUint aSSRC ); - -This API is appropriate when the stream uses the cryptographic context -of the session. -aSession is the input parameter that contains the session. The stream -will use the cryptographic context of the session. -aSSRC is the input parameter that contains the synchronization source -ID of the SRTP stream. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - - IMPORT_C static CSRTPStreamOut* NewL( CSRTPSession& aSession, - TUint aSSRC, - CSRTPCryptoContext* aCon, - MSRTPReKeyingObserver& aObs ); - - -This API is appropriate when the stream will have a cryptographic context -of its own. -aSession is the input parameter that contains the session. -aSSRC is the input parameter that contains the synchronization source -ID of the SRTP stream. -aCon is the input parameter that contains cryptographic context of -the SRTP stream. -aObs is the callback object. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - - IMPORT_C static CSRTPStreamOut* NewL( CSRTPSession& aSession, - TUint aSSRC, - MSRTPReKeyingObserver& aObs ); - -This API is appropriate when the stream will have a cryptographic context -of its own. The cryptographic context is set later using SetCryptoOutL(). -aSession is the input parameter that contains the session. -aSSRC is the input parameter that contains the synchronization source -ID of the SRTP stream. -aObs is the callback object. -The API leaves with KErrNone if successfully executed, else returns -a valid system-wide error code. - - - - -

On successful execution of the API, a SRTP stream is created and -initialized.

-

The cryptographic context of the stream can be deleted and the -stream can be re-initialised using UpdateCryptoAndStatesL() .

-
-Creating -an SRTP Session -Creating -a Cryptographic Context -Encrypting - RTCP Packet Data -Encrypting -RTP Packet Data -Decrypting -RTP Packet Data -Decrypting - RTCP Packet Data -Updating -Master Key -Managing - Master Key + + + + + +Creating +a SRTP Stream

SRTP library generates SRTP packets from the RTP or RTCP stream +and forwards the packets to the receiver. SRTP transforms incoming SRTP packets +to RTP/RTCP packets and passes them up the stack.

The cryptographic +state information associated with each SRTP stream is termed the cryptographic +context. The state information is maintained by both the sender and receiver +of SRTP streams. If multiple SRTP streams exist within a given RTP session, +then separate cryptographic contexts must be maintained for each stream. Each +stream is identified by a Synchronisation Source (SSRC). The stream can be +a incoming or outgoing.

+

Prior to stream creation:

    +
  • A SRTP session must +be created and initialised.

  • +
  • Values to populate the +cryptographic context for the stream shall be available.

    The callback +object (for MSRTPReKeyingObserver) shall be implemented .

  • +
+ +Create a SRTP stream +(incoming) by invoking the NewL() of +the class CSRTPStreamIn. + +The functions NewL() has six +variants. Each of the variants are explained below. + + + + IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, + TUint aSSRC); + +This API is appropriate when the stream uses the cryptographic context +of the session. +aSession is the input parameter that contains the session. The stream +will use the cryptographic context of the session. +aSSRC is the input parameter that contains the synchronization source +ID of the SRTP stream. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + + IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, + TUint aSSRC, + CSRTPCryptoContext* aCon, + MSRTPReKeyingObserver& aObs ); + +This API is appropriate when the stream will have a cryptographic context +of its own. +aSession is the input parameter that contains the session. +aSSRC is the input parameter that contains the synchronization source +ID of the SRTP stream. +aCon is the input parameter that contains cryptographic context of +the SRTP stream. +aObs is the callback object. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + + IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession); + +This API is appropriate when the stream will use the cryptographic context +of the session. No synchronisation source id is provided at the time of stream +creation. The stream uses late binding. +aSession is the input parameter that contains the session. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + + IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, + CSRTPCryptoContext* aCon, + MSRTPReKeyingObserver& aObs ); + +This API is appropriate when the stream will have a cryptographic context +of its own. No synchronisation source id is provided at the time of stream +creation. The stream uses late binding. +aSession is the input parameter that contains the session. +aCon is the input parameter that contains cryptographic context of +the SRTP stream. +aObs is the callback object. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + + IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, + TUint aSSRC, + MSRTPReKeyingObserver& aObs ); + +This API is appropriate when the stream will have a cryptographic context +of its own. The cryptographic context is set later using SetCryptoInL(). +aSession is the input parameter that contains the session. +aSSRC is the input parameter that contains the synchronization source +ID of the SRTP stream. +aObs is the callback object. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + + IMPORT_C static CSRTPStreamIn* NewL( CSRTPSession& aSession, + MSRTPReKeyingObserver& aObs ); + +This API is appropriate when the stream will have a cryptographic context +of its own. The cryptographic context is set later using SetCryptoInL(). No +synchronisation source id is provided at the time of stream creation .The +stream uses late binding. +aSession is the input parameter that contains the session. +aObs is the callback object. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + +Create a SRTP stream +(outgoing) by invoking the NewL() of +the class CSRTPStreamOut. + +The functions NewL() has three +variants. Each of the variants are explained below. + + + + IMPORT_C static CSRTPStreamOut* NewL( CSRTPSession& aSession, TUint aSSRC ); + +This API is appropriate when the stream uses the cryptographic context +of the session. +aSession is the input parameter that contains the session. The stream +will use the cryptographic context of the session. +aSSRC is the input parameter that contains the synchronization source +ID of the SRTP stream. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + + IMPORT_C static CSRTPStreamOut* NewL( CSRTPSession& aSession, + TUint aSSRC, + CSRTPCryptoContext* aCon, + MSRTPReKeyingObserver& aObs ); + + +This API is appropriate when the stream will have a cryptographic context +of its own. +aSession is the input parameter that contains the session. +aSSRC is the input parameter that contains the synchronization source +ID of the SRTP stream. +aCon is the input parameter that contains cryptographic context of +the SRTP stream. +aObs is the callback object. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + + IMPORT_C static CSRTPStreamOut* NewL( CSRTPSession& aSession, + TUint aSSRC, + MSRTPReKeyingObserver& aObs ); + +This API is appropriate when the stream will have a cryptographic context +of its own. The cryptographic context is set later using SetCryptoOutL(). +aSession is the input parameter that contains the session. +aSSRC is the input parameter that contains the synchronization source +ID of the SRTP stream. +aObs is the callback object. +The API leaves with KErrNone if successfully executed, else returns +a valid system-wide error code. + + + + +

On successful execution of the API, a SRTP stream is created and +initialized.

+

The cryptographic context of the stream can be deleted and the +stream can be re-initialised using UpdateCryptoAndStatesL() .

+
+Creating +an SRTP Session +Creating +a Cryptographic Context +Encrypting + RTCP Packet Data +Encrypting +RTP Packet Data +Decrypting +RTP Packet Data +Decrypting + RTCP Packet Data +Updating +Master Key +Managing + Master Key
\ No newline at end of file