idnits 2.17.1 draft-ietf-ntp-network-time-security-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 ([I-D.ietf-tictoc-security-requirements]), 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 14, 2014) is 3724 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) -- Looks like a reference, but probably isn't: '1' on line 650 -- Possible downref: Non-RFC (?) normative reference: ref. 'IEEE1588' ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Downref: Normative reference to an Informational RFC: RFC 4082 ** Downref: Normative reference to an Informational RFC: RFC 5906 ** Obsolete normative reference: RFC 6277 (Obsoleted by RFC 6960) == Outdated reference: A later version (-12) exists of draft-ietf-tictoc-security-requirements-05 Summary: 5 errors (**), 0 flaws (~~), 2 warnings (==), 3 comments (--). 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 18, 2014 6 K. Teichel 7 PTB 8 February 14, 2014 10 Network Time Security 11 draft-ietf-ntp-network-time-security-02.txt 13 Abstract 15 This document describes the Network Time Security (NTS) protocol that 16 enables secure authentication of time servers using Network Time 17 Protocol (NTP) or Precision Time Protocol (PTP). Its design 18 considers the special requirements of precise timekeeping, which are 19 described in Security Requirements of Time Protocols in Packet 20 Switched Networks [I-D.ietf-tictoc-security-requirements]. 22 Requirements Language 24 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 25 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 26 document are to be interpreted as described in RFC 2119 [RFC2119]. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at http://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on August 18, 2014. 45 Copyright Notice 47 Copyright (c) 2014 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (http://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 63 2. Security Threats . . . . . . . . . . . . . . . . . . . . . . 4 64 3. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 4 65 4. Terms and Abbreviations . . . . . . . . . . . . . . . . . . . 4 66 5. NTS Overview . . . . . . . . . . . . . . . . . . . . . . . . 5 67 5.1. Symmetric and Client/Server Mode . . . . . . . . . . . . 5 68 5.2. Broadcast Mode . . . . . . . . . . . . . . . . . . . . . 5 69 6. Protocol Messages . . . . . . . . . . . . . . . . . . . . . . 6 70 6.1. Association Messages . . . . . . . . . . . . . . . . . . 6 71 6.1.1. Message type: "client_assoc" . . . . . . . . . . . . 6 72 6.1.2. Message type: "server_assoc" . . . . . . . . . . . . 6 73 6.2. Certificate Messages . . . . . . . . . . . . . . . . . . 7 74 6.2.1. Message type: "client_cert" . . . . . . . . . . . . . 7 75 6.2.2. Message type: "server_cert" . . . . . . . . . . . . . 7 76 6.3. Cookie Messages . . . . . . . . . . . . . . . . . . . . . 8 77 6.3.1. Message type: "client_cook" . . . . . . . . . . . . . 8 78 6.3.2. Message type: "server_cook" . . . . . . . . . . . . . 8 79 6.4. Unicast Time Synchronisation Messages . . . . . . . . . . 8 80 6.4.1. Message type: "time_request" . . . . . . . . . . . . 9 81 6.4.2. Message type: "time_response" . . . . . . . . . . . . 9 82 6.5. Broadcast Parameter Messages . . . . . . . . . . . . . . 9 83 6.5.1. Message type: "client_bpar" . . . . . . . . . . . . . 10 84 6.5.2. Message type: "server_bpar" . . . . . . . . . . . . . 10 85 6.6. Broadcast Message . . . . . . . . . . . . . . . . . . . . 10 86 6.6.1. Message type: "server_broad" . . . . . . . . . . . . 11 87 7. Protocol Sequence . . . . . . . . . . . . . . . . . . . . . . 11 88 7.1. The client . . . . . . . . . . . . . . . . . . . . . . . 11 89 7.1.1. The client in unicast mode . . . . . . . . . . . . . 11 90 7.1.2. The client in broadcast mode . . . . . . . . . . . . 12 91 7.2. The server . . . . . . . . . . . . . . . . . . . . . . . 13 92 7.2.1. The server in unicast mode . . . . . . . . . . . . . 13 93 7.2.2. The server in broadcast mode . . . . . . . . . . . . 14 94 7.3. Server Seed Refresh . . . . . . . . . . . . . . . . . . . 14 95 8. Hash Algorithms and MAC Generation . . . . . . . . . . . . . 15 96 8.1. Hash Algorithms . . . . . . . . . . . . . . . . . . . . . 15 97 8.2. MAC Calculation . . . . . . . . . . . . . . . . . . . . . 15 99 9. Server Seed Considerations . . . . . . . . . . . . . . . . . 15 100 9.1. Server Seed Algorithm . . . . . . . . . . . . . . . . . . 16 101 9.2. Server Seed Live Time . . . . . . . . . . . . . . . . . . 16 102 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 103 11. Security Considerations . . . . . . . . . . . . . . . . . . . 16 104 11.1. Initial Verification of the Server Certificates . . . . 16 105 11.2. Revocation of Server Certificates . . . . . . . . . . . 16 106 11.3. Usage of NTP Pools . . . . . . . . . . . . . . . . . . . 17 107 11.4. Denial-of-Service in Broadcast Mode . . . . . . . . . . 17 108 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 17 109 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 110 13.1. Normative References . . . . . . . . . . . . . . . . . . 17 111 13.2. Informative References . . . . . . . . . . . . . . . . . 18 112 Appendix A. Flow Diagrams of Client Behaviour . . . . . . . . . 18 113 Appendix B. Extension fields . . . . . . . . . . . . . . . . . . 20 114 Appendix C. TICTOC Security Requirements . . . . . . . . . . . . 21 115 Appendix D. Broadcast Mode . . . . . . . . . . . . . . . . . . . 22 116 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 118 1. Introduction 120 Time synchronization protocols are utilized more and more to 121 synchronize clocks in networked infrastructures. The reliable 122 performance of such infrastructures can be degraded seriously by 123 successful attacks against the time synchronization protocol. 124 Therefore, time synchronization protocols applied in critical 125 infrastructures have to provide security measures to defeat possible 126 adversaries. Consequently, the widespread Network Time Protocol 127 (NTP) [RFC5905] was supplemented by the autokey protocol [RFC5906] 128 which shall ensure authenticity of the NTP server and integrity of 129 the protocol packets. Unfortunately, the autokey protocol exhibits 130 various severe security vulnerabilities as revealed in a thorough 131 analysis of the protocol [Roettger]. For the Precision Time Protocol 132 (PTP), Annex K of the standard document IEEE 1588 [IEEE1588] defines 133 an informative security protocol that is still in experimental state. 135 Because of autokey's security vulnerabilities and the absence of a 136 standardized security protocol for PTP, these protocols cannot be 137 applied in environments in which compliance requirements demand 138 authenticity and integrity protection. This document specifies a 139 security protocol which ensures authenticity of the time server via a 140 Public Key Infrastructure (PKI) and integrity of the time 141 synchronization protocol packets and which therefore enables the 142 usage of NTP and PTP in such environments. 144 The protocol is specified with the prerequisite in mind that precise 145 timekeeping can only be accomplished with stateless time 146 synchronization communication, which excludes the utilization of 147 standard security protocols like IPsec or TLS for time 148 synchronization messages. This prerequisite corresponds with the 149 requirement that a security mechanism for timekeeping must be 150 designed in such a way that it does not degrade the quality of the 151 time transfer [I-D.ietf-tictoc-security-requirements]. 153 Note: 155 The intent is to formulate the protocol to be applicable to NTP as 156 well as PTP. In the current state the draft focuses on the 157 application to NTP. 159 2. Security Threats 161 A profound analysis of security threats and requirements for NTP and 162 PTP can be found in the I-D [I-D.ietf-tictoc-security-requirements]. 164 3. Objectives 166 The objectives of the NTS specifications are as follows: 168 o Authenticity: NTS enables the client to authenticate its time 169 server. 171 o Integrity: NTS protects the integrity of time synchronization 172 protocol packets via a message authentication code (MAC). 174 o Confidentiality: NTS does not provide confidentiality protection 175 of the time synchronization packets. 177 o Modes of operation: All operational modes of NTP are supported. 179 o Operational modes of PTP should be supported as far as possible. 181 o Hybrid mode: Both secure and insecure communication modes are 182 possible for NTP servers and clients, respectively. 184 o Compatibility: 186 * Unsecured NTP associations shall not be affected. 188 * An NTP server that does not support NTS shall not be affected 189 by NTS authentication requests. 191 4. Terms and Abbreviations 193 o TESLA: Timed Efficient Stream Loss-Tolerant Authentication 195 5. NTS Overview 197 5.1. Symmetric and Client/Server Mode 199 Authenticity of the time server is verified once by utilization of 200 X.509 certificates. Authenticity and integrity of the NTP packets 201 are then ensured by a Message Authentication Code (MAC), which is 202 attached to the NTP packet. The calculation of the MAC includes the 203 whole NTP packet and the cookie which is shared between client and 204 server. It is calculated according to: 206 cookie = MSB_128 (HMAC(server seed, public key of client)), 208 with the server seed as key, and where the function MSB_128 cuts off 209 the 128 most significant bits of the result of the HMAC function. 210 The server seed is a 128 bit random value of the server, which has to 211 be kept secret. The cookie thus never changes as long as the server 212 seed stays the same. The server seed has to be refreshed 213 periodically in order to provide key freshness as required in 214 [I-D.ietf-tictoc-security-requirements]. The server does not keep a 215 state of the client. Therefore it has to recalculate the cookie each 216 time it receives a request from the client. To this end, the client 217 has to attach the hash value of its public key to each request (see 218 Section 6.4). 220 5.2. Broadcast Mode 222 Just as in the case of the client server mode and symmetric mode, 223 authenticity and integrity of the NTP packets are ensured by a MAC, 224 which is attached to the NTP packet by the sender. The verification 225 of the authenticity is based on the TESLA protocol, in particular on 226 its "Not Re-using Keys" scheme, see section 3.7.2 of [RFC4082]. 227 TESLA is based on a one-way chain of keys, where each key is the 228 output of a one-way function applied on the previous key in the 229 chain. The last element of the chain is shared securely with all 230 clients. The server splits time into intervals of uniform duration 231 and assigns each key to an interval in reverse order, starting with 232 the penultimate. At each time interval, the server sends an NTP 233 broadcast packet appended by a MAC, calculated using the 234 corresponding key, and the key of the previous disclosure interval. 235 The client verifies the MAC by buffering the packet until the 236 disclosure of the key in its associated disclosure interval. In 237 order to be able to verify the validity of the key, the client has to 238 be loosely time synchronized to the server. This has to be 239 accomplished during the initial client server exchange between 240 broadcast client and server. For a more detailed description of the 241 TESLA protocol see Appendix D. 243 6. Protocol Messages 245 Note that this section currently describes realization of the message 246 format of NTS only for its utilization for NTP, in which the NTS 247 specific data are enclosed in extension fields on top of NTP packets. 248 A specification of NTS messages for PTP would have to be developed 249 accordingly. 251 The steps described in Section 6.1 - Section 6.4 belong to the 252 unicast mode, while Section 6.5 and Section 6.6 explain the steps 253 involved in the broadcast mode of NTS. 255 6.1. Association Messages 257 In this step, the hash and signature algorithms that are used for the 258 rest of the protocol are negotiated. 260 6.1.1. Message type: "client_assoc" 262 The protocol sequence starts with the client sending an association 263 message, called client_assoc. This message contains 265 o the version number of NTS that the client wants to use (this 266 SHOULD be the highest version number that it supports), 268 o the hostname of the client, 270 o a selection of hash algorithms, and 272 o a selection of accepted algorithms for the signatures. 274 For NTP, this message is realized as a packet with an extension field 275 of type "association", which contains all this data. 277 6.1.2. Message type: "server_assoc" 279 This message is sent by the server upon receipt of client_assoc. It 280 contains 282 o the version number used for the rest of the protocol (which SHOULD 283 be determined as the minimum over the client's suggestion in the 284 client_assoc and the highest supported by the server), 286 o the hostname of the server, and 288 o the server's choice of algorithm for the signatures and 289 cryptographic hash algorithm, both of which MUST be chosen from 290 the client's proposals. 292 In the case of NTP, the data is enclosed in a packet's extension 293 field, also of type "association". 295 6.2. Certificate Messages 297 In this step, the client receives the certification chain up to a 298 trusted anchor. With the established certification chain the client 299 is able to verify the server signatures and, hence, the authenticity 300 of the server messages with extension fields is ensured. 302 Discussion: 304 Note that in this step the client validates the authenticity of 305 its immediate NTP server only. It does not recursively validate 306 the authenticity of each NTP server on the time synchronization 307 chain. Recursive authentication (and authorization) as formulated 308 in [I-D.ietf-tictoc-security-requirements] depends on the chosen 309 trust anchor. 311 6.2.1. Message type: "client_cert" 313 This message is sent by the client, after it successfully verified 314 the content of the received server_assoc message (see Section 7.1.1). 315 It contains 317 o the negotiated version number, 319 o the client's hostname, and 321 o the signature algorithm negotiated during the association 322 messages. 324 It is realized as an NTP packet with extension field of type 325 "certificate request" for the necessary data. 327 6.2.2. Message type: "server_cert" 329 This message is sent by the server, upon receipt of a client_cert 330 message, if the version number and choice of methods communicated in 331 that message are actually supported by the server. It contains 333 o all the information necessary to authenticate the server to the 334 client. This is a chain of certificates, which starts at the 335 server and goes up to a trusted authority, where each certificate 336 MUST be certified by the one directly following it. 338 This message is realized for NTP as a packet with extension field of 339 type "certificate" which holds the certification data. 341 6.3. Cookie Messages 343 During this step, the server transmits a secret cookie to the client 344 securely. The cookie will be used for integrity protection during 345 unicast time synchronization. 347 6.3.1. Message type: "client_cook" 349 This message is sent by the client, upon successful authentication of 350 the server. In this message, the client requests a cookie from the 351 server. It contains 353 o the negotiated version number, 355 o the hash algorithm H negotiated between client and server during 356 the association messages, 358 o the client's public key. 360 For NTP, an extension field of type "cookie request" holds the listed 361 data. 363 6.3.2. Message type: "server_cook" 365 This message is sent by the server, upon receipt of a client_cook 366 message. The hash of the client's public key, as included in 367 client_cook, is used by the server to calculate the cookie (see 368 Section 5.1). This message contains 370 o a concatenated pair, encrypted with the client's public key, where 371 the pair consists of 373 * the cookie, and 375 * a signature of the cookie signed with the server's private key. 377 In the case of NTP, this is a packet with an extension field of type 378 "cookie transmit". 380 6.4. Unicast Time Synchronisation Messages 382 In this step, the usual time synchronization process is executed, 383 with the addition of integrity protection for all messages that the 384 server sends. This step can be repeated as often as the client 385 desires and as long as the integrity of the server's time responses 386 is verified successfully. Secure time synchronization by repetition 387 of this step is the goal of a unicast run. 389 6.4.1. Message type: "time_request" 391 This message is sent by the client when it requests time exchange. 392 To send this message, the client MUST have received server_cook and 393 successfully verified the cookie via the server's signature. It 394 contains 396 o the negotiated version number, 398 o the time synchronization data that the client wants to transmit, 400 o a 128-bit nonce, 402 o the negotiated hash algorithm H, 404 o the hash of the client's public key under H. 406 It is realized as an NTP packet with the time synchronization data 407 and an additional extension field of type "time request" for the rest 408 of the information. 410 6.4.2. Message type: "time_response" 412 This message is sent by the server, after it received a time_request 413 message. The server uses the hash of the client's public key and the 414 transmitted hash algorithm to recalculate the cookie for the client. 415 This message contains 417 o the server's time synchronization response data, 419 o the nonce transmitted in time_request, 421 o a MAC (generated with the cookie as key) for verification of the 422 above. 424 It is realized as an NTP packet with the necessary time 425 synchronization data and with a new extension field of type "time 426 response". This packet has an appended MAC that is generated over 427 the time synchronization data and the extension field, with the 428 cookie as the key. 430 6.5. Broadcast Parameter Messages 432 In this step, the client receives the necessary information to 433 execute the TESLA protocol in a secured broadcast association. The 434 client can only initiate a secure broadcast association after a 435 successful unicast run, see Section 7.1.2. 437 See Appendix D for more details on TESLA. 439 6.5.1. Message type: "client_bpar" 441 This message is sent by the client in order to establish a secured 442 time broadcast association with the server. It contains 444 o the version number negotiated during association in unicast mode, 446 o the client's hostname, and 448 o the signature algorithm negotiated during unicast. 450 For NTP, this message is realized as a packet with an extension field 451 of type "broadcast request". 453 6.5.2. Message type: "server_bpar" 455 This message is sent by the server upon receipt of a client_bpar 456 message during the broadcast loop of the server. It contains 458 o the one-way function used for building the one-way key chain, 460 o the last key of the one-way key chain, and 462 o the disclosure schedule of the keys. This contains: 464 * time interval duration, 466 * the disclosure delay (number of intervals between use and 467 disclosure of a key), 469 * the time at which the next time interval will start, and 471 * the next interval's associated index. 473 o The message also contains a signature signed by the server with 474 its private key, verifying all the data listed above. 476 It is realized for NTP as a packet with an extension field of type 477 "broadcast parameters", which contains all the given data. 479 6.6. Broadcast Message 481 In this step, the server keeps sending broadcast time synchronization 482 messages to all participating clients. 484 6.6.1. Message type: "server_broad" 486 This message is sent by the server over the course of its broadcast 487 schedule. It is part of any broadcast association. It contains 489 o time broadcast data, 491 o the index that belongs to the current interval (and therefore 492 identifies the current, yet undisclosed key) 494 o the disclosed key of the previous disclosure interval (current 495 time interval minus disclosure delay). 497 o a MAC, calculated with the key for the current time interval, 498 verifying the time data 500 The message is realized as an NTP broadcast packet with the time 501 broadcast data and with an extension field of type "broadcast 502 message", which contains the rest of the listed data. The NTP packet 503 is then appended by a MAC verifying the time data, but not the 504 extension field. 506 7. Protocol Sequence 508 7.1. The client 510 7.1.1. The client in unicast mode 512 For a unicast run, the client performs the following steps: 514 1. It sends a client_assoc message to the server. 516 2. It waits for a reply in the form of a server_assoc message. 517 After receipt of the message it performs the following checks: 519 * The message MUST contain a conform version number. 521 * The client has to verify that the server has chosen the 522 signature and hash algorithms from its proposal sent in the 523 client_assoc message. 525 If one of the checks fails, the client MUST abort the run. 527 3. The client then sends a client_cert message to the server. 529 4. It awaits a reply in the form of a server_cert message and 530 performs an authenticity check. If this check fails, the client 531 MUST abort the run. 533 5. Next, it sends a client_cook message to the server. 535 6. It awaits a reply in the form of a server_cook message; upon 536 receipt it executes the following actions: 538 * It decrypts the message with its own private key. 540 * It checks that the decrypted message has the format of a 128 541 bit Cookie concatenated with its own signature value, 542 verifiable with the server's public key. 544 If the check fails, the client MAY abort the run. 546 7. The client sends a time_request message to the server. 548 8. It awaits a reply in the form of a time_response message. Upon 549 receipt, it checks: 551 * that the transmitted nonce belongs to the previous 552 time_request message and . 554 * that the appended MAC verifies the time data and the 555 transmitted nonce. 557 If the nonce is invalid, the client MUST ignore this 558 time_response message. If the MAC is invalid, the client MUST do 559 one of the following: abort the run or go back to step 5. If 560 both checks are successful, the client SHOULD continue time 561 synchronization by going back to step 7. 563 The client's behaviour in unicast mode is also expressed in Figure 1. 565 7.1.2. The client in broadcast mode 567 To establish a secure broadcast association with a broadcast server, 568 the client MUST initially authenticate the broadcast server and 569 securely synchronize its time to it up to an upper bound for its time 570 offset in unicast mode. After that, the client performs the 571 following steps: 573 1. It sends a client_bpar message to the server. 575 2. It waits for a reply in the form of a server_bpar message after 576 which it performs the following checks: 578 * The message must contain all the necessary information for the 579 TESLA protocol, as listed in Section 6.5.2. 581 * Verification of the message's signature. 583 If any information is missing or cannot be verified as signed by 584 the server, the client MUST abort the broadcast run. 586 3. The client awaits time synchronization data in the form of a 587 server_broadcast message. Upon receipt, it performs the 588 following checks: 590 1. Proof that the MAC is based on a key that is not yet 591 disclosed. This is achieved via a disclosure schedule, so 592 this is where loose time synchronization is required. If 593 verified the packet will be buffered for later 594 authentication. Otherwise, the client MUST discard it. Note 595 that the time information included in the packet will not be 596 used for synchronization until its authenticity could be 597 verified. 599 2. The client checks whether it already knows the disclosed key. 600 If so, the client SHOULD discard the packet to avoid a buffer 601 overrun. If not, the client verifies that the disclosed key 602 belongs to the one-way key chain by applying the one-way 603 function until equality with a previous disclosed key is 604 verified. If falsified, the client MUST discard the packet. 606 3. If the disclosed key is legitimate the client verifies the 607 authenticity of any packet that it received during the 608 corresponding time interval. If authenticity of a packet is 609 verified it is released from the buffer and the packet's time 610 information can be utilized. If the verification fails 611 authenticity is no longer given. In this case the client 612 MUST request authentic time from the server by means of a 613 unicast time request message. 615 See RFC 4082[RFC4082] for a detailed description of the packet 616 verification process. 618 The client's behaviour in broadcast mode can also be seen in Figure 619 2. 621 7.2. The server 623 The server's behaviour is not as easy to express in sequential terms 624 as the client's, not even for a single association with one client. 625 This is because the server does not keep state of any connection. 627 7.2.1. The server in unicast mode 628 A broadcast server MUST also support unicast mode, in order to 629 provide the initial time synchronization is a precondition for any 630 broadcast association. To support unicast mode, the server MUST be 631 ready to perform the following actions: 633 o Upon receipt of a client_assoc message, the server constructs and 634 sends a reply in the form of a server_assoc message as described 635 in Section 6.1.2. 637 o Upon receipt of a client_cert message, the server checks whether 638 it supports the given signature algorithm. If so, it constructs 639 and sends a server_cert message as described in Section 6.2.2. 641 o Upon receipt of a client_cook message, the server calculates the 642 cookie according to the formula given in Section 5.1. With this, 643 it constructs a server_cook message as described in Section 6.3.2. 645 o Upon receipt of a time_request message, the server re-calculates 646 the cookie, then computes the necessary time synchronization data 647 and constructs a time_response message as given in Section 6.4.2. 649 Also, it must adhere to the rule of server seed refreshing, as given 650 in [1]. More information on that can be found in Section 7.3. 652 7.2.2. The server in broadcast mode 654 To support NTS broadcast, the server MUST be ready to perform the 655 following actions: 657 o Upon receipt of a client_bpar message, the server constructs and 658 sends a server_bpar message as described in Section 6.5.2. 660 o The server follows the TESLA protocol in all other aspects, by 661 regularly sending server_broad messages as described in 662 Section 6.6.1, adhering to its own disclosure schedule. 664 It is also the server's responsibility to watch for the expiration 665 date of the one-way key chain and generate a new key chain 666 accordingly. 668 7.3. Server Seed Refresh 669 According to the requirements in 670 [I-D.ietf-tictoc-security-requirements] the server has to refresh its 671 server seed periodically. As a consequence the cookie used in the 672 time request messages becomes invalid. In this case the client 673 cannot verify the attached MAC and has to respond accordingly by re- 674 initiating the protocol with a cookie request (Section 6.3). This is 675 true for the unicast and broadcast mode, respectively. 677 Additionally, in broadcast mode the client has to restart the 678 broadcast sequence with a time request message if the one-way key 679 chain expires. 681 During certificate message exchange the client reads the expiration 682 date of the period of validity of the server certificate. The client 683 MAY restart the protocol sequence with the association message before 684 the server certificate expires. 686 8. Hash Algorithms and MAC Generation 688 8.1. Hash Algorithms 690 Hash algorithms are used at different points: calculation of the 691 cookie and the MAC, and hashing of the public key. Client and server 692 negotiate a hash algorithm H during the association message exchange 693 (Section 6.1) at the beginning of a unicast run. The selected 694 algorithm H is used for all hashing processes in that run. 696 In broadcast mode, hash algorithms are used as pseudo random 697 functions to construct the one-way key chain. Here, the utilized 698 hash algorithm is communicated by the server and non-negotiable. 700 The list of the hash algorithms supported by the server has to 701 fulfill the following requirements: 703 o it MUST NOT include MD5 or weaker algorithms, 705 o it MUST include SHA-256 or stronger algorithms. 707 8.2. MAC Calculation 709 For the calculation of the MAC client and server are using a Keyed- 710 Hash Message Authentication Code (HMAC) approach [RFC2104]. The HMAC 711 is generated with the hash algorithm specified by the client (see 712 Section 8.1). 714 9. Server Seed Considerations 715 The server has to calculate a random seed which has to be kept secret 716 and which MUST be changed periodically. The server MUST generate a 717 seed for each supported hash algorithm. 719 9.1. Server Seed Algorithm 721 9.2. Server Seed Live Time 723 10. IANA Considerations 725 This document makes no request of IANA. 727 Note to RFC Editor: this section may be removed on publication as an 728 RFC. 730 11. Security Considerations 732 11.1. Initial Verification of the Server Certificates 734 The client has to verify the validity of the certificates during the 735 certification message exchange (Section 6.2). Since it generally has 736 no reliable time during this initial communication phase, it is 737 impossible to verify the period of validity of the certificates. 738 Therefore, the client MUST use one of the following approaches: 740 o The validity of the certificates is preconditioned. Usually this 741 will be the case in corporate networks. 743 o The client ensures that the certificates are not revoked. To this 744 end, the client uses the Online Certificate Status Protocol (OCSP) 745 defined in [RFC6277]. 747 o The client requests a different service to get an initial time 748 stamp in order to be able to verify the certificates' periods of 749 validity. To this end, it can, e.g., use a secure shell 750 connection to a reliable host. Another alternative is to request 751 a time stamp from a Time Stamping Authority (TSA) by means of the 752 Time-Stamp Protocol (TSP) defined in [RFC3161]. 754 11.2. Revocation of Server Certificates 756 According to Section 7.3, it is the client's responsibility to 757 initiate a new association with the server after the server's 758 certificate expires. To this end the client reads the expiration 759 date of the certificate during the certificate message exchange 760 (Section 6.2). Besides, certificates may also be revoked prior to 761 the normal expiration date. To increase security the client MAY 762 verify the state of the server's certificate via OCSP periodically. 764 11.3. Usage of NTP Pools 766 The certification based authentication scheme described in Section 6 767 is not applicable to the concept of NTP pools. Therefore, NTS is not 768 able to provide secure usage of NTP pools. 770 11.4. Denial-of-Service in Broadcast Mode 772 TESLA authentication buffers packets for delayed authentication. 773 This makes the protocol vulnerable to flooding attacks, causing the 774 client to buffer excessive numbers of packets. To add stronger DoS 775 protection to the protocol client and server SHALL use the "Not Re- 776 using Keys" scheme of TESLA as pointed out in section 3.7.2 of RFC 777 4082 [RFC4082]. In this scheme the server never uses a key for the 778 MAC generation more than once. Therefore the client can discard any 779 packet that contains a disclosed key it knows already, thus 780 preventing memory flooding attacks. 782 Note, an alternative approach to enhance TESLA's resistance against 783 DoS attacks involves the addition of a group MAC to each packet. 784 This requires the exchange of an additional shared key common to the 785 whole group. This adds additional complexity to the protocol and 786 hence is currently not considered in this document. 788 12. Acknowledgements 790 The authors would like to thank David Mills and Kurt Roeckx for 791 discussions and comments on the design of NTS. Also, thanks to 792 Harlan Stenn for his technical review and specific text contributions 793 to this document. 795 13. References 797 13.1. Normative References 799 [IEEE1588] 800 IEEE Instrumentation and Measurement Society. TC-9 Sensor 801 Technology, "IEEE standard for a precision clock 802 synchronization protocol for networked measurement and 803 control systems", 2008. 805 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 806 Hashing for Message Authentication", RFC 2104, February 807 1997. 809 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 810 Requirement Levels", BCP 14, RFC 2119, March 1997. 812 [RFC3161] Adams, C., Cain, P., Pinkas, D., and R. Zuccherato, 813 "Internet X.509 Public Key Infrastructure Time-Stamp 814 Protocol (TSP)", RFC 3161, August 2001. 816 [RFC4082] Perrig, A., Song, D., Canetti, R., Tygar, J., and B. 817 Briscoe, "Timed Efficient Stream Loss-Tolerant 818 Authentication (TESLA): Multicast Source Authentication 819 Transform Introduction", RFC 4082, June 2005. 821 [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 822 Time Protocol Version 4: Protocol and Algorithms 823 Specification", RFC 5905, June 2010. 825 [RFC5906] Haberman, B. and D. Mills, "Network Time Protocol Version 826 4: Autokey Specification", RFC 5906, June 2010. 828 [RFC6277] Santesson, S. and P. Hallam-Baker, "Online Certificate 829 Status Protocol Algorithm Agility", RFC 6277, June 2011. 831 13.2. Informative References 833 [I-D.ietf-tictoc-security-requirements] 834 Mizrahi, T., "Security Requirements of Time Protocols in 835 Packet Switched Networks", draft-ietf-tictoc-security- 836 requirements-05 (work in progress), April 2013. 838 [Roettger] 839 Roettger, S., "Analysis of the NTP Autokey Procedures", 840 February 2012. 842 Appendix A. Flow Diagrams of Client Behaviour 844 +---------------------+ 845 |Association Messages | 846 +----------+----------+ 847 | 848 v 849 +---------------------+ 850 |Certificate Messages | 851 +----------+----------+ 852 | 853 +------------------------------>o 854 | | 855 | v 856 | +---------------+ 857 | |Cookie Messages| 858 | +-------+-------+ 859 | | 860 | o<------------------------------+ 861 | | | 862 | v | 863 | +-------------------+ | 864 | |Time Sync. Messages| | 865 | +---------+---------+ | 866 | | | 867 | v | 868 | +-----+ | 869 | |Check| | 870 | +--+--+ | 871 | | | 872 | /------------------+------------------\ | 873 | v v v | 874 | .-----------. .-------------. .-------. | 875 | ( MAC Failure ) ( Nonce Failure ) ( Success ) | 876 | '-----+-----' '------+------' '---+---' | 877 | | | | | 878 | v v v | 879 | +-------------+ +-------------+ +--------------+ | 880 | |Discard Data | |Discard Data | |Sync. Process | | 881 | +-------------+ +------+------+ +------+-------+ | 882 | | | | | 883 | | | v | 884 +-----------+ +------------------>o-----------+ 886 Figure 1: The client's behaviour in NTS unicast mode. 888 +-----------------------------+ 889 |Broadcast Parameter Messages | 890 +--------------+--------------+ 891 | 892 o<--------------------------+ 893 | | 894 v | 895 +-----------------------------+ | 896 |Broadcast Time Sync. Message | | 897 +--------------+--------------+ | 898 | | 899 +-------------------------------------->o | 900 | | | 901 | v | 902 | +-------------------+ | 903 | |Key and Auth. Check| | 904 | +---------+---------+ | 905 | | | 906 | /----------------*----------------\ | 907 | v v | 908 | .---------. .---------. | 909 | ( Verified ) ( Falsified ) | 910 | '----+----' '----+----' | 911 | | | | 912 | v v | 913 | +-------------+ +-------+ | 914 | |Store Message| |Discard| | 915 | +------+------+ +---+---+ | 916 | | | | 917 | v +---------o 918 | +---------------+ | 919 | |Check Previous | | 920 | +-------+-------+ | 921 | | | 922 | /--------*--------\ | 923 | v v | 924 | .---------. .---------. | 925 | ( Verified ) ( Falsified ) | 926 | '----+----' '----+----' | 927 | | | | 928 | v v | 929 | +-------------+ +-----------------+ | 930 | |Sync. Process| |Discard Previous | | 931 | +------+------+ +--------+--------+ | 932 | | | | 933 +-----------+ +-----------------------------------+ 935 Figure 2: The client's behaviour in NTS broadcast mode. 937 Appendix B. Extension fields 939 In Section 6, some new extension fields for NTP packets are 940 introduced. They are listed here again, for reference. 942 +------------------------+---------------+ 943 | name | used in | 944 +------------------------+---------------+ 945 | "association" | client_assoc | 946 | | server_assoc | 947 | | | 948 | "certificate request" | client_cert | 949 | | | 950 | "certificate" | server_cert | 951 | | | 952 | "cookie request" | client_cook | 953 | | | 954 | "cookie transmit" | server_cook | 955 | | | 956 | "time request" | time_request | 957 | | | 958 | "time response" | time_response | 959 | | | 960 | "broadcast request" | client_bpar | 961 | | | 962 | "broadcast parameters" | server_bpar | 963 | | | 964 | "broadcast message" | server_broad | 965 +------------------------+---------------+ 967 Appendix C. TICTOC Security Requirements 969 The following table compares the NTS specifications against the 970 TICTOC security requirements [I-D.ietf-tictoc-security-requirements]. 972 +---------+--------------------------------+---------------+--------+ 973 | Section | Requirement from I-D tictoc | Requirement | NTS | 974 | | security-requirements-05 | level | | 975 +---------+--------------------------------+---------------+--------+ 976 | 5.1.1 | Authentication of Servers | MUST | OK | 977 +---------+--------------------------------+---------------+--------+ 978 | 5.1.1 | Authorization of Servers | MUST | OK | 979 +---------+--------------------------------+---------------+--------+ 980 | 5.1.2 | Recursive Authentication of | MUST | OK | 981 | | Servers (Stratum 1) | | | 982 +---------+--------------------------------+---------------+--------+ 983 | 5.1.2 | Recursive Authorization of | MUST | OK | 984 | | Servers (Stratum 1) | | | 985 +---------+--------------------------------+---------------+--------+ 986 | 5.1.3 | Authentication and | MAY | - | 987 | | Authorization of Slaves | | | 988 +---------+--------------------------------+---------------+--------+ 989 | 5.2 | Integrity protection. | MUST | OK | 990 +---------+--------------------------------+---------------+--------+ 991 | 5.3 | Protection against DoS attacks | SHOULD | OK | 992 +---------+--------------------------------+---------------+--------+ 993 | 5.4 | Replay protection | MUST | OK | 994 +---------+--------------------------------+---------------+--------+ 995 | 5.5.1 | Key freshness. | MUST | OK | 996 +---------+--------------------------------+---------------+--------+ 997 | 5.5.2 | Security association. | SHOULD | OK | 998 +---------+--------------------------------+---------------+--------+ 999 | 5.5.3 | Unicast and multicast | SHOULD | OK | 1000 | | associations. | | | 1001 +---------+--------------------------------+---------------+--------+ 1002 | 5.6 | Performance: no degradation in | MUST | OK | 1003 | | quality of time transfer. | | | 1004 +---------+--------------------------------+---------------+--------+ 1005 | | Performance: lightweight | SHOULD | OK | 1006 | | computation | | | 1007 +---------+--------------------------------+---------------+--------+ 1008 | | Performance: storage, | SHOULD | OK | 1009 | | bandwidth | | | 1010 +---------+--------------------------------+---------------+--------+ 1011 | 5.7 | Confidentiality protection | MAY | NO | 1012 +---------+--------------------------------+---------------+--------+ 1013 | 5.8 | Protection against Packet | SHOULD | NA*) | 1014 | | Delay and Interception Attacks | | | 1015 +---------+--------------------------------+---------------+--------+ 1016 | 5.9.1 | Secure mode | MUST | - | 1017 +---------+--------------------------------+---------------+--------+ 1018 | 5.9.2 | Hybrid mode | MAY | - | 1019 +---------+--------------------------------+---------------+--------+ 1021 *) Ensured by NTP via multi-source configuration. 1023 Comparsion of NTS sepecification against TICTOC security 1024 requirements. 1026 Appendix D. Broadcast Mode 1028 Authors' Addresses 1030 Dieter Sibold 1031 Physikalisch-Technische Bundesanstalt 1032 Bundesallee 100 1033 Braunschweig D-38116 1034 Germany 1036 Phone: +49-(0)531-592-8420 1037 Fax: +49-531-592-698420 1038 Email: dieter.sibold@ptb.de 1040 Stephen Roettger 1042 Email: stephen.roettger@googlemail.com 1043 Kristof Teichel 1044 Physikalisch-Technische Bundesanstalt 1045 Bundesallee 100 1046 Braunschweig D-38116 1047 Germany 1049 Email: kristof.teichel@ptb.de