21 #ifndef CRYPTOCONTEXT_H 22 #define CRYPTOCONTEXT_H 24 #include <commoncpp/config.h> 29 #define REPLAY_WINDOW_SIZE 64 41 #ifndef CRYPTOCONTEXTCTRL_H 46 #include <ccrtp/crypto/SrtpSymCrypto.h> 175 int32 masterKeyLength,
177 int32 masterSaltLength,
230 void srtpEncrypt(
RTPPacket* rtp, uint64 index, uint32 ssrc );
248 void srtpAuthenticate(
RTPPacket* rtp, uint32 roc, uint8* tag );
261 void deriveSrtpKeys(uint64 index);
275 uint64 guessIndex(uint16 newSeqNumber);
292 bool checkReplay(uint16 newSeqNumber);
303 void update( uint16 newSeqNumber );
354 CryptoContext* newCryptoContextForSSRC(uint32 ssrc,
int roc, int64 keyDerivRate);
366 int64 key_deriv_rate;
369 uint64 replay_window;
372 uint32 master_key_length;
373 uint32 master_key_srtp_use_nb;
374 uint32 master_key_srtcp_use_nb;
376 uint32 master_salt_length;
397 SrtpSymCrypto* cipher;
398 SrtpSymCrypto* f8Cipher;
The implementation for a SRTP cryptographic context.
Definition: CryptoContext.h:83
const int SrtpEncryptionTWOF8
Definition: CryptoContext.h:39
const int SrtpEncryptionAESF8
Definition: CryptoContext.h:37
const int SrtpAuthenticationNull
Definition: CryptoContext.h:31
uint32 getSsrc() const
Get the SSRC of this SRTP Cryptograhic context.
Definition: CryptoContext.h:330
A base class for both IncomingRTPPkt and OutgoingRTPPkt.
Definition: rtppkt.h:73
uint32 getRoc() const
Get the Roll-Over-Counter.
Definition: CryptoContext.h:211
int32 getTagLength() const
Get the length of the SRTP authentication tag in bytes.
Definition: CryptoContext.h:311
const int SrtpEncryptionTWOCM
Definition: CryptoContext.h:38
const int SrtpAuthenticationSkeinHmac
Definition: CryptoContext.h:33
const int SrtpAuthenticationSha1Hmac
Definition: CryptoContext.h:32
const int SrtpEncryptionAESCM
Definition: CryptoContext.h:36
void setRoc(uint32 r)
Set the Roll-Over-Counter.
Definition: CryptoContext.h:199
const int SrtpEncryptionNull
Definition: CryptoContext.h:35
int32 getMkiLength() const
Get the length of the MKI in bytes.
Definition: CryptoContext.h:321