CryptoContextCtrl(3) | Library Functions Manual | CryptoContextCtrl(3) |
CryptoContextCtrl - The implementation for a SRTCP cryptographic context.
#include <CryptoContextCtrl.h>
CryptoContextCtrl (uint32 ssrc)
Constructor for empty SRTP cryptographic context. CryptoContextCtrl
(uint32 ssrc, const int32 ealg, const int32 aalg, uint8 *masterKey, int32
masterKeyLength, uint8 *masterSalt, int32 masterSaltLength, int32 ekeyl,
int32 akeyl, int32 skeyl, int32 tagLength)
Constructor for an active SRTP cryptographic context.
~CryptoContextCtrl ()
Destructor. void srtcpEncrypt (uint8 *rtp, size_t len, uint64 index,
uint32 ssrc)
Perform SRTP encryption. void srtcpAuthenticate (uint8 *rtp, size_t
len, uint32 roc, uint8 *tag)
Compute the authentication tag. void deriveSrtcpKeys ()
Perform key derivation according to SRTP specification. bool
checkReplay (uint32 newSeqNumber)
Check for packet replay. void update (uint32 newSeqNumber)
Update the SRTP packet index. int32 getTagLength () const
Get the length of the SRTP authentication tag in bytes. int32
getMkiLength () const
Get the length of the MKI in bytes. uint32 getSsrc () const
Get the SSRC of this SRTP Cryptograhic context. CryptoContextCtrl *
newCryptoContextForSSRC (uint32 ssrc)
Derive a new Crypto Context for use with a new SSRC.
The implementation for a SRTCP cryptographic context.
This class holds data and provides functions that implement a cryptographic context for SRTP, Refer to RFC 3711, chapter 3.2 for some more detailed information about the SRTP cryptographic context.
Each SRTP cryptographic context maintains a RTP source identified by its SSRC. Thus you can independently protect each source inside a RTP session.
Key management mechanisms negotiate the parameters for the SRTP cryptographic context, such as master key, key length, authentication length and so on. The key management mechanisms are not part of SRTP. Refer to MIKEY (RFC 3880) or to Phil Zimmermann's ZRTP protocol (draft-zimmermann-avt-zrtp-01). After key management negotiated the data the application can setup the SRTCP cryptographic context and enable SRTCP processing.
Author:
Erik Eliasson eliasson@it.kth.se
Johan Bilien jobi@via.ecp.fr
Joachim Orrblad joachim@orrblad.com
Werner Dittmann Werner.Dittmann@t-online.de
Constructor for empty SRTP cryptographic context. This constructor creates an empty SRTP cryptographic context were all algorithms are set to the null algorithm, that is no SRTP processing is performed.
Parameters:
Constructor for an active SRTP cryptographic context. This constructor creates an active SRTP cryptographic context were algorithms are enabled, keys are computed and so on. This SRTP cryptographic context can protect a RTP SSRC stream.
Parameters:
Destructor. Cleans the SRTP cryptographic context.
Check for packet replay. The method check if a received packet is either to old or was already received.
The method supports a 64 packet history relative the the given sequence number.
Parameters:
Returns:
Perform key derivation according to SRTP specification. This method computes the session key, session authentication key and the session salt key. This method must be called at least once after the SRTP Cryptograhic context was set up.
Parameters:
Get the length of the MKI in bytes.
Returns:
Get the SSRC of this SRTP Cryptograhic context.
Returns:
Get the length of the SRTP authentication tag in bytes.
Returns:
Derive a new Crypto Context for use with a new SSRC. This method returns a new Crypto Context initialized with the data of this crypto context. Replacing the SSRC, Roll-over-Counter, and the key derivation rate the application cab use this Crypto Context to encrypt / decrypt a new stream (Synchronization source) inside one RTP session.
Before the application can use this crypto context it must call the deriveSrtpKeys method.
Parameters:
Returns:
Compute the authentication tag. Compute the authentication tag according the the parameters in the SRTP Cryptograhic context.
Parameters:
Perform SRTP encryption. This method encrypts and decrypts SRTP payload data. Plain data gets encrypted, encrypted data get decrypted.
Parameters:
Update the SRTP packet index. Call this method after all checks were successful. See chapter 3.3.1 in the RFC when to update the ROC and ROC processing.
Parameters:
Generated automatically by Doxygen for ccRTP from the source code.
Sat Oct 27 2018 | ccRTP |