Internet Engineering Task Force (IETF)                            Y. Nir
Request for Comments: 7634                                   Check Point
Category: Standards Track                                    August 2015
ISSN: 2070-1721
        
Internet Engineering Task Force (IETF)                            Y. Nir
Request for Comments: 7634                                   Check Point
Category: Standards Track                                    August 2015
ISSN: 2070-1721
        

ChaCha20, Poly1305, and Their Use in the Internet Key Exchange Protocol (IKE) and IPsec

ChaCha20、Poly1305及其在Internet密钥交换协议(IKE)和IPsec中的使用

Abstract

摘要

This document describes the use of the ChaCha20 stream cipher along with the Poly1305 authenticator, combined into an AEAD algorithm for the Internet Key Exchange Protocol version 2 (IKEv2) and for IPsec.

本文档描述了ChaCha20流密码与Poly1305身份验证器的使用,结合到互联网密钥交换协议版本2(IKEv2)和IPsec的AEAD算法中。

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/rfc7634.

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

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  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Conventions Used in This Document . . . . . . . . . . . .   3
   2.  ChaCha20 and Poly1305 for ESP . . . . . . . . . . . . . . . .   3
     2.1.  AAD Construction  . . . . . . . . . . . . . . . . . . . .   5
   3.  Use in IKEv2  . . . . . . . . . . . . . . . . . . . . . . . .   6
   4.  Negotiation in IKEv2  . . . . . . . . . . . . . . . . . . . .   6
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   6
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   7
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .   7
     7.2.  Informative References  . . . . . . . . . . . . . . . . .   8
   Appendix A.  ESP Example  . . . . . . . . . . . . . . . . . . . .   9
   Appendix B.  IKEv2 Example  . . . . . . . . . . . . . . . . . . .  11
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  13
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  13
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Conventions Used in This Document . . . . . . . . . . . .   3
   2.  ChaCha20 and Poly1305 for ESP . . . . . . . . . . . . . . . .   3
     2.1.  AAD Construction  . . . . . . . . . . . . . . . . . . . .   5
   3.  Use in IKEv2  . . . . . . . . . . . . . . . . . . . . . . . .   6
   4.  Negotiation in IKEv2  . . . . . . . . . . . . . . . . . . . .   6
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   6
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   7
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .   7
     7.2.  Informative References  . . . . . . . . . . . . . . . . .   8
   Appendix A.  ESP Example  . . . . . . . . . . . . . . . . . . . .   9
   Appendix B.  IKEv2 Example  . . . . . . . . . . . . . . . . . . .  11
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  13
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  13
        
1. Introduction
1. 介绍

The Advanced Encryption Standard (AES) [FIPS-197] has become the go-to algorithm for encryption. It is now the most commonly used algorithm in many areas, including IPsec Virtual Private Networks (VPNs). On most modern platforms, AES is anywhere from four to ten times as fast as the previously popular cipher, Triple Data Encryption Standard (3DES) [SP800-67]. 3DES also uses a 64-bit block; this means that the amount of data that can be encrypted before rekeying is required is limited. These reasons make AES not only the best choice, but the only viable choice for IPsec.

高级加密标准(AES)[FIPS-197]已成为加密的通用算法。它现在是许多领域中最常用的算法,包括IPsec虚拟专用网络(VPN)。在大多数现代平台上,AES的速度是以前流行的密码、三重数据加密标准(3DES)[SP800-67]的四到十倍。3DES还使用64位块;这意味着在需要密钥更新之前可以加密的数据量是有限的。这些原因使得AES不仅是IPsec的最佳选择,也是唯一可行的选择。

The problem is that if future advances in cryptanalysis reveal a weakness in AES, VPN users will be in an unenviable position. With the only other widely supported cipher for IPsec implementations being the much slower 3DES, it is not feasible to reconfigure IPsec installations away from AES. [Standby-Cipher] describes this issue and the need for a standby cipher in greater detail.

问题是,如果密码分析的未来发展揭示了AES的弱点,VPN用户将处于一个不可行的位置。由于IPsec实现中唯一受广泛支持的密码是速度慢得多的3DE,因此不可能将IPsec安装从AES中重新配置。[备用密码]更详细地描述了此问题以及备用密码的需要。

This document proposes the fast and secure ChaCha20 stream cipher as such a standby cipher in an Authenticated Encryption with Associated Data (AEAD) construction with the Poly1305 authenticator for use with the Encapsulated Security Protocol (ESP) [RFC4303] and the Internet Key Exchange Protocol version 2 (IKEv2) [RFC7296]. The algorithms are described in a separate document ([RFC7539]). This document only describes the IPsec-specific things.

本文件提出了快速、安全的ChaCha20流密码,作为一种备用密码,采用Poly1305认证器,采用带关联数据的认证加密(AEAD)结构,用于封装安全协议(ESP)[RFC4303]和互联网密钥交换协议版本2(IKEv2)[RFC7296]。算法在单独的文档([RFC7539])中进行了描述。本文档仅描述IPsec特定的内容。

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

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

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

2. ChaCha20 and Poly1305 for ESP
2. 用于ESP的ChaCha20和Poly1305

AEAD_CHACHA20_POLY1305 ([RFC7539]) is a combined mode algorithm, or AEAD. Usage follows the AEAD construction in Section 2.8 of RFC 7539:

AEAD_CHACHA20_POLY1305([RFC7539])是一种组合模式算法或AEAD。使用遵循RFC 7539第2.8节中的AEAD构造:

o The Initialization Vector (IV) is 64 bits and is used as part of the nonce. The IV MUST be unique for each invocation for a particular security association (SA) but does not need to be unpredictable. The use of a counter or a linear feedback shift register (LFSR) is RECOMMENDED.

o 初始化向量(IV)为64位,用作nonce的一部分。对于特定安全关联(SA)的每次调用,IV必须是唯一的,但不需要是不可预测的。建议使用计数器或线性反馈移位寄存器(LFSR)。

o A 32-bit Salt is prepended to the 64-bit IV to form the 96-bit nonce. The salt is fixed per SA, and it is not transmitted as part of the ESP packet.

o 在64位IV前面加上32位Salt以形成96位nonce。salt是每个SA固定的,不作为ESP数据包的一部分传输。

o The encryption key is 256 bits.

o 加密密钥为256位。

o The Internet Key Exchange Protocol generates a bitstring called KEYMAT using a pseudorandom function (PRF). That KEYMAT is divided into keys for encryption, message authentication, and whatever else is needed. The KEYMAT requested for each ChaCha20-Poly1305 key is 36 octets. The first 32 octets are the 256-bit ChaCha20 key, and the remaining 4 octets are used as the Salt value in the nonce.

o Internet密钥交换协议使用伪随机函数(PRF)生成名为KEYMAT的位字符串。该密钥表分为加密密钥、消息身份验证密钥和其他所需的密钥。为每个ChaCha20-Poly1305密钥请求的键盘为36个八位字节。前32个八位字节是256位ChaCha20密钥,其余4个八位字节用作nonce中的Salt值。

The ChaCha20 encryption algorithm requires the following parameters: a 256-bit key, a 96-bit nonce, and a 32-bit Initial Block Counter. For ESP, we set these as follows:

ChaCha20加密算法需要以下参数:256位密钥、96位nonce和32位初始块计数器。对于ESP,我们设置如下:

o The key is set as mentioned above.

o 按键设置如上所述。

o The 96-bit nonce is formed from a concatenation of the 32-bit Salt and the 64-bit IV, as described above.

o 如上所述,96位nonce由32位Salt和64位IV级联而成。

o The Initial Block Counter is set to one (1). The reason that one is used for the initial counter rather than zero is that zero is reserved for generating the one-time Poly1305 key (see below).

o 初始块计数器设置为一(1)。一用于初始计数器而不是零的原因是零用于生成一次性Poly1305密钥(见下文)。

As the ChaCha20 block function is not applied directly to the plaintext, no padding should be necessary. However, in keeping with the specification in RFC 4303, the plaintext always has a pad length octet and a Next Header octet, and it may require padding octets so as to align the buffer to an integral multiple of 4 octets.

由于ChaCha20块函数不直接应用于纯文本,因此不需要填充。然而,根据RFC 4303中的规范,明文始终具有一个pad长度八位字节和一个下一个报头八位字节,并且它可能需要padding八位字节,以便将缓冲器对准4个八位字节的整数倍。

The same key and nonce, along with a block counter of zero, are passed to the ChaCha20 block function, and the top 256 bits of the result are used as the Poly1305 key.

将相同的密钥和nonce以及块计数器0传递给ChaCha20块函数,结果的前256位用作Poly1305密钥。

Finally, the Poly1305 function is run on the data to be authenticated, which is, as specified in Section 2.8 of [RFC7539], a concatenation of the following in the order below:

最后,Poly1305函数在待验证的数据上运行,如[RFC7539]第2.8节所述,这是以下顺序的串联:

o The Authenticated Additional Data (AAD); see Section 2.1.

o 经认证的附加数据(AAD);见第2.1节。

o Zero-octet padding that rounds the length up to 16 octets. This is 4 or 8 octets depending on the length of the AAD.

o 零八位字节填充,将长度四舍五入到16个八位字节。这是4或8个八位字节,取决于AAD的长度。

o The ciphertext.

o 密文。

o Zero-octet padding that rounds the total length up to an integral multiple of 16 octets.

o 零八位字节填充,将总长度四舍五入到16个八位字节的整数倍。

o The length of the AAD in octets (as a 64-bit integer encoded in little-endian byte order).

o AAD的长度,以八位字节为单位(以小端字节顺序编码的64位整数)。

o The length of the ciphertext in octets (as a 64-bit integer encoded in little-endian byte order).

o 以八位字节为单位的密文长度(以小端字节顺序编码的64位整数)。

The 128-bit output of Poly1305 is used as the tag. All 16 octets are included in the packet.

Poly1305的128位输出用作标签。所有16个八位字节都包含在数据包中。

The figure below is a copy of Figure 2 in RFC 4303:

下图是RFC 4303中图2的副本:

     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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               Security Parameters Index (SPI)                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Sequence Number                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---
   |                    IV (optional)                              | ^ p
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | a
   |                    Rest of Payload Data  (variable)           | | y
   ~                                                               ~ | l
   |                                                               | | o
   +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | a
   |               |         TFC Padding * (optional, variable)    | v d
   +-+-+-+-+-+-+-+-+         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---
   |                         |        Padding (0-255 bytes)        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                               |  Pad Length   | Next Header   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Integrity Check Value-ICV   (variable)                |
   ~                                                               ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
     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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               Security Parameters Index (SPI)                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Sequence Number                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---
   |                    IV (optional)                              | ^ p
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | a
   |                    Rest of Payload Data  (variable)           | | y
   ~                                                               ~ | l
   |                                                               | | o
   +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | a
   |               |         TFC Padding * (optional, variable)    | v d
   +-+-+-+-+-+-+-+-+         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---
   |                         |        Padding (0-255 bytes)        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                               |  Pad Length   | Next Header   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Integrity Check Value-ICV   (variable)                |
   ~                                                               ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

o The IV field is 64 bits. It is the final 64 bits of the 96-bit nonce. If the counter method is used for generating unique IVs, then the final 32 bits of the IV will be equal to the Sequence Number field.

o IV字段为64位。它是96位nonce的最后64位。如果计数器方法用于生成唯一的IV,则IV的最后32位将等于序列号字段。

o The length of the Padding field need not exceed 4 octets. However, neither RFC 4303 nor this specification require using the minimal padding length.

o 填充字段的长度不需要超过4个八位字节。但是,RFC 4303和本规范均不要求使用最小填充长度。

o The Integrity Check Value field contains the 16-octet tag.

o 完整性检查值字段包含16个八位字节标记。

2.1. AAD Construction
2.1. AAD建设

The construction of the Additional Authenticated Data (AAD) is similar to the one in [RFC4106]. For security associations (SAs) with 32-bit sequence numbers, the AAD is 8 octets: a 4-octet SPI followed by a 4-octet sequence number ordered exactly as it is in the packet. For SAs with an Extended Sequence Number (ESN), the AAD is 12 octets: a 4-octet SPI followed by an 8-octet sequence number as a 64-bit integer in big-endian byte order.

附加认证数据(AAD)的构造类似于[RFC4106]中的构造。对于具有32位序列号的安全关联(SA),AAD是8个八位字节:一个4个八位字节的SPI,后跟一个4个八位字节的序列号,其顺序与数据包中的顺序完全相同。对于具有扩展序列号(ESN)的SAs,AAD为12个八位字节:一个4个八位字节的SPI,后跟一个8个八位字节的序列号,以大端字节顺序表示为64位整数。

3. Use in IKEv2
3. 在IKEv2中使用

AEAD algorithms can be used in IKE, as described in [RFC5282]. More specifically:

AEAD算法可用于IKE,如[RFC5282]所述。更具体地说:

o The Encrypted Payload is as described in Section 3 of RFC 5282.

o 加密有效载荷如RFC 5282第3节所述。

o The ChaCha20-Poly1305 keying material is derived similarly to ESP: 36 octets are requested for each of SK_ei and SK_er, of which the first 32 form the key and the last 4 form the salt. No octets are requested for SK_ai and SK_ar.

o ChaCha20-Poly1305键控材料与ESP类似:SK_ei和SK_er各需要36个八位组,其中前32个形成键,后4个形成盐。SK_ai和SK_ar不需要八位字节。

o The IV is 64 bits, as described in Section 2, and is included explicitly in the Encrypted payload.

o 如第2节所述,IV是64位的,并且显式地包括在加密的有效负载中。

o The sender SHOULD include no padding and set the Pad Length field to zero. The receiver MUST accept any length of padding.

o 发送方不应包含填充,并将“填充长度”字段设置为零。接收器必须接受任何长度的填充。

o The AAD is as described in Section 5.1 of RFC 5282, so it is 32 octets (28 for the IKEv2 header plus 4 octets for the encrypted payload header), assuming no unencrypted payloads.

o AAD如RFC 5282第5.1节所述,因此假设没有未加密的有效载荷,AAD为32个八位字节(IKEv2报头为28个八位字节,加密的有效载荷报头为4个八位字节)。

4. Negotiation in IKEv2
4. IKEv2中的谈判

When negotiating the ChaCha20-Poly1305 algorithm for use in IKE or IPsec, the value ENCR_CHACHA20_POLY1305 (28) should be used in the transform substructure of the SA payload as the ENCR (type 1) transform ID. As with other AEAD algorithms, INTEG (type 3) transform substructures MUST NOT be specified, or just one INTEG transform MAY be included with value NONE (0).

协商用于IKE或IPsec的ChaCha20-Poly1305算法时,应在SA有效载荷的变换子结构中使用值ENCR_ChaCha20_Poly1305(28)作为ENCR(类型1)变换ID。与其他AEAD算法一样,不得指定整数(类型3)变换子结构,或者,值NONE(0)可能只包含一个整数变换。

5. Security Considerations
5. 安全考虑

The ChaCha20 cipher is designed to provide 256-bit security.

ChaCha20密码设计用于提供256位安全性。

The Poly1305 authenticator is designed to ensure that forged messages are rejected with a probability of 1-(n/(2^102)) for a 16n-octet message, even after sending 2^64 legitimate messages, so it is SUF-CMA (strong unforgeability against chosen-message attacks) in the terminology of [AE].

Poly1305认证器设计用于确保即使在发送了2^64条合法消息之后,16n八位字节消息的伪造消息也会以1-(n/(2^102))的概率被拒绝,因此它是[AE]术语中的SUF-CMA(针对选定消息攻击的强不可伪造性)。

The most important security consideration in implementing this document is the uniqueness of the nonce used in ChaCha20. The nonce should be selected uniquely for a particular key, but unpredictability of the nonce is not required. Counters and LFSRs are both acceptable ways of generating unique nonces.

在执行本文档时,最重要的安全考虑是CHA20中使用的nonce的唯一性。应为特定密钥唯一选择nonce,但不要求nonce具有不可预测性。计数器和LFSR都是生成唯一nonce的可接受方式。

Another issue with implementing these algorithms is avoiding side channels. This is trivial for ChaCha20, but requires some care for Poly1305. Considerations for implementations of these algorithms are in [RFC7539].

实现这些算法的另一个问题是避免旁道。这对于ChaCha20来说是微不足道的,但是需要对Poly1305进行一些维护。[RFC7539]中介绍了实现这些算法的注意事项。

The Salt value in used nonce construction in ESP and IKEv2 is derived from the keystream, same as the encryption key. It is never transmitted on the wire, but the security of the algorithm does not depend on its secrecy. Thus, implementations that keep keys and other secret material within some security boundary MAY export the Salt from the security boundary. This may be useful if the API provided by the library accepts the nonce as a parameter rather than the IV.

ESP和IKEv2中使用的nonce构造中的Salt值是从密钥流派生的,与加密密钥相同。它从不在电线上传输,但算法的安全性并不取决于它的保密性。因此,将密钥和其他机密材料保留在某些安全边界内的实现可能会从安全边界导出Salt。如果库提供的API接受nonce作为参数而不是IV,那么这可能很有用。

6. IANA Considerations
6. IANA考虑

IANA has assigned the value 28 as a transform identifier for the algorithm described in this document in the "Transform Type 1 - Encryption Algorithm Transform IDs" registry with name ENCR_CHACHA20_POLY1305 and this document as reference for both ESP and IKEv2.

IANA已在“transform Type 1-Encryption algorithm transform IDs”(转换类型1-加密算法转换ID)注册表中指定值28作为本文件中所述算法的转换标识符,名称为ENCR_CHACHA20_POLY1305,本文件作为ESP和IKEv2的参考。

7. References
7. 工具书类
7.1. Normative References
7.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>.

[RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC 4303, DOI 10.17487/RFC4303, December 2005, <http://www.rfc-editor.org/info/rfc4303>.

[RFC4303]Kent,S.,“IP封装安全有效载荷(ESP)”,RFC 4303,DOI 10.17487/RFC4303,2005年12月<http://www.rfc-editor.org/info/rfc4303>.

[RFC5282] Black, D. and D. McGrew, "Using Authenticated Encryption Algorithms with the Encrypted Payload of the Internet Key Exchange version 2 (IKEv2) Protocol", RFC 5282, DOI 10.17487/RFC5282, August 2008, <http://www.rfc-editor.org/info/rfc5282>.

[RFC5282]Black,D.和D.McGrew,“使用互联网密钥交换版本2(IKEv2)协议的加密有效载荷的认证加密算法”,RFC 5282,DOI 10.17487/RFC5282,2008年8月<http://www.rfc-editor.org/info/rfc5282>.

[RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. Kivinen, "Internet Key Exchange Protocol Version 2 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 2014, <http://www.rfc-editor.org/info/rfc7296>.

[RFC7296]Kaufman,C.,Hoffman,P.,Nir,Y.,Eronen,P.,和T.Kivinen,“互联网密钥交换协议版本2(IKEv2)”,STD 79,RFC 7296,DOI 10.17487/RFC72962014年10月<http://www.rfc-editor.org/info/rfc7296>.

[RFC7539] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF Protocols", RFC 7539, DOI 10.17487/RFC7539, May 2015, <http://www.rfc-editor.org/info/rfc7539>.

[RFC7539]Nir,Y.和A.Langley,“IETF协议的ChaCha20和Poly1305”,RFC 7539,DOI 10.17487/RFC7539,2015年5月<http://www.rfc-editor.org/info/rfc7539>.

7.2. Informative References
7.2. 资料性引用

[AE] Bellare, M. and C. Namprempre, "Authenticated Encryption: Relations among notions and analysis of the generic composition paradigm", DOI 10.1007/s00145-008-9026-x, September 2008, <http://cseweb.ucsd.edu/~mihir/papers/oem.html>.

[AE]Bellare,M.和C.Namprempre,“认证加密:概念之间的关系和通用组合范式的分析”,DOI 10.1007/s00145-008-9026-x,2008年9月<http://cseweb.ucsd.edu/~mihir/papers/oem.html>。

[FIPS-197] National Institute of Standards and Technology, "Advanced Encryption Standard (AES)", FIPS PUB 197, November 2001, <http://csrc.nist.gov/publications/fips/fips197/ fips-197.pdf>.

[FIPS-197]国家标准与技术研究所,“高级加密标准(AES)”,FIPS PUB 197,2001年11月<http://csrc.nist.gov/publications/fips/fips197/ fips-197.pdf>。

[RFC1761] Callaghan, B. and R. Gilligan, "Snoop Version 2 Packet Capture File Format", RFC 1761, DOI 10.17487/RFC1761, February 1995, <http://www.rfc-editor.org/info/rfc1761>.

[RFC1761]Callaghan,B.和R.Gilligan,“Snoop版本2数据包捕获文件格式”,RFC 1761,DOI 10.17487/RFC1761,1995年2月<http://www.rfc-editor.org/info/rfc1761>.

[RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)", RFC 4106, DOI 10.17487/RFC4106, June 2005, <http://www.rfc-editor.org/info/rfc4106>.

[RFC4106]Viega,J.和D.McGrew,“在IPsec封装安全有效载荷(ESP)中使用Galois/计数器模式(GCM)”,RFC 4106,DOI 10.17487/RFC4106,2005年6月<http://www.rfc-editor.org/info/rfc4106>.

[SP800-67] National Institute of Standards and Technology, "Recommendation for the Triple Data Encryption Algorithm (TDEA) Block Cipher", FIPS SP800-67, January 2012, <http://csrc.nist.gov/publications/nistpubs/800-67-Rev1/ SP-800-67-Rev1.pdf>.

[SP800-67]国家标准与技术研究所,“三重数据加密算法(TDEA)分组密码建议”,FIPS SP800-67,2012年1月<http://csrc.nist.gov/publications/nistpubs/800-67-Rev1/ SP-800-67-Rev1.pdf>。

[Standby-Cipher] McGrew, D., Grieco, A., and Y. Sheffer, "Selection of Future Cryptographic Standards", Work in Progress draft-mcgrew-standby-cipher-00, January 2013.

[备用密码]McGrew,D.,Grieco,A.,和Y.Sheffer,“未来密码标准的选择”,正在进行的工作草稿-McGrew-Standby-Cipher-00,2013年1月。

Appendix A. ESP Example
附录A.ESP示例

For this example, we will use a tunnel-mode ESP SA using the ChaCha20-Poly1305 algorithm. The keying material is as follows:

对于本例,我们将使用ChaCha20-Poly1305算法的隧道模式ESP SA。键控材料如下所示:

  KEYMAT:
  000  80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f  ................
  016  90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f  ................
  032  a0 a1 a2 a3                                      ....
        
  KEYMAT:
  000  80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f  ................
  016  90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f  ................
  032  a0 a1 a2 a3                                      ....
        

Obviously not a great PRF. The first 32 octets are the key and the final 4 octets (0xa0 0xa1 0xa2 0xa3) are the salt. For the packet, we will use an ICMP packet from 198.51.100.5 to 192.0.2.5:

显然不是一个伟大的PRF。前32个八位字节是键,最后4个八位字节(0xa0 0xa1 0xa2 0xa3)是盐。对于数据包,我们将使用从198.51.100.5到192.0.2.5的ICMP数据包:

  Source Packet:
  000  45 00 00 54 a6 f2 00 00 40 01 e7 78 c6 33 64 05  E..T....@..x.3d.
  016  c0 00 02 05 08 00 5b 7a 3a 08 00 00 55 3b ec 10  ......[z:...U;..
  032  00 07 36 27 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13  ..6'............
  048  14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23  ............ !"#
  064  24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33  $%&'()*+,-./0123
  080  34 35 36 37                                      4567
        
  Source Packet:
  000  45 00 00 54 a6 f2 00 00 40 01 e7 78 c6 33 64 05  E..T....@..x.3d.
  016  c0 00 02 05 08 00 5b 7a 3a 08 00 00 55 3b ec 10  ......[z:...U;..
  032  00 07 36 27 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13  ..6'............
  048  14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23  ............ !"#
  064  24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33  $%&'()*+,-./0123
  080  34 35 36 37                                      4567
        

The SA details are as follows:

SA详情如下:

o The key and Salt are as above.

o 钥匙和盐如上所述。

o The SPI is 0x01 0x02 0x03 0x04.

o SPI为0x01 0x02 0x03 0x04。

o The next sequence number is 5; ESN is not enabled.

o 下一个序列号是5;ESN未启用。

o The gateway IP address for this side is 203.0.113.153; The peer address is 203.0.113.5.

o 该侧网关IP地址为203.0.113.153;对等地址为203.0.113.5。

o NAT was not detected.

o 未检测到NAT。

The 64-bit IV is 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17. Putting together the salt and IV we get the nonce:

64位IV为0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17。把盐和IV放在一起,我们得到了暂时的结果:

   The nonce:
   000  a0 a1 a2 a3 10 11 12 13 14 15 16 17              ............
        
   The nonce:
   000  a0 a1 a2 a3 10 11 12 13 14 15 16 17              ............
        

The plaintext to encrypt consists of the source IP packet plus the padding:

要加密的明文由源IP数据包加上填充组成:

  Plaintext (includes padding and pad length):
  000  45 00 00 54 a6 f2 00 00 40 01 e7 78 c6 33 64 05  E..T....@..x.3d.
  016  c0 00 02 05 08 00 5b 7a 3a 08 00 00 55 3b ec 10  ......[z:...U;..
  032  00 07 36 27 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13  ..6'............
  048  14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23  ............ !"#
  064  24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33  $%&'()*+,-./0123
  080  34 35 36 37 01 02 02 04                          4567....
        
  Plaintext (includes padding and pad length):
  000  45 00 00 54 a6 f2 00 00 40 01 e7 78 c6 33 64 05  E..T....@..x.3d.
  016  c0 00 02 05 08 00 5b 7a 3a 08 00 00 55 3b ec 10  ......[z:...U;..
  032  00 07 36 27 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13  ..6'............
  048  14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23  ............ !"#
  064  24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33  $%&'()*+,-./0123
  080  34 35 36 37 01 02 02 04                          4567....
        

With the key, nonce, and plaintext available, we can call the ChaCha20 function and encrypt the packet, producing the ciphertext:

在密钥、nonce和明文可用的情况下,我们可以调用ChaCha20函数并加密数据包,生成密文:

  Ciphertext:
  000  24 03 94 28 b9 7f 41 7e 3c 13 75 3a 4f 05 08 7b  $..(..A~<.u:O..{
  016  67 c3 52 e6 a7 fa b1 b9 82 d4 66 ef 40 7a e5 c6  g.R.......f.@z..
  032  14 ee 80 99 d5 28 44 eb 61 aa 95 df ab 4c 02 f7  .....(D.a....L..
  048  2a a7 1e 7c 4c 4f 64 c9 be fe 2f ac c6 38 e8 f3  *..|LOd.../..8..
  064  cb ec 16 3f ac 46 9b 50 27 73 f6 fb 94 e6 64 da  ...?.F.P's....d.
  080  91 65 b8 28 29 f6 41 e0                          .e.().A.
        
  Ciphertext:
  000  24 03 94 28 b9 7f 41 7e 3c 13 75 3a 4f 05 08 7b  $..(..A~<.u:O..{
  016  67 c3 52 e6 a7 fa b1 b9 82 d4 66 ef 40 7a e5 c6  g.R.......f.@z..
  032  14 ee 80 99 d5 28 44 eb 61 aa 95 df ab 4c 02 f7  .....(D.a....L..
  048  2a a7 1e 7c 4c 4f 64 c9 be fe 2f ac c6 38 e8 f3  *..|LOd.../..8..
  064  cb ec 16 3f ac 46 9b 50 27 73 f6 fb 94 e6 64 da  ...?.F.P's....d.
  080  91 65 b8 28 29 f6 41 e0                          .e.().A.
        

To calculate the tag, we need a one-time Poly1305 key, which we calculate by calling the ChaCha20 function again with the same key and nonce, but a block count of zero.

为了计算标记,我们需要一个一次性的Poly1305键,我们通过使用相同的键和nonce再次调用ChaCha20函数来计算,但是块计数为零。

  Poly1305 one-time key:
  000  af 1f 41 2c c1 15 ad ce 5e 4d 0e 29 d5 c1 30 bf  ..A,....^M.)..0.
  016  46 31 21 0e 0f ef 74 31 c0 45 4f e7 0f d7 c2 d1  F1!...t1.EO.....
        
  Poly1305 one-time key:
  000  af 1f 41 2c c1 15 ad ce 5e 4d 0e 29 d5 c1 30 bf  ..A,....^M.)..0.
  016  46 31 21 0e 0f ef 74 31 c0 45 4f e7 0f d7 c2 d1  F1!...t1.EO.....
        

The AAD is constructed by concatenating the SPI to the sequence number:

AAD通过将SPI连接到序列号来构造:

   000  01 02 03 04 00 00 00 05                          ........
        
   000  01 02 03 04 00 00 00 05                          ........
        

The input to the Poly1305 function is constructed by concatenating and padding the AAD and ciphertext:

Poly1305函数的输入通过连接和填充AAD和密文来构造:

  Poly1305 Input:
  000  01 02 03 04 00 00 00 05 00 00 00 00 00 00 00 00  ................
  016  24 03 94 28 b9 7f 41 7e 3c 13 75 3a 4f 05 08 7b  $..(..A~<.u:O..{
  032  67 c3 52 e6 a7 fa b1 b9 82 d4 66 ef 40 7a e5 c6  g.R.......f.@z..
  048  14 ee 80 99 d5 28 44 eb 61 aa 95 df ab 4c 02 f7  .....(D.a....L..
  064  2a a7 1e 7c 4c 4f 64 c9 be fe 2f ac c6 38 e8 f3  *..|LOd.../..8..
  080  cb ec 16 3f ac 46 9b 50 27 73 f6 fb 94 e6 64 da  ...?.F.P's....d.
  096  91 65 b8 28 29 f6 41 e0 00 00 00 00 00 00 00 00  .e.().A.........
  112  08 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00  ........X.......
        
  Poly1305 Input:
  000  01 02 03 04 00 00 00 05 00 00 00 00 00 00 00 00  ................
  016  24 03 94 28 b9 7f 41 7e 3c 13 75 3a 4f 05 08 7b  $..(..A~<.u:O..{
  032  67 c3 52 e6 a7 fa b1 b9 82 d4 66 ef 40 7a e5 c6  g.R.......f.@z..
  048  14 ee 80 99 d5 28 44 eb 61 aa 95 df ab 4c 02 f7  .....(D.a....L..
  064  2a a7 1e 7c 4c 4f 64 c9 be fe 2f ac c6 38 e8 f3  *..|LOd.../..8..
  080  cb ec 16 3f ac 46 9b 50 27 73 f6 fb 94 e6 64 da  ...?.F.P's....d.
  096  91 65 b8 28 29 f6 41 e0 00 00 00 00 00 00 00 00  .e.().A.........
  112  08 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00  ........X.......
        

The resulting tag is:

生成的标记是:

  Tag:
  000  76 aa a8 26 6b 7f b0 f7 b1 1b 36 99 07 e1 ad 43  v..&k.....6....C
        
  Tag:
  000  76 aa a8 26 6b 7f b0 f7 b1 1b 36 99 07 e1 ad 43  v..&k.....6....C
        

Putting it all together, the resulting packet is as follows:

将其放在一起,得到的数据包如下所示:

  ESP packet:
  000  45 00 00 8c 23 45 00 00 40 32 de 5b cb 00 71 99  E...#E..@2.[..q.
  016  cb 00 71 05 01 02 03 04 00 00 00 05 10 11 12 13  ..q.............
  032  14 15 16 17 24 03 94 28 b9 7f 41 7e 3c 13 75 3a  ....$..(..A~<.u:
  048  4f 05 08 7b 67 c3 52 e6 a7 fa b1 b9 82 d4 66 ef  O..{g.R.......f.
  064  40 7a e5 c6 14 ee 80 99 d5 28 44 eb 61 aa 95 df  @z.......(D.a...
  080  ab 4c 02 f7 2a a7 1e 7c 4c 4f 64 c9 be fe 2f ac  .L..*..|LOd.../.
  096  c6 38 e8 f3 cb ec 16 3f ac 46 9b 50 27 73 f6 fb  .8.....?.F.P's..
  112  94 e6 64 da 91 65 b8 28 29 f6 41 e0 76 aa a8 26  ..d..e.().A.v..&
  128  6b 7f b0 f7 b1 1b 36 99 07 e1 ad 43              k.....6....C
        
  ESP packet:
  000  45 00 00 8c 23 45 00 00 40 32 de 5b cb 00 71 99  E...#E..@2.[..q.
  016  cb 00 71 05 01 02 03 04 00 00 00 05 10 11 12 13  ..q.............
  032  14 15 16 17 24 03 94 28 b9 7f 41 7e 3c 13 75 3a  ....$..(..A~<.u:
  048  4f 05 08 7b 67 c3 52 e6 a7 fa b1 b9 82 d4 66 ef  O..{g.R.......f.
  064  40 7a e5 c6 14 ee 80 99 d5 28 44 eb 61 aa 95 df  @z.......(D.a...
  080  ab 4c 02 f7 2a a7 1e 7c 4c 4f 64 c9 be fe 2f ac  .L..*..|LOd.../.
  096  c6 38 e8 f3 cb ec 16 3f ac 46 9b 50 27 73 f6 fb  .8.....?.F.P's..
  112  94 e6 64 da 91 65 b8 28 29 f6 41 e0 76 aa a8 26  ..d..e.().A.v..&
  128  6b 7f b0 f7 b1 1b 36 99 07 e1 ad 43              k.....6....C
        
Appendix B. IKEv2 Example
附录B.IKEv2示例

For the IKEv2 example, we'll use the following:

对于IKEv2示例,我们将使用以下内容:

o The key is 0x80..0x9f, the same as in Appendix A.

o 密钥为0x80..0x9f,与附录A中的相同。

o The Salt is 0xa0 0xa1 0xa2 0xa3.

o 盐是0xa0 0xa1 0xa2 0xa3。

o The IV will also be the same as in the previous example. The fact that the IV and Salt are both the same means that the nonce is also the same.

o IV也将与上一示例中的相同。IV和Salt都是相同的事实意味着nonce也是相同的。

o Because the key and nonce are the same, so is the one-time Poly1305 key.

o 因为密钥和nonce是相同的,所以一次性Poly1305密钥也是相同的。

o The packet will be an INFORMATIONAL request carrying a single payload: a Notify payload with type SET_WINDOW_SIZE, setting the window size to 10.

o 数据包将是一个信息请求,携带一个有效负载:一个类型为SET_WINDOW_SIZE的通知有效负载,将窗口大小设置为10。

o iSPI = 0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc6 0xc7.

o iSPI=0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc6 0xc7。

o rSPI = 0xd0 0xd1 0xd2 0xd3 0xd4 0xd5 0xd6 0xd7.

o rSPI=0xd0 0xd1 0xd2 0xd3 0xd4 0xd5 0xd6 0xd7。

o Message ID shall be 9.

o 消息ID应为9。

   The Notify Payload:
   000  00 00 00 0c 00 00 40 01 00 00 00 0a              ......@.....
        
   The Notify Payload:
   000  00 00 00 0c 00 00 40 01 00 00 00 0a              ......@.....
        
   Plaintext (with no padding and a zero pad length):
   000  00 00 00 0c 00 00 40 01 00 00 00 0a 00           ......@......
        
   Plaintext (with no padding and a zero pad length):
   000  00 00 00 0c 00 00 40 01 00 00 00 0a 00           ......@......
        
   Ciphertext:
   000  61 03 94 70 1f 8d 01 7f 7c 12 92 48 89           a..p....|..H.
        
   Ciphertext:
   000  61 03 94 70 1f 8d 01 7f 7c 12 92 48 89           a..p....|..H.
        

The AAD is constructed by appending the IKE header to the encrypted payload header. Note that the length field in the IKE header and the length field in the encrypted payload header have to be calculated before constructing the AAD:

AAD是通过将IKE头附加到加密的有效负载头来构造的。注意,在构造AAD之前,必须计算IKE报头中的长度字段和加密有效负载报头中的长度字段:

  AAD:
  000  c0 c1 c2 c3 c4 c5 c6 c7 d0 d1 d2 d3 d4 d5 d6 d7  ................
  016  2e 20 25 00 00 00 00 09 00 00 00 45 29 00 00 29  . %........E)..)
        
  AAD:
  000  c0 c1 c2 c3 c4 c5 c6 c7 d0 d1 d2 d3 d4 d5 d6 d7  ................
  016  2e 20 25 00 00 00 00 09 00 00 00 45 29 00 00 29  . %........E)..)
        

In this case, the length of the AAD is an integral multiple of 16, so when constructing the input to Poly1305 there was no need for padding. The ciphertext is 13 octets long, so it is followed by 3 zero octets. The input to Poly1305 is 32 octets of AAD, 13 octets of ciphertext, 3 octets of zero padding, and two 8-octet length fields in little-endian byte order.

在这种情况下,AAD的长度是16的整数倍,因此在构造Poly1305的输入时,不需要填充。密文有13个八位字节长,因此后面跟着3个零八位字节。Poly1305的输入是AAD的32个八位字节、密文的13个八位字节、零填充的3个八位字节和两个小尾端字节顺序的8个八位字节长度字段。

  Poly1305 Input:
  000  c0 c1 c2 c3 c4 c5 c6 c7 d0 d1 d2 d3 d4 d5 d6 d7  ................
  016  2e 20 25 00 00 00 00 09 00 00 00 45 29 00 00 29  . %........E)..)
  032  61 03 94 70 1f 8d 01 7f 7c 12 92 48 89 00 00 00  a..p....|..H....
  048  20 00 00 00 00 00 00 00 0d 00 00 00 00 00 00 00   ...............
        
  Poly1305 Input:
  000  c0 c1 c2 c3 c4 c5 c6 c7 d0 d1 d2 d3 d4 d5 d6 d7  ................
  016  2e 20 25 00 00 00 00 09 00 00 00 45 29 00 00 29  . %........E)..)
  032  61 03 94 70 1f 8d 01 7f 7c 12 92 48 89 00 00 00  a..p....|..H....
  048  20 00 00 00 00 00 00 00 0d 00 00 00 00 00 00 00   ...............
        
  Tag:
  000  6b 71 bf e2 52 36 ef d7 cd c6 70 66 90 63 15 b2  kq..R6....pf.c..
        
  Tag:
  000  6b 71 bf e2 52 36 ef d7 cd c6 70 66 90 63 15 b2  kq..R6....pf.c..
        
  Encrypted Payload:
  000  29 00 00 29 10 11 12 13 14 15 16 17 61 03 94 70  )..)........a..p
  016  1f 8d 01 7f 7c 12 92 48 89 6b 71 bf e2 52 36 ef  ....|..H.kq..R6.
  032  d7 cd c6 70 66 90 63 15 b2                       ...pf.c..
        
  Encrypted Payload:
  000  29 00 00 29 10 11 12 13 14 15 16 17 61 03 94 70  )..)........a..p
  016  1f 8d 01 7f 7c 12 92 48 89 6b 71 bf e2 52 36 ef  ....|..H.kq..R6.
  032  d7 cd c6 70 66 90 63 15 b2                       ...pf.c..
        
  The IKE Message:
  000  c0 c1 c2 c3 c4 c5 c6 c7 d0 d1 d2 d3 d4 d5 d6 d7  ................
  016  2e 20 25 00 00 00 00 09 00 00 00 45 29 00 00 29  . %........E)..)
  032  10 11 12 13 14 15 16 17 61 03 94 70 1f 8d 01 7f  ........a..p....
  048  7c 12 92 48 89 6b 71 bf e2 52 36 ef d7 cd c6 70  |..H.kq..R6....p
  064  66 90 63 15 b2                                   f.c..
        
  The IKE Message:
  000  c0 c1 c2 c3 c4 c5 c6 c7 d0 d1 d2 d3 d4 d5 d6 d7  ................
  016  2e 20 25 00 00 00 00 09 00 00 00 45 29 00 00 29  . %........E)..)
  032  10 11 12 13 14 15 16 17 61 03 94 70 1f 8d 01 7f  ........a..p....
  048  7c 12 92 48 89 6b 71 bf e2 52 36 ef d7 cd c6 70  |..H.kq..R6....p
  064  66 90 63 15 b2                                   f.c..
        

The below file in the snoop format [RFC1761] contains three packets: The first is the ICMP packet from the example in Appendix A, the second is the ESP packet from the same appendix, and the third is the IKEv2 packet from this appendix. To convert this text back into a file, you can use a Unix command line tool such as "openssl enc -d -a":

以下snoop格式的文件[RFC1761]包含三个数据包:第一个是附录A示例中的ICMP数据包,第二个是同一附录中的ESP数据包,第三个是本附录中的IKEv2数据包。要将此文本转换回文件,可以使用Unix命令行工具,如“openssl enc-d-a”:

c25vb3AAAAAAAAACAAAABAAAAGIAAABiAAAAegAAAABVPq8PAAADVdhs6fUQBHgx wbcpwggARQAAVKbyAABAAed4xjNkBcAAAgUIAFt6OggAAFU77BAABzYnCAkKCwwN Dg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3AAAAmgAA AJoAAACyAAAAAFU+rw8AAAo62Gzp9RAEeDHBtynCCABFAACMI0UAAEAy3lvLAHGZ ywBxBQECAwQAAAAFEBESExQVFhckA5QouX9BfjwTdTpPBQh7Z8NS5qf6sbmC1Gbv QHrlxhTugJnVKETrYaqV36tMAvcqpx58TE9kyb7+L6zGOOjzy+wWP6xGm1Anc/b7 lOZk2pFluCgp9kHgdqqoJmt/sPexGzaZB+GtQwAAAG8AAABvAAAAhwAAAABVPq8P AAARH9hs6fUQBHgxwbcpwggARQAAYSNFAABAEd6nywBxmcsAcQUB9AH0AE0IUcDB wsPExcbH0NHS09TV1tcuICUAAAAACQAAAEUpAAApEBESExQVFhdhA5RwH40Bf3wS kkiJa3G/4lI279fNxnBmkGMVsg==

C25VB3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaababaaaaaaaaabababaagagagauaguiaft6Oggawn DG8QERITFBUfxGzGzGzghschr4QIQLJICOKSorlC0uxM0Ntyaaaaaaaaafafu+RW8aaao62gzP9GzP9RaeedbyEedhbtycabacabacabacabacabacabacabacabacw7Ay3Ay3Lvy3Lvy3Ay3Lvg3Lvg3Lvzlay3Lvzlayy3Ay3LvzlayYW0BzyGzYYWzyWQHrlxhTugJnVKETrYaqV36tMAvcqpx58TE9kyb7+L6zGOOjzy+wWP6xGm1Anc/b7 Lozk2FlucGp9KHgdQQOJMT/sPexGzaZB+GtQwAAAG8AAABvAAAAhwAAAABVPq8P AARH6HS6FUQBHGXWBCPWGGARQAYSNFAABED6NYWBCxMCSACQUB9AAH0AE0IUCDB WSPEXCBH0NHS09Tv1TCU8AACAG8AAKKKKQQQQ8P/KKKKKK4FN4FNKKK4G==

Acknowledgements

致谢

All of the algorithms in this document were designed by D. J. Bernstein. The AEAD construction was designed by Adam Langley. The author would also like to thank Adam for helpful comments, as well as Yaron Sheffer for telling me to write the algorithms document. Thanks also to Martin Willi for pointing out the discrepancy with the final version of the algorithm document, and to Valery Smyslov and Tero Kivinen for helpful comments on this document. Thanks to Steve Doyle and Martin Willi for pointing out mistakes in my examples.

本文中的所有算法都是由D.J.Bernstein设计的。AEAD结构由亚当·兰利设计。作者还要感谢Adam提供的有用的评论,以及Yaron Sheffer告诉我编写算法文档。还感谢Martin Willi指出了与算法文档最终版本的差异,并感谢Valery Smyslov和Tero Kivinen对本文档的有用意见。感谢史蒂夫·道尔和马丁·威利指出了我例子中的错误。

Author's Address

作者地址

Yoav Nir Check Point Software Technologies Ltd. 5 Hasolelim St. Tel Aviv 6789735 Israel

以色列特拉维夫Hasolelim街5号Yoav Nir Check Point软件技术有限公司6789735

   Email: ynir.ietf@gmail.com
        
   Email: ynir.ietf@gmail.com