Internet Engineering Task Force (IETF)                         D. McGrew
Request for Comments: 7714                           Cisco Systems, Inc.
Category: Standards Track                                        K. Igoe
ISSN: 2070-1721                                 National Security Agency
                                                           December 2015
        
Internet Engineering Task Force (IETF)                         D. McGrew
Request for Comments: 7714                           Cisco Systems, Inc.
Category: Standards Track                                        K. Igoe
ISSN: 2070-1721                                 National Security Agency
                                                           December 2015
        

AES-GCM Authenticated Encryption in the Secure Real-time Transport Protocol (SRTP)

安全实时传输协议(SRTP)中的AES-GCM认证加密

Abstract

摘要

This document defines how the AES-GCM Authenticated Encryption with Associated Data family of algorithms can be used to provide confidentiality and data authentication in the Secure Real-time Transport Protocol (SRTP).

本文件定义了如何使用AES-GCM认证加密和相关数据系列算法在安全实时传输协议(SRTP)中提供机密性和数据认证。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7714.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7714.

Copyright Notice

版权公告

Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2015 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1. Introduction ....................................................3
   2. Conventions Used in This Document ...............................4
   3. Overview of the SRTP/SRTCP AEAD Security Architecture ...........4
   4. Terminology .....................................................5
   5. Generic AEAD Processing .........................................6
      5.1. Types of Input Data ........................................6
      5.2. AEAD Invocation Inputs and Outputs .........................6
           5.2.1. Encrypt Mode ........................................6
           5.2.2. Decrypt Mode ........................................7
      5.3. Handling of AEAD Authentication ............................7
   6. Counter Mode Encryption .........................................7
   7. Unneeded SRTP/SRTCP Fields ......................................8
      7.1. SRTP/SRTCP Authentication Tag Field ........................8
      7.2. RTP Padding ................................................9
   8. AES-GCM Processing for SRTP .....................................9
      8.1. SRTP IV Formation for AES-GCM ..............................9
      8.2. Data Types in SRTP Packets ................................10
      8.3. Handling Header Extensions ................................11
      8.4. Prevention of SRTP IV Reuse ...............................12
   9. AES-GCM Processing of SRTCP Compound Packets ...................13
      9.1. SRTCP IV Formation for AES-GCM ............................13
      9.2. Data Types in Encrypted SRTCP Compound Packets ............14
      9.3. Data Types in Unencrypted SRTCP Compound Packets ..........16
      9.4. Prevention of SRTCP IV Reuse ..............................17
   10. Constraints on AEAD for SRTP and SRTCP ........................17
   11. Key Derivation Functions ......................................18
   12. Summary of AES-GCM in SRTP/SRTCP ..............................19
   13. Security Considerations .......................................20
      13.1. Handling of Security-Critical Parameters .................20
      13.2. Size of the Authentication Tag ...........................21
   14. IANA Considerations ...........................................21
      14.1. SDES .....................................................21
      14.2. DTLS-SRTP ................................................22
      14.3. MIKEY ....................................................23
   15. Parameters for Use with MIKEY .................................23
   16. Some RTP Test Vectors .........................................24
      16.1. SRTP AEAD_AES_128_GCM ....................................25
           16.1.1. SRTP AEAD_AES_128_GCM Encryption ..................25
           16.1.2. SRTP AEAD_AES_128_GCM Decryption ..................27
           16.1.3. SRTP AEAD_AES_128_GCM Authentication Tagging ......29
           16.1.4. SRTP AEAD_AES_128_GCM Tag Verification ............30
      16.2. SRTP AEAD_AES_256_GCM ....................................31
           16.2.1. SRTP AEAD_AES_256_GCM Encryption ..................31
           16.2.2. SRTP AEAD_AES_256_GCM Decryption ..................33
           16.2.3. SRTP AEAD_AES_256_GCM Authentication Tagging ......35
           16.2.4. SRTP AEAD_AES_256_GCM Tag Verification ............36
        
   1. Introduction ....................................................3
   2. Conventions Used in This Document ...............................4
   3. Overview of the SRTP/SRTCP AEAD Security Architecture ...........4
   4. Terminology .....................................................5
   5. Generic AEAD Processing .........................................6
      5.1. Types of Input Data ........................................6
      5.2. AEAD Invocation Inputs and Outputs .........................6
           5.2.1. Encrypt Mode ........................................6
           5.2.2. Decrypt Mode ........................................7
      5.3. Handling of AEAD Authentication ............................7
   6. Counter Mode Encryption .........................................7
   7. Unneeded SRTP/SRTCP Fields ......................................8
      7.1. SRTP/SRTCP Authentication Tag Field ........................8
      7.2. RTP Padding ................................................9
   8. AES-GCM Processing for SRTP .....................................9
      8.1. SRTP IV Formation for AES-GCM ..............................9
      8.2. Data Types in SRTP Packets ................................10
      8.3. Handling Header Extensions ................................11
      8.4. Prevention of SRTP IV Reuse ...............................12
   9. AES-GCM Processing of SRTCP Compound Packets ...................13
      9.1. SRTCP IV Formation for AES-GCM ............................13
      9.2. Data Types in Encrypted SRTCP Compound Packets ............14
      9.3. Data Types in Unencrypted SRTCP Compound Packets ..........16
      9.4. Prevention of SRTCP IV Reuse ..............................17
   10. Constraints on AEAD for SRTP and SRTCP ........................17
   11. Key Derivation Functions ......................................18
   12. Summary of AES-GCM in SRTP/SRTCP ..............................19
   13. Security Considerations .......................................20
      13.1. Handling of Security-Critical Parameters .................20
      13.2. Size of the Authentication Tag ...........................21
   14. IANA Considerations ...........................................21
      14.1. SDES .....................................................21
      14.2. DTLS-SRTP ................................................22
      14.3. MIKEY ....................................................23
   15. Parameters for Use with MIKEY .................................23
   16. Some RTP Test Vectors .........................................24
      16.1. SRTP AEAD_AES_128_GCM ....................................25
           16.1.1. SRTP AEAD_AES_128_GCM Encryption ..................25
           16.1.2. SRTP AEAD_AES_128_GCM Decryption ..................27
           16.1.3. SRTP AEAD_AES_128_GCM Authentication Tagging ......29
           16.1.4. SRTP AEAD_AES_128_GCM Tag Verification ............30
      16.2. SRTP AEAD_AES_256_GCM ....................................31
           16.2.1. SRTP AEAD_AES_256_GCM Encryption ..................31
           16.2.2. SRTP AEAD_AES_256_GCM Decryption ..................33
           16.2.3. SRTP AEAD_AES_256_GCM Authentication Tagging ......35
           16.2.4. SRTP AEAD_AES_256_GCM Tag Verification ............36
        
   17. RTCP Test Vectors .............................................37
      17.1. SRTCP AEAD_AES_128_GCM Encryption and Tagging ............39
      17.2. SRTCP AEAD_AES_256_GCM Verification and Decryption .......41
      17.3. SRTCP AEAD_AES_128_GCM Tagging Only ......................43
      17.4. SRTCP AEAD_AES_256_GCM Tag Verification ..................44
   18. References ....................................................45
      18.1. Normative References .....................................45
      18.2. Informative References ...................................47
   Acknowledgements ..................................................48
   Authors' Addresses ................................................48
        
   17. RTCP Test Vectors .............................................37
      17.1. SRTCP AEAD_AES_128_GCM Encryption and Tagging ............39
      17.2. SRTCP AEAD_AES_256_GCM Verification and Decryption .......41
      17.3. SRTCP AEAD_AES_128_GCM Tagging Only ......................43
      17.4. SRTCP AEAD_AES_256_GCM Tag Verification ..................44
   18. References ....................................................45
      18.1. Normative References .....................................45
      18.2. Informative References ...................................47
   Acknowledgements ..................................................48
   Authors' Addresses ................................................48
        
1. Introduction
1. 介绍

The Secure Real-time Transport Protocol (SRTP) [RFC3711] is a profile of the Real-time Transport Protocol (RTP) [RFC3550], which can provide confidentiality, message authentication, and replay protection to the RTP traffic and to the control traffic for RTP, the Real-time Transport Control Protocol (RTCP). It is important to note that the outgoing SRTP packets from a single endpoint may be originating from several independent data sources.

安全实时传输协议(SRTP)[RFC3711]是实时传输协议(RTP)[RFC3550]的一个配置文件,它可以为RTP流量和RTP(实时传输控制协议(RTCP))的控制流量提供机密性、消息认证和重播保护。需要注意的是,来自单个端点的传出SRTP数据包可能来自多个独立的数据源。

Authenticated Encryption [BN00] is a form of encryption that, in addition to providing confidentiality for the Plaintext that is encrypted, provides a way to check its integrity and authenticity. Authenticated Encryption with Associated Data, or AEAD [R02], adds the ability to check the integrity and authenticity of some Associated Data (AD), also called "Additional Authenticated Data" (AAD), that is not encrypted. This specification makes use of the interface to a generic AEAD algorithm as defined in [RFC5116].

认证加密[BN00]是一种加密形式,除了为加密的明文提供保密性外,还提供了一种检查其完整性和真实性的方法。使用关联数据进行身份验证加密(AEAD)[R02]增加了检查未加密的某些关联数据(AD)(也称为“附加身份验证数据”(AAD))的完整性和真实性的能力。本规范使用[RFC5116]中定义的通用AEAD算法接口。

The Advanced Encryption Standard (AES) is a block cipher that provides a high level of security and can accept different key sizes. AES Galois/Counter Mode (AES-GCM) [GCM] is a family of AEAD algorithms based upon AES. This specification makes use of the AES versions that use 128-bit and 256-bit keys, which we call "AES-128" and "AES-256", respectively.

高级加密标准(AES)是一种分组密码,它提供了高级别的安全性,并且可以接受不同的密钥大小。AES伽罗瓦/计数器模式(AES-GCM)[GCM]是一系列基于AES的AEAD算法。本规范使用了使用128位和256位密钥的AES版本,我们分别称之为“AES-128”和“AES-256”。

Any AEAD algorithm provides an intrinsic authentication tag. In many applications, the authentication tag is truncated to less than full length. In this specification, the authentication tag MUST NOT be truncated. The authentications tags MUST be a full 16 octets in length. When used in SRTP/SRTCP, AES-GCM will have two configurations:

任何AEAD算法都提供一个固有的身份验证标记。在许多应用程序中,身份验证标记被截断为小于完整长度。在本规范中,身份验证标记不能被截断。身份验证标签的长度必须为完整的16个八位字节。在SRTP/SRTCP中使用时,AES-GCM将有两种配置:

AEAD_AES_128_GCM AES-128 with a 16-octet authentication tag AEAD_AES_256_GCM AES-256 with a 16-octet authentication tag

AEAD_AES_128_GCM AES-128带有16个八位字节的身份验证标签AEAD_AES_256_GCM AES-256带有16个八位字节的身份验证标签

The key size is set when the session is initiated and SHOULD NOT be altered.

密钥大小在会话启动时设置,不应更改。

The Galois/Counter Mode of operation (GCM) is an AEAD mode of operation for block ciphers. GCM uses Counter Mode to encrypt the data, an operation that can be efficiently pipelined. Further, GCM authentication uses operations that are particularly well suited to efficient implementation in hardware, making it especially appealing for high-speed implementations, or for implementations in an efficient and compact circuit.

Galois/计数器操作模式(GCM)是分组密码的AEAD操作模式。GCM使用计数器模式对数据进行加密,这是一种可以高效管道化的操作。此外,GCM身份验证使用特别适合在硬件中高效实现的操作,使其特别适合于高速实现或高效紧凑电路中的实现。

In summary, this document defines how to use an AEAD algorithm, particularly AES-GCM, to provide confidentiality and message authentication within SRTP and SRTCP packets.

总之,本文档定义了如何使用AEAD算法,特别是AES-GCM,在SRTP和SRTCP数据包中提供机密性和消息验证。

2. Conventions Used in This Document
2. 本文件中使用的公约

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”应按照[RFC2119]中的说明进行解释。

3. Overview of the SRTP/SRTCP AEAD Security Architecture
3. SRTP/SRTCP AEAD安全体系结构概述

SRTP/SRTCP AEAD security is based upon the following principles:

SRTP/SRTCP AEAD安全性基于以下原则:

a) Both privacy and authentication are based upon the use of symmetric algorithms. An AEAD algorithm such as AES-GCM combines privacy and authentication into a single process.

a) 隐私和身份验证都基于对称算法的使用。AEAD算法(如AES-GCM)将隐私和身份验证结合到单个进程中。

b) A secret master key is shared by all participating endpoints -- both those originating SRTP/SRTCP packets and those receiving these packets. Any given master key MAY be used simultaneously by several endpoints to originate SRTP/SRTCP packets (as well as one or more endpoints using this master key to process inbound data).

b) 秘密主密钥由所有参与的端点共享——包括发起SRTP/SRTCP数据包的端点和接收这些数据包的端点。多个端点可以同时使用任何给定的主密钥来发起SRTP/SRTCP数据包(以及一个或多个使用该主密钥处理入站数据的端点)。

c) A Key Derivation Function (KDF) is applied to the shared master key value to form separate encryption keys, authentication keys, and salting keys for SRTP and for SRTCP (a total of six keys). This process is described in Section 4.3 of [RFC3711]. The master key MUST be at least as large as the encryption key derived from it. Since AEAD algorithms such as AES-GCM combine encryption and authentication into a single process, AEAD algorithms do not make use of separate authentication keys.

c) 密钥派生函数(KDF)应用于共享主密钥值,以形成SRTP和SRTCP的单独加密密钥、身份验证密钥和加密密钥(共六个密钥)。[RFC3711]第4.3节描述了该过程。主密钥必须至少与从其派生的加密密钥一样大。由于AEAD算法(如AES-GCM)将加密和身份验证结合到一个进程中,因此AEAD算法不使用单独的身份验证密钥。

d) Aside from making modifications to IANA registries to allow AES-GCM to work with Security Descriptions (SDES), Datagram Transport Layer Security for Secure RTP (DTLS-SRTP), and Multimedia Internet KEYing (MIKEY), the details of how the master key is established and shared between the participants are outside the scope of this document. Similarly, any mechanism for rekeying an existing session is outside the scope of the document.

d) 除了对IANA注册表进行修改以允许AES-GCM使用安全描述(SDE)、安全RTP的数据报传输层安全(DTLS-SRTP)和多媒体互联网密钥(MIKEY)之外,关于如何在参与者之间建立和共享主密钥的详细信息不在本文档的范围内。类似地,任何为现有会话重新设置密钥的机制都不在文档的范围之内。

e) Each time an instantiation of AES-GCM is invoked to encrypt and authenticate an SRTP or SRTCP data packet, a new Initialization Vector (IV) is used. SRTP combines the 4-octet Synchronization Source (SSRC) identifier, the 4-octet Rollover Counter (ROC), and the 2-octet Sequence Number (SEQ) with the 12-octet encryption salt to form a 12-octet IV (see Section 8.1). SRTCP combines the SSRC and 31-bit SRTCP index with the encryption salt to form a 12-octet IV (see Section 9.1).

e) 每次调用AES-GCM的实例化来加密和验证SRTP或SRTCP数据包时,都会使用一个新的初始化向量(IV)。SRTP将4-octet同步源(SSRC)标识符、4-octet翻转计数器(ROC)和2-octet序列号(SEQ)与12-octet加密salt结合起来,形成12-octet IV(见第8.1节)。SRTCP将SSRC和31位SRTCP索引与加密salt相结合,形成12个八位组IV(见第9.1节)。

4. Terminology
4. 术语

The following terms have very specific meanings in the context of this RFC:

以下术语在本RFC中具有非常具体的含义:

Instantiation: In AEAD, an instantiation is an (Encryption_key, salt) pair together with all of the data structures (for example, counters) needed for it to function properly. In SRTP/SRTCP, each endpoint will need two instantiations of the AEAD algorithm for each master key in its possession: one instantiation for SRTP traffic and one instantiation for SRTCP traffic.

实例化:在AEAD中,实例化是一个(加密密钥,salt)对以及它正常运行所需的所有数据结构(例如计数器)。在SRTP/SRTCP中,每个端点将需要对其拥有的每个主密钥进行两次AEAD算法实例化:一次实例化SRTP流量,一次实例化SRTCP流量。

Invocation: SRTP/SRTCP data streams are broken into packets. Each packet is processed by a single invocation of the appropriate instantiation of the AEAD algorithm.

调用:SRTP/SRTCP数据流被分解成数据包。通过调用AEAD算法的适当实例化来处理每个数据包。

In many applications, each endpoint will have one master key for processing outbound data but may have one or more separate master keys for processing inbound data.

在许多应用程序中,每个端点将有一个主密钥用于处理出站数据,但可能有一个或多个单独的主密钥用于处理入站数据。

5. Generic AEAD Processing
5. 通用AEAD处理
5.1. Types of Input Data
5.1. 输入数据的类型

Associated Data: Data that is to be authenticated but not encrypted.

关联数据:待验证但未加密的数据。

Plaintext: Data that is to be both encrypted and authenticated.

明文:需要加密和认证的数据。

Raw Data: Data that is to be neither encrypted nor authenticated.

原始数据:既不加密也不验证的数据。

Which portions of SRTP/SRTCP packets that are to be treated as Associated Data, which are to be treated as Plaintext, and which are to be treated as Raw Data are covered in Sections 8.2, 9.2, and 9.3.

第8.2、9.2和9.3节介绍了SRTP/SRTCP数据包中哪些部分将被视为关联数据,哪些部分将被视为明文,哪些部分将被视为原始数据。

5.2. AEAD Invocation Inputs and Outputs
5.2. AEAD调用输入和输出
5.2.1. Encrypt Mode
5.2.1. 加密模式

Inputs: Encryption_key Octet string, either 16 or 32 octets long Initialization_Vector Octet string, 12 octets long Associated_Data Octet string of variable length Plaintext Octet string of variable length

输入:加密密钥八位组字符串、16或32个八位组长的初始化向量八位组字符串、12个八位组长的关联数据八位组字符串、可变长度的明文八位组字符串

      Outputs:
        Ciphertext*                 Octet string, length =
                                      length(Plaintext) + tag_length
        
      Outputs:
        Ciphertext*                 Octet string, length =
                                      length(Plaintext) + tag_length
        

(*): In AEAD, the authentication tag in embedded in the ciphertext. When GCM is being used, the ciphertext consists of the encrypted Plaintext followed by the authentication tag.

(*):在AEAD中,嵌入在密文中的身份验证标记。使用GCM时,密文由加密的明文和认证标记组成。

5.2.2. Decrypt Mode
5.2.2. 解密模式

Inputs: Encryption_key Octet string, either 16 or 32 octets long Initialization_Vector Octet string, 12 octets long Associated_Data Octet string of variable length Ciphertext Octet string of variable length

输入:加密密钥八位组字符串,16或32个八位组长的初始化向量八位组字符串,12个八位组长的关联数据八位组字符串可变长度密文八位组字符串可变长度

Outputs: Plaintext Octet string, length = length(Ciphertext) - tag_length Validity_Flag Boolean, TRUE if valid, FALSE otherwise

输出:纯文本八位字符串,长度=长度(密文)-标记\长度有效性\标志布尔值,如果有效则为TRUE,否则为FALSE

5.3. Handling of AEAD Authentication
5.3. AEAD认证的处理

AEAD requires that all incoming packets MUST pass AEAD authentication before any other action takes place. Plaintext and Associated Data MUST NOT be released until the AEAD authentication tag has been validated. Further, the ciphertext MUST NOT be decrypted until the AEAD tag has been validated.

AEAD要求所有传入数据包必须在任何其他操作发生之前通过AEAD身份验证。在验证AEAD身份验证标签之前,不得发布纯文本和相关数据。此外,在验证AEAD标记之前,不得解密密文。

Should the AEAD tag prove to be invalid, the packet in question is to be discarded and a Validation Error flag raised. Local policy determines how this flag is to be handled and is outside the scope of this document.

如果AEAD标记被证明无效,则将丢弃有问题的数据包并发出验证错误标志。本地策略决定如何处理此标志,不在本文档的范围内。

6. Counter Mode Encryption
6. 计数器模式加密

Each outbound packet uses a 12-octet IV and an encryption key to form two outputs:

每个出站数据包使用12个八位组IV和一个加密密钥来形成两个输出:

o a 16-octet first_key_block, which is used in forming the authentication tag, and

o 16个八位组的第一密钥块,用于形成认证标签,以及

o a keystream of octets, formed in blocks of 16 octets each

o 一种八位字节的密钥流,由每个八位字节16个组成的块组成

The first 16-octet block of the key is saved for use in forming the authentication tag, and the remainder of the keystream is XORed to the Plaintext to form the cipher. This keystream is formed one block at a time by inputting the concatenation of a 12-octet IV (see Sections 8.1 and 9.1) with a 4-octet block to AES. The pseudocode below illustrates this process:

密钥的前16个八位字节块被保存以用于形成身份验证标记,剩余的密钥流被XORD到明文以形成密码。通过将12个八位组IV(见第8.1节和第9.1节)与4个八位组块的串联输入AES,每次形成一个块。下面的伪代码说明了此过程:

    def GCM_keystream( Plaintext_len, IV, Encryption_key ):
        assert Plaintext_len <= (2**36) - 32 ## measured in octets
        key_stream = ""
        block_counter = 1
        first_key_block = AES_ENC( data=IV||block_counter,
                                   key=Encryption_key )
        while len(key_stream) < Plaintext_len:
            block_counter = block_counter + 1
            key_block = AES_ENC( data=IV||block_counter,
                                 key=Encryption_key )
            key_stream = key_stream||key_block
        key_stream = truncate( key_stream, Plaintext_len )
        return( first_key_block, key_stream )
        
    def GCM_keystream( Plaintext_len, IV, Encryption_key ):
        assert Plaintext_len <= (2**36) - 32 ## measured in octets
        key_stream = ""
        block_counter = 1
        first_key_block = AES_ENC( data=IV||block_counter,
                                   key=Encryption_key )
        while len(key_stream) < Plaintext_len:
            block_counter = block_counter + 1
            key_block = AES_ENC( data=IV||block_counter,
                                 key=Encryption_key )
            key_stream = key_stream||key_block
        key_stream = truncate( key_stream, Plaintext_len )
        return( first_key_block, key_stream )
        

In theory, this keystream generation process allows for the encryption of up to (2^36) - 32 octets per invocation (i.e., per packet), far longer than is actually required.

理论上,此密钥流生成过程允许每次调用(即,每个数据包)最多加密(2^36)-32个八位字节,远远超过实际需要的时间。

With any counter mode, if the same (IV, Encryption_key) pair is used twice, precisely the same keystream is formed. As explained in Section 9.1 of [RFC3711], this is a cryptographic disaster. For GCM, the consequences are even worse, since such a reuse compromises GCM's integrity mechanism not only for the current packet stream but for all future uses of the current encryption_key.

在任何计数器模式下,如果两次使用相同的(IV,Encryption_key)对,则形成完全相同的密钥流。如[RFC3711]第9.1节所述,这是一场加密灾难。对于GCM来说,后果甚至更糟,因为这种重用不仅会损害当前数据包流的GCM完整性机制,而且会损害当前加密密钥的所有未来使用。

7. Unneeded SRTP/SRTCP Fields
7. 不需要的SRTP/SRTCP字段

AEAD Counter Mode encryption removes the need for certain existing SRTP/SRTCP mechanisms.

AEAD计数器模式加密消除了对某些现有SRTP/SRTCP机制的需要。

7.1. SRTP/SRTCP Authentication Tag Field
7.1. SRTP/SRTCP身份验证标记字段

The AEAD message authentication mechanism MUST be the primary message authentication mechanism for AEAD SRTP/SRTCP. Additional SRTP/SRTCP authentication mechanisms SHOULD NOT be used with any AEAD algorithm, and the optional SRTP/SRTCP authentication tags are NOT RECOMMENDED and SHOULD NOT be present. Note that this contradicts Section 3.4 of [RFC3711], which makes the use of the SRTCP authentication tag field mandatory, but the presence of the AEAD authentication renders the older authentication methods redundant.

AEAD消息身份验证机制必须是AEAD SRTP/SRTCP的主要消息身份验证机制。附加的SRTP/SRTCP身份验证机制不应与任何AEAD算法一起使用,并且不建议使用可选的SRTP/SRTCP身份验证标签,也不应出现。请注意,这与[RFC3711]第3.4节相矛盾,该节规定必须使用SRTCP身份验证标签字段,但AEAD身份验证的存在使旧的身份验证方法变得多余。

Rationale: Some applications use the SRTP/SRTCP authentication tag as a means of conveying additional information, notably [RFC4771]. This document retains the authentication tag field primarily to preserve compatibility with these applications.

理由:一些应用程序使用SRTP/SRTCP身份验证标签作为传递附加信息的手段,尤其是[RFC4771]。本文档保留身份验证标记字段主要是为了保持与这些应用程序的兼容性。

7.2. RTP Padding
7.2. RTP填充

AES-GCM does not require that the data be padded out to a specific block size, reducing the need to use the padding mechanism provided by RTP. It is RECOMMENDED that the RTP padding mechanism not be used unless it is necessary to disguise the length of the underlying Plaintext.

AES-GCM不要求将数据填充到特定的块大小,从而减少了使用RTP提供的填充机制的需要。建议不要使用RTP填充机制,除非有必要隐藏底层明文的长度。

8. AES-GCM Processing for SRTP
8. SRTP的AES-GCM处理
8.1. SRTP IV Formation for AES-GCM
8.1. AES-GCM的SRTP IV形成
                   0  0  0  0  0  0  0  0  0  0  1  1
                   0  1  2  3  4  5  6  7  8  9  0  1
                 +--+--+--+--+--+--+--+--+--+--+--+--+
                 |00|00|    SSRC   |     ROC   | SEQ |---+
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |         Encryption Salt           |->(+)
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |       Initialization Vector       |<--+
                 +--+--+--+--+--+--+--+--+--+--+--+--+
        
                   0  0  0  0  0  0  0  0  0  0  1  1
                   0  1  2  3  4  5  6  7  8  9  0  1
                 +--+--+--+--+--+--+--+--+--+--+--+--+
                 |00|00|    SSRC   |     ROC   | SEQ |---+
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |         Encryption Salt           |->(+)
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |       Initialization Vector       |<--+
                 +--+--+--+--+--+--+--+--+--+--+--+--+
        

Figure 1: AES-GCM SRTP Initialization Vector Formation

图1:AES-GCM SRTP初始化向量形成

The 12-octet IV used by AES-GCM SRTP is formed by first concatenating 2 octets of zeroes, the 4-octet SSRC, the 4-octet rollover counter (ROC), and the 2-octet sequence number (SEQ). The resulting 12-octet value is then XORed to the 12-octet salt to form the 12-octet IV.

AES-GCM SRTP使用的12个八位组IV由两个八位组的零、4个八位组的SSRC、4个八位组的翻转计数器(ROC)和2个八位组的序列号(SEQ)组成。然后将所得的12八位元值与12八位元盐异或形成12八位元IV。

8.2. Data Types in SRTP Packets
8.2. SRTP数据包中的数据类型

All SRTP packets MUST be both authenticated and encrypted. The data fields within the RTP packets are broken into Associated Data, Plaintext, and Raw Data, as follows (see Figure 2):

所有SRTP数据包都必须经过身份验证和加密。RTP数据包中的数据字段分为关联数据、明文和原始数据,如下所示(见图2):

Associated Data: The version V (2 bits), padding flag P (1 bit), extension flag X (1 bit), Contributing Source (CSRC) count CC (4 bits), marker M (1 bit), Payload Type PT (7 bits), sequence number (16 bits), timestamp (32 bits), SSRC (32 bits), optional CSRC identifiers (32 bits each), and optional RTP extension (variable length).

相关数据:版本V(2位)、填充标志P(1位)、扩展标志X(1位)、贡献源(CSC)计数CC(4位)、标记M(1位)、有效负载类型PT(7位)、序列号(16位)、时间戳(32位)、SSRC(32位)、可选CSC标识符(每个32位)和可选RTP扩展(可变长度)。

Plaintext: The RTP payload (variable length), RTP padding (if used, variable length), and RTP pad count (if used, 1 octet).

纯文本:RTP有效负载(可变长度)、RTP填充(如果使用,可变长度)和RTP填充计数(如果使用,1个八位字节)。

Raw Data: The optional variable-length SRTP Master Key Identifier (MKI) and SRTP authentication tag (whose use is NOT RECOMMENDED). These fields are appended after encryption has been performed.

原始数据:可选的可变长度SRTP主密钥标识符(MKI)和SRTP身份验证标签(不建议使用)。这些字段在执行加密后追加。

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|X|  CC   |M|     PT      |       sequence number         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                           timestamp                           |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |           synchronization source (SSRC) identifier            |
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |      contributing source (CSRC) identifiers (optional)        |
    A  |                               ....                            |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                   RTP extension (OPTIONAL)                    |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                          payload  ...                         |
    P  |                               +-------------------------------+
    P  |                               | RTP padding   | RTP pad count |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|X|  CC   |M|     PT      |       sequence number         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                           timestamp                           |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |           synchronization source (SSRC) identifier            |
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |      contributing source (CSRC) identifiers (optional)        |
    A  |                               ....                            |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                   RTP extension (OPTIONAL)                    |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                          payload  ...                         |
    P  |                               +-------------------------------+
    P  |                               | RTP padding   | RTP pad count |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

P = Plaintext (to be encrypted and authenticated) A = Associated Data (to be authenticated only)

P=明文(待加密和验证)A=关联数据(仅待验证)

Figure 2: Structure of an RTP Packet before Authenticated Encryption

图2:认证加密前RTP数据包的结构

Since the AEAD ciphertext is larger than the Plaintext by exactly the length of the AEAD authentication tag, the corresponding SRTP-encrypted packet replaces the Plaintext field with a slightly larger field containing the cipher. Even if the Plaintext field is empty, AEAD encryption must still be performed, with the resulting cipher consisting solely of the authentication tag. This tag is to be placed immediately before the optional variable-length SRTP MKI and SRTP authentication tag fields.

由于AEAD密文比明文大出AEAD身份验证标签的长度,因此相应的SRTP加密数据包将明文字段替换为包含密码的稍大字段。即使明文字段为空,也必须执行AEAD加密,生成的密码仅包含身份验证标签。此标记将直接放置在可选的可变长度SRTP MKI和SRTP身份验证标记字段之前。

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|X|  CC   |M|     PT      |       sequence number         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                           timestamp                           |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |           synchronization source (SSRC) identifier            |
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |      contributing source (CSRC) identifiers (optional)        |
    A  |                               ....                            |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                   RTP extension (OPTIONAL)                    |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    C  |                             cipher                            |
    C  |                               ...                             |
    C  |                                                               |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  :                     SRTP MKI (OPTIONAL)                       :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  :           SRTP authentication tag (NOT RECOMMENDED)           :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|X|  CC   |M|     PT      |       sequence number         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                           timestamp                           |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |           synchronization source (SSRC) identifier            |
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |      contributing source (CSRC) identifiers (optional)        |
    A  |                               ....                            |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                   RTP extension (OPTIONAL)                    |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    C  |                             cipher                            |
    C  |                               ...                             |
    C  |                                                               |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  :                     SRTP MKI (OPTIONAL)                       :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  :           SRTP authentication tag (NOT RECOMMENDED)           :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

C = Ciphertext (encrypted and authenticated) A = Associated Data (authenticated only) R = neither encrypted nor authenticated, added after Authenticated Encryption completed

C=密文(加密和认证)A=关联数据(仅认证)R=既不加密也不认证,在认证加密完成后添加

Figure 3: Structure of an SRTP Packet after Authenticated Encryption

图3:经过身份验证的加密后的SRTP数据包的结构

8.3. Handling Header Extensions
8.3. 处理标头扩展

RTP header extensions were first defined in [RFC3550]. [RFC6904] describes how these header extensions are to be encrypted in SRTP.

RTP标头扩展首先在[RFC3550]中定义。[RFC6904]描述如何在SRTP中加密这些标头扩展。

When RFC 6904 is in use, a separate keystream is generated to encrypt selected RTP header extension elements. For the AEAD_AES_128_GCM algorithm, this keystream MUST be generated in the manner defined in [RFC6904], using the AES Counter Mode (AES-CM) transform. For the

当使用RFC 6904时,将生成一个单独的密钥流来加密选定的RTP头扩展元素。对于AEAD_AES_128_GCM算法,必须使用AES计数器模式(AES-CM)转换,以[RFC6904]中定义的方式生成此密钥流。对于

AEAD_AES_256_GCM algorithm, the keystream MUST be generated in the manner defined for the AES_256_CM transform. The originator must perform any required header extension encryption before the AEAD algorithm is invoked.

AEAD_AES_256_GCM算法,必须以为AES_256_CM转换定义的方式生成密钥流。在调用AEAD算法之前,发起人必须执行任何所需的头扩展加密。

As with the other fields contained within the RTP header, both encrypted and unencrypted header extensions are to be treated by the AEAD algorithm as Associated Data (AD). Thus, the AEAD algorithm does not provide any additional privacy for the header extensions, but it does provide integrity and authentication.

与RTP报头中包含的其他字段一样,AEAD算法将加密和未加密的报头扩展都视为关联数据(AD)。因此,AEAD算法不为报头扩展提供任何额外的隐私,但它提供了完整性和身份验证。

8.4. Prevention of SRTP IV Reuse
8.4. 防止SRTP IV再利用

In order to prevent IV reuse, we must ensure that the (ROC,SEQ,SSRC) triple is never used twice with the same master key. The following two scenarios illustrate this issue:

为了防止IV重复使用,我们必须确保(ROC、SEQ、SSRC)三元组永远不会与同一主密钥一起使用两次。以下两个场景说明了此问题:

Counter Management: A rekey MUST be performed to establish a new master key before the (ROC,SEQ) pair cycles back to its original value. Note that this scenario implicitly assumes that either (1) the outgoing RTP process is trusted to not attempt to repeat a (ROC,SEQ) value or (2) the encryption process ensures that both the SEQ and ROC numbers of the packets presented to it are always incremented in the proper fashion. This is particularly important for GCM, since using the same (ROC,SEQ) value twice compromises the authentication mechanism. For GCM, the (ROC,SEQ) and SSRC values used MUST be generated or checked by either the SRTP implementation or a module (e.g., the RTP application) that can be considered equally trustworthy. While [RFC3711] allows the detection of SSRC collisions after they happen, SRTP using GCM with shared master keys MUST prevent an SSRC collision from happening even once.

计数器管理:在(ROC,SEQ)对循环回到其原始值之前,必须执行重新密钥以建立新的主密钥。注意,该场景隐含地假设:(1)出站RTP过程被信任不会尝试重复(ROC,SEQ)值,或者(2)加密过程确保呈现给它的数据包的SEQ和ROC编号始终以正确的方式递增。这对于GCM尤其重要,因为两次使用相同的(ROC,SEQ)值会损害身份验证机制。对于GCM,使用的(ROC、SEQ)和SSRC值必须由SRTP实现或可被视为同等可信的模块(如RTP应用程序)生成或检查。虽然[RFC3711]允许在SSRC冲突发生后进行检测,但使用带有共享主密钥的GCM的SRTP必须防止SSRC冲突发生一次。

SSRC Management: For a given master key, the set of all SSRC values used with that master key must be partitioned into disjoint pools, one pool for each endpoint using that master key to originate outbound data. Each such originating endpoint MUST only issue SSRC values from the pool it has been assigned. Further, each originating endpoint MUST maintain a history of outbound SSRC

SSRC管理:对于给定的主密钥,与该主密钥一起使用的所有SSRC值的集合必须划分为不相交的池,每个端点一个池使用该主密钥来生成出站数据。每个这样的原始端点必须仅从其分配的池中发出SSRC值。此外,每个发起端点必须维护出站SSRC的历史记录

identifiers that it has issued within the lifetime of the current master key, and when a new SSRC requests an SSRC identifier it MUST NOT be given an identifier that has been previously issued. A rekey MUST be performed before any of the originating endpoints using that master key exhaust their pools of SSRC values. Further, the identity of the entity giving out SSRC values MUST be verified, and the SSRC signaling MUST be integrity protected.

在当前主密钥的生命周期内发出的标识符,当新SSRC请求SSRC标识符时,不得向其提供先前发出的标识符。在使用主密钥的任何原始端点耗尽其SSRC值池之前,必须执行重新密钥。此外,必须验证给出SSRC值的实体的身份,并且必须对SSRC信令进行完整性保护。

9. AES-GCM Processing of SRTCP Compound Packets
9. SRTCP复合数据包的AES-GCM处理

All SRTCP compound packets MUST be authenticated, but unlike SRTP, SRTCP packet encryption is optional. A sender can select which packets to encrypt and indicates this choice with a 1-bit Encryption flag (located just before the 31-bit SRTCP index).

所有SRTCP复合数据包都必须经过身份验证,但与SRTP不同,SRTCP数据包加密是可选的。发送方可以选择要加密的数据包,并使用1位加密标志(位于31位SRTCP索引之前)指示此选择。

9.1. SRTCP IV Formation for AES-GCM
9.1. AES-GCM的SRTCP IV形成

The 12-octet IV used by AES-GCM SRTCP is formed by first concatenating 2 octets of zeroes, the 4-octet SSRC identifier, 2 octets of zeroes, a single "0" bit, and the 31-bit SRTCP index. The resulting 12-octet value is then XORed to the 12-octet salt to form the 12-octet IV.

AES-GCM SRTCP使用的12个八位组IV首先由2个八位组的零、4个八位组的SSRC标识符、2个八位组的零、单个“0”位和31位SRTCP索引串联而成。然后将所得的12八位元值与12八位元盐异或形成12八位元IV。

                   0  1  2  3  4  5  6  7  8  9 10 11
                 +--+--+--+--+--+--+--+--+--+--+--+--+
                 |00|00|    SSRC   |00|00|0+SRTCP Idx|---+
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |         Encryption Salt           |->(+)
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |       Initialization Vector       |<--+
                 +--+--+--+--+--+--+--+--+--+--+--+--+
        
                   0  1  2  3  4  5  6  7  8  9 10 11
                 +--+--+--+--+--+--+--+--+--+--+--+--+
                 |00|00|    SSRC   |00|00|0+SRTCP Idx|---+
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |         Encryption Salt           |->(+)
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |       Initialization Vector       |<--+
                 +--+--+--+--+--+--+--+--+--+--+--+--+
        

Figure 4: SRTCP Initialization Vector Formation

图4:SRTCP初始化向量形成

9.2. Data Types in Encrypted SRTCP Compound Packets
9.2. 加密SRTCP复合数据包中的数据类型
        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|   RC    |  Packet Type  |            length             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |           synchronization source (SSRC) of sender             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                         sender info                           :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                        report block 1                         :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                        report block 2                         :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                              ...                              :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |V=2|P|   SC    |  Packet Type  |              length           |
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    P  |                          SSRC/CSRC_1                          |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                           SDES items                          :
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    P  |                              ...                              :
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |1|                         SRTCP index                         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  |                  SRTCP MKI (optional) index                   :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  :           SRTCP authentication tag (NOT RECOMMENDED)          :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|   RC    |  Packet Type  |            length             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |           synchronization source (SSRC) of sender             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                         sender info                           :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                        report block 1                         :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                        report block 2                         :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                              ...                              :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |V=2|P|   SC    |  Packet Type  |              length           |
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    P  |                          SSRC/CSRC_1                          |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    P  |                           SDES items                          :
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    P  |                              ...                              :
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |1|                         SRTCP index                         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  |                  SRTCP MKI (optional) index                   :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  :           SRTCP authentication tag (NOT RECOMMENDED)          :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

P = Plaintext (to be encrypted and authenticated) A = Associated Data (to be authenticated only) R = neither encrypted nor authenticated, added after encryption

P=明文(待加密和验证)A=关联数据(仅待验证)R=未加密或未验证,加密后添加

Figure 5: AEAD SRTCP Inputs When Encryption Flag = 1 (The fields are defined in RFC 3550.)

图5:Encryption Flag=1时AEAD SRTCP输入(字段在RFC 3550中定义。)

When the Encryption flag is set to 1, the SRTCP packet is broken into Plaintext, Associated Data, and Raw (untouched) Data (as shown above in Figure 5):

当加密标志设置为1时,SRTCP数据包被分解为纯文本、关联数据和原始(未接触)数据(如图5所示):

Associated Data: The packet version V (2 bits), padding flag P (1 bit), reception report count RC (5 bits), Packet Type (8 bits), length (2 octets), SSRC (4 octets), Encryption flag (1 bit), and SRTCP index (31 bits).

相关数据:数据包版本V(2位)、填充标志P(1位)、接收报告计数RC(5位)、数据包类型(8位)、长度(2个八位)、SSRC(4个八位)、加密标志(1位)和SRTCP索引(31位)。

Raw Data: The optional variable-length SRTCP MKI and SRTCP authentication tag (whose use is NOT RECOMMENDED).

原始数据:可选的可变长度SRTCP MKI和SRTCP身份验证标记(不建议使用)。

Plaintext: All other data.

纯文本:所有其他数据。

Note that the Plaintext comes in one contiguous field. Since the AEAD cipher is larger than the Plaintext by exactly the length of the AEAD authentication tag, the corresponding SRTCP-encrypted packet replaces the Plaintext field with a slightly larger field containing the cipher. Even if the Plaintext field is empty, AEAD encryption must still be performed, with the resulting cipher consisting solely of the authentication tag. This tag is to be placed immediately before the Encryption flag and SRTCP index.

请注意,纯文本位于一个连续字段中。由于AEAD密码比明文大出AEAD身份验证标记的长度,因此相应的SRTCP加密数据包将明文字段替换为包含密码的稍大字段。即使明文字段为空,也必须执行AEAD加密,生成的密码仅包含身份验证标签。此标记将放置在加密标志和SRTCP索引之前。

9.3. Data Types in Unencrypted SRTCP Compound Packets
9.3. 未加密的SRTCP复合数据包中的数据类型
        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|   RC    |  Packet Type  |            length             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |           synchronization source (SSRC) of sender             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                         sender info                           :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                        report block 1                         :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                        report block 2                         :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                              ...                              :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|   SC    |  Packet Type  |              length           |
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |                          SSRC/CSRC_1                          |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                           SDES items                          :
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |                              ...                              :
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |0|                         SRTCP index                         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  |                  SRTCP MKI (optional) index                   :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  :              authentication tag (NOT RECOMMENDED)             :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|   RC    |  Packet Type  |            length             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |           synchronization source (SSRC) of sender             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                         sender info                           :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                        report block 1                         :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                        report block 2                         :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                              ...                              :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |V=2|P|   SC    |  Packet Type  |              length           |
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |                          SSRC/CSRC_1                          |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    A  |                           SDES items                          :
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |                              ...                              :
       +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    A  |0|                         SRTCP index                         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  |                  SRTCP MKI (optional) index                   :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    R  :              authentication tag (NOT RECOMMENDED)             :
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

A = Associated Data (to be authenticated only) R = neither encrypted nor authenticated, added after encryption

A=关联数据(仅需验证)R=既不加密也不验证,加密后添加

Figure 6: AEAD SRTCP Inputs When Encryption Flag = 0

图6:加密标志=0时AEAD SRTCP输入

When the Encryption flag is set to 0, the SRTCP compound packet is broken into Plaintext, Associated Data, and Raw (untouched) Data, as follows (see Figure 6):

当加密标志设置为0时,SRTCP复合数据包被分解为纯文本、关联数据和原始(未接触)数据,如下所示(见图6):

Plaintext: None.

纯文本:无。

Raw Data: The variable-length optional SRTCP MKI and SRTCP authentication tag (whose use is NOT RECOMMENDED).

原始数据:可变长度可选SRTCP MKI和SRTCP身份验证标记(不建议使用)。

Associated Data: All other data.

关联数据:所有其他数据。

Even though there is no ciphertext in this RTCP packet, AEAD encryption returns a cipher field that is precisely the length of the AEAD authentication tag. This cipher is to be placed before the Encryption flag and the SRTCP index in the authenticated SRTCP packet.

即使此RTCP数据包中没有密文,AEAD encryption也会返回一个密码字段,该密码字段的长度正好是AEAD身份验证标记的长度。此密码将置于经过身份验证的SRTCP数据包中的加密标志和SRTCP索引之前。

9.4. Prevention of SRTCP IV Reuse
9.4. 防止SRTCP-IV重用

A new master key MUST be established before the 31-bit SRTCP index cycles back to its original value. Ideally, a rekey should be performed and a new master key put in place well before the SRTCP index cycles back to the starting value.

在31位SRTCP索引循环回其原始值之前,必须建立新的主密钥。理想情况下,应在SRTCP索引循环回到起始值之前执行重新密钥,并放置新的主密钥。

The comments on SSRC management in Section 8.4 also apply.

第8.4节中关于SSRC管理的意见也适用。

10. Constraints on AEAD for SRTP and SRTCP
10. SRTP和SRTCP的AEAD约束

In general, any AEAD algorithm can accept inputs with varying lengths, but each algorithm can accept only a limited range of lengths for a specific parameter. In this section, we describe the constraints on the parameter lengths that any AEAD algorithm must support to be used in AEAD-SRTP. Additionally, we specify a complete parameter set for one specific family of AEAD algorithms, namely AES-GCM.

通常,任何AEAD算法都可以接受不同长度的输入,但每个算法只能接受特定参数的有限长度范围。在本节中,我们将描述任何AEAD算法必须支持的参数长度约束,以便在AEAD-SRTP中使用。此外,我们还为AEAD算法的一个特定系列指定了一个完整的参数集,即AES-GCM。

All AEAD algorithms used with SRTP/SRTCP MUST satisfy the five constraints listed below:

与SRTP/SRTCP一起使用的所有AEAD算法必须满足以下五个约束条件:

   Parameter  Meaning                  Value
   ---------------------------------------------------------------------
   A_MAX      maximum Associated       MUST be at least 12 octets.
              Data length
        
   Parameter  Meaning                  Value
   ---------------------------------------------------------------------
   A_MAX      maximum Associated       MUST be at least 12 octets.
              Data length
        

N_MIN minimum nonce (IV) MUST be 12 octets. length

N_MIN最小nonce(IV)必须为12个八位字节。长

N_MAX maximum nonce (IV) MUST be 12 octets. length

N_最大nonce(IV)必须为12个八位字节。长

   P_MAX      maximum Plaintext        GCM: MUST be <= 2^36 - 32 octets.
              length per invocation
        
   P_MAX      maximum Plaintext        GCM: MUST be <= 2^36 - 32 octets.
              length per invocation
        
   C_MAX      maximum ciphertext       GCM: MUST be <= 2^36 - 16 octets.
              length per invocation
        
   C_MAX      maximum ciphertext       GCM: MUST be <= 2^36 - 16 octets.
              length per invocation
        

For the sake of clarity, we specify three additional parameters:

为了清楚起见,我们指定了三个附加参数:

AEAD authentication tag length MUST be 16 octets

AEAD身份验证标记长度必须为16个八位字节

      Maximum number of invocations    SRTP: MUST be at most 2^48
         for a given instantiation     SRTCP: MUST be at most 2^31
        
      Maximum number of invocations    SRTP: MUST be at most 2^48
         for a given instantiation     SRTCP: MUST be at most 2^31
        

Block Counter size GCM: MUST be 32 bits

块计数器大小GCM:必须为32位

The reader is reminded that the ciphertext is longer than the Plaintext by exactly the length of the AEAD authentication tag.

提醒读者,密文比明文的长度正好是AEAD认证标签的长度。

11. Key Derivation Functions
11. 键导函数

A Key Derivation Function (KDF) is used to derive all of the required encryption and authentication keys from a secret value shared by the endpoints. The AEAD_AES_128_GCM algorithm MUST use the (128-bit) AES_CM PRF KDF described in [RFC3711]. AEAD_AES_256_GCM MUST use the AES_256_CM_PRF KDF described in [RFC6188].

密钥派生函数(KDF)用于从端点共享的秘密值派生所有必需的加密和身份验证密钥。AEAD_AES_128_GCM算法必须使用[RFC3711]中所述的(128位)AES_CM PRF KDF。AEAD_AES_256_GCM必须使用[RFC6188]中所述的AES_256_CM_PRF KDF。

12. Summary of AES-GCM in SRTP/SRTCP
12. SRTP/SRTCP中AES-GCM综述

For convenience, much of the information about the use of the AES-GCM family of algorithms in SRTP is collected in the tables contained in this section.

为方便起见,关于在SRTP中使用AES-GCM系列算法的大部分信息都收集在本节中的表格中。

The AES-GCM family of AEAD algorithms is built around the AES block cipher algorithm. AES-GCM uses AES-CM for encryption and Galois Message Authentication Code (GMAC) for authentication. A detailed description of the AES-GCM family can be found in [RFC5116]. The following members of the AES-GCM family may be used with SRTP/SRTCP:

AEAD算法的AES-GCM系列是围绕AES分组密码算法构建的。AES-GCM使用AES-CM进行加密,使用Galois消息身份验证码(GMAC)进行身份验证。有关AES-GCM系列的详细说明,请参见[RFC5116]。AES-GCM系列的以下成员可与SRTP/SRTCP一起使用:

     Name                 Key Size      AEAD Tag Size      Reference
     ================================================================
     AEAD_AES_128_GCM     16 octets     16 octets          [RFC5116]
     AEAD_AES_256_GCM     32 octets     16 octets          [RFC5116]
        
     Name                 Key Size      AEAD Tag Size      Reference
     ================================================================
     AEAD_AES_128_GCM     16 octets     16 octets          [RFC5116]
     AEAD_AES_256_GCM     32 octets     16 octets          [RFC5116]
        

Table 1: AES-GCM Algorithms for SRTP/SRTCP

表1:SRTP/SRTCP的AES-GCM算法

Any implementation of AES-GCM SRTP MUST support both AEAD_AES_128_GCM and AEAD_AES_256_GCM. Below, we summarize parameters associated with these two GCM algorithms:

AES-GCM SRTP的任何实现必须同时支持AEAD_AES_128_GCM和AEAD_AES_256_GCM。下面,我们总结了与这两种GCM算法相关的参数:

     +--------------------------------+------------------------------+
     | Parameter                      | Value                        |
     +--------------------------------+------------------------------+
     | Master key length              | 128 bits                     |
     | Master salt length             | 96 bits                      |
     | Key Derivation Function        | AES_CM PRF [RFC3711]         |
     | Maximum key lifetime (SRTP)    | 2^48 packets                 |
     | Maximum key lifetime (SRTCP)   | 2^31 packets                 |
     | Cipher (for SRTP and SRTCP)    | AEAD_AES_128_GCM             |
     | AEAD authentication tag length | 128 bits                     |
     +--------------------------------+------------------------------+
        
     +--------------------------------+------------------------------+
     | Parameter                      | Value                        |
     +--------------------------------+------------------------------+
     | Master key length              | 128 bits                     |
     | Master salt length             | 96 bits                      |
     | Key Derivation Function        | AES_CM PRF [RFC3711]         |
     | Maximum key lifetime (SRTP)    | 2^48 packets                 |
     | Maximum key lifetime (SRTCP)   | 2^31 packets                 |
     | Cipher (for SRTP and SRTCP)    | AEAD_AES_128_GCM             |
     | AEAD authentication tag length | 128 bits                     |
     +--------------------------------+------------------------------+
        

Table 2: The AEAD_AES_128_GCM Crypto Suite

表2:AEAD_AES_128_GCM加密套件

     +--------------------------------+------------------------------+
     | Parameter                      | Value                        |
     +--------------------------------+------------------------------+
     | Master key length              | 256 bits                     |
     | Master salt length             | 96 bits                      |
     | Key Derivation Function        | AES_256_CM_PRF [RFC6188]     |
     | Maximum key lifetime (SRTP)    | 2^48 packets                 |
     | Maximum key lifetime (SRTCP)   | 2^31 packets                 |
     | Cipher (for SRTP and SRTCP)    | AEAD_AES_256_GCM             |
     | AEAD authentication tag length | 128 bits                     |
     +--------------------------------+------------------------------+
        
     +--------------------------------+------------------------------+
     | Parameter                      | Value                        |
     +--------------------------------+------------------------------+
     | Master key length              | 256 bits                     |
     | Master salt length             | 96 bits                      |
     | Key Derivation Function        | AES_256_CM_PRF [RFC6188]     |
     | Maximum key lifetime (SRTP)    | 2^48 packets                 |
     | Maximum key lifetime (SRTCP)   | 2^31 packets                 |
     | Cipher (for SRTP and SRTCP)    | AEAD_AES_256_GCM             |
     | AEAD authentication tag length | 128 bits                     |
     +--------------------------------+------------------------------+
        

Table 3: The AEAD_AES_256_GCM Crypto Suite

表3:AEAD_AES_256_GCM加密套件

13. Security Considerations
13. 安全考虑
13.1. Handling of Security-Critical Parameters
13.1. 安全关键参数的处理

As with any security process, the implementer must take care to ensure that cryptographically sensitive parameters are properly handled. Many of these recommendations hold for all SRTP cryptographic algorithms, but we include them here to emphasize their importance.

与任何安全过程一样,实现者必须注意确保正确处理加密敏感参数。这些建议中的许多适用于所有SRTP加密算法,但我们在这里包含它们是为了强调它们的重要性。

- If the master salt is to be kept secret, it MUST be properly erased when no longer needed.

- 如果主盐要保密,当不再需要时,必须将其正确擦除。

- The secret master key and all keys derived from it MUST be kept secret. All keys MUST be properly erased when no longer needed.

- 密钥主密钥及其派生的所有密钥必须保密。不再需要时,必须正确擦除所有钥匙。

- At the start of each packet, the Block Counter MUST be reset to 1. The Block Counter is incremented after each block key has been produced, but it MUST NOT be allowed to exceed 2^32 - 1 for GCM. Note that even though the Block Counter is reset at the start of each packet, IV uniqueness is ensured by the inclusion of SSRC/ROC/SEQ or the SRTCP index in the IV. (The reader is reminded that the first block of key produced is reserved for use in authenticating the packet and is not used to encrypt Plaintext.)

- 在每个数据包开始时,块计数器必须重置为1。生成每个块密钥后,块计数器将递增,但GCM的块计数器不得超过2^32-1。请注意,即使在每个数据包的开始处重置了块计数器,通过在IV中包含SSRC/ROC/SEQ或SRTCP索引来确保IV的唯一性。(提醒读者,生成的第一个密钥块保留用于验证数据包,而不是用于加密明文。)

- Each time a rekey occurs, the initial values of both the 31-bit SRTCP index and the 48-bit SRTP packet index (ROC||SEQ) MUST be saved in order to prevent IV reuse.

- 每次重设密钥时,必须保存31位SRTCP索引和48位SRTP数据包索引(ROC | | SEQ)的初始值,以防止IV重用。

- Processing MUST cease if either the 31-bit SRTCP index or the 48-bit SRTP packet index (ROC||SEQ) cycles back to its initial value. Processing MUST NOT resume until a new SRTP/SRTCP session has been established using a new SRTP master key. Ideally, a rekey should be done well before any of these counters cycle.

- 如果31位SRTCP索引或48位SRTP数据包索引(ROC | SEQ)循环回到其初始值,则处理必须停止。在使用新的SRTP主密钥建立新的SRTP/SRTCP会话之前,不得恢复处理。理想情况下,在这些计数器循环之前,应该做好重新设置密钥的工作。

13.2. Size of the Authentication Tag
13.2. 身份验证标记的大小

We require that the AEAD authentication tag be 16 octets, in order to effectively eliminate the risk of an adversary successfully introducing fraudulent data. Though other protocols may allow the use of truncated authentication tags, the consensus of the authors and the working group is that risks associated with using truncated AES-GCM tags are deemed too high to allow the use of truncated authentication tags in SRTP/SRTCP.

我们要求AEAD身份验证标签为16个八位字节,以便有效消除对手成功引入欺诈数据的风险。尽管其他协议可能允许使用截断认证标签,但作者和工作组的共识是,使用截断AES-GCM标签相关的风险被认为太高,不允许在SRTP/SRTCP中使用截断认证标签。

14. IANA Considerations
14. IANA考虑
14.1. SDES
14.1. SDES

"Session Description Protocol (SDP) Security Descriptions for Media Streams" [RFC4568] defines SRTP "crypto suites". A crypto suite corresponds to a particular AEAD algorithm in SRTP. In order to allow security descriptions to signal the use of the algorithms defined in this document, IANA has registered the following crypto suites in the "SRTP Crypto Suite Registrations" subregistry of the "Session Description Protocol (SDP) Security Descriptions" registry. The ABNF [RFC5234] syntax is as follows:

“媒体流的会话描述协议(SDP)安全描述”[RFC4568]定义了SRTP“加密套件”。加密套件对应于SRTP中的特定AEAD算法。为了允许安全描述表明使用本文件中定义的算法,IANA已在“会话描述协议(SDP)安全描述”注册表的“SRTP加密套件注册”子区注册了以下加密套件。ABNF[RFC5234]语法如下:

srtp-crypto-suite-ext = "AEAD_AES_128_GCM" / "AEAD_AES_256_GCM" / srtp-crypto-suite-ext

srtp加密套件ext=“AEAD_AES_128_GCM”/“AEAD_AES_256_GCM”/srtp加密套件ext

14.2. DTLS-SRTP
14.2. DTLS-SRTP

DTLS-SRTP [RFC5764] defines DTLS-SRTP "SRTP protection profiles". These profiles also correspond to the use of an AEAD algorithm in SRTP. In order to allow the use of the algorithms defined in this document in DTLS-SRTP, IANA has registered the following SRTP protection profiles:

DTLS-SRTP[RFC5764]定义了DTLS-SRTP“SRTP保护配置文件”。这些配置文件还对应于在SRTP中使用AEAD算法。为了允许在DTLS-SRTP中使用本文件中定义的算法,IANA注册了以下SRTP保护配置文件:

         SRTP_AEAD_AES_128_GCM    = {0x00, 0x07}
         SRTP_AEAD_AES_256_GCM    = {0x00, 0x08}
        
         SRTP_AEAD_AES_128_GCM    = {0x00, 0x07}
         SRTP_AEAD_AES_256_GCM    = {0x00, 0x08}
        

Below, we list the SRTP transform parameters for each of these protection profiles. Unless separate parameters for SRTP and SRTCP are explicitly listed, these parameters apply to both SRTP and SRTCP.

下面,我们列出了每个保护配置文件的SRTP转换参数。除非明确列出SRTP和SRTCP的单独参数,否则这些参数同时适用于SRTP和SRTCP。

    SRTP_AEAD_AES_128_GCM
         cipher:                 AES_128_GCM
         cipher_key_length:      128 bits
         cipher_salt_length:     96 bits
         aead_auth_tag_length:   16 octets
         auth_function:          NULL
         auth_key_length:        N/A
         auth_tag_length:        N/A
         maximum lifetime:       at most 2^31 SRTCP packets and
                                   at most 2^48 SRTP packets
        
    SRTP_AEAD_AES_128_GCM
         cipher:                 AES_128_GCM
         cipher_key_length:      128 bits
         cipher_salt_length:     96 bits
         aead_auth_tag_length:   16 octets
         auth_function:          NULL
         auth_key_length:        N/A
         auth_tag_length:        N/A
         maximum lifetime:       at most 2^31 SRTCP packets and
                                   at most 2^48 SRTP packets
        
    SRTP_AEAD_AES_256_GCM
         cipher:                 AES_256_GCM
         cipher_key_length:      256 bits
         cipher_salt_length:     96 bits
         aead_auth_tag_length:   16 octets
         auth_function:          NULL
         auth_key_length:        N/A
         auth_tag_length:        N/A
         maximum lifetime:       at most 2^31 SRTCP packets and
                                   at most 2^48 SRTP packets
        
    SRTP_AEAD_AES_256_GCM
         cipher:                 AES_256_GCM
         cipher_key_length:      256 bits
         cipher_salt_length:     96 bits
         aead_auth_tag_length:   16 octets
         auth_function:          NULL
         auth_key_length:        N/A
         auth_tag_length:        N/A
         maximum lifetime:       at most 2^31 SRTCP packets and
                                   at most 2^48 SRTP packets
        

Note that these SRTP protection profiles do not specify an auth_function, auth_key_length, or auth_tag_length, because all of these profiles use AEAD algorithms and thus do not use a separate auth_function, auth_key, or auth_tag. The term "aead_auth_tag_length" is used to emphasize that this refers to the authentication tag provided by the AEAD algorithm and that this tag is not located in the authentication tag field provided by SRTP/SRTCP.

请注意,这些SRTP保护配置文件没有指定auth_函数、auth_key_length或auth_tag_length,因为所有这些配置文件都使用AEAD算法,因此不使用单独的auth_函数、auth_key或auth_tag。术语“aead_auth_tag_length”用于强调这是指aead算法提供的身份验证标签,并且该标签不位于SRTP/SRTCP提供的身份验证标签字段中。

14.3. MIKEY
14.3. 米奇

In accordance with "MIKEY: Multimedia Internet KEYing" [RFC3830], IANA maintains several subregistries under "Multimedia Internet KEYing (MIKEY) Payload Name Spaces". Per this document, additions have been made to two of the MIKEY subregistries.

根据“MIKEY:Multimedia Internet KEYing”[RFC3830],IANA在“Multimedia Internet KEYing(MIKEY)有效负载名称空间”下维护了几个子区域。根据本文件,增加了两个MIKEY分区。

In the "MIKEY Security Protocol Parameters" subregistry, the following has been added:

在“MIKEY Security Protocol Parameters”子区域中,添加了以下内容:

      Type | Meaning                         | Possible Values
      --------------------------------------------------------
        20 | AEAD authentication tag length  | 16 octets
        
      Type | Meaning                         | Possible Values
      --------------------------------------------------------
        20 | AEAD authentication tag length  | 16 octets
        

This list is, of course, intended for use with GCM. It is conceivable that new AEAD algorithms introduced at some point in the future may require a different set of authentication tag lengths.

当然,此列表旨在与GCM一起使用。可以想象,未来某个时候引入的新AEAD算法可能需要一组不同的认证标签长度。

In the "Encryption algorithm (Value 0)" subregistry (derived from Table 6.10.1.b of [RFC3830]), the following has been added:

在“加密算法(值0)”子区域(源自[RFC3830]的表6.10.1.b),增加了以下内容:

        SRTP Encr. | Value | Default Session   |  Default Auth.
        Algorithm  |       | Encr. Key Length  |   Tag Length
      -----------------------------------------------------------
        AES-GCM    |    6  |    16 octets      |  16 octets
        
        SRTP Encr. | Value | Default Session   |  Default Auth.
        Algorithm  |       | Encr. Key Length  |   Tag Length
      -----------------------------------------------------------
        AES-GCM    |    6  |    16 octets      |  16 octets
        

The encryption algorithm, session encryption key length, and AEAD authentication tag sizes received from MIKEY fully determine the AEAD algorithm to be used. The exact mapping is described in Section 15.

从MIKEY收到的加密算法、会话加密密钥长度和AEAD身份验证标记大小完全决定要使用的AEAD算法。第15节描述了精确映射。

15. Parameters for Use with MIKEY
15. 用于MIKEY的参数

MIKEY specifies the algorithm family separately from the key length (which is specified by the Session Encryption key length) and the authentication tag length (specified by the AEAD authentication tag length).

MIKEY指定的算法系列与密钥长度(由会话加密密钥长度指定)和身份验证标记长度(由AEAD身份验证标记长度指定)不同。

                           +------------+-------------+-------------+
                           | Encryption | Encryption  |  AEAD Auth. |
                           | Algorithm  | Key Length  |  Tag Length |
                           +============+=============+=============+
      AEAD_AES_128_GCM     |  AES-GCM   | 16 octets   | 16 octets   |
                           +------------+-------------+-------------+
      AEAD_AES_256_GCM     |  AES-GCM   | 32 octets   | 16 octets   |
                           +============+=============+=============+
        
                           +------------+-------------+-------------+
                           | Encryption | Encryption  |  AEAD Auth. |
                           | Algorithm  | Key Length  |  Tag Length |
                           +============+=============+=============+
      AEAD_AES_128_GCM     |  AES-GCM   | 16 octets   | 16 octets   |
                           +------------+-------------+-------------+
      AEAD_AES_256_GCM     |  AES-GCM   | 32 octets   | 16 octets   |
                           +============+=============+=============+
        

Table 4: Mapping MIKEY Parameters to AEAD Algorithms

表4:将MIKEY参数映射到AEAD算法

Section 11 of this document restricts the choice of KDF for AEAD algorithms. To enforce this restriction in MIKEY, we require that the SRTP Pseudorandom Function (PRF) has value AES-CM whenever an AEAD algorithm is used. Note that, according to Section 6.10.1 of [RFC3830], the input key length of the KDF (i.e., the SRTP master key length) is always equal to the session encryption key length. This means, for example, that AEAD_AES_256_GCM will use AES_256_CM_PRF as the KDF.

本文件第11节限制AEAD算法的KDF选择。为了在MIKEY中实施此限制,我们要求每当使用AEAD算法时,SRTP伪随机函数(PRF)的值为AES-CM。注意,根据[RFC3830]第6.10.1节,KDF的输入密钥长度(即SRTP主密钥长度)始终等于会话加密密钥长度。这意味着,例如,AEAD_AES_256_GCM将使用AES_256_CM_PRF作为KDF。

16. Some RTP Test Vectors
16. 一些RTP测试向量

The examples in this section are all based upon the same RTP packet

本节中的示例都基于相同的RTP数据包

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207473

consisting of a 12-octet header (8040f17b 8041f8d3 5501a0b2) and a 38-octet payload (47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573), which is just the ASCII string "Gallia est omnis divisa in partes tres". The salt used (51756964 2070726f 2071756f) comes from the ASCII string "Quid pro quo". The 16-octet (128-bit) key is 00 01 02 ... 0f, and the 32-octet (256-bit) key is 00 01 02 ... 1f. At the time this document was written, the RTP payload type (1000000 binary = 64 decimal) was an unassigned value.

由一个12个八位字节的报头(8040f17b 8041f8d3 5501a0b2)和一个38个八位字节的有效载荷(47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 732072 6573)组成,它只是ASCII字符串“Gallia est omnis divisia in partes tres”。使用的salt(51756964 2070726f 2071756f)来自ASCII字符串“Quid-pro-quo”。16个八位组(128位)的密钥是00 01 02。。。0f,并且32个八位字节(256位)的键是00 01 02。。。1f。在编写本文档时,RTP有效负载类型(1000000二进制=64十进制)是一个未赋值的值。

As shown in Section 8.1, the IV is formed by XORing two 12-octet values. The first 12-octet value is formed by concatenating two zero octets, the 4-octet SSRC (found in the ninth through 12th octets of the packet), the 4-octet rollover counter (ROC) maintained at each end of the link, and the 2-octet sequence number (SEQ) (found in the third and fourth octets of the packet). The second 12-octet value is the salt, a value that is held constant at least until the key is changed.

如第8.1节所示,IV由两个12八位元值的XORing构成。前12个八位字节值由两个零八位字节、4个八位字节SSRC(位于数据包的第9到第12个八位字节中)、保持在链路两端的4个八位字节翻转计数器(ROC)和2个八位字节序列号(SEQ)(位于数据包的第三和第四个八位字节中)串联而成。第二个12个八位组的值是salt,该值至少在密钥更改之前保持不变。

              | Pad |   SSRC    |    ROC    | SEQ |
               00 00 55 01 a0 b2 00 00 00 00 f1 7b
        salt   51 75 69 64 20 70 72 6f 20 71 75 6f
               ------------------------------------
          IV   51 75 3c 65 80 c2 72 6f 20 71 84 14
        
              | Pad |   SSRC    |    ROC    | SEQ |
               00 00 55 01 a0 b2 00 00 00 00 f1 7b
        salt   51 75 69 64 20 70 72 6f 20 71 75 6f
               ------------------------------------
          IV   51 75 3c 65 80 c2 72 6f 20 71 84 14
        

All of the RTP examples use this IV.

所有RTP示例都使用此IV。

16.1. SRTP AEAD_AES_128_GCM
16.1. SRTP AEAD_AES_128_GCM
16.1.1. SRTP AEAD_AES_128_GCM Encryption
16.1.1. SRTP AEAD_AES_128_GCM加密

Encrypting the following packet:

加密以下数据包:

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207473

Form the IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14

形成IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b盐:51 75 69 64 20 70 72 6f 20 71 6f IV:51 75 3c 65 80 c2 72 6f 20 71 84 14

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 8040f17b 8041f8d3 5501a0b2
    PT: 47616c6c 69612065 7374206f 6d6e6973
        20646976 69736120 696e2070 61727465
        73207472 6573
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: c6a13b37878f5b826f4f8162a1c8d879
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 8040f17b 8041f8d3 5501a0b2
    PT: 47616c6c 69612065 7374206f 6d6e6973
        20646976 69736120 696e2070 61727465
        73207472 6573
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: c6a13b37878f5b826f4f8162a1c8d879
        

Encrypt the Plaintext block # 0 IV||blk_cntr: 51753c6580c2726f2071841400000002 key_block: b5 2c 8f cf 92 55 fe 09 df ce a6 73 f0 10 22 b9 plain_block: 47 61 6c 6c 69 61 20 65 73 74 20 6f 6d 6e 69 73 cipher_block: f2 4d e3 a3 fb 34 de 6c ac ba 86 1c 9d 7e 4b ca block # 1 IV||blk_cntr: 51753c6580c2726f2071841400000003 key_block: 9e 07 52 a3 64 5a 2f 4f 2b cb d4 0a 30 b5 a5 fe plain_block: 20 64 69 76 69 73 61 20 69 6e 20 70 61 72 74 65 cipher_block: be 63 3b d5 0d 29 4e 6f 42 a5 f4 7a 51 c7 d1 9b block # 2 IV||blk_cntr: 51753c6580c2726f2071841400000004 key_block: 45 fe 4e ad ed 40 0a 5d 1a f3 63 f9 0c e1 49 3b plain_block: 73 20 74 72 65 73 cipher_block: 36 de 3a df 88 33

加密明文块#0 IV | blk|u cntr:51753C6580C2726F207184140000002密钥块:b5 2c 8f cf 92 55 fe 09 df ce a6 73 f0 10 22 b9明文块:47 61 6c 69 61 20 65 73 20 74 20 6f 6d 6e 69 73密码块:f2 4d e3 fb 34 de 6c ac ba 86 1c 9d 7e 4b ca块#1 IV | blk| cntr:516580C200003密钥块:1849E4f 2b cb d4 0a 30 b5 a5 fe普通块:20 64 69 76 69 73 61 20 69 6e 20 70 61 72 74 65密码块:be 63 3b d5 0d 29 4e 6f 42 a5 f4 7a 51 c7 d1 9b块#2 IV | blk|cntr:51753C6580C2726F207184140000004密钥块:45 fe 4e ADD 40 0a 5d 1a f3 63 f9 0c e1 49 3b普通块:73 20 74 73 de 3a密码块:

Cipher before tag appended f24de3a3 fb34de6c acba861c 9d7e4bca be633bd5 0d294e6f 42a5f47a 51c7d19b 36de3adf 8833

附加标签前的密码f24de3a3 fb34de6c acba861c 9d7e4bca be633bd5 0d294e6f 42a5f47a 51c7d19b 36de3adf 8833

Compute the GMAC tag

计算GMAC标记

     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b200000000
       partial hash: bcfb3d1d0e6e3e78ba45403377dba11b
        
     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b200000000
       partial hash: bcfb3d1d0e6e3e78ba45403377dba11b
        
     Process the cipher
        cipher word: f24de3a3fb34de6cacba861c9d7e4bca
       partial hash: 0ebc0abe1b15b32fedd2b07888c1ef61
        cipher word: be633bd50d294e6f42a5f47a51c7d19b
       partial hash: 438e5797011ea860585709a2899f4685
        cipher word: 36de3adf883300000000000000000000
       partial hash: 336fb643310d7bac2aeaa76247f6036d
        
     Process the cipher
        cipher word: f24de3a3fb34de6cacba861c9d7e4bca
       partial hash: 0ebc0abe1b15b32fedd2b07888c1ef61
        cipher word: be633bd50d294e6f42a5f47a51c7d19b
       partial hash: 438e5797011ea860585709a2899f4685
        cipher word: 36de3adf883300000000000000000000
       partial hash: 336fb643310d7bac2aeaa76247f6036d
        
     Process the length word
        length word: 00000000000000600000000000000130
       partial hash: 1b964067078c408c4e442a8f015e5264
        
     Process the length word
        length word: 00000000000000600000000000000130
       partial hash: 1b964067078c408c4e442a8f015e5264
        

Turn GHASH into GMAC GHASH: 1b 96 40 67 07 8c 40 8c 4e 44 2a 8f 01 5e 52 64 K0: 92 0b 3f 40 b9 3d 2a 1d 1c 8b 5c d1 e5 67 5e aa full GMAC: 89 9d 7f 27 be b1 6a 91 52 cf 76 5e e4 39 0c ce

将GHASH转换为GMAC GHASH:1b 96 40 67 07 8c 40 8c 4e 44 2a 8f 01 5e 52 64 K0:92 0b 3f 40 b9 3d 2a 1d 1c 8b 5c d1 e5 67 5e aa完整GMAC:89 9d 7f 27 be b1 6a 91 cf 76 5e e4 39 0c ce

Cipher with tag f24de3a3 fb34de6c acba861c 9d7e4bca be633bd5 0d294e6f 42a5f47a 51c7d19b 36de3adf 8833899d 7f27beb1 6a9152cf 765ee439 0cce

带标签f24de3a3 fb34de6c acba861c 9d7e4bca be633bd5 0d294e6f 42a5f47a 51c7d19b 36de3adf 8833899d 7f27beb1 6a9152cf 765ee439 0cce的密码

Encrypted and tagged packet: 8040f17b 8041f8d3 5501a0b2 f24de3a3 fb34de6c acba861c 9d7e4bca be633bd5 0d294e6f 42a5f47a 51c7d19b 36de3adf 8833899d 7f27beb1 6a9152cf 765ee439 0cce

加密和标记的数据包:8040f17b 8041f8d3 5501a0b2 f24de3a3 fb34de6c acba861c 9d7e4bca be633bd5 0d294e6f 42a5f47a 51c7d19b 36de3adf 8833899d 7f27beb1 6a9152cf 765ee439 0cce

16.1.2. SRTP AEAD_AES_128_GCM Decryption
16.1.2. SRTP AEAD_AES_128_GCM解密

Decrypting the following packet:

解密以下数据包:

8040f17b 8041f8d3 5501a0b2 f24de3a3 fb34de6c acba861c 9d7e4bca be633bd5 0d294e6f 42a5f47a 51c7d19b 36de3adf 8833899d 7f27beb1 6a9152cf 765ee439 0cce

8040f17b 8041f8d3 5501a0b2 f24de3a3 fb34de6c acba861c 9d7e4bca be633bd5 0d294e6f 42a5f47a 51c7d19b 36de3adf 8833899d 7f27beb1 6a9152cf 765ee439 0CE

Form the IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14

形成IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b盐:51 75 69 64 20 70 72 6f 20 71 6f IV:51 75 3c 65 80 c2 72 6f 20 71 84 14

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 8040f17b 8041f8d3 5501a0b2
    CT: f24de3a3 fb34de6c acba861c 9d7e4bca
        be633bd5 0d294e6f 42a5f47a 51c7d19b
        36de3adf 8833899d 7f27beb1 6a9152cf
        765ee439 0cce
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: c6a13b37878f5b826f4f8162a1c8d879
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 8040f17b 8041f8d3 5501a0b2
    CT: f24de3a3 fb34de6c acba861c 9d7e4bca
        be633bd5 0d294e6f 42a5f47a 51c7d19b
        36de3adf 8833899d 7f27beb1 6a9152cf
        765ee439 0cce
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: c6a13b37878f5b826f4f8162a1c8d879
        

Verify the received tag 89 9d 7f 27 be b1 6a 91 52 cf 76 5e e4 39 0c ce

验证收到的标签89 9d 7f 27是否为b1 6a 91 52 cf 76 5e e4 39 0c ce

     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b200000000
       partial hash: bcfb3d1d0e6e3e78ba45403377dba11b
        
     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b200000000
       partial hash: bcfb3d1d0e6e3e78ba45403377dba11b
        
     Process the cipher
        cipher word: f24de3a3fb34de6cacba861c9d7e4bca
       partial hash: 0ebc0abe1b15b32fedd2b07888c1ef61
        cipher word: be633bd50d294e6f42a5f47a51c7d19b
       partial hash: 438e5797011ea860585709a2899f4685
        cipher word: 36de3adf883300000000000000000000
       partial hash: 336fb643310d7bac2aeaa76247f6036d
        
     Process the cipher
        cipher word: f24de3a3fb34de6cacba861c9d7e4bca
       partial hash: 0ebc0abe1b15b32fedd2b07888c1ef61
        cipher word: be633bd50d294e6f42a5f47a51c7d19b
       partial hash: 438e5797011ea860585709a2899f4685
        cipher word: 36de3adf883300000000000000000000
       partial hash: 336fb643310d7bac2aeaa76247f6036d
        
     Process the length word
        length word: 00000000000000600000000000000130
       partial hash: 1b964067078c408c4e442a8f015e5264
        
     Process the length word
        length word: 00000000000000600000000000000130
       partial hash: 1b964067078c408c4e442a8f015e5264
        

Turn GHASH into GMAC GHASH: 1b 96 40 67 07 8c 40 8c 4e 44 2a 8f 01 5e 52 64 K0: 92 0b 3f 40 b9 3d 2a 1d 1c 8b 5c d1 e5 67 5e aa full GMAC: 89 9d 7f 27 be b1 6a 91 52 cf 76 5e e4 39 0c ce

将GHASH转换为GMAC GHASH:1b 96 40 67 07 8c 40 8c 4e 44 2a 8f 01 5e 52 64 K0:92 0b 3f 40 b9 3d 2a 1d 1c 8b 5c d1 e5 67 5e aa完整GMAC:89 9d 7f 27 be b1 6a 91 cf 76 5e e4 39 0c ce

Received tag = 899d7f27 beb16a91 52cf765e e4390cce Computed tag = 899d7f27 beb16a91 52cf765e e4390cce Received tag verified.

接收的标签=899d7f27 beb16a91 52cf765e e4390cce计算的标签=899d7f27 beb16a91 52cf765e e4390cce已验证的接收标签。

Decrypt the cipher block # 0 IV||blk_cntr: 51753c6580c2726f2071841400000002 key_block: b5 2c 8f cf 92 55 fe 09 df ce a6 73 f0 10 22 b9 cipher_block: f2 4d e3 a3 fb 34 de 6c ac ba 86 1c 9d 7e 4b ca plain_block: 47 61 6c 6c 69 61 20 65 73 74 20 6f 6d 6e 69 73 block # 1 IV||blk_cntr: 51753c6580c2726f2071841400000003 key_block: 9e 07 52 a3 64 5a 2f 4f 2b cb d4 0a 30 b5 a5 fe cipher_block: be 63 3b d5 0d 29 4e 6f 42 a5 f4 7a 51 c7 d1 9b plain_block: 20 64 69 76 69 73 61 20 69 6e 20 70 61 72 74 65 block # 2 IV||blk_cntr: 51753c6580c2726f2071841400000004 key_block: 45 fe 4e ad ed 40 0a 5d 1a f3 63 f9 0c e1 49 3b cipher_block: 36 de 3a df 88 33 plain_block: 73 20 74 72 65 73

解密密码块#0 IV | blk|cntr:51753C6580C2726F207184140000002密钥块:b5 2c 8f cf 92 55 fe 09 df ce a6 73 f0 10 22 b9密码块:F24D e3 a3 fb 34 de 6c ac ba 86 1c 9d 7e 4b ca普通密钥块:4761 6c 6c 69 61 20 65 73 74 20 6f 6d 6e 69 73密钥块2b cb d4 0a 30 b5 a5 fe密码块:be 63 3b d5 0d 29 4e 6f 42 a5 f4 7a 51 c7 d1 9b普通密码块:20 64 69 76 69 61 20 69 6e 20 70 61 72 74 65块#2 IV | blk cntr:51753C6580 C2726F207184140000004密钥块:45 fe ADD 40 0a 5d 1a f3 63 f9 0c e1 49 3b密码块:36 de 3a df 88 33普通密码块:73 20 74

Verified and tagged packet: 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

验证和标记的数据包:47616C669612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

16.1.3. SRTP AEAD_AES_128_GCM Authentication Tagging
16.1.3. SRTP AEAD_AES_128_GCM认证标签

Tagging the following packet:

标记以下数据包:

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207473

Form the IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14

形成IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b盐:51 75 69 64 20 70 72 6f 20 71 6f IV:51 75 3c 65 80 c2 72 6f 20 71 84 14

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 8040f17b 8041f8d3 5501a0b2 47616c6c
        69612065 7374206f 6d6e6973 20646976
        69736120 696e2070 61727465 73207472
        6573
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: c6a13b37878f5b826f4f8162a1c8d879
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 8040f17b 8041f8d3 5501a0b2 47616c6c
        69612065 7374206f 6d6e6973 20646976
        69736120 696e2070 61727465 73207472
        6573
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: c6a13b37878f5b826f4f8162a1c8d879
        

Compute the GMAC tag

计算GMAC标记

     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b247616c6c
       partial hash: 79f41fea34a474a77609d8925e9f2b22
           AAD word: 696120657374206f6d6e697320646976
       partial hash: 84093a2f85abf17ab37d3ce2f706138f
           AAD word: 69736120696e20706172746573207472
       partial hash: ab2760fee24e6dec754739d8059cd144
           AAD word: 65730000000000000000000000000000
       partial hash: e84f3c55d287fc561c41d09a8aada4be
        
     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b247616c6c
       partial hash: 79f41fea34a474a77609d8925e9f2b22
           AAD word: 696120657374206f6d6e697320646976
       partial hash: 84093a2f85abf17ab37d3ce2f706138f
           AAD word: 69736120696e20706172746573207472
       partial hash: ab2760fee24e6dec754739d8059cd144
           AAD word: 65730000000000000000000000000000
       partial hash: e84f3c55d287fc561c41d09a8aada4be
        
     Process the length word
        length word: 00000000000001900000000000000000
       partial hash: b04200c26b81c98af55cc2eafccd1cbc
        
     Process the length word
        length word: 00000000000001900000000000000000
       partial hash: b04200c26b81c98af55cc2eafccd1cbc
        

Turn GHASH into GMAC GHASH: b0 42 00 c2 6b 81 c9 8a f5 5c c2 ea fc cd 1c bc K0: 92 0b 3f 40 b9 3d 2a 1d 1c 8b 5c d1 e5 67 5e aa full GMAC: 22 49 3f 82 d2 bc e3 97 e9 d7 9e 3b 19 aa 42 16

将GHASH转换为GMAC GHASH:b0 42 00 c2 6b 81 c9 8a f5 5c c2 ea fc cd 1c bc K0:92 0b 3f 40 b9 3d 2a 1d 1c 8b 5c d1 e5 67 5e aa完整GMAC:22 49 3f 82 d2 bc e3 97 e9 d7 9e 3b 19 aa 42 16

Cipher with tag 22493f82 d2bce397 e9d79e3b 19aa4216

带标记22493f82 d2bce397 e9d79e3b 19aa4216的密码

Tagged packet: 8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 65732249 3f82d2bc e397e9d7 9e3b19aa 4216

标记包:8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 7320772 65732249 3F82BC e397e9d7 9e3b19aa 4216

16.1.4. SRTP AEAD_AES_128_GCM Tag Verification
16.1.4. SRTP AEAD_AES_128_GCM标签验证

Verifying the following packet:

正在验证以下数据包:

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 65732249 3f82d2bc e397e9d7 9e3b19aa 4216

8040f17b 8041f8d3 5501a0b2 47616C669612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 7320772 65732249 3F82B2 BC e397e9d7 9e3b19aa 4216

Form the IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14

形成IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b盐:51 75 69 64 20 70 72 6f 20 71 6f IV:51 75 3c 65 80 c2 72 6f 20 71 84 14

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 8040f17b 8041f8d3 5501a0b2 47616c6c
        69612065 7374206f 6d6e6973 20646976
        69736120 696e2070 61727465 73207472
        6573
    CT: 22493f82 d2bce397 e9d79e3b 19aa4216
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: c6a13b37878f5b826f4f8162a1c8d879
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 8040f17b 8041f8d3 5501a0b2 47616c6c
        69612065 7374206f 6d6e6973 20646976
        69736120 696e2070 61727465 73207472
        6573
    CT: 22493f82 d2bce397 e9d79e3b 19aa4216
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: c6a13b37878f5b826f4f8162a1c8d879
        

Verify the received tag 22 49 3f 82 d2 bc e3 97 e9 d7 9e 3b 19 aa 42 16

验证收到的标签22 49 3f 82 d2 bc e3 97 e9 d7 9e 3b 19 aa 42 16

     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b247616c6c
       partial hash: 79f41fea34a474a77609d8925e9f2b22
           AAD word: 696120657374206f6d6e697320646976
       partial hash: 84093a2f85abf17ab37d3ce2f706138f
           AAD word: 69736120696e20706172746573207472
       partial hash: ab2760fee24e6dec754739d8059cd144
           AAD word: 65730000000000000000000000000000
       partial hash: e84f3c55d287fc561c41d09a8aada4be
        
     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b247616c6c
       partial hash: 79f41fea34a474a77609d8925e9f2b22
           AAD word: 696120657374206f6d6e697320646976
       partial hash: 84093a2f85abf17ab37d3ce2f706138f
           AAD word: 69736120696e20706172746573207472
       partial hash: ab2760fee24e6dec754739d8059cd144
           AAD word: 65730000000000000000000000000000
       partial hash: e84f3c55d287fc561c41d09a8aada4be
        
     Process the length word
        length word: 00000000000001900000000000000000
       partial hash: b04200c26b81c98af55cc2eafccd1cbc
        
     Process the length word
        length word: 00000000000001900000000000000000
       partial hash: b04200c26b81c98af55cc2eafccd1cbc
        

Turn GHASH into GMAC GHASH: b0 42 00 c2 6b 81 c9 8a f5 5c c2 ea fc cd 1c bc K0: 92 0b 3f 40 b9 3d 2a 1d 1c 8b 5c d1 e5 67 5e aa full GMAC: 22 49 3f 82 d2 bc e3 97 e9 d7 9e 3b 19 aa 42 16

将GHASH转换为GMAC GHASH:b0 42 00 c2 6b 81 c9 8a f5 5c c2 ea fc cd 1c bc K0:92 0b 3f 40 b9 3d 2a 1d 1c 8b 5c d1 e5 67 5e aa完整GMAC:22 49 3f 82 d2 bc e3 97 e9 d7 9e 3b 19 aa 42 16

Received tag = 22493f82 d2bce397 e9d79e3b 19aa4216 Computed tag = 22493f82 d2bce397 e9d79e3b 19aa4216 Received tag verified.

已接收标记=22493f82 d2bce397 e9d79e3b 19aa4216已计算标记=22493f82 d2bce397 e9d79e3b 19aa4216已验证已接收标记。

16.2. SRTP AEAD_AES_256_GCM
16.2. SRTP AEAD_AES_256_GCM
16.2.1. SRTP AEAD_AES_256_GCM Encryption
16.2.1. SRTP AEAD_AES_256_GCM加密

Encrypting the following packet:

加密以下数据包:

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207473

Form the IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14

形成IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b盐:51 75 69 64 20 70 72 6f 20 71 6f IV:51 75 3c 65 80 c2 72 6f 20 71 84 14

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 8040f17b 8041f8d3 5501a0b2
    PT: 47616c6c 69612065 7374206f 6d6e6973
        20646976 69736120 696e2070 61727465
        73207472 6573
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: f29000b62a499fd0a9f39a6add2e7780
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 8040f17b 8041f8d3 5501a0b2
    PT: 47616c6c 69612065 7374206f 6d6e6973
        20646976 69736120 696e2070 61727465
        73207472 6573
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: f29000b62a499fd0a9f39a6add2e7780
        

Encrypt the Plaintext block # 0 IV||blk_cntr: 51753c6580c2726f2071841400000002 key_block: 75 d0 b2 14 c1 43 de 77 9c eb 58 95 5e 40 5a d9 plain_block: 47 61 6c 6c 69 61 20 65 73 74 20 6f 6d 6e 69 73 cipher_block: 32 b1 de 78 a8 22 fe 12 ef 9f 78 fa 33 2e 33 aa block # 1 IV||blk_cntr: 51753c6580c2726f2071841400000003 key_block: 91 e4 7b 4e f3 2b 83 d3 dc 65 0a 72 17 8d da 6a plain_block: 20 64 69 76 69 73 61 20 69 6e 20 70 61 72 74 65 cipher_block: b1 80 12 38 9a 58 e2 f3 b5 0b 2a 02 76 ff ae 0f block # 2 IV||blk_cntr: 51753c6580c2726f2071841400000004 key_block: 68 86 43 eb dd 08 07 98 16 3a 16 d5 e5 04 f6 3a plain_block: 73 20 74 72 65 73 cipher_block: 1b a6 37 99 b8 7b

加密明文块#0 IV | blk|u cntr:51753C6580C2726F207184140000002密钥块:75 d0 b2 14 c1 43 de 77 9c eb 58 95 5e 40 5a d9明文块:47 61 6c 69 61 20 65 74 20 6f 6d 6e 69密码块:32 b1 de 78 a8 22 fe 12 ef 9f 78 fa 33 2 E 33 aa块d3 dc 65 0a 72 17 8d da 6a普通块:20 64 69 76 73 61 20 69 6e 20 70 61 72 74 65密码块:b1 80 12 38 9a 58 e2 f3 b5 0b 2a 02 76 ff ae 0f块#2 IV | blk|U cntr:51753C6580 C2726F207184140000004密钥块:68 86 43 eb dd 08 98 16 3a 16 d5 e5 04 f6 3a普通块:73 20 74 74 1b a6 37 B7 B密码块

Cipher before tag appended 32b1de78 a822fe12 ef9f78fa 332e33aa b1801238 9a58e2f3 b50b2a02 76ffae0f 1ba63799 b87b

附加标签前的密码32b1de78 a822fe12 ef9f78fa 332E33A b1801238 9a58e2f3 b50b2a02 76ffae0f 1ba63799 b87b

Compute the GMAC tag

计算GMAC标记

     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b200000000
       partial hash: 0154dcb75485b71880e1957c877351bd
        
     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b200000000
       partial hash: 0154dcb75485b71880e1957c877351bd
        
     Process the cipher
        cipher word: 32b1de78a822fe12ef9f78fa332e33aa
       partial hash: c3f07db9a8b9cb4345eb07f793d322d2
        cipher word: b18012389a58e2f3b50b2a0276ffae0f
       partial hash: 6d1e66fe32eb32ecd8906ceab09db996
        cipher word: 1ba63799b87b00000000000000000000
       partial hash: b3d1d2f1fa3b366619bc42cd2eedafee
        
     Process the cipher
        cipher word: 32b1de78a822fe12ef9f78fa332e33aa
       partial hash: c3f07db9a8b9cb4345eb07f793d322d2
        cipher word: b18012389a58e2f3b50b2a0276ffae0f
       partial hash: 6d1e66fe32eb32ecd8906ceab09db996
        cipher word: 1ba63799b87b00000000000000000000
       partial hash: b3d1d2f1fa3b366619bc42cd2eedafee
        
     Process the length word
        length word: 00000000000000600000000000000130
       partial hash: 7debf5fa1fac3bd318d5e1a7ee401091
        
     Process the length word
        length word: 00000000000000600000000000000130
       partial hash: 7debf5fa1fac3bd318d5e1a7ee401091
        

Turn GHASH into GMAC GHASH: 7d eb f5 fa 1f ac 3b d3 18 d5 e1 a7 ee 40 10 91 K0: 07 48 2e cc c0 53 ed 63 e1 6e 99 df 39 e7 7c 82 full GMAC: 7a a3 db 36 df ff d6 b0 f9 bb 78 78 d7 a7 6c 13

将GHASH转换为GMAC GHASH:7d eb f5 fa 1f ac 3b d3 18 d5 e1 a7 ee 40 10 91 K0:07 48 2e cc c0 53 ed 63 e1 6e 99 df 39 e7 7c 82完整GMAC:7a a3 db 36 df ff d6 b0 f9 bb 78 d7 a7 6c 13

Cipher with tag 32b1de78 a822fe12 ef9f78fa 332e33aa b1801238 9a58e2f3 b50b2a02 76ffae0f 1ba63799 b87b7aa3 db36dfff d6b0f9bb 7878d7a7 6c13

带标签32b1de78 a822fe12 ef9f78fa 332E33A b1801238 9a58e2f3 b50b2a02 76ffae0f 1ba63799 b87b7aa3 db36dfff d6b0f9bb 7878d7a7 6c13的密码

Encrypted and tagged packet: 8040f17b 8041f8d3 5501a0b2 32b1de78 a822fe12 ef9f78fa 332e33aa b1801238 9a58e2f3 b50b2a02 76ffae0f 1ba63799 b87b7aa3 db36dfff d6b0f9bb 7878d7a7 6c13

加密和标记的数据包:8040f17b 8041f8d3 5501a0b2 32b1de78 a822fe12 ef9f78fa 332E33A b1801238 9a58e2f3 b50b2a02 76ffae0f 1ba63799 b87b7aa3 db36dfff d6b0f9bb 7878d7a7 6c13

16.2.2. SRTP AEAD_AES_256_GCM Decryption
16.2.2. SRTP AEAD_AES_256_GCM解密

Decrypting the following packet:

解密以下数据包:

8040f17b 8041f8d3 5501a0b2 32b1de78 a822fe12 ef9f78fa 332e33aa b1801238 9a58e2f3 b50b2a02 76ffae0f 1ba63799 b87b7aa3 db36dfff d6b0f9bb 7878d7a7 6c13

8040f17b 8041f8d3 5501a0b2 32b1de78 a822fe12 ef9f78fa 332E33A b1801238 9a58e2f3 b50b2a02 76ffae0f 1ba63799 b87b7aa3 db36dfff d6b0f9bb 7878d7a7 6c13

Form the IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14

形成IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b盐:51 75 69 64 20 70 72 6f 20 71 6f IV:51 75 3c 65 80 c2 72 6f 20 71 84 14

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 8040f17b 8041f8d3 5501a0b2
    CT: 32b1de78 a822fe12 ef9f78fa 332e33aa
        b1801238 9a58e2f3 b50b2a02 76ffae0f
        1ba63799 b87b7aa3 db36dfff d6b0f9bb
        7878d7a7 6c13
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: f29000b62a499fd0a9f39a6add2e7780
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 8040f17b 8041f8d3 5501a0b2
    CT: 32b1de78 a822fe12 ef9f78fa 332e33aa
        b1801238 9a58e2f3 b50b2a02 76ffae0f
        1ba63799 b87b7aa3 db36dfff d6b0f9bb
        7878d7a7 6c13
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: f29000b62a499fd0a9f39a6add2e7780
        

Verify the received tag 7a a3 db 36 df ff d6 b0 f9 bb 78 78 d7 a7 6c 13

验证收到的标签7a a3 db 36 df ff d6 b0 f9 bb 78 d7 a7 6c 13

     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b200000000
       partial hash: 0154dcb75485b71880e1957c877351bd
        
     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b200000000
       partial hash: 0154dcb75485b71880e1957c877351bd
        
     Process the cipher
        cipher word: 32b1de78a822fe12ef9f78fa332e33aa
       partial hash: c3f07db9a8b9cb4345eb07f793d322d2
        cipher word: b18012389a58e2f3b50b2a0276ffae0f
       partial hash: 6d1e66fe32eb32ecd8906ceab09db996
        cipher word: 1ba63799b87b00000000000000000000
       partial hash: b3d1d2f1fa3b366619bc42cd2eedafee
        
     Process the cipher
        cipher word: 32b1de78a822fe12ef9f78fa332e33aa
       partial hash: c3f07db9a8b9cb4345eb07f793d322d2
        cipher word: b18012389a58e2f3b50b2a0276ffae0f
       partial hash: 6d1e66fe32eb32ecd8906ceab09db996
        cipher word: 1ba63799b87b00000000000000000000
       partial hash: b3d1d2f1fa3b366619bc42cd2eedafee
        
     Process the length word
        length word: 00000000000000600000000000000130
       partial hash: 7debf5fa1fac3bd318d5e1a7ee401091
        
     Process the length word
        length word: 00000000000000600000000000000130
       partial hash: 7debf5fa1fac3bd318d5e1a7ee401091
        

Turn GHASH into GMAC GHASH: 7d eb f5 fa 1f ac 3b d3 18 d5 e1 a7 ee 40 10 91 K0: 07 48 2e cc c0 53 ed 63 e1 6e 99 df 39 e7 7c 82 full GMAC: 7a a3 db 36 df ff d6 b0 f9 bb 78 78 d7 a7 6c 13

将GHASH转换为GMAC GHASH:7d eb f5 fa 1f ac 3b d3 18 d5 e1 a7 ee 40 10 91 K0:07 48 2e cc c0 53 ed 63 e1 6e 99 df 39 e7 7c 82完整GMAC:7a a3 db 36 df ff d6 b0 f9 bb 78 d7 a7 6c 13

Received tag = 7aa3db36 dfffd6b0 f9bb7878 d7a76c13 Computed tag = 7aa3db36 dfffd6b0 f9bb7878 d7a76c13 Received tag verified.

接收到的标签=7aa3db36 dfffd6b0 f9bb7878 d7a76c13计算标签=7aa3db36 dfffd6b0 f9bb7878 d7a76c13已验证接收到的标签。

Decrypt the cipher block # 0 IV||blk_cntr: 51753c6580c2726f2071841400000002 key_block: 75 d0 b2 14 c1 43 de 77 9c eb 58 95 5e 40 5a d9 cipher_block: 32 b1 de 78 a8 22 fe 12 ef 9f 78 fa 33 2e 33 aa plain_block: 47 61 6c 6c 69 61 20 65 73 74 20 6f 6d 6e 69 73 block # 1 IV||blk_cntr: 51753c6580c2726f2071841400000003 key_block: 91 e4 7b 4e f3 2b 83 d3 dc 65 0a 72 17 8d da 6a cipher_block: b1 80 12 38 9a 58 e2 f3 b5 0b 2a 02 76 ff ae 0f plain_block: 20 64 69 76 69 73 61 20 69 6e 20 70 61 72 74 65 block # 2 IV||blk_cntr: 51753c6580c2726f2071841400000004 key_block: 68 86 43 eb dd 08 07 98 16 3a 16 d5 e5 04 f6 3a cipher_block: 1b a6 37 99 b8 7b plain_block: 73 20 74 72 65 73

解密密码块#0 IV | | blk| cntr:51753C6580C2726F207184140000002密钥块:75 d0 b2 14 c1 43 de 77 9c eb 58 95 5e 40 5a d9密码块:32 b1 de 78 a8 22 fe 12 ef 9f 78 fa 33 2e 33 aa普通|块:47 61 6c 69 61 20 65 73 70 74 20 6f 6d 6 E 69 73块| 1 IV| blk| cntr:513C65C2727F 78 F2077B83密钥块dc 65 0a 72 17 8d da 6a密码块:b1 80 12 38 9a 58 e2 f3 b5 0b 2a 02 76 ff ae 0f普通密码块:20 64 69 76 69 61 20 69 6e 20 70 61 72 74 65块#2 IV | blk cntr:51753C6580C2726F207184140000004密钥块:68 86 43 eb dd 08 98 16 3a 16 d5 e5 04 f6 3a密码块:1b a6 37 99 b8 7b普通密码块:73 20 74 73

Verified and tagged packet: 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

验证和标记的数据包:47616C669612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

16.2.3. SRTP AEAD_AES_256_GCM Authentication Tagging
16.2.3. SRTP AEAD_AES_256_GCM认证标签

Tagging the following packet:

标记以下数据包:

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207473

Form the IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14

形成IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b盐:51 75 69 64 20 70 72 6f 20 71 6f IV:51 75 3c 65 80 c2 72 6f 20 71 84 14

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 8040f17b 8041f8d3 5501a0b2 47616c6c
        69612065 7374206f 6d6e6973 20646976
        69736120 696e2070 61727465 73207472
        6573
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: f29000b62a499fd0a9f39a6add2e7780
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 8040f17b 8041f8d3 5501a0b2 47616c6c
        69612065 7374206f 6d6e6973 20646976
        69736120 696e2070 61727465 73207472
        6573
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: f29000b62a499fd0a9f39a6add2e7780
        

Compute the GMAC tag

计算GMAC标记

     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b247616c6c
       partial hash: c059753e6763791762ca630d8ef97714
           AAD word: 696120657374206f6d6e697320646976
       partial hash: a4e3401e712900dc4f1d2303bc4b2675
           AAD word: 69736120696e20706172746573207472
       partial hash: 1c8c1af883de0d67878f379a19c65987
           AAD word: 65730000000000000000000000000000
       partial hash: 958462781aa8e8feacce6d93b54472ac
        
     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b247616c6c
       partial hash: c059753e6763791762ca630d8ef97714
           AAD word: 696120657374206f6d6e697320646976
       partial hash: a4e3401e712900dc4f1d2303bc4b2675
           AAD word: 69736120696e20706172746573207472
       partial hash: 1c8c1af883de0d67878f379a19c65987
           AAD word: 65730000000000000000000000000000
       partial hash: 958462781aa8e8feacce6d93b54472ac
        
     Process the length word
        length word: 00000000000001900000000000000000
       partial hash: af2efb5dcfdb9900e7127721fdb56956
        
     Process the length word
        length word: 00000000000001900000000000000000
       partial hash: af2efb5dcfdb9900e7127721fdb56956
        

Turn GHASH into GMAC GHASH: af 2e fb 5d cf db 99 00 e7 12 77 21 fd b5 69 56 K0: 07 48 2e cc c0 53 ed 63 e1 6e 99 df 39 e7 7c 82 full GMAC: a8 66 d5 91 0f 88 74 63 06 7c ee fe c4 52 15 d4

将GHASH转换为GMAC GHASH:af 2e fb 5d cf db 99 00 e7 12 77 21 fd b5 69 56 K0:07 48 2e cc c0 53 ed 63 e1 6e 99 df 39 e7 7c 82完整GMAC:a8 66 d5 91 0f 88 74 63 06 7c ee fe c4 52 15 d4

Cipher with tag a866d591 0f887463 067ceefe c45215d4

带标记a866d591 0f887463 067ceefe c45215d4的密码

Tagged packet: 8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573a866 d5910f88 7463067c eefec452 15d4

标签包:8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 7320747 6573a866 d5910f88 7463067c eefec452 15d4

16.2.4. SRTP AEAD_AES_256_GCM Tag Verification
16.2.4. SRTP AEAD_AES_256_GCM标签验证

Verifying the following packet:

正在验证以下数据包:

8040f17b 8041f8d3 5501a0b2 47616c6c 69612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 73207472 6573a866 d5910f88 7463067c eefec452 15d4

8040f17b 8041f8d3 5501a0b2 47616C669612065 7374206f 6d6e6973 20646976 69736120 696e2070 61727465 7320772 6573a866 d5910f88 7463067c eefec452 15d4

Form the IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14

形成IV | Pad | SSRC | ROC | SEQ | 00 00 55 01 a0 b2 00 00 00 00 f1 7b盐:51 75 69 64 20 70 72 6f 20 71 6f IV:51 75 3c 65 80 c2 72 6f 20 71 84 14

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 8040f17b 8041f8d3 5501a0b2 47616c6c
        69612065 7374206f 6d6e6973 20646976
        69736120 696e2070 61727465 73207472
        6573
    CT: a866d591 0f887463 067ceefe c45215d4
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: f29000b62a499fd0a9f39a6add2e7780
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 8040f17b 8041f8d3 5501a0b2 47616c6c
        69612065 7374206f 6d6e6973 20646976
        69736120 696e2070 61727465 73207472
        6573
    CT: a866d591 0f887463 067ceefe c45215d4
    IV: 51 75 3c 65 80 c2 72 6f 20 71 84 14
     H: f29000b62a499fd0a9f39a6add2e7780
        

Verify the received tag a8 66 d5 91 0f 88 74 63 06 7c ee fe c4 52 15 d4

验证收到的标签a8 66 d5 91 0f 88 74 63 06 7c ee fe c4 52 15 d4

     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b247616c6c
       partial hash: c059753e6763791762ca630d8ef97714
           AAD word: 696120657374206f6d6e697320646976
       partial hash: a4e3401e712900dc4f1d2303bc4b2675
           AAD word: 69736120696e20706172746573207472
       partial hash: 1c8c1af883de0d67878f379a19c65987
           AAD word: 65730000000000000000000000000000
       partial hash: 958462781aa8e8feacce6d93b54472ac
        
     Process the AAD
           AAD word: 8040f17b8041f8d35501a0b247616c6c
       partial hash: c059753e6763791762ca630d8ef97714
           AAD word: 696120657374206f6d6e697320646976
       partial hash: a4e3401e712900dc4f1d2303bc4b2675
           AAD word: 69736120696e20706172746573207472
       partial hash: 1c8c1af883de0d67878f379a19c65987
           AAD word: 65730000000000000000000000000000
       partial hash: 958462781aa8e8feacce6d93b54472ac
        
     Process the length word
        length word: 00000000000001900000000000000000
       partial hash: af2efb5dcfdb9900e7127721fdb56956
        
     Process the length word
        length word: 00000000000001900000000000000000
       partial hash: af2efb5dcfdb9900e7127721fdb56956
        

Turn GHASH into GMAC GHASH: af 2e fb 5d cf db 99 00 e7 12 77 21 fd b5 69 56 K0: 07 48 2e cc c0 53 ed 63 e1 6e 99 df 39 e7 7c 82 full GMAC: a8 66 d5 91 0f 88 74 63 06 7c ee fe c4 52 15 d4

将GHASH转换为GMAC GHASH:af 2e fb 5d cf db 99 00 e7 12 77 21 fd b5 69 56 K0:07 48 2e cc c0 53 ed 63 e1 6e 99 df 39 e7 7c 82完整GMAC:a8 66 d5 91 0f 88 74 63 06 7c ee fe c4 52 15 d4

Received tag = a866d591 0f887463 067ceefe c45215d4 Computed tag = a866d591 0f887463 067ceefe c45215d4 Received tag verified.

收到的标签=a866d591 0f887463 067ceefe c45215d4计算标签=a866d591 0f887463 067ceefe c45215d4已验证收到的标签。

17. RTCP Test Vectors
17. RTCP测试向量

The examples in this section are all based upon the same RTCP packet:

本节中的示例均基于相同的RTCP数据包:

81c8000e 4d617273 4e545031 4e545031 52545020 0000042a 0000eb98 4c756e61 deadbeef deadbeef deadbeef deadbeef deadbeef

81c8000e 4d617273 4e545031 4e545031 52545020 00000 42A 0000eb98 4c756e61死牛肉死牛肉死牛肉死牛肉

with 32-bit SRTCP index 000005d4.

具有32位SRTCP索引000005d4。

As shown in Section 9.1, the IV is formed by XORing two 12-octet values. The first 12-octet value is formed by concatenating two zero octets, the 4-octet SSRC (found in the fifth through eighth octets of the RTP packet), another two padding octets, and the 31-bit SRTCP index, right-justified in a 32-bit = 4-octet field with a single "0" bit prepended as padding. An example of SRTCP IV formation is shown below:

如第9.1节所示,IV由两个12八位元值的XORing构成。前12个八位字节值由两个零八位字节、4个八位字节SSRC(位于RTP数据包的第五到第八个八位字节中)、另两个填充八位字节和31位SRTCP索引串联而成,在32位=4位八位字节字段中右对齐,并在前面加上一个“0”位作为填充。SRTCP IV形成的示例如下所示:

             | Pad |   SSRC    | Pad |  0+SRTCP  |
              00 00 4d 61 72 73 00 00 00 00 05 d4
       salt   51 75 69 64 20 70 72 6f 20 71 75 6f
              ------------------------------------
         IV   51 75 24 05 52 03 72 6f 20 71 70 bb
        
             | Pad |   SSRC    | Pad |  0+SRTCP  |
              00 00 4d 61 72 73 00 00 00 00 05 d4
       salt   51 75 69 64 20 70 72 6f 20 71 75 6f
              ------------------------------------
         IV   51 75 24 05 52 03 72 6f 20 71 70 bb
        

In an SRTCP packet, a 1-bit Encryption flag is prepended to the 31-bit SRTCP index to form a 32-bit value we shall call the "ESRTCP word". The E-flag is one if the SRTCP packet has been encrypted and zero if it has been tagged but not encrypted. Note that the ESRTCP field is only present in an SRTCP packet, not in an RTCP packet. The full ESRTCP word is part of the AAD.

在SRTCP数据包中,在31位SRTCP索引前加上1位加密标志,形成一个32位值,我们称之为“ESRTCP字”。如果SRTCP数据包已加密,则E标志为1;如果已标记但未加密,则E标志为0。请注意,ESRTCP字段仅存在于SRTCP数据包中,而不存在于RTCP数据包中。完整的ESRTCP字是AAD的一部分。

When encrypting and tagging an RTCP packet (E-flag = 1), the SRTCP packet consists of the following fields in the following order:

加密和标记RTCP数据包(E-flag=1)时,SRTCP数据包按以下顺序由以下字段组成:

- The first 8 octets of the RTCP packet (part of the AAD).

- RTCP数据包的前8个八位字节(AAD的一部分)。

- The cipher.

- 密码。

- The ESRTCP word (the final part of the AAD).

- ESRTCP字(AAD的最后一部分)。

- Any Raw Data that might have been appended to the end of the original RTCP packet.

- 可能附加到原始RTCP数据包末尾的任何原始数据。

Recall that AEAD treats the authentication tag as an integral part of the cipher, and in fact the authentication tag is the last 8 or 16 octets of the cipher.

回想一下,AEAD将身份验证标签视为密码不可分割的一部分,事实上,身份验证标签是密码的最后8或16个八位字节。

The reader is reminded that when the RTCP packet is to be tagged but not encrypted (E-flag = 0), GCM will produce a cipher that consists solely of the 8-octet or 16-octet authentication tag. The tagged SRTCP consists of the following fields in the order listed below:

提醒读者,当RTCP数据包需要标记但未加密(E-flag=0)时,GCM将生成一个仅由8位字节或16位字节认证标记组成的密码。标记的SRTCP由以下字段组成,顺序如下:

- All of the AAD, except for the ESRTCP word.

- 除ESRTCP字外的所有AAD。

- The cipher (= the authentication tag).

- 密码(=身份验证标签)。

- The ESRTCP word (the final part of the AAD).

- ESRTCP字(AAD的最后一部分)。

- Any Raw Data that might have been appended to the end of the original RTCP packet.

- 可能附加到原始RTCP数据包末尾的任何原始数据。

17.1. SRTCP AEAD_AES_128_GCM Encryption and Tagging
17.1. SRTCP AEAD_AES_128_GCM加密和标记

Encrypting the following packet:

加密以下数据包:

81c8000d 4d617273 4e545031 4e545032 52545020 0000042a 0000e930 4c756e61 deadbeef deadbeef deadbeef deadbeef deadbeef

81c8000d 4d617273 4e545031 4e545032 52545020 00000 42A 0000e930 4c756e61死牛肉死牛肉死牛肉死牛肉

Key size = 128 bits Tag size = 16 octets

密钥大小=128位标记大小=16个八位字节

Form the IV | Pad | SSRC | Pad | SRTCP | 00 00 4d 61 72 73 00 00 00 00 05 d4 salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 24 05 52 03 72 6f 20 71 70 bb

形成IV | Pad | SSRC | Pad | SRTCP | 00 4d 61 72 73 00 00 00 00 05 d4盐:51 75 69 64 20 70 72 6f 20 71 75 6f IV:51 75 24 05 52 03 72 6f 20 71 70 bb

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 81c8000d 4d617273 800005d4
    PT: 4e545031 4e545032 52545020 0000042a
        0000e930 4c756e61 deadbeef deadbeef
        deadbeef deadbeef deadbeef
    IV: 51 75 24 05 52 03 72 6f 20 71 70 bb
     H: c6a13b37878f5b826f4f8162a1c8d879
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 81c8000d 4d617273 800005d4
    PT: 4e545031 4e545032 52545020 0000042a
        0000e930 4c756e61 deadbeef deadbeef
        deadbeef deadbeef deadbeef
    IV: 51 75 24 05 52 03 72 6f 20 71 70 bb
     H: c6a13b37878f5b826f4f8162a1c8d879
        

Encrypt the Plaintext block # 0 IV||blk_cntr: 517524055203726f207170bb00000002 key_block: 2d bd 18 b4 92 8e e6 4e f5 73 87 46 2f 6b 7a b3 plain_block: 4e 54 50 31 4e 54 50 32 52 54 50 20 00 00 04 2a cipher_block: 63 e9 48 85 dc da b6 7c a7 27 d7 66 2f 6b 7e 99 block # 1 IV||blk_cntr: 517524055203726f207170bb00000003 key_block: 7f f5 29 c7 20 73 9d 4c 18 db 1b 1e ad a0 d1 35 plain_block: 00 00 e9 30 4c 75 6e 61 de ad be ef de ad be ef cipher_block: 7f f5 c0 f7 6c 06 f3 2d c6 76 a5 f1 73 0d 6f da block # 2 IV||blk_cntr: 517524055203726f207170bb00000004 key_block: 92 4d 25 a9 58 9d 83 02 d5 14 99 b4 e0 14 78 15 plain_block: de ad be ef de ad be ef de ad be ef cipher_block: 4c e0 9b 46 86 30 3d ed 0b b9 27 5b

加密明文块#0 IV | blk|cntr:517524055203726f207170bb00000002密钥块:2d bd 18 b4 92 8e e6 4e f5 73 87 46 2f 6b 7a b3明文块:4e 54 50 31 4e 54 50 32 52 50 20 00 04 2a密码块:63 e9 48 85 dc da b6 7c a7 27 d7 66 2f 7e 99块#1 IVウblkジbb cntr 5175707b 7a f29密钥块4c 18 db 1b 1e ad a0 d1 35普通块:00 e9 30 4c 75 6e 61 de ad be ef de ad be ef密码块:7f f5 c0 f7 6c 06 f3 2d c6 76 a5 f1 73 0d da块#2 IV | blk cntr:517524055203726f207170bb00000004密钥块:92 4d 25 a9 58 9d 83 02 d5 14 99 b4 e0 14 78 15普通块:de ad be ef de de de ef de de ef de de de ef de de ef de de ef de ef de de de ef de de ef de ef de ef de de ef de ef 3d密码块:46 4ced 0b b9 27 5b

Cipher before tag appended 63e94885 dcdab67c a727d766 2f6b7e99 7ff5c0f7 6c06f32d c676a5f1 730d6fda 4ce09b46 86303ded 0bb9275b

附加标签前的密码63e94885 dcdab67c a727d766 2f6b7e99 7ff5c0f7 6c06f32d c676a5f1 730d6fda 4ce09b46 863030BB9275B

Compute the GMAC tag

计算GMAC标记

     Process the AAD
           AAD word: 81c8000d4d617273800005d400000000
       partial hash: 085d6eb166c555aa62982f630430ec6e
        
     Process the AAD
           AAD word: 81c8000d4d617273800005d400000000
       partial hash: 085d6eb166c555aa62982f630430ec6e
        
     Process the cipher
        cipher word: 63e94885dcdab67ca727d7662f6b7e99
       partial hash: 8c9221be93466d68bbb16fa0d42b0187
        cipher word: 7ff5c0f76c06f32dc676a5f1730d6fda
       partial hash: 221ebb044ec9fd0bf116d7780f198792
        cipher word: 4ce09b4686303ded0bb9275b00000000
       partial hash: 50f70b9ca110ab312dce212657328dae
        
     Process the cipher
        cipher word: 63e94885dcdab67ca727d7662f6b7e99
       partial hash: 8c9221be93466d68bbb16fa0d42b0187
        cipher word: 7ff5c0f76c06f32dc676a5f1730d6fda
       partial hash: 221ebb044ec9fd0bf116d7780f198792
        cipher word: 4ce09b4686303ded0bb9275b00000000
       partial hash: 50f70b9ca110ab312dce212657328dae
        
     Process the length word
        length word: 00000000000000600000000000000160
       partial hash: 7296107c9716534371dfc1a30c5ffeb5
        
     Process the length word
        length word: 00000000000000600000000000000160
       partial hash: 7296107c9716534371dfc1a30c5ffeb5
        

Turn GHASH into GMAC GHASH: 72 96 10 7c 97 16 53 43 71 df c1 a3 0c 5f fe b5 K0: ba dc b4 24 01 d9 1e 6c b4 74 39 d1 49 86 14 6b full GMAC: c8 4a a4 58 96 cf 4d 2f c5 ab f8 72 45 d9 ea de

将GHASH转换为GMAC GHASH:72 96 10 7c 97 16 53 43 71 df c1 a3 0c 5f fe b5 K0:ba dc b4 24 01 d9 1e 6c b4 74 39 d1 49 86 14 6b完整GMAC:c8 4a a4 58 96 cf 4d 2f c5 ab f8 72 45 d9 ea de

Cipher with tag 63e94885 dcdab67c a727d766 2f6b7e99 7ff5c0f7 6c06f32d c676a5f1 730d6fda 4ce09b46 86303ded 0bb9275b c84aa458 96cf4d2f c5abf872 45d9eade

带标签63e94885 dcdab67c a727d766 2f6b7e99 7FF5C07F7 6c06f32d c676a5f1 730d6fda 4ce09b46 86303D 0bb9275b c84aa458 96cf4d2f c5abf872 45d9eade的密码

Append the ESRTCP word with the E-flag set 63e94885 dcdab67c a727d766 2f6b7e99 7ff5c0f7 6c06f32d c676a5f1 730d6fda 4ce09b46 86303ded 0bb9275b c84aa458 96cf4d2f c5abf872 45d9eade 800005d4

附加带有电子标志集63e94885 dcdab67c a727d766 2f6b7e99 7ff5c0f7 6c06f32d c676a5f1 730d6fda 4ce09b46 86303D 0bb9275b c84aa458 96cf4d2f c5abf872 45d9eade 800005d4的ESRTCP字

Encrypted and tagged packet: 81c8000d 4d617273 63e94885 dcdab67c a727d766 2f6b7e99 7ff5c0f7 6c06f32d c676a5f1 730d6fda 4ce09b46 86303ded 0bb9275b c84aa458 96cf4d2f c5abf872 45d9eade 800005d4

加密和标记的数据包:81c8000d 4d617273 63e94885 dcdab67c a727d766 2f6b7e99 7ff5c0f7 6c06f32d c676a5f1 730d6fda 4ce09b46 86303D 0bb9275b c84aa458 96cf4d2f c5abf872 45d9eade 80005D4

17.2. SRTCP AEAD_AES_256_GCM Verification and Decryption
17.2. SRTCP AEAD_AES_256_GCM验证和解密

Key size = 256 bits Tag size = 16 octets

密钥大小=256位标记大小=16个八位字节

Process the length word

处理字长

Decrypting the following packet:

解密以下数据包:

81c8000d 4d617273 d50ae4d1 f5ce5d30 4ba297e4 7d470c28 2c3ece5d bffe0a50 a2eaa5c1 110555be 8415f658 c61de047 6f1b6fad 1d1eb30c 4446839f 57ff6f6c b26ac3be 800005d4

81c8000d 4d617273 d50ae4d1 f5ce5d30 4ba297e4 7d470c28 2EC5D bffe0a50 a2eaa5c1 110555be 8415f658 c61de047 6f1b6fad 1d1eb30c 4446839f 57ff6f6c b26ac3be 800005d4

Key size = 256 bits Key size = 16 octets

密钥大小=256位密钥大小=16个八位字节

Form the IV | Pad | SSRC | Pad | SRTCP | 00 00 4d 61 72 73 00 00 00 00 05 d4 salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 24 05 52 03 72 6f 20 71 70 bb

形成IV | Pad | SSRC | Pad | SRTCP | 00 4d 61 72 73 00 00 00 00 05 d4盐:51 75 69 64 20 70 72 6f 20 71 75 6f IV:51 75 24 05 52 03 72 6f 20 71 70 bb

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 81c8000d 4d617273 800005d4
    CT: d50ae4d1 f5ce5d30 4ba297e4 7d470c28
        2c3ece5d bffe0a50 a2eaa5c1 110555be
        8415f658 c61de047 6f1b6fad 1d1eb30c
        4446839f 57ff6f6c b26ac3be
    IV: 51 75 24 05 52 03 72 6f 20 71 70 bb
     H: f29000b62a499fd0a9f39a6add2e7780
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 81c8000d 4d617273 800005d4
    CT: d50ae4d1 f5ce5d30 4ba297e4 7d470c28
        2c3ece5d bffe0a50 a2eaa5c1 110555be
        8415f658 c61de047 6f1b6fad 1d1eb30c
        4446839f 57ff6f6c b26ac3be
    IV: 51 75 24 05 52 03 72 6f 20 71 70 bb
     H: f29000b62a499fd0a9f39a6add2e7780
        

Verify the received tag 1d 1e b3 0c 44 46 83 9f 57 ff 6f 6c b2 6a c3 be

验证收到的标签1d 1e b3 0c 44 46 83 9f 57 ff 6f 6c b2 6a c3是否正确

     Process the AAD
           AAD word: 81c8000d4d617273800005d400000000
       partial hash: 3ae5afd36dead5280b18950400176b5b
        
     Process the AAD
           AAD word: 81c8000d4d617273800005d400000000
       partial hash: 3ae5afd36dead5280b18950400176b5b
        
     Process the cipher
        cipher word: d50ae4d1f5ce5d304ba297e47d470c28
       partial hash: e90fab7546f6940781227227ac926ebe
        cipher word: 2c3ece5dbffe0a50a2eaa5c1110555be
       partial hash: 9b236807d8b2dab07583adce367aa88f
        cipher word: 8415f658c61de0476f1b6fad00000000
       partial hash: e69313f423a75e3e0b7eb93321700e86
        
     Process the cipher
        cipher word: d50ae4d1f5ce5d304ba297e47d470c28
       partial hash: e90fab7546f6940781227227ac926ebe
        cipher word: 2c3ece5dbffe0a50a2eaa5c1110555be
       partial hash: 9b236807d8b2dab07583adce367aa88f
        cipher word: 8415f658c61de0476f1b6fad00000000
       partial hash: e69313f423a75e3e0b7eb93321700e86
        
     Process the length word
        length word: 00000000000000600000000000000160
       partial hash: 3a284af2616fdf505faf37eec39fbc8b
        
     Process the length word
        length word: 00000000000000600000000000000160
       partial hash: 3a284af2616fdf505faf37eec39fbc8b
        

Turn GHASH into GMAC GHASH: 3a 28 4a f2 61 6f df 50 5f af 37 ee c3 9f bc 8b K0: 27 36 f9 fe 25 29 5c cf 08 50 58 82 71 f5 7f 35 full GMAC: 1d 1e b3 0c 44 46 83 9f 57 ff 6f 6c b2 6a c3 be

将GHASH转换为GMAC GHASH:3a 28 4a f2 61 6f df 50 5f af 37 ee c3 9f bc 8b K0:27 36 f9 fe 25 29 5c cf 08 50 58 82 71 f5 7f 35完整GMAC:1d 1e b3 0c 44 46 83 9f 57 ff 6f 6c b2 6a c3 be

Received tag = 1d1eb30c 4446839f 57ff6f6c b26ac3be Computed tag = 1d1eb30c 4446839f 57ff6f6c b26ac3be Received tag verified.

已接收标签=1d1eb30c 4446839f 57ff6f6c b26ac3be计算标签=1d1eb30c 4446839f 57ff6f6c b26ac3be已接收标签验证。

Decrypt the cipher block # 0 IV||blk_cntr: 517524055203726f207170bb00000002 key_block: 9b 5e b4 e0 bb 9a 0d 02 19 f6 c7 c4 7d 47 08 02 cipher_block: d5 0a e4 d1 f5 ce 5d 30 4b a2 97 e4 7d 47 0c 28 plain_block: 4e 54 50 31 4e 54 50 32 52 54 50 20 00 00 04 2a block # 1 IV||blk_cntr: 517524055203726f207170bb00000003 key_block: 2c 3e 27 6d f3 8b 64 31 7c 47 1b 2e cf a8 eb 51 cipher_block: 2c 3e ce 5d bf fe 0a 50 a2 ea a5 c1 11 05 55 be plain_block: 00 00 e9 30 4c 75 6e 61 de ad be ef de ad be ef block # 2 IV||blk_cntr: 517524055203726f207170bb00000004 key_block: 5a b8 48 b7 18 b0 5e a8 b1 b6 d1 42 3b 74 39 55 cipher_block: 84 15 f6 58 c6 1d e0 47 6f 1b 6f ad plain_block: de ad be ef de ad be ef de ad be ef

解密密码块#0 IV | | blk|cntr:517524055203726f207170bb00000002密钥块:9b 5e b4 e0 bb 9a 0d 02 19 f6 c7 c4 7d 47 08 02密码块:d5 0a e4 d1 f5 ce 5d 30 4b a2 97 e4 7d 47 0c 28普通密钥块:4e 54 50 31 4e 54 50 32 52 50 20 00 04 2a密钥块#1 IV | blkジc4 7d Ctr:75240070B 7d 4b 7d 7B 7d 7F2038B密钥块7c 47 1b 2e cf a8 eb 51密码块:2c 3e ce 5d bf fe 0a 50 a2 ea a5 c1 11 05 55为普通密码块:00 e9 30 4c 75 6e 61为普通密码块(2 IV)为普通密码块(cntr:517524055203726f207170bb00000004密钥块:5a b8 48 b7 18 b0 5e a8 b1 b6 d1 42 3b 74为普通密码块)84 15 f6 58 c6 1为普通密码块)为普通密码块德阿德贝夫酒店

Verified and decrypted packet: 81c8000d 4d617273 4e545031 4e545032 52545020 0000042a 0000e930 4c756e61 deadbeef deadbeef deadbeef deadbeef deadbeef

验证和解密的数据包:81c8000d 4d617273 4e545031 4e545032 52545020 00000 42A 0000e930 4c756e61 deadbeef deadbeef deadbeef deadbeef deadbeef

17.3. SRTCP AEAD_AES_128_GCM Tagging Only
17.3. 仅限SRTCP AEAD_AES_128_GCM标签

Tagging the following packet:

标记以下数据包:

81c8000d 4d617273 4e545031 4e545032 52545020 0000042a 0000e930 4c756e61 deadbeef deadbeef deadbeef deadbeef deadbeef

81c8000d 4d617273 4e545031 4e545032 52545020 00000 42A 0000e930 4c756e61死牛肉死牛肉死牛肉死牛肉

Key size = 128 bits Tag size = 16 octets

密钥大小=128位标记大小=16个八位字节

Form the IV | Pad | SSRC | Pad | SRTCP | 00 00 4d 61 72 73 00 00 00 00 05 d4 salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 24 05 52 03 72 6f 20 71 70 bb

形成IV | Pad | SSRC | Pad | SRTCP | 00 4d 61 72 73 00 00 00 00 05 d4盐:51 75 69 64 20 70 72 6f 20 71 75 6f IV:51 75 24 05 52 03 72 6f 20 71 70 bb

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 81c8000d 4d617273 4e545031 4e545032
        52545020 0000042a 0000e930 4c756e61
        deadbeef deadbeef deadbeef deadbeef
        deadbeef 000005d4
    IV: 51 75 24 05 52 03 72 6f 20 71 70 bb
     H: c6a13b37878f5b826f4f8162a1c8d879
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
   AAD: 81c8000d 4d617273 4e545031 4e545032
        52545020 0000042a 0000e930 4c756e61
        deadbeef deadbeef deadbeef deadbeef
        deadbeef 000005d4
    IV: 51 75 24 05 52 03 72 6f 20 71 70 bb
     H: c6a13b37878f5b826f4f8162a1c8d879
        

Compute the GMAC tag

计算GMAC标记

     Process the AAD
           AAD word: 81c8000d4d6172734e5450314e545032
       partial hash: f8dbbe278e06afe17fb4fb2e67f0a22e
           AAD word: 525450200000042a0000e9304c756e61
       partial hash: 6ccd900dfd0eb292f68f8a410d0648ec
           AAD word: deadbeefdeadbeefdeadbeefdeadbeef
       partial hash: 6a14be0ea384c6b746235ba955a57ff5
           AAD word: deadbeef000005d40000000000000000
       partial hash: cc81f14905670a1e37f8bc81a91997cd
        
     Process the AAD
           AAD word: 81c8000d4d6172734e5450314e545032
       partial hash: f8dbbe278e06afe17fb4fb2e67f0a22e
           AAD word: 525450200000042a0000e9304c756e61
       partial hash: 6ccd900dfd0eb292f68f8a410d0648ec
           AAD word: deadbeefdeadbeefdeadbeefdeadbeef
       partial hash: 6a14be0ea384c6b746235ba955a57ff5
           AAD word: deadbeef000005d40000000000000000
       partial hash: cc81f14905670a1e37f8bc81a91997cd
        
     Process the length word
        length word: 00000000000001c00000000000000000
       partial hash: 3ec16d4c3c0e90a59e91be415bd976d8
        
     Process the length word
        length word: 00000000000001c00000000000000000
       partial hash: 3ec16d4c3c0e90a59e91be415bd976d8
        

Turn GHASH into GMAC GHASH: 3e c1 6d 4c 3c 0e 90 a5 9e 91 be 41 5b d9 76 d8 K0: ba dc b4 24 01 d9 1e 6c b4 74 39 d1 49 86 14 6b full GMAC: 84 1d d9 68 3d d7 8e c9 2a e5 87 90 12 5f 62 b3

将GHASH转换为GMAC GHASH:3e c1 6d 4c 3c 0e 90 a5 9e 91 be 41 5b d9 76 d8 K0:ba dc b4 24 01 d9 1e 6c b4 74 39 d1 49 86 14 6b完整GMAC:84 1d d9 68 3d d7 8e c9 2a e5 87 90 12 5f 62 b3

Cipher with tag 841dd968 3dd78ec9 2ae58790 125f62b3

带标记841dd968 3dd78ec9 2ae58790 125f62b3的密码

Tagged packet: 81c8000d 4d617273 4e545031 4e545032 52545020 0000042a 0000e930 4c756e61 deadbeef deadbeef deadbeef deadbeef deadbeef 841dd968 3dd78ec9 2ae58790 125f62b3 000005d4

标签包:81c8000d 4d617273 4e545031 4e545032 52545020 00000 42A 0000e930 4c756e61死牛肉死牛肉死牛肉死牛肉841dd968 3dd78ec9 2ae58790 125f62b3 000005d4

17.4. SRTCP AEAD_AES_256_GCM Tag Verification
17.4. SRTCP AEAD_AES_256_GCM标签验证

Key size = 256 bits Tag size = 16 octets

密钥大小=256位标记大小=16个八位字节

Process the length word Verifying the following packet:

处理验证以下数据包的长度字:

81c8000d 4d617273 4e545031 4e545032 52545020 0000042a 0000e930 4c756e61 deadbeef deadbeef deadbeef deadbeef deadbeef 91db4afb feee5a97 8fab4393 ed2615fe 000005d4

81c8000d 4d617273 4e545031 4e545032 52545020 00000 42A 0000e930 4c756e61死牛肉死牛肉死牛肉死牛肉91db4afb feee5a97 8fab4393 ed2615fe 000005d4

Key size = 256 bits Key size = 16 octets

密钥大小=256位密钥大小=16个八位字节

Form the IV | Pad | SSRC | Pad | SRTCP | 00 00 4d 61 72 73 00 00 00 00 05 d4 salt: 51 75 69 64 20 70 72 6f 20 71 75 6f IV: 51 75 24 05 52 03 72 6f 20 71 70 bb

形成IV | Pad | SSRC | Pad | SRTCP | 00 4d 61 72 73 00 00 00 00 05 d4盐:51 75 69 64 20 70 72 6f 20 71 75 6f IV:51 75 24 05 52 03 72 6f 20 71 70 bb

   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 81c8000d 4d617273 4e545031 4e545032
        52545020 0000042a 0000e930 4c756e61
        deadbeef deadbeef deadbeef deadbeef
        deadbeef 000005d4
    CT: 91db4afb feee5a97 8fab4393 ed2615fe
    IV: 51 75 24 05 52 03 72 6f 20 71 70 bb
     H: f29000b62a499fd0a9f39a6add2e7780
        
   Key: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
        10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
   AAD: 81c8000d 4d617273 4e545031 4e545032
        52545020 0000042a 0000e930 4c756e61
        deadbeef deadbeef deadbeef deadbeef
        deadbeef 000005d4
    CT: 91db4afb feee5a97 8fab4393 ed2615fe
    IV: 51 75 24 05 52 03 72 6f 20 71 70 bb
     H: f29000b62a499fd0a9f39a6add2e7780
        

Verify the received tag 91 db 4a fb fe ee 5a 97 8f ab 43 93 ed 26 15 fe

验证收到的标签91 db 4a fb fe ee 5a 97 8f ab 43 93 ed 26 15 fe

     Process the AAD
           AAD word: 81c8000d4d6172734e5450314e545032
       partial hash: 7bc665c71676a5a5f663b3229af4b85c
           AAD word: 525450200000042a0000e9304c756e61
       partial hash: 34ed77752703ab7d69f44237910e3bc0
           AAD word: deadbeefdeadbeefdeadbeefdeadbeef
       partial hash: 74a59f1a99282344d64ab1c8a2be6cf8
           AAD word: deadbeef000005d40000000000000000
       partial hash: 126335c0baa7ab1b79416ceeb9f7a518
        
     Process the AAD
           AAD word: 81c8000d4d6172734e5450314e545032
       partial hash: 7bc665c71676a5a5f663b3229af4b85c
           AAD word: 525450200000042a0000e9304c756e61
       partial hash: 34ed77752703ab7d69f44237910e3bc0
           AAD word: deadbeefdeadbeefdeadbeefdeadbeef
       partial hash: 74a59f1a99282344d64ab1c8a2be6cf8
           AAD word: deadbeef000005d40000000000000000
       partial hash: 126335c0baa7ab1b79416ceeb9f7a518
        
     Process the length word
        length word: 00000000000001c00000000000000000
       partial hash: b6edb305dbc7065887fb1b119cd36acb
        
     Process the length word
        length word: 00000000000001c00000000000000000
       partial hash: b6edb305dbc7065887fb1b119cd36acb
        

Turn GHASH into GMAC GHASH: b6 ed b3 05 db c7 06 58 87 fb 1b 11 9c d3 6a cb K0: 27 36 f9 fe 25 29 5c cf 08 50 58 82 71 f5 7f 35 full GMAC: 91 db 4a fb fe ee 5a 97 8f ab 43 93 ed 26 15 fe

将GHASH转换为GMAC GHASH:b6 ed b3 05 db c7 06 58 87 fb 1b 11 9c d3 6a cb K0:27 36 f9 fe 25 29 5c cf 08 50 58 82 71 f5 7f 35完整GMAC:91 db 4a fb fe ee 5a 97 8f ab 43 93 ed 26 15 fe

Received tag = 91db4afb feee5a97 8fab4393 ed2615fe Computed tag = 91db4afb feee5a97 8fab4393 ed2615fe Received tag verified.

已接收标签=91db4afb feee5a97 8fab4393 ed2615fe已计算标签=91db4afb feee5a97 8fab4393 ed2615fe已验证已接收标签。

Verified packet: 81c8000d 4d617273 4e545031 4e545032 52545020 0000042a 0000e930 4c756e61 deadbeef deadbeef deadbeef deadbeef deadbeef

验证数据包:81c8000d 4d617273 4e545031 4e545032 52545020 00000 42A 0000e930 4c756e61死牛肉死牛肉死牛肉死牛肉

18. References
18. 工具书类
18.1. Normative References
18.1. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<http://www.rfc-editor.org/info/rfc2119>.

[RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550, July 2003, <http://www.rfc-editor.org/info/rfc3550>.

[RFC3550]Schulzrinne,H.,Casner,S.,Frederick,R.,和V.Jacobson,“RTP:实时应用的传输协议”,STD 64,RFC 3550,DOI 10.17487/RFC3550,2003年7月<http://www.rfc-editor.org/info/rfc3550>.

[RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, "The Secure Real-time Transport Protocol (SRTP)", RFC 3711, DOI 10.17487/RFC3711, March 2004, <http://www.rfc-editor.org/info/rfc3711>.

[RFC3711]Baugher,M.,McGrew,D.,Naslund,M.,Carrara,E.,和K.Norrman,“安全实时传输协议(SRTP)”,RFC 3711,DOI 10.17487/RFC3711,2004年3月<http://www.rfc-editor.org/info/rfc3711>.

[RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, DOI 10.17487/RFC3830, August 2004, <http://www.rfc-editor.org/info/rfc3830>.

[RFC3830]Arkko,J.,Carrara,E.,Lindholm,F.,Naslund,M.,和K.Norrman,“米奇:多媒体互联网键控”,RFC 3830,DOI 10.17487/RFC3830,2004年8月<http://www.rfc-editor.org/info/rfc3830>.

[RFC4568] Andreasen, F., Baugher, M., and D. Wing, "Session Description Protocol (SDP) Security Descriptions for Media Streams", RFC 4568, DOI 10.17487/RFC4568, July 2006, <http://www.rfc-editor.org/info/rfc4568>.

[RFC4568]Andreasen,F.,Baugher,M.和D.Wing,“媒体流的会话描述协议(SDP)安全描述”,RFC 4568,DOI 10.17487/RFC4568,2006年7月<http://www.rfc-editor.org/info/rfc4568>.

[RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, <http://www.rfc-editor.org/info/rfc5116>.

[RFC5116]McGrew,D.“认证加密的接口和算法”,RFC 5116,DOI 10.17487/RFC5116,2008年1月<http://www.rfc-editor.org/info/rfc5116>.

[RFC5234] Crocker, D., Ed., and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <http://www.rfc-editor.org/info/rfc5234>.

[RFC5234]Crocker,D.,Ed.,和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,DOI 10.17487/RFC5234,2008年1月<http://www.rfc-editor.org/info/rfc5234>.

[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)", RFC 5764, DOI 10.17487/RFC5764, May 2010, <http://www.rfc-editor.org/info/rfc5764>.

[RFC5764]McGrew,D.和E.Rescorla,“为安全实时传输协议(SRTP)建立密钥的数据报传输层安全(DTLS)扩展”,RFC 5764,DOI 10.17487/RFC5764,2010年5月<http://www.rfc-editor.org/info/rfc5764>.

[RFC6188] McGrew, D., "The Use of AES-192 and AES-256 in Secure RTP", RFC 6188, DOI 10.17487/RFC6188, March 2011, <http://www.rfc-editor.org/info/rfc6188>.

[RFC6188]McGrew,D.,“AES-192和AES-256在安全RTP中的使用”,RFC 6188,DOI 10.17487/RFC6188,2011年3月<http://www.rfc-editor.org/info/rfc6188>.

[RFC6904] Lennox, J., "Encryption of Header Extensions in the Secure Real-time Transport Protocol (SRTP)", RFC 6904, DOI 10.17487/RFC6904, April 2013, <http://www.rfc-editor.org/info/rfc6904>.

[RFC6904]Lennox,J.,“安全实时传输协议(SRTP)中的报头扩展加密”,RFC 6904,DOI 10.17487/RFC6904,2013年4月<http://www.rfc-editor.org/info/rfc6904>.

18.2. Informative References
18.2. 资料性引用

[BN00] Bellare, M. and C. Namprempre, "Authenticated Encryption: Relations among notions and analysis of the generic composition paradigm", Proceedings of ASIACRYPT 2000, Springer-Verlag, LNCS 1976, pp. 531-545, DOI 10.1007/3-540-44448-3_41, <http://www-cse.ucsd.edu/users/mihir/papers/oem.html>.

[BN00]Bellare,M.和C.Namprempre,“认证加密:概念之间的关系和通用组合范式的分析”,《亚洲加密会议录》,2000年,Springer Verlag,LNCS 1976年,第531-545页,DOI 10.1007/3-540-44448-341<http://www-cse.ucsd.edu/users/mihir/papers/oem.html>.

[GCM] Dworkin, M., "NIST Special Publication 800-38D: Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC", U.S. National Institute of Standards and Technology, November 2007, <http://csrc.nist.gov/publications/nistpubs/ 800-38D/SP-800-38D.pdf>.

[GCM]Dworkin,M.,“NIST特别出版物800-38D:分组密码操作模式建议:Galois/计数器模式(GCM)和GMAC”,美国国家标准与技术研究所,2007年11月<http://csrc.nist.gov/publications/nistpubs/ 800-38D/SP-800-38D.pdf>。

[R02] Rogaway, P., "Authenticated-Encryption with Associated-Data", ACM Conference on Computer and Communications Security (CCS'02), pp. 98-107, ACM Press, DOI 10.1145/586110.586125, September 2002, <http://www.cs.ucdavis.edu/~rogaway/papers/ad.html>.

[R02]Rogaway,P.,“相关数据的认证加密”,ACM计算机和通信安全会议(CCS'02),第98-107页,ACM出版社,DOI 10.1145/586110.5861252002年9月<http://www.cs.ucdavis.edu/~rogaway/papers/ad.html>。

[RFC4771] Lehtovirta, V., Naslund, M., and K. Norrman, "Integrity Transform Carrying Roll-Over Counter for the Secure Real-time Transport Protocol (SRTP)", RFC 4771, DOI 10.17487/RFC4771, January 2007, <http://www.rfc-editor.org/info/rfc4771>.

[RFC4771]Lehtovirta,V.,Naslund,M.,和K.Norrman,“安全实时传输协议(SRTP)的完整性转换携带滚动计数器”,RFC 4771,DOI 10.17487/RFC4771,2007年1月<http://www.rfc-editor.org/info/rfc4771>.

Acknowledgements

致谢

The authors would like to thank Michael Peck, Michael Torla, Qin Wu, Magnus Westerlund, Oscar Ohllson, Woo-Hwan Kim, John Mattsson, Richard Barnes, Morris Dworkin, Stephen Farrell, and many other reviewers who provided valuable comments on earlier draft versions of this document.

作者要感谢Michael Peck、Michael Torla、秦武、Magnus Westerlund、Oscar Ohlson、Woo Hwan Kim、John Mattsson、Richard Barnes、Morris Dworkin、Stephen Farrell和许多其他评论家,他们对本文件的早期草稿提出了宝贵意见。

Authors' Addresses

作者地址

David A. McGrew Cisco Systems, Inc. 510 McCarthy Blvd. Milpitas, CA 95035 United States Phone: (408) 525 8651

David A.McGrew思科系统公司,位于麦卡锡大道510号。加利福尼亚州米尔皮塔斯95035美国电话:(408)5258651

   Email: mcgrew@cisco.com
   URI:   http://www.mindspring.com/~dmcgrew/dam.htm
        
   Email: mcgrew@cisco.com
   URI:   http://www.mindspring.com/~dmcgrew/dam.htm
        

Kevin M. Igoe NSA/CSS Commercial Solutions Center National Security Agency

Kevin M.Igoe NSA/CSS商业解决方案中心国家安全局

   Email: mythicalkevin@yahoo.com
        
   Email: mythicalkevin@yahoo.com