WebRTC中的SRTP

SRTP in WebRTC

WebRTC中的SRTP

WebRTC mandates encryption of media by means of the Secure Realtime Protocol, or SRTP, which is described in RFC 3711.

​WebRTC通过RFC 3711中描述的安全实时协议(SRTP)强制对媒体进行加密。

The key negotiation in WebRTC happens using DTLS-SRTP which is described in RFC 5764. The older SDES protocol is implemented but not enabled by default.

​WebRTC中的密钥协商使用在RFC 5764中描述的DTLS-SRTP进行。已实现较旧的SDES协议,但默认情况下未启用。

Unencrypted RTP can be enabled for debugging purposes by setting the PeerConnections disable_encryption option to true.

​通过将PeerConnections的disable_encryption选项设置为true,可以出于调试目的启用未加密的RTP。

Supported cipher suites

支持的密码套件

The implementation supports the following cipher suites:

该实现支持以下密码套件:

  • SRTP_AES128_CM_HMAC_SHA1_80
  • SRTP_AEAD_AES_128_GCM
  • SRTP_AEAD_AES_256_GCM

The SRTP_AES128_CM_HMAC_SHA1_32 cipher suite is accepted for audio-only connections if offered by the other side. It is not actively supported, see SelectCrypto for details.

​如果另一方提供SRTP_AES128_CM_HMAC_SHA_32密码套件,则该套件可用于仅音频连接。它不受主动支持,有关详细信息,请参阅SelectCrypto。

The cipher suite ordering allows a non-WebRTC peer to prefer GCM cipher suites, however they are not selected as default by two instances of the WebRTC library.

密码套件排序允许非WebRTC对等端更喜欢GCM密码套件,但WebRTC库的两个实例不会默认选择它们。

cricket::SrtpSession

The cricket::SrtpSession is providing encryption and decryption of SRTP packets using libsrtp. Keys will be provided by SrtpTransport or DtlsSrtpTransport in the SetSend and SetRecv methods.

cricket::SrtpSession使用libsrtp提供SRTP数据包的加密和解密。密钥将由SetEnd和SetRecv方法中的SrtpTransport或DtlsSrtpTransport提供。

Encryption and decryption happens in-place in the ProtectRtpProtectRtcpUnprotectRtp and UnprotectRtcp methods. The SrtpSession class also takes care of initializing and deinitializing libsrtp by keeping track of how many instances are being used.

​加密和解密在ProtectRtp、ProtectRtcp、Unprotecttp和UnprotectTCP方法中进行。SrtpSession类还通过跟踪正在使用的实例数量来负责初始化和取消初始化libsrtp。

webrtc::SrtpTransport and webrtc::DtlsSrtpTransport

The webrtc::SrtpTransport class is controlling the SrtpSession instances for RTP and RTCP. When rtcp-mux is used, the SrtpSession for RTCP is not needed.

​webrtc::SrtpTransport类正在控制RTP和RTCP的SrtpSession实例。当使用rtcp-mux时,不需要用于rtcp的SrtpSession。

webrtc:DtlsSrtpTransport is a subclass of the SrtpTransport that extracts the keying material when the DTLS handshake is done and configures it in its base class. It will also become writable only once the DTLS handshake is done.

webrtc::DtlsSrtpTransport是SrtpTransport的一个子类,它在DTLS握手完成时提取密钥材料,并在其基类中配置它。只有在DTLS握手完成后,它才会变成可写的。

cricket::SrtpFilter

The cricket::SrtpFilter class is used to negotiate SDES.

​cricket::SrtpFilter类用于协商SDES。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值