This article describes how to utilise the NTP security features to authenticate time references when synchronizing network time clients to a NTP server.
This article describes how to utilise the Network Time Protocol authentication features to authenticate time references when synchronizing clients to a NTP server.
NTP Server SecurityNetwork Time Protocol is used to provide a precise time reference for time critical applications. Therefore, NTP can pose a security risk if malicious users attempt to corrupt a NTP timestamp to create a false time on network equipment.
NTP provides increased security in the form of authentication. Authentication is intended to overcome security risks by ensuring that any response received from an NTP time server has come from the intended reference. The client sends a request for time to a NTP server. The server then responds to the client with a precise timestamp along with one of a number of agreed encrypted keys. On receipt of the timestamp, the client un-encrypts the key and verifies it against a list of trusted keys. The client can then be sure that the received timestamp was indeed transmitted from the intended time reference. NTP utilises MD5 encryption (Message Digest Encryption 5), which is a 128-bit cryptographic hash function, which outputs a fingerprint of the key. MD5 is a highly secure encryption algorithm, widely used on the internet for authentication and security purposes.
NTP Authentication KeysNTP authentication keys are codes that are encrypted on both the server and client that are used to identify the NTP time server. NTP authentication keys are stored in a file usually called ‘ntp.keys'. Each authentication key consists of a key number, an encryption code and the key itself.
E.g. NTP server keys:
2 M VisioN5 M SeRvEr7 M TiMeLy10 M MYKEY12 M TiDy14 M MaGicThe authenication key number acts as a reference to the specified authentication key. The encryption code specifies the type of encryption to be utilised, e.g. ‘M' for MD5 encryption. The actual keys must be identical on both the client and the NTP time server. The client may utilise a sub-set of the authentication keys specified on the NTP Server. The keys are case sensitive.
E.g. client keys:
5 M SeRvEr7 M TiMeLy10 M MYKEY14 M MaGicTrusted Authentication KeysTrusted authentication keys are specified in the NTP server configuration file, ‘ntp.conf'. Trusted keys specify which subset of keys are currently activeand can be used by the NTP server. This allows a sub-set of trusted keys to be selected from a potentially large keys file. The trusted keys specifier allows key references to be changed easily without editing the keys file. Trusted keys are selected using the ‘trusted-keys' configuration command.
E.g.trusted-keys 7 10 14This specifies that authentication keys with the key references of 7, 10 and 14 are trusted and can be used by the NTP installation.
NTP Security SummaryEssentially, authentication is used by the client to authenticate that the NTP server is who he says he is, and that no rogue server intervenes. The key is encrypted and sent to the client by the server where it is unencrypted and checked against the client keys to ensure a match. Authenication provides NTP with a high level of security to prevent malicous tampering of timestamp information.
Why Does My Organisation Need a NTP Time Server?
This article attempts to clearly and simply describe what a NTP server is and why it is an essential part of a modern computer network infrastructure.Network Time Synchronisation using GPS
This article describes the components required to utilise GPS for computer timing applications. It also discusses how the GPS system can be used for computer network timing by using the Network Time Protocol (NTP) and NTP time servers.Installing a Radio Referenced NTP Server
Many networks in organisations suffer from a lack of time synchronisation between servers, workstations and other network components. This can lead to problems processing time critical information and transactions. However, a solution has been available for many years in the form of NTP.