diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-425A208C-5D2D-55FD-8623-9E00006E2781.dita --- a/Symbian3/PDK/Source/GUID-425A208C-5D2D-55FD-8623-9E00006E2781.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-425A208C-5D2D-55FD-8623-9E00006E2781.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,89 +1,89 @@ - - - - - -Creating -Cryptographic Context -

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.

-

A cryptographic context includes a session key used in encryption and message -authentication. A cryptographic context also includes a securely exchanged -random bit string used to derive session keys called the master key. In addition -to the session and master key the cryptographic context includes other working -session parameters.

- -
Required background

Prior to cryptographic context -creation:

    -
  • The master key,master -salt and parameters (ie. TSrtpCryptoParams) required to create the cryptographic -context must be created and initalised.

  • -
-
Procedure

The following steps describe the steps -involved in creating a cryptographic context:

    -
  • Create a cryptographic -context by invoking the API NewL() or NewLC() of the class CSRTPCryptoContext.

      -
    1. - IMPORT_C static CSRTPCryptoContext* NewL( const CSRTPMasterKey* aKey, - const CSRTPMasterSalt* aSalt, - const TSrtpCryptoParams& aCryptoParams);

      aKey -is the input parameter that contains the master key.

      aSalt is the -input parameter that contains the master salt key.

      aCryptoParams is -the input parameter that contains the Crypto Context parameters.

      The -API leaves with KErrNone if successfully executed, else returns a valid system-wide -error code.

    2. -
    3. - IMPORT_C static CSRTPCryptoContext* NewLC( const CSRTPMasterKey* aKey, - const CSRTPMasterSalt* aSalt, - const TSrtpCryptoParams& aCryptoParams );

      aKey -is the input parameter that contains the master key.

      aSalt is the -input parameter that contains the master salt key.

      aCryptoParams is -the input parameter that contains the Crypto Context parameters.

      The -API leaves with KErrNone if successfully executed, else returns a valid system-wide -error code.

    4. -
  • -

Creating Master Key

The master key can be created using -the following API's:

    -
  • IMPORT_C static CSRTPMasterKey* NewL( const TDesC8& aKey,const TDesC8& aMKI,TUint aN_E = KSRTPDefSessionEncryptionKeyLength,Uint aN_A = KSRTPDefSessionAuthenticationKeyLength );
  • -
  • IMPORT_C static CSRTPMasterKey* NewLC( const TDesC8& aKey,const TDesC8& aMKI,TUint aN_E = KSRTPDefSessionEncryptionKeyLength,TUint aN_A = KSRTPDefSessionAuthenticationKeyLength);
  • -
  • IMPORT_C static CSRTPMasterSalt* NewLC( const TDesC8& aKey, TUint aN_S = KSRTPDefSessionSaltingKeyLength );
  • -

Creating Master Salt Key

The master salt key can be created -using the following API's:

    -
  • IMPORT_C static CSRTPMasterSalt* NewL( const TDesC8& aKey,TUint aN_S = KSRTPDefSessionSaltingKeyLength )
  • -
- -
Results

On successful execution of the API, a cryptographic -context is created.

The cryptographic context can be used by a SRTP -session or Stream. In other words, the cryptographic context is owned by the -session or stream.

The master keys and the master salt are always -owned by the cryptographic context.

- -

For more information on cryptographic context management also -refer:

MasterKey()

SetMasterKey()

MasterSalt()

SetMasterSalt()

SetRCCm3Sync()

CryptoParams()

AddCryptoChangeObserver()

RemoveCryptoChangeObserver()

UpdateCryptoParams()

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

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.

+

A cryptographic context includes a session key used in encryption and message +authentication. A cryptographic context also includes a securely exchanged +random bit string used to derive session keys called the master key. In addition +to the session and master key the cryptographic context includes other working +session parameters.

+ +
Required background

Prior to cryptographic context +creation:

    +
  • The master key,master +salt and parameters (ie. TSrtpCryptoParams) required to create the cryptographic +context must be created and initalised.

  • +
+
Procedure

The following steps describe the steps +involved in creating a cryptographic context:

    +
  • Create a cryptographic +context by invoking the API NewL() or NewLC() of the class CSRTPCryptoContext.

      +
    1. + IMPORT_C static CSRTPCryptoContext* NewL( const CSRTPMasterKey* aKey, + const CSRTPMasterSalt* aSalt, + const TSrtpCryptoParams& aCryptoParams);

      aKey +is the input parameter that contains the master key.

      aSalt is the +input parameter that contains the master salt key.

      aCryptoParams is +the input parameter that contains the Crypto Context parameters.

      The +API leaves with KErrNone if successfully executed, else returns a valid system-wide +error code.

    2. +
    3. + IMPORT_C static CSRTPCryptoContext* NewLC( const CSRTPMasterKey* aKey, + const CSRTPMasterSalt* aSalt, + const TSrtpCryptoParams& aCryptoParams );

      aKey +is the input parameter that contains the master key.

      aSalt is the +input parameter that contains the master salt key.

      aCryptoParams is +the input parameter that contains the Crypto Context parameters.

      The +API leaves with KErrNone if successfully executed, else returns a valid system-wide +error code.

    4. +
  • +

Creating Master Key

The master key can be created using +the following API's:

    +
  • IMPORT_C static CSRTPMasterKey* NewL( const TDesC8& aKey,const TDesC8& aMKI,TUint aN_E = KSRTPDefSessionEncryptionKeyLength,Uint aN_A = KSRTPDefSessionAuthenticationKeyLength );
  • +
  • IMPORT_C static CSRTPMasterKey* NewLC( const TDesC8& aKey,const TDesC8& aMKI,TUint aN_E = KSRTPDefSessionEncryptionKeyLength,TUint aN_A = KSRTPDefSessionAuthenticationKeyLength);
  • +
  • IMPORT_C static CSRTPMasterSalt* NewLC( const TDesC8& aKey, TUint aN_S = KSRTPDefSessionSaltingKeyLength );
  • +

Creating Master Salt Key

The master salt key can be created +using the following API's:

    +
  • IMPORT_C static CSRTPMasterSalt* NewL( const TDesC8& aKey,TUint aN_S = KSRTPDefSessionSaltingKeyLength )
  • +
+ +
Results

On successful execution of the API, a cryptographic +context is created.

The cryptographic context can be used by a SRTP +session or Stream. In other words, the cryptographic context is owned by the +session or stream.

The master keys and the master salt are always +owned by the cryptographic context.

+ +

For more information on cryptographic context management also +refer:

MasterKey()

SetMasterKey()

MasterSalt()

SetMasterSalt()

SetRCCm3Sync()

CryptoParams()

AddCryptoChangeObserver()

RemoveCryptoChangeObserver()

UpdateCryptoParams()

+
+Creating +an SRTP Session +Creating +an SRTP Stream +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