|
Yate
|
SRTP implementation. More...
#include <yatertp.h>
Public Member Functions | |
| RTPSecure (DebugEnabler *dbg=0, const char *traceId=0) | |
| RTPSecure (const String &suite, DebugEnabler *dbg=0, const char *traceId=0) | |
| RTPSecure (const RTPSecure &other) | |
| virtual | ~RTPSecure () |
| RTPBaseIO * | owner () const |
| void | owner (RTPBaseIO *newOwner) |
| Cipher * | rtpCipher () const |
| virtual bool | supported (RTPSession *session=0) const |
| virtual bool | setup (const String &suite, const String &keyParams, const ObjList *paramList=0) |
| virtual bool | create (String &suite, String &keyParams, bool buildMaster=true) |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual bool | alive () const |
| virtual void | destruct () |
| virtual const String & | toString () const |
| virtual const String & | traceId () const |
| virtual void * | getObject (const String &name) const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Public Member Functions inherited from RTPDebug | |
| RTPDebug (DebugEnabler *dbg, const char *traceId) | |
| RTPDebug (RTPSession *session) | |
| DebugEnabler * | dbg () const |
| const String & | dbgTraceId () const |
Protected Member Functions | |
| virtual void | init () |
| virtual void | rtpEncipher (unsigned char *data, int len) |
| virtual void | rtpAddIntegrity (const unsigned char *data, int len, unsigned char *authData) |
| virtual bool | rtpDecipher (unsigned char *data, int len, const void *secData, u_int32_t ssrc, u_int64_t seq) |
| virtual bool | rtpCheckIntegrity (const unsigned char *data, int len, const void *authData, u_int32_t ssrc, u_int64_t seq) |
| bool | deriveKey (Cipher &cipher, DataBlock &key, unsigned int len, unsigned char label, u_int64_t index=0) |
Protected Member Functions inherited from RTPDebug | |
| void | setDebug (DebugEnabler *dbg, const char *traceId) |
Friends | |
| class | RTPReceiver |
| class | RTPSender |
| class | RTPSession |
Additional Inherited Members | |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Protected Attributes inherited from RTPDebug | |
| DebugEnabler * | m_dbg |
| String | m_traceId |
SRTP implementation.
Security and integrity implementation
| RTPSecure | ( | DebugEnabler * | dbg = 0, |
| const char * | traceId = 0 ) |
Default constructor, builds an inactive implementation
| dbg | DebugEnabler |
| traceId | Trace ID |
References RTPDebug::dbg(), and GenObject::traceId().
Referenced by RTPSecure().
| RTPSecure | ( | const String & | suite, |
| DebugEnabler * | dbg = 0, | ||
| const char * | traceId = 0 ) |
Constructor that creates an active implementation
| suite | Cryptographic suite to use by default |
| dbg | DebugEnabler |
| traceId | Trace ID |
References RTPDebug::dbg(), and GenObject::traceId().
Constructor that copies the basic crypto lengths
| other | Security provider to copy parameters from |
References RTPSecure().
|
virtual |
Destructor
Create a set of cryptographic parameters
| suite | Reference of returned cryptographic suite description |
| keyParams | Reference to returned keying material |
| buildMaster | Create random master key and salt if not already set |
|
protected |
Internal method implementing key derivation
| cipher | Cipher used for key derivation |
| key | Reference to derived key output |
| len | Desired length of the key, should be at most cipher block length |
| label | Derived key type |
| index | Packet index after being divided by KDR |
|
protectedvirtual |
Initialize security related variables in the RTP session
|
inline |
Get the owner of this security instance
| void owner | ( | RTPBaseIO * | newOwner | ) |
Set the owner of this security instance
| newOwner | Pointer to new RTPBaseIO owning this security instance |
|
protectedvirtual |
Method called to add integrity information to the RTP packet
| data | Pointer to the RTP packet to protect |
| len | Length of RTP data to be encrypted including header and padding |
| authData | Address to write the integrity data to |
|
protectedvirtual |
Method called to check the integrity of the RTP packet
| data | Pointer to RTP header and data |
| len | Length of header, data and padding |
| authData | Pointer to authentication data |
| ssrc | SSRC of the packet to validate |
| seq | Full (48 bit) seqence number of the packet including rollovers |
|
inline |
Get the current RTP cipher if set
|
protectedvirtual |
Method called to decipher RTP data in-place
| data | Pointer to data block to decipher |
| len | Length of data including any padding |
| secData | Pointer to security data if applicable |
| ssrc | SSRC of the packet to decipher |
| seq | Full (48 bit) seqence number of the packet including rollovers |
|
protectedvirtual |
Method called to encipher RTP payload data in-place
| data | Pointer to data block to encipher |
| len | Length of payload data to be encrypted including any padding |
|
virtual |
Set up the cryptographic parameters
| suite | Descriptor of the encryption and authentication algorithms |
| keyParams | Keying material and related parameters |
| paramList | Optional session parameters as list of Strings |
|
virtual |
Check if the systems supports requirements for activating SRTP
| session | RTP session to use for cipher checking, NULL to use owner session |