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
Malhotra & Goldberg Standards Track [Page 1]
RFC 8573 MAC for NTP June 2019
Table of Contents
1. Introduction
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.
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 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.
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 as it supports algorithm agility as described in Section 2.1 of RFC 7696 [RFC7696].
Malhotra & Goldberg Standards Track [Page 2]
RFC 8573 MAC for NTP June 2019
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.
4. Motivation
AES-CMAC is recommended for the following reasons:
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 for the CMAC mode of authentication; see the Security Considerations of RFC 4493 [RFC4493] for discussion on security guarantees of AES-CMAC.
Malhotra & Goldberg Standards Track [Page 3]
RFC 8573 MAC for NTP June 2019 8. References 8.1. Normative References[NIST] Dworkin, M., "Recommendation for Block Cipher Modes of
8.2. Informative References
[BCK] Bellare, M., Canetti, R., and H. Krawczyk, "Keying Hash
Malhotra & Goldberg Standards Track [Page 4]
RFC 8573 MAC for NTP June 2019
[RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,