idnits 2.17.1 draft-sibold-autokey-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC5906]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 23, 2013) is 4080 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 6277 (Obsoleted by RFC 6960) == Outdated reference: A later version (-12) exists of draft-ietf-tictoc-security-requirements-04 Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NTP Working Group D. Sibold 3 Internet-Draft PTB 4 Intended status: Standards Track S. Roettger 5 Expires: August 25, 2013 TU-BS 6 February 23, 2013 8 Network Time Protocol: autokey Version 2 Specification 9 draft-sibold-autokey-02 11 Abstract 13 This document describes a security protocol that enables 14 authenticated time synchronization using Network Time Protocol (NTP). 15 Autokey Version 2 obsoletes NTP autokey protocol RFC 5906 [RFC5906] 16 which suffers from various security vulnerabilities. Its design 17 considers the special requirements that are related to the task of 18 precise timekeeping. 20 Requirements Language 22 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 23 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 24 document are to be interpreted as described in RFC 2119 [RFC2119]. 26 Status of this Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on August 25, 2013. 43 Copyright Notice 45 Copyright (c) 2013 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents (http://trustee.ietf.org/ 50 license-info) in effect on the date of publication of this document. 51 Please review these documents carefully, as they describe your rights 52 and restrictions with respect to this document. Code Components 53 extracted from this document must include Simplified BSD License text 54 as described in Section 4.e of the Trust Legal Provisions and are 55 provided without warranty as described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 60 1.1. Differences from the original autokey . . . . . . . . . . 3 61 2. Security Threats . . . . . . . . . . . . . . . . . . . . . . . 3 62 3. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . 3 63 4. Terms and abbreviations . . . . . . . . . . . . . . . . . . . 4 64 5. Autokey Overview . . . . . . . . . . . . . . . . . . . . . . . 4 65 5.1. Symmetric and Client/Server Mode . . . . . . . . . . . . . 4 66 5.2. Broadcast Mode . . . . . . . . . . . . . . . . . . . . . . 4 67 6. Protocol Sequence . . . . . . . . . . . . . . . . . . . . . . 5 68 6.1. Association Message . . . . . . . . . . . . . . . . . . . 5 69 6.2. Certificate Message . . . . . . . . . . . . . . . . . . . 5 70 6.3. Cookie Message . . . . . . . . . . . . . . . . . . . . . . 6 71 6.4. Broadcast Parameter Message . . . . . . . . . . . . . . . 6 72 6.5. Time Request Message . . . . . . . . . . . . . . . . . . . 6 73 6.6. Broadcast Message . . . . . . . . . . . . . . . . . . . . 6 74 7. Hash algorithms and MAC generation . . . . . . . . . . . . . . 7 75 7.1. Hash algorithms . . . . . . . . . . . . . . . . . . . . . 7 76 7.2. MAC Calculation . . . . . . . . . . . . . . . . . . . . . 7 77 8. Server Seed Considerations . . . . . . . . . . . . . . . . . . 8 78 8.1. Server Seed algorithm . . . . . . . . . . . . . . . . . . 8 79 8.2. Server Seed Live Time . . . . . . . . . . . . . . . . . . 8 80 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 81 10. Security Considerations . . . . . . . . . . . . . . . . . . . 8 82 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 8 83 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8 84 12.1. Normative References . . . . . . . . . . . . . . . . . . 8 85 12.2. Informative References . . . . . . . . . . . . . . . . . 9 86 Appendix A. TICTOC Security Requirements . . . . . . . . . . . . . 9 87 Appendix B. Broadcast Mode . . . . . . . . . . . . . . . . . . . . 10 88 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 10 90 1. Introduction 92 In NTP [RFC5905] the autokey protocol [RFC5906] was introduced to 93 provide authenticity to NTP servers and to ensure integrity of time 94 synchronization. It is designed to meet the specific communication 95 requirements of precise timekeeping and therefore does not compromise 96 timekeeping precision. 98 This document focuses on a new definition of the autokey protocol for 99 NTP, autokey version 2. The necessity to renew the autokey 100 specification arises from various severe security vulnerabilities 101 that have been found in a thorough analysis of the protocol 102 [Roettger]. The new specification is based on the same assumptions 103 as the original autokey specification. In particular, the 104 prerequisite is that precise timekeeping can only be accomplished 105 with stateless time synchronization communication, which excludes 106 standard security protocols like IPSec or TLS. This prerequisite 107 corresponds with the requirement that a security mechanism for 108 timekeeping must be designed in such a way that it does not degrade 109 the quality of the time transfer [I-D.ietf-tictoc-security- 110 requirements]. 112 1.1. Differences from the original autokey 114 Autokey version 2 is a major redraft of the original autokey 115 specification. It is intended to mitigate security vulnerabilities 116 of the original specification and it is based on the suggestions in 117 the analysis of Roettger [Roettger]. The major changes are: 119 o The bit length of server seed and cookie has been increased. 121 o The IP addresses of the synchronization partners in the 122 calculation of the cookie have been replaced by the hash value of 123 the client's public key. 125 o The identity schemes for the verification of the NTP server 126 authenticity have been replaced by a hierarchical public key 127 infrastructure (PKI) based on X.509 certificates. 129 2. Security Threats 131 A profound analysis of security threats and requirements for NTP and 132 Precision Time Protocol (PTP) can be found in the I-D [I-D.ietf- 133 tictoc-security-requirements]. 135 3. Objectives 137 The objectives of the autokey specifications are as follows: 139 o Authenticity: Autokey enables the client to authenticate its NTP 140 server or peer. 142 o Integrity: Autokey protects the integrity of time synchronization 143 packets via a message authentication code (MAC). 145 o Confidentiality: Autokey does not provide confidentiality 146 protection of the NTP packets. 148 o Modes of operation: All operational modes of NTP are supported 149 (client server, symmetric, broadcast). 151 o Hybrid mode: Both secure and insecure communication modes are 152 possible for NTP servers and clients, respectively. 154 o Compatibility: 156 * Interoperation with autokey version 1 is not given. 158 * NTP associations without authentication shall not be affected. 160 * An NTP server that does not support autokey version 2 shall not 161 be affected by autokey version 2 authentication requests. 163 4. Terms and abbreviations 165 o Throughout this document the term "autokey" refers to autokey 166 version 2. 168 o TESLA: Time efficient stream loss-tolerant authentication 170 5. Autokey Overview 172 5.1. Symmetric and Client/Server Mode 174 Authenticity and integrity of the NTP packets are ensured by a 175 Message Authentication Code (MAC), which is attached to the NTP 176 packet. The calculation of the MAC includes the whole NTP packet and 177 the cookie which is shared between client and server. It is 178 calculated according to: 180 cookie = MSB_128 (H(server seed || H(public key of client))), 182 where || indicates concatenation and in which H is a hash algorithm. 183 The function MSB_128 cuts off the 128 most significant bits of the 184 result of the hash function. The server seed is a 128 bit random 185 value of the server, which has to be kept secret. The cookie thus 186 never changes. The server seed has to be refreshed periodically. 187 The server does not keep a state of the client. Therefore it has to 188 recalculate the cookie each time it receives a request from the 189 client. To this end, the client has to attach the hash value of its 190 public key to each request (see Section 6.5). 192 5.2. Broadcast Mode 193 Just as in the case of the client server mode and symmetric mode, 194 authenticity and integrity of the NTP packets are ensured by a MAC, 195 which is attached to the NTP packet by the sender. The verification 196 of the authenticity is based on the TESLA protocol [RFC4082]. TESLA 197 is based on a one-way chain of keys, where each key is the output of 198 a one-way function applied on the previous key in the chain. The 199 last element of the chain is shared securely with all clients. The 200 server splits time into intervals of uniform duration and assigns 201 each key to an interval in reverse order, starting with the 202 penultimate. At each time interval, the server sends an NTP 203 broadcast packet appended by a MAC, calculated using the 204 corresponding key, and the key of the previous interval. The client 205 verifies the MAC by buffering the packet until the disclosure of the 206 key in the next interval. In order to be able to verify the validity 207 of the key, the client has to be loosely time synchronized to the 208 server. This has to be accomplished during the initial client server 209 exchange between broadcast client and server. 211 6. Protocol Sequence 213 6.1. Association Message 215 The protocol sequence starts with the association message, in which 216 the client sends an NTP packet with an extension field of type 217 association. It contains the hostname of the client and a status 218 word which contains the algorithms used for the signatures and the 219 status of the connection. The response contains the hostname of the 220 server and the algorithms for the signatures. The server notifies 221 the cryptographic hash algorithms which it supports. 223 6.2. Certificate Message 225 In this step, the client receives the certification chain up to the 226 trusted authority (TA). To this end, the client requests the 227 certificate for the subject name (hostname) of the NTP server. The 228 response contains the certificate with the issuer name. If the 229 issuer name is different from the subject name, the client requests 230 the certificate for the issuer. This continues until it receives a 231 certificate which is issued by a TA. The client recognizes the TA 232 because it has a list of certificates which are accepted as TAs. The 233 client has to check that each issuer is authorized to issue new 234 certificates. To this end, the certificates have to include the 235 X.509v3 extension field "CA:TRUE". With the established 236 certification chain the client is able to verify the server 237 signatures and, hence, the authenticity of the server messages with 238 extension fields is ensured. 240 Discussion: 242 Note that in this step the client validate the authenticity of its 243 NTP-server only. It does not recursively validate the 244 authenticity of each NTP server on the time synchronization chain. 245 But each NTP server on the time synchronization chain validates 246 the NTP server to which it is synchronized. This conforms to the 247 recursive authentication requirement in the TICTOC security 248 requirements [I-D.ietf-tictoc-security-requirements]. 250 6.3. Cookie Message 252 The client requests a cookie from the server. It selects a hash 253 algorithm from the list of algorithms supported by the server. The 254 request includes its public key and the selected hash algorithm. The 255 hash of the public key is used by the server to calculate the cookie 256 (see Section 5.1). The response of the server contains the cookie 257 encrypted with the public key. 259 6.4. Broadcast Parameter Message 261 In the broadcast mode the client requests the following information 262 from the server: 264 o the last key of the one-way key chain, 266 o the disclosure schedule of the following keys. This contains: 268 * time interval duration, time at which the next time interval 269 will start and its associated index, 271 * key disclosure delay (number of time intervals for which a key 272 is valid). 274 The server will sign all transmitted properties so that the client is 275 able to verify their authenticity. For this packet exchange a new 276 extension field "broadcast parameters" is used. The client 277 synchronizes its time with the server in the client server mode and 278 saves an upper bound of its time offset with respect to the time of 279 the server. See Appendix B for more details. 281 6.5. Time Request Message 283 The client request includes a new extension field "time request" 284 which contains the hash of its public key. The server needs the hash 285 of the public key to recalculate the cookie for the client. The 286 response is a normal NTP packet without extension field. It contains 287 a MAC. 289 6.6. Broadcast Message 290 The NTP broadcast packet includes a new extension field "broadcast 291 message" which contains the disclosed key of the previous disclosure 292 interval (current time interval minus disclosure delay). The NTP 293 packet is appended by a MAC, calculated with the key for the current 294 time interval. When a client receives a broadcast message it has to 295 perform the following tests: 297 o Proof that the MAC is based on a key that is not yet disclosed. 298 If verified the packet will be buffered for later authentication 299 otherwise it has to be discarded. 301 o The client checks whether it already knows the disclosed key. If 302 not, the client verifies its legitimacy. If falsified the packet 303 has to be discarded. 305 o If the disclosed key is legitimate the client verifies the 306 authenticity of any packet that it received during the 307 corresponding time interval. If authenticity of a packet is 308 verified it is released from the buffer. If the verification 309 fails authenticity is no longer given. In this case the client 310 MUST request authentic time from the server by means of a unicast 311 time request message. 313 See Appendix B or [RFC4082] for a detailed description of the packet 314 verification process. 316 7. Hash algorithms and MAC generation 318 7.1. Hash algorithms 320 Hash algorithms are used at different points: calculation of the 321 cookie and the MAC, and hashing of the public key. The client 322 selects the hash algorithm from the list of hash algorithms which are 323 supported by the server. This list is notified during the 324 association message exchange (Section 6.1). The selected algorithm is 325 used for all hashing processes in the protocol. 327 In the broadcast mode hash algorithm are used as pseudo random 328 function to construct the one-way key chain. 330 The list of the server supported hash algorithms has to fulfill 331 following requirements: 333 o it MUST NOT contain the MD5 or weaker algorithms, 335 o it MUST include SHA-256 or stronger algorithms. 337 7.2. MAC Calculation 339 For the calculation of the MAC client and server are using a Keyed- 340 Hash Message Authentication Code (HMAC) approach [RFC2104]. The HMAC 341 is generated with the hash algorithm specified by the client (see 342 Section 7.1). 344 8. Server Seed Considerations 346 The server has to calculate a random seed which has to be kept secret 347 and which has to be changed periodically. The server has to generate 348 a seed for each supported hash algorithm. 350 8.1. Server Seed algorithm 352 8.2. Server Seed Live Time 354 9. IANA Considerations 356 This document makes no request of IANA. 358 Note to RFC Editor: this section may be removed on publication as an 359 RFC. 361 10. Security Considerations 363 The client has to verify the validity of the certificates during the 364 certification message exchange (Section 6.2). Since it generally has 365 no reliable time during this initial communication phase, it is 366 impossible to verify the period of validity of the certificates. 367 Therefore, the client MUST use one of the following approaches: 369 o The validity of the certificates is preconditioned. Usually this 370 will be the case in corporation networks. 372 o The client ensures that the certificates are not revoked. To this 373 end, the client uses the Online Certificate Status Protocol (OCSP) 374 defined in [RFC6277]. 376 o The client requests a different service to get an initial time 377 stamp in order to be able to verify the certificates' periods of 378 validity. To this end, it can, e.g., use a secure shell 379 connection to a reliable host. Another alternative is to request 380 a time stamp from a Time Stamping Authority (TSA) by means of the 381 Time-Stamp Protocol (TSP) defined in [RFC3161]. 383 11. Acknowledgements 385 12. References 387 12.1. Normative References 389 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 390 Requirement Levels", BCP 14, RFC 2119, March 1997. 392 [RFC3161] Adams, C., Cain, P., Pinkas, D. and R. Zuccherato, 393 "Internet X.509 Public Key Infrastructure Time-Stamp 394 Protocol (TSP)", RFC 3161, August 2001. 396 [RFC6277] Santesson, S. and P. Hallam-Baker, "Online Certificate 397 Status Protocol Algorithm Agility", RFC 6277, June 2011. 399 12.2. Informative References 401 [I-D.ietf-tictoc-security-requirements] 402 Mizrahi, T., "Security Requirements of Time 403 Synchronization Protocols in Packet Switched Networks", 404 Internet-Draft draft-ietf-tictoc-security-requirements-04, 405 February 2013. 407 [RFC2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed- 408 Hashing for Message Authentication", RFC 2104, February 409 1997. 411 [RFC4082] Perrig, A., Song, D., Canetti, R., Tygar, J.D. and B. 412 Briscoe, "Timed Efficient Stream Loss-Tolerant 413 Authentication (TESLA): Multicast Source Authentication 414 Transform Introduction", RFC 4082, June 2005. 416 [RFC5905] Mills, D., Martin, J., Burbank, J. and W. Kasch, "Network 417 Time Protocol Version 4: Protocol and Algorithms 418 Specification", RFC 5905, June 2010. 420 [RFC5906] Haberman, B. and D. Mills, "Network Time Protocol Version 421 4: Autokey Specification", RFC 5906, June 2010. 423 [Roettger] 424 Roettger, S., "Analysis of the NTP Autokey Procedures", 425 February 2012. 427 Appendix A. TICTOC Security Requirements 429 The following table compares the autokey specifications against the 430 TICTOC security requirements [I-D.ietf-tictoc-security-requirements]. 432 +----------+------------------------------+---------------+---------+ 433 | Section | Requirement from I-D tictoc | Requirement | Autokey | 434 | | security-requirements-04 | level | V2 | 435 +----------+------------------------------+---------------+---------+ 436 | 5.1 | Clock Identity | MUST | OK | 437 | | Authentication and | | | 438 | | Authorization | | | 439 | 5.1.1 | Authentication and | MUST | OK | 440 | | Authorization of Masters | | | 441 | 5.1.2 | Recursive Authentication and | MUST | OK | 442 | | Authorization of Masters | | | 443 | | (Chain of Trust) | | | 444 | 5.1.3 | Authentication and | MAY | - | 445 | | Authorization of Slaves | | | 446 | 5.2 | Integrity protection. | MUST | OK | 447 | 5.3 | Protection against DoS | SHOULD | - | 448 | | attacks | | | 449 | 5.4 | Replay protection | MUST | OK | 450 | | | | (NTP) | 451 | 5.5.1 | Key freshness. | MUST | OK | 452 | 5.5.2 | Security association. | SHOULD | OK | 453 | 5.5.3 | Unicast and multicast | SHOULD | OK | 454 | | associations. | | | 455 | 5.6 | Performance: no degradation | MUST | OK | 456 | | in quality of time transfer. | | | 457 | | Performance: lightweight | SHOULD | OK | 458 | | computation | | | 459 | | Performance: storage, | SHOULD | OK | 460 | | bandwidth | | | 461 | 5.7 | Confidentiality protection | MAY | - | 462 | 5.8 | Protection against Packet | SHOULD | - | 463 | | Delay and Interception | | | 464 | | Attacks | | | 465 | 5.9.1 | Secure mode | MUST | OK | 466 | | | | (NTP) | 467 | 5.9.2 | Hybrid mode | MAY | OK | 468 | | | | (NTP) | 469 +----------+------------------------------+---------------+---------+ 471 Comparison between TICTOC security requirements and autokey. 473 Appendix B. Broadcast Mode 475 Authors' Addresses 477 Dieter Sibold 478 Physikalisch-Technische Bundesanstalt 479 Bundesallee 100 480 Braunschweig, D-38116 481 Germany 483 Phone: +49-(0)531-592-8420 484 Email: dieter.sibold@ptb.de 485 Stephen Roettger 486 Technische Universitaet Braunschweig 488 Email: stephen.roettger@googlemail.com