RFC 8573

Message Authentication Code for the Network Time Protocol

πŸ“… published June 2019, from ietf

Internet Engineering Task Force (IETF) πŸ’…βœ¨

Okay bestie, let's get into it. πŸŽ€

Title block, the highlights 🫢

  • RFC: 8573 🌸
  • Title: Message Authentication Code for the Network Time Protocol πŸ¦‹
  • Authors: A. Malhotra and S. Goldberg, both from Boston University πŸŽ“
  • Category: Standards Track (this one's official, it's a real standard!) πŸ‘‘
  • Date: June 2019 πŸ“…
  • Updates: RFC 5905 (NTP), so this doc tweaks it πŸ’œ
  • Obsoletes: nothing, so no glow-up needed on that front πŸ™ˆ

Abstract ✨

Okay so NTP, which is defined in RFC 5905, says NTP packets should be authenticated by sticking the NTP data onto a 128-bit key and then hashing it with MD5 to get a 128-bit tag. πŸ™ˆ MD5 is considered way too weak now, so this document deprecates MD5-based authentication and recommends AES-CMAC from RFC 4493 as the replacement. πŸ”₯ Major glow-up energy πŸ’–

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). More info on Internet Standards is in Section 2 of RFC 7841. πŸ¦‹

Info about the current status, any errata, and how to send feedback lives at https://www.rfc-editor.org/info/rfc8573. 🌈

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

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 read these carefully, bestie, because they explain your rights and restrictions for 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. βš–οΈπŸ’–

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 🌸

So the Network Time Protocol [RFC5905] says NTP packets should be authenticated by appending NTP data to a 128-bit key and hashing the result with MD5 to get a 128-bit tag. πŸ™ˆ This document deprecates MD5-based authentication because it's too weak, and it recommends AES-CMAC [RFC4493] as the replacement. πŸ¦‹

1.1. Requirements Language πŸ’…

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. πŸŽ€

2. Deprecating the Use of MD5 πŸ’–

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

3. Replacement Recommendation πŸ‘‘

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 MUST be at least 128 bits in length, as stated in Section 2.4 of RFC 4493 [RFC4493]. NTP makes this transition possible because it supports algorithm agility, as described in Section 2.1 of RFC 7696 [RFC7696]. πŸ”₯

The hosts that want 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. 🌈

4. Motivation πŸ¦‹

AES-CMAC is RECOMMENDED for the following reasons: πŸ’œ

  1. It is an IETF specification that is supported in many open source implementations. 🫢
  2. It is immune to nonce-reuse vulnerabilities (e.g., [Joux]) because it does not use a nonce. πŸ™ˆ
  3. It has fine performance in terms of latency and throughput. ✨
  4. It benefits from native hardware support, for instance, Intel's New Instruction set GUE [GUE]. 🧚

5. Test Vectors πŸŽ€

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

6. IANA Considerations 🌸

This document has no IANA actions. πŸ¦‹

7. Security Considerations 😭

Refer to Appendices A, B, and C of the NIST document [NIST] for a recommendation on the CMAC mode of authentication. See the Security Considerations of RFC 4493 [RFC4493] for discussion of the security guarantees of AES-CMAC. This part is serious, bestie, so go read those. πŸ’€πŸ’–

8. References πŸ’œ

8.1. Normative References ✨

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

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

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

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

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

8.2. Informative References 🧚

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

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

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

[RFC1321]  Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
           DOI 10.17487/RFC1321, April 1992,
           <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>.

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

Acknowledgements 🫢

The authors wish to acknowledge useful discussions with Leen Alshenibr, Daniel Franke, Ethan Heilman, Kenny Paterson, Leonid Reyzin, Harlan Stenn, and Mayank Varia. πŸ’–βœ¨

Authors' Addresses πŸŽ€

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

Email: aanchal4@bu.edu

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

Email: goldbe@cs.bu.edu 🌈

πŸ“¦ where this page comes from