• Articles
  • Api Documentation
Search Results for

    Show / Hide Table of Contents
    • SipLib.Body
      • BodyParser
      • ContentTypes
      • MessageContentsContainer
      • MultipartBinaryBodyBuilder
      • SipBodyBuilder
    • SipLib.Channels
      • AcceptCertificateDelegate
      • AcceptConnectionDelegate
      • DscpSettings
      • LogInvalidSipMessageDelegate
      • LogSipRequestDelegate
      • LogSipResponseDelegate
      • Qos
      • SIPChannel
      • SIPConnection
      • SIPConnectionDisconnectedDelegate
      • SIPConnectionsEnum
      • SIPMessageReceivedDelegate
      • SIPTCPChannel
      • SIPTLSChannel
      • SIPUDPChannel
      • SipConnectionFailedDelegate
      • SipRequestReceivedDelegate
      • SipResponseReceivedDelegate
      • SipTransactionCompleteDelegate
      • WindowsQos
    • SipLib.Collections
      • ThreadSafeGenericList<T>
    • SipLib.Core
      • ByteBufferInfo
      • CallProperties
      • Crypto
      • HTTPDigest
      • IPSocket
      • SIPAuthenticationHeader
      • SIPAuthorisationDigest
      • SIPAuthorisationHeadersEnum
      • SIPCallInfoHeader
      • SIPConstants
      • SIPContactHeader
      • SIPEndPoint
      • SIPEscape
      • SIPFrag
      • SIPFromHeader
      • SIPGeolocationHeader
      • SIPHeader
      • SIPHeaders
      • SIPMessage
      • SIPMessageTypesEnum
      • SIPMethods
      • SIPMethodsEnum
      • SIPPaiHeader
      • SIPParameters
      • SIPPpiHeader
      • SIPProtocolsEnum
      • SIPProtocolsType
      • SIPReplacesParameter
      • SIPRequest
      • SIPResponse
      • SIPResponseStatusCodes
      • SIPResponseStatusCodesEnum
      • SIPRoute
      • SIPRouteSet
      • SIPSchemesEnum
      • SIPSchemesType
      • SIPToHeader
      • SIPURI
      • SIPUserField
      • SIPValidationException
      • SIPValidationFieldsEnum
      • SIPViaHeader
      • SIPViaSet
      • SipUtils
      • TypeExtensions
    • SipLib.Dtls
      • AlertLevelsEnum
      • AlertTypesEnum
      • DtlsClientUdpTransport
      • DtlsServerUdpTransport
      • DtlsSrtpClient
      • DtlsSrtpServer
      • DtlsSrtpTransport
      • DtlsUtils
      • IDtlsSrtpPeer
      • IPacketTransformer
      • ITransformEngine
      • NetConvert
      • RTCDtlsFingerprint
      • RawPacket
      • SrtcpCryptoContext
      • SrtpPolicy
      • SrtpTransformEngine
      • SrtpTransformer
    • SipLib.Logging
      • SipLogger
    • SipLib.Media
      • ALawDecoder
      • ALawEncoder
      • AudioDestination
      • AudioDestinationDelegate
      • AudioSampleData
      • AudioSamplesReadyDelegate
      • AudioSource
      • Band
      • DtmfDigitReceivedDelegate
      • FileAudioSource
      • G722Codec
      • G722CodecState
      • G722Decoder
      • G722Encoder
      • G722Flags
      • HighResolutionTimer
      • HighResolutionTimerDelegate
      • IAudioDecoder
      • IAudioEncoder
      • IAudioSampleSource
      • MediaPortManager
      • MediaPortSettings
      • MediaTypes
      • MsrpEncryptionEnum
      • MuLawDecoder
      • MuLawEncoder
      • PcmaDecoder
      • PcmaEncoder
      • PcmuDecoder
      • PcmuEncoder
      • PortRange
      • RtpEncryptionEnum
    • SipLib.Msrp
      • ByteRangeHeader
      • CpimMessage
      • MsrpCompletionStatus
      • MsrpConnection
      • MsrpConnectionStatusDelegate
      • MsrpMessage
      • MsrpMessageDeliveryFailedDelegate
      • MsrpMessageReceivedDelegate
      • MsrpMessageSentDelegate
      • MsrpMessageType
      • MsrpPathHeader
      • MsrpStatusHeader
      • MsrpStreamParser
      • MsrpTextMessageReceivedDelegate
      • MsrpUri
      • ReportReceivedDelegate
    • SipLib.Network
      • IpUtils
    • SipLib.RealTimeText
      • RttCharactersReceivedDelegate
      • RttParameters
      • RttReceiver
      • RttRtpSendDelegate
      • RttSender
    • SipLib.Rtp
      • ByePacket
      • DtlsHandshakeFailedDelegate
      • DtmfEventEnum
      • DtmfPacket
      • JitterStatistics
      • MeanOpinionScore
      • ReceiveStatisticsReadyDelegate
      • ReceiverReport
      • ReportBlock
      • RtcpCompoundPacket
      • RtcpHeader
      • RtcpPacketReceivedDelegate
      • RtcpPacketSentDelegate
      • RtcpPacketType
      • RtpChannel
      • RtpPacket
      • RtpPacketReceivedDelegate
      • RtpPacketSentDelegate
      • RtpReceiveStatistics
      • RtpUtils
      • SdesChunk
      • SdesItem
      • SdesItemType
      • SdesPacket
      • SenderInfo
      • SenderReport
    • SipLib.RtpCrypto
      • AesFunctions
      • CryptoAttribute
      • CryptoContext
      • CryptoSuites
      • InlineParams
      • MasterKeys
      • RocVals
      • RocValues
      • SRtpErrorsEnum
      • SRtpUtils
      • SessionKeys
      • SrtpDecryptor
      • SrtpEncryptor
      • SrtpLabelItem
      • SrtpTransformBase
    • SipLib.Sdp
      • ConnectionData
      • MediaDescription
      • MediaDirectionEnum
      • Origin
      • RtpMapAttribute
      • Sdp
      • SdpAnswerSettings
      • SdpAttribute
      • SdpUtils
      • SetupType
    • SipLib.Threading
      • QueuedActionWorkerTask
    • SipLib.Transactions
      • ClientInviteTransaction
      • ClientNonInviteTransaction
      • ServerInviteTransaction
      • ServerNonInviteTransaction
      • SipTimers
      • SipTransactionBase
      • SipTransport
      • TransactionRequestReceivedDelegate
      • TransactionResponseReceivedDelegate
      • TransactionStateEnum
      • TransactionTerminationReasonEnum
    • SipLib.Video
      • H264Depacketiser
      • H264Packetiser
      • H264Packetiser.H264Nal
      • H264RtpReceiver
      • H264RtpSender
      • RtpSendDelegate
      • RtpVP8Header
      • VP8RtpReceiver
      • VP8RtpSender
      • VideoRtpReceiver
      • VideoRtpSender

    Class SrtcpCryptoContext

    SRTPCryptoContext class is the core class of SRTP implementation. There can be multiple SRTP sources in one SRTP session. And each SRTP stream has a corresponding SRTPCryptoContext object, identified by SSRC. In this way, different sources can be protected independently.

    Inheritance
    object
    SrtcpCryptoContext
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SipLib.Dtls
    Assembly: SipLib.dll
    Syntax
    public class SrtcpCryptoContext

    Constructors

    | Edit this page View Source

    SrtcpCryptoContext(long)

    Constructs an empty SRTPCryptoContext using the SSRC. The other parameters are set to default null value.

    Declaration
    public SrtcpCryptoContext(long ssrcIn)
    Parameters
    Type Name Description
    long ssrcIn

    SSRC of this SRTPCryptoContext

    | Edit this page View Source

    SrtcpCryptoContext(long, byte[], byte[], SrtpPolicy)

    Construct a normal SRTPCryptoContext based on the given parameters.

    Declaration
    public SrtcpCryptoContext(long ssrcIn, byte[] masterK, byte[] masterS, SrtpPolicy policyIn)
    Parameters
    Type Name Description
    long ssrcIn

    The RTP SSRC that this SRTP cryptographic context protects.

    byte[] masterK

    byte array holding the master key for this SRTP cryptographic context. Refer to Section 3.2.1 of the RFC about the role of the master key.

    byte[] masterS

    byte array holding the master salt for this SRTP cryptographic context.It is used to computer the initialization vector that in turn is input to compute the session key, session authentication key and the session salt.

    SrtpPolicy policyIn

    SRTP policy for this SRTP cryptographic context, defined the encryption algorithm, the authentication algorithm, etc

    Methods

    | Edit this page View Source

    Close()

    Close the crypto context. The Close function deletes key data and performs a cleanup of the crypto context. Clean up key data, maybe this is the second time.However, sometimes we cannot know if the CryptoContext was used and the application called deriveSrtpKeys(...) that would have cleaned the key data.

    Declaration
    public void Close()
    | Edit this page View Source

    DeriveContext(long)

    Derives a new SRTPCryptoContext for use with a new SSRC. This method returns a new SRTPCryptoContext initialized with the data of this SRTPCryptoContext. Replacing the SSRC, Roll-over-Counter, and the key derivation rate the application cab use this SRTPCryptoContext to encrypt / decrypt a new stream(Synchronization source) inside one RTP session.

    Declaration
    public SrtcpCryptoContext DeriveContext(long ssrc)
    Parameters
    Type Name Description
    long ssrc

    The SSRC for this context

    Returns
    Type Description
    SrtcpCryptoContext

    Returns a new SRTPCryptoContext with all relevant data set.

    | Edit this page View Source

    DeriveSrtcpKeys()

    Derives the srtcp session keys from the master key.

    Declaration
    public void DeriveSrtcpKeys()
    | Edit this page View Source

    GetAuthTagLength()

    Gets the authentication tag length of this SRTP cryptographic context

    Declaration
    public int GetAuthTagLength()
    Returns
    Type Description
    int
    | Edit this page View Source

    GetMKILength()

    Gets the MKI length of this SRTP cryptographic context

    Declaration
    public int GetMKILength()
    Returns
    Type Description
    int
    | Edit this page View Source

    GetSSRC()

    Gets the SSRC of this SRTP cryptographic context

    Declaration
    public long GetSSRC()
    Returns
    Type Description
    long
    | Edit this page View Source

    ProcessPacketAESCM(RawPacket, int)

    Performs Counter Mode AES encryption / decryption

    Declaration
    public void ProcessPacketAESCM(RawPacket pkt, int index)
    Parameters
    Type Name Description
    RawPacket pkt

    The RTP packet to be encrypted / decrypted

    int index
    | Edit this page View Source

    ProcessPacketAESF8(RawPacket, int)

    Performs F8 Mode AES encryption / decryption

    Declaration
    public void ProcessPacketAESF8(RawPacket pkt, int index)
    Parameters
    Type Name Description
    RawPacket pkt

    The RTP packet to be encrypted / decrypted

    int index
    | Edit this page View Source

    ReverseTransformPacket(RawPacket)

    Transform a SRTCP packet into a RTCP packet. This method is called when a SRTCP packet was received.

    Declaration
    public bool ReverseTransformPacket(RawPacket pkt)
    Parameters
    Type Name Description
    RawPacket pkt

    The received RTCP packet

    Returns
    Type Description
    bool

    Returns true if the packet can be accepted false if authentication or replay check failed

    | Edit this page View Source

    TransformPacket(RawPacket)

    Transform a RTP packet into a SRTP packet. This method is called when a normal RTP packet ready to be sent.

    Operations done by the transformation may include: encryption, using either Counter Mode encryption, or F8 Mode encryption, adding authentication tag, currently HMC SHA1 method.

    Both encryption and authentication functionality can be turned off as long as the SRTPPolicy used in this SRTPCryptoContext is requires no encryption and no authentication. Then the packet will be sent out untouched. However this is not encouraged. If no SRTP feature is enabled, then we shall not use SRTP TransformConnector. We should use the original method (RTPManager managed transportation) instead.

    Declaration
    public void TransformPacket(RawPacket pkt)
    Parameters
    Type Name Description
    RawPacket pkt

    The RTP packet that is going to be sent out

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX