Internet Engineering Task Force (IETF)                       A. Malhotra
Request for Comments: 8573                                   S. Goldberg
Updates: 5905                                          Boston University
Category: Standards Track                                      June 2019
ISSN: 2070-1721
        
Internet Engineering Task Force (IETF)                       A. Malhotra
Request for Comments: 8573                                   S. Goldberg
Updates: 5905                                          Boston University
Category: Standards Track                                      June 2019
ISSN: 2070-1721
        

Message Authentication Code for the Network Time Protocol

网络时间协议的消息身份验证代码

Abstract

摘要

The Network Time Protocol (NTP), as described in RFC 5905, states that NTP packets should be authenticated by appending NTP data to a 128-bit key and hashing the result with MD5 to obtain a 128-bit tag. This document deprecates MD5-based authentication, which is considered too weak, and recommends the use of AES-CMAC as described in RFC 4493 as a replacement.

如RFC 5905中所述,网络时间协议(NTP)规定,应通过将NTP数据附加到128位密钥并使用MD5散列结果以获得128位标记来验证NTP数据包。本文档反对基于MD5的身份验证,认为这种身份验证太弱,并建议使用RFC 4493中所述的AES-CMAC作为替代。

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 7841.

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

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

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

Copyright Notice

版权公告

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

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

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://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文件的法律规定的约束(https://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   2
   2.  Deprecating the Use of MD5  . . . . . . . . . . . . . . . . .   2
   3.  Replacement Recommendation  . . . . . . . . . . . . . . . . .   2
   4.  Motivation  . . . . . . . . . . . . . . . . . . . . . . . . .   3
   5.  Test Vectors  . . . . . . . . . . . . . . . . . . . . . . . .   3
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   3
   7.  Security Considerations . . . . . . . . . . . . . . . . . . .   3
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   4
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .   4
     8.2.  Informative References  . . . . . . . . . . . . . . . . .   4
   Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . .  5
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   5
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   2
   2.  Deprecating the Use of MD5  . . . . . . . . . . . . . . . . .   2
   3.  Replacement Recommendation  . . . . . . . . . . . . . . . . .   2
   4.  Motivation  . . . . . . . . . . . . . . . . . . . . . . . . .   3
   5.  Test Vectors  . . . . . . . . . . . . . . . . . . . . . . . .   3
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   3
   7.  Security Considerations . . . . . . . . . . . . . . . . . . .   3
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   4
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .   4
     8.2.  Informative References  . . . . . . . . . . . . . . . . .   4
   Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . .  5
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   5
        
1. Introduction
1. 介绍

The Network Time Protocol [RFC5905] states that NTP packets should be authenticated by appending NTP data to a 128-bit key and hashing the result with MD5 to obtain a 128-bit tag. This document deprecates MD5-based authentication, which is considered too weak, and recommends the use of AES-CMAC [RFC4493] as a replacement.

网络时间协议[RFC5905]规定,应通过将NTP数据附加到128位密钥并使用MD5散列结果以获得128位标记来验证NTP数据包。本文档不推荐基于MD5的身份验证,因为它被认为太弱,建议使用AES-CMAC[RFC4493]作为替代。

1.1. Requirements Language
1.1. 需求语言

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 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”在所有大写字母出现时(如图所示)应按照BCP 14[RFC2119][RFC8174]所述进行解释。

2. Deprecating the Use of MD5
2. 反对使用MD5

RFC 5905 [RFC5905] defines how the MD5 digest algorithm described in RFC 1321 [RFC1321] can be used as a Message Authentication Code (MAC) for authenticating NTP packets. However, as discussed in [BCK] and RFC 6151 [RFC6151], this is not a secure MAC and therefore MUST be deprecated.

RFC 5905[RFC5905]定义了如何将RFC 1321[RFC1321]中描述的MD5摘要算法用作验证NTP数据包的消息验证码(MAC)。但是,如[BCK]和RFC 6151[RFC6151]中所述,这不是一个安全的MAC,因此必须弃用。

3. Replacement Recommendation
3. 更换建议

If NTP authentication is implemented, then AES-CMAC as specified in RFC 4493 [RFC4493] MUST be computed over all fields in the NTP header and any extension fields that are present in the NTP packet as described in RFC 5905 [RFC5905]. The MAC key for NTP MUST be an AES-128 key that is 128 bits in length, and the resulting MAC tag

如果实施NTP身份验证,则必须按照RFC 5905[RFC5905]中的说明,对NTP报头中的所有字段以及NTP数据包中存在的任何扩展字段计算RFC 4493[RFC4493]中规定的AES-CMAC。NTP的MAC密钥必须是长度为128位的AES-128密钥以及生成的MAC标签

MUST be at least 128 bits in length, as stated in Section 2.4 of RFC 4493 [RFC4493]. NTP makes this transition possible as it supports algorithm agility as described in Section 2.1 of RFC 7696 [RFC7696].

如RFC 4493[RFC4493]第2.4节所述,长度必须至少为128位。NTP支持RFC 7696[RFC7696]第2.1节中所述的算法敏捷性,因此使这种转换成为可能。

The hosts that wish to use NTP authentication share a symmetric key out of band. So they MUST implement AES-CMAC and share the corresponding symmetric key. A symmetric key is a triplet of ID, type (e.g., MD5 and AES-CMAC) and the key itself. All three have to match in order to successfully authenticate packets between two hosts. Old implementations that don't support AES-CMAC will not accept and will not send packets authenticated with such a key.

希望使用NTP身份验证的主机在带外共享对称密钥。因此,它们必须实现AES-CMAC并共享相应的对称密钥。对称密钥是ID、类型(例如MD5和AES-CMAC)和密钥本身的三元组。为了在两台主机之间成功地验证数据包,这三种方法都必须匹配。不支持AES-CMAC的旧实现将不接受并不会发送使用此类密钥进行身份验证的数据包。

4. Motivation
4. 动机

AES-CMAC is recommended for the following reasons:

建议使用AES-CMAC,原因如下:

1. It is an IETF specification that is supported in many open source implementations.

1. 它是一个IETF规范,在许多开源实现中都得到支持。

2. It is immune to nonce-reuse vulnerabilities (e.g., [Joux]) because it does not use a nonce.

2. 它不受nonce重用漏洞(例如,[Joux])的影响,因为它不使用nonce。

3. It has fine performance in terms of latency and throughput.

3. 它在延迟和吞吐量方面具有良好的性能。

4. It benefits from native hardware support, for instance, Intel's New Instruction set GUE [GUE].

4. 它得益于本机硬件支持,例如Intel的新指令集GUE[GUE]。

5. Test Vectors
5. 测试向量

For test vectors and their outputs, refer to Section 4 of RFC 4493 [RFC4493].

有关测试向量及其输出,请参考RFC 4493[RFC4493]第4节。

6. IANA Considerations
6. IANA考虑

This document has no IANA actions.

本文档没有IANA操作。

7. Security Considerations
7. 安全考虑

Refer to Appendices A, B, and C of the NIST document [NIST] for a recommendation for the CMAC mode of authentication; see the Security Considerations of RFC 4493 [RFC4493] for discussion on security guarantees of AES-CMAC.

关于CMAC认证模式的建议,请参考NIST文件[NIST]附录A、B和C;有关AES-CMAC安全保证的讨论,请参见RFC 4493[RFC4493]的安全注意事项。

8. References
8. 工具书类
8.1. Normative References
8.1. 规范性引用文件

[NIST] Dworkin, M., "Recommendation for Block Cipher Modes of Operation: The CMAC Mode for Authentication", NIST Special Publication 800-38B, DOI 10.6028/NIST.SP.800-38B, October 2016, <https://www.nist.gov/publications/recommendation-block-cipher-modes-operation-cmac-mode-authentication-0>.

[NIST]Dworkin,M.“分组密码操作模式的建议:用于认证的CMAC模式”,NIST特别出版物800-38B,DOI 10.6028/NIST.SP.800-38B,2016年10月<https://www.nist.gov/publications/recommendation-block-cipher-modes-operation-cmac-mode-authentication-0>.

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

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

[RFC4493] Song, JH., Poovendran, R., Lee, J., and T. Iwata, "The AES-CMAC Algorithm", RFC 4493, DOI 10.17487/RFC4493, June 2006, <https://www.rfc-editor.org/info/rfc4493>.

[RFC4493]Song,JH.,Poovendran,R.,Lee,J.,和T.Iwata,“AES-CMAC算法”,RFC 4493,DOI 10.17487/RFC4493,2006年6月<https://www.rfc-editor.org/info/rfc4493>.

[RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, <https://www.rfc-editor.org/info/rfc5905>.

[RFC5905]Mills,D.,Martin,J.,Ed.,Burbank,J.,和W.Kasch,“网络时间协议版本4:协议和算法规范”,RFC 5905,DOI 10.17487/RFC59052010年6月<https://www.rfc-editor.org/info/rfc5905>.

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[RFC8174]Leiba,B.,“RFC 2119关键词中大写与小写的歧义”,BCP 14,RFC 8174,DOI 10.17487/RFC8174,2017年5月<https://www.rfc-editor.org/info/rfc8174>.

8.2. Informative References
8.2. 资料性引用

[BCK] Bellare, M., Canetti, R., and H. Krawczyk, "Keying Hash Functions and Message Authentication", Advances in Cryptology - Crypto 96 Proceedings, Lecture Notes in Computer Science, Vol. 1109, N. Koblitz ed, Springer-Verlag, 1996.

[BCK]Bellare,M.,Canetti,R.,和H.Krawczyk,“密钥散列函数和消息认证”,密码学进展-加密96会议录,计算机科学讲稿,第1109卷,N.Koblitz ed,Springer Verlag,1996年。

[GUE] Geuron, S., "Intel Advanced Encryption Standard (AES) New Instructions Set", May 2010, <https://www.intel.com/content/dam/doc/white-paper/ advanced-encryption-standard-new-instructions-set-paper.pdf>.

[GUE]Geuron,S.,“英特尔高级加密标准(AES)新指令集”,2010年5月<https://www.intel.com/content/dam/doc/white-paper/ 高级加密标准新指令集文件.pdf>。

[Joux] Joux, A., "Authentication Failures in NIST version of GCM", <http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/ comments/800-38_Series-Drafts/GCM/Joux_comments.pdf>.

[Joux]Joux,A.,“NIST版GCM中的认证失败”<http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/ comments/800-38_Series-Drafts/GCM/Joux_comments.pdf>。

[RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, DOI 10.17487/RFC1321, April 1992, <https://www.rfc-editor.org/info/rfc1321>.

[RFC1321]Rivest,R.,“MD5消息摘要算法”,RFC 1321,DOI 10.17487/RFC1321,1992年4月<https://www.rfc-editor.org/info/rfc1321>.

[RFC6151] Turner, S. and L. Chen, "Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms", RFC 6151, DOI 10.17487/RFC6151, March 2011, <https://www.rfc-editor.org/info/rfc6151>.

[RFC6151]Turner,S.和L.Chen,“MD5消息摘要和HMAC-MD5算法的更新安全注意事项”,RFC 6151,DOI 10.17487/RFC6151,2011年3月<https://www.rfc-editor.org/info/rfc6151>.

[RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms", BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, <https://www.rfc-editor.org/info/rfc7696>.

[RFC7696]Housley,R.,“加密算法敏捷性和选择强制算法的指南”,BCP 201,RFC 7696,DOI 10.17487/RFC7696,2015年11月<https://www.rfc-editor.org/info/rfc7696>.

Acknowledgements

致谢

The authors wish to acknowledge useful discussions with Leen Alshenibr, Daniel Franke, Ethan Heilman, Kenny Paterson, Leonid Reyzin, Harlan Stenn, and Mayank Varia.

作者希望感谢与Leen Alshenibr、Daniel Franke、Ethan Heilman、Kenny Paterson、Leonid Reyzin、Harlan Stenn和Mayank Varia进行的有益讨论。

Authors' Addresses

作者地址

Aanchal Malhotra Boston University 111 Cummington St Boston, MA 02215 United States of America

安查尔·马尔霍特拉波士顿大学,美国马萨诸塞州波士顿卡明顿街111号,邮编02215

   Email: aanchal4@bu.edu
        
   Email: aanchal4@bu.edu
        

Sharon Goldberg Boston University 111 Cummington St Boston, MA 02215 United States of America

美国马萨诸塞州波士顿市卡明顿街111号莎伦·戈德伯格波士顿大学02215

   Email: goldbe@cs.bu.edu
        
   Email: goldbe@cs.bu.edu