idnits 2.17.1 draft-ietf-ntp-network-time-security-03.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 (March 19, 2014) is 3681 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 848 -- 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: September 20, 2014 6 K. Teichel 7 PTB 8 March 19, 2014 10 Network Time Security 11 draft-ietf-ntp-network-time-security-03.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 September 20, 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 . . . . . . . . . . . . . . . . . . . 5 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" . . . . . . . . . . . . 7 73 6.2. Certificate Messages . . . . . . . . . . . . . . . . . . 7 74 6.2.1. Message type: "client_cert" . . . . . . . . . . . . . 7 75 6.2.2. Message type: "server_cert" . . . . . . . . . . . . . 8 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 . . . . . . . . . . 9 80 6.4.1. Message type: "time_request" . . . . . . . . . . . . 9 81 6.4.2. Message type: "time_response" . . . . . . . . . . . . 9 82 6.5. Broadcast Parameter Messages . . . . . . . . . . . . . . 10 83 6.5.1. Message type: "client_bpar" . . . . . . . . . . . . . 10 84 6.5.2. Message type: "server_bpar" . . . . . . . . . . . . . 10 85 6.6. Broadcast Message . . . . . . . . . . . . . . . . . . . . 11 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 . . . . . . . . . . . . 13 91 7.2. The server . . . . . . . . . . . . . . . . . . . . . . . 14 92 7.2.1. The server in unicast mode . . . . . . . . . . . . . 14 93 7.2.2. The server in broadcast mode . . . . . . . . . . . . 14 94 7.3. Server Seed Refresh . . . . . . . . . . . . . . . . . . . 15 95 8. Hash Algorithms and MAC Generation . . . . . . . . . . . . . 15 96 8.1. Hash Algorithms . . . . . . . . . . . . . . . . . . . . . 15 97 8.2. MAC Calculation . . . . . . . . . . . . . . . . . . . . . 16 98 9. Server Seed Considerations . . . . . . . . . . . . . . . . . 16 99 9.1. Server Seed Algorithm . . . . . . . . . . . . . . . . . . 16 100 9.2. Server Seed Live Time . . . . . . . . . . . . . . . . . . 16 101 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 102 11. Security Considerations . . . . . . . . . . . . . . . . . . . 16 103 11.1. Initial Verification of the Server Certificates . . . . 16 104 11.2. Revocation of Server Certificates . . . . . . . . . . . 17 105 11.3. Usage of NTP Pools . . . . . . . . . . . . . . . . . . . 17 106 11.4. Denial-of-Service in Broadcast Mode . . . . . . . . . . 17 107 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 17 108 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 109 13.1. Normative References . . . . . . . . . . . . . . . . . . 18 110 13.2. Informative References . . . . . . . . . . . . . . . . . 18 111 13.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 19 112 Appendix A. Flow Diagrams of Client Behaviour . . . . . . . . . 19 113 Appendix B. Extension fields . . . . . . . . . . . . . . . . . . 22 114 Appendix C. TICTOC Security Requirements . . . . . . . . . . . . 22 115 Appendix D. Broadcast Mode . . . . . . . . . . . . . . . . . . . 23 116 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 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, H(public key of client))), 208 with the server seed as key, where H is a hash function, and where 209 the function MSB_128 cuts off the 128 most significant bits of the 210 result of the HMAC function. The server seed is a 128 bit random 211 value of the server, which has to be kept secret. The cookie never 212 changes as long as the server seed stays the same, but the server 213 seed has to be refreshed periodically in order to provide key 214 freshness as required in [I-D.ietf-tictoc-security-requirements]. 215 See Section 9 for details on the seed refresh and Section 7.1.1 for 216 the client's reaction to it. 218 The server does not keep a state of the client. Therefore it has to 219 recalculate the cookie each time it receives a request from the 220 client. To this end, the client has to attach the hash value of its 221 public key to each request (see Section 6.4). 223 5.2. Broadcast Mode 225 Just as in the case of the client server mode and symmetric mode, 226 authenticity and integrity of the NTP packets are ensured by a MAC, 227 which is attached to the NTP packet by the sender. The verification 228 of the authenticity is based on the TESLA protocol, in particular on 229 its "Not Re-using Keys" scheme, see section 3.7.2 of [RFC4082]. 230 TESLA is based on a one-way chain of keys, where each key is the 231 output of a one-way function applied on the previous key in the 232 chain. The last element of the chain is shared securely with all 233 clients. The server splits time into intervals of uniform duration 234 and assigns each key to an interval in reverse order, starting with 235 the penultimate. At each time interval, the server sends an NTP 236 broadcast packet appended by a MAC, calculated using the 237 corresponding key, and the key of the previous disclosure interval. 238 The client verifies the MAC by buffering the packet until the 239 disclosure of the key in its associated disclosure interval. In 240 order to be able to verify the validity of the key, the client has to 241 be loosely time synchronized to the server. This has to be 242 accomplished during the initial client server exchange between 243 broadcast client and server. For a more detailed description of the 244 TESLA protocol see Appendix D. 246 6. Protocol Messages 248 Note that this section currently describes realization of the message 249 format of NTS only for its utilization for NTP, in which the NTS 250 specific data are enclosed in extension fields on top of NTP packets. 251 A specification of NTS messages for PTP would have to be developed 252 accordingly. 254 The steps described in Section 6.1 - Section 6.4 belong to the 255 unicast mode, while Section 6.5 and Section 6.6 explain the steps 256 involved in the broadcast mode of NTS. 258 6.1. Association Messages 260 In this step, the hash and signature algorithms that are used for the 261 rest of the protocol are negotiated. 263 6.1.1. Message type: "client_assoc" 265 The protocol sequence starts with the client sending an association 266 message, called client_assoc. This message contains 268 o the version number of NTS that the client wants to use (this 269 SHOULD be the highest version number that it supports), 271 o the hostname of the client, 273 o a selection of hash algorithms, and 275 o a selection of accepted algorithms for the signatures. 277 For NTP, this message is realized as a packet with an extension field 278 of type "association", which contains all this data. 280 6.1.2. Message type: "server_assoc" 282 This message is sent by the server upon receipt of client_assoc. It 283 contains 285 o the version number used for the rest of the protocol (which SHOULD 286 be determined as the minimum over the client's suggestion in the 287 client_assoc and the highest supported by the server), 289 o the hostname of the server, and 291 o the server's choice of algorithm for the signatures and 292 cryptographic hash algorithm, both of which MUST be chosen from 293 the client's proposals. 295 In the case of NTP, the data is enclosed in a packet's extension 296 field, also of type "association". 298 6.2. Certificate Messages 300 In this step, the client receives the certification chain up to a 301 trusted anchor. With the established certification chain the client 302 is able to verify the server signatures and, hence, the authenticity 303 of the server messages with extension fields is ensured. 305 Discussion: 307 Note that in this step the client validates the authenticity of 308 its immediate NTP server only. It does not recursively validate 309 the authenticity of each NTP server on the time synchronization 310 chain. Recursive authentication (and authorization) as formulated 311 in [I-D.ietf-tictoc-security-requirements] depends on the chosen 312 trust anchor. 314 6.2.1. Message type: "client_cert" 316 This message is sent by the client, after it successfully verified 317 the content of the received server_assoc message (see Section 7.1.1). 318 It contains 320 o the negotiated version number, 322 o the client's hostname, and 324 o the signature algorithm negotiated during the association 325 messages. 327 It is realized as an NTP packet with extension field of type 328 "certificate request" for the necessary data. 330 6.2.2. Message type: "server_cert" 332 This message is sent by the server, upon receipt of a client_cert 333 message, if the version number and choice of methods communicated in 334 that message are actually supported by the server. It contains 336 o all the information necessary to authenticate the server to the 337 client. This is a chain of certificates, which starts at the 338 server and goes up to a trusted authority, where each certificate 339 MUST be certified by the one directly following it. 341 This message is realized for NTP as a packet with extension field of 342 type "certificate" which holds the certification data. 344 6.3. Cookie Messages 346 During this step, the server transmits a secret cookie to the client 347 securely. The cookie will be used for integrity protection during 348 unicast time synchronization. 350 6.3.1. Message type: "client_cook" 352 This message is sent by the client, upon successful authentication of 353 the server. In this message, the client requests a cookie from the 354 server. It contains 356 o the negotiated version number, 358 o the hash algorithm H negotiated between client and server during 359 the association messages, 361 o the client's public key. 363 For NTP, an extension field of type "cookie request" holds the listed 364 data. 366 6.3.2. Message type: "server_cook" 368 This message is sent by the server, upon receipt of a client_cook 369 message. The hash of the client's public key, as included in 370 client_cook, is used by the server to calculate the cookie (see 371 Section 5.1). This message contains 373 o a concatenated pair, encrypted with the client's public key, where 374 the pair consists of 375 * the cookie, and 377 * a signature of the cookie signed with the server's private key. 379 In the case of NTP, this is a packet with an extension field of type 380 "cookie transmit". 382 6.4. Unicast Time Synchronisation Messages 384 In this step, the usual time synchronization process is executed, 385 with the addition of integrity protection for all messages that the 386 server sends. This step can be repeated as often as the client 387 desires and as long as the integrity of the server's time responses 388 is verified successfully. Secure time synchronization by repetition 389 of this step is the goal of a unicast run. 391 6.4.1. Message type: "time_request" 393 This message is sent by the client when it requests time exchange. 394 To send this message, the client MUST have received server_cook and 395 successfully verified the cookie via the server's signature. It 396 contains 398 o the negotiated version number, 400 o the time synchronization data that the client wants to transmit, 402 o a 128-bit nonce, 404 o the negotiated hash algorithm H, 406 o the hash of the client's public key under H. 408 It is realized as an NTP packet with the time synchronization data 409 and an additional extension field of type "time request" for the rest 410 of the information. 412 6.4.2. Message type: "time_response" 414 This message is sent by the server, after it received a time_request 415 message. The server uses the hash of the client's public key and the 416 transmitted hash algorithm to recalculate the cookie for the client. 417 This message contains 419 o the server's time synchronization response data, 421 o the nonce transmitted in time_request, 422 o a MAC (generated with the cookie as key) for verification of the 423 above. 425 It is realized as an NTP packet with the necessary time 426 synchronization data and with a new extension field of type "time 427 response". This packet has an appended MAC that is generated over 428 the time synchronization data and the extension field, with the 429 cookie as the key. 431 6.5. Broadcast Parameter Messages 433 In this step, the client receives the necessary information to 434 execute the TESLA protocol in a secured broadcast association. The 435 client can only initiate a secure broadcast association after a 436 successful unicast run, see Section 7.1.2. 438 See Appendix D for more details on TESLA. 440 6.5.1. Message type: "client_bpar" 442 This message is sent by the client in order to establish a secured 443 time broadcast association with the server. It contains 445 o the version number negotiated during association in unicast mode, 447 o the client's hostname, and 449 o the signature algorithm negotiated during unicast. 451 For NTP, this message is realized as a packet with an extension field 452 of type "broadcast request". 454 6.5.2. Message type: "server_bpar" 456 This message is sent by the server upon receipt of a client_bpar 457 message during the broadcast loop of the server. It contains 459 o the one-way function used for building the one-way key chain, 461 o the last key of the one-way key chain, and 463 o the disclosure schedule of the keys. This contains: 465 * time interval duration, 467 * the disclosure delay (number of intervals between use and 468 disclosure of a key), 470 * the time at which the next time interval will start, and 472 * the next interval's associated index. 474 o The message also contains a signature signed by the server with 475 its private key, verifying all the data listed above. 477 It is realized for NTP as a packet with an extension field of type 478 "broadcast parameters", which contains all the given data. 480 6.6. Broadcast Message 482 In this step, the server keeps sending broadcast time synchronization 483 messages to all participating clients. 485 6.6.1. Message type: "server_broad" 487 This message is sent by the server over the course of its broadcast 488 schedule. It is part of any broadcast association. It contains 490 o time broadcast data, 492 o the index that belongs to the current interval (and therefore 493 identifies the current, yet undisclosed key) 495 o the disclosed key of the previous disclosure interval (current 496 time interval minus disclosure delay). 498 o a MAC, calculated with the key for the current time interval, 499 verifying the time data 501 The message is realized as an NTP broadcast packet with the time 502 broadcast data and with an extension field of type "broadcast 503 message", which contains the rest of the listed data. The NTP packet 504 is then appended by a MAC verifying the time data, but not the 505 extension field. 507 7. Protocol Sequence 509 7.1. The client 511 7.1.1. The client in unicast mode 513 For a unicast run, the client performs the following steps: 515 1. It sends a client_assoc message to the server. 517 2. It waits for a reply in the form of a server_assoc message. 518 After receipt of the message it performs the following checks: 520 * The message MUST contain a conform version number. 522 * The client has to verify that the server has chosen the 523 signature and hash algorithms from its proposal sent in the 524 client_assoc message. 526 If one of the checks fails, the client MUST abort the run. 528 3. The client then sends a client_cert message to the server. 530 4. It awaits a reply in the form of a server_cert message and 531 performs an authenticity check. If this check fails, the client 532 MUST abort the run. 534 5. Next, it sends a client_cook message to the server. 536 6. It awaits a reply in the form of a server_cook message; upon 537 receipt it executes the following actions: 539 * It decrypts the message with its own private key. 541 * It checks that the decrypted message has the format of a 128 542 bit Cookie concatenated with its own signature value, 543 verifiable with the server's public key. 545 If the check fails, the client MAY abort the run. 547 7. The client sends a time_request message to the server. 549 8. It awaits a reply in the form of a time_response message. Upon 550 receipt, it checks: 552 * that the transmitted nonce belongs to the previous 553 time_request message and . 555 * that the appended MAC verifies the time data and the 556 transmitted nonce. 558 If the nonce is invalid, the client MUST ignore this 559 time_response message. If the MAC is invalid, the client MUST do 560 one of the following: abort the run or go back to step 5 (because 561 the cookie might have changed due to a server seed refresh). If 562 both checks are successful, the client SHOULD continue time 563 synchronization by going back to step 7. 565 The client's behaviour in unicast mode is also expressed in Figure 1. 567 7.1.2. The client in broadcast mode 569 To establish a secure broadcast association with a broadcast server, 570 the client MUST initially authenticate the broadcast server and 571 securely synchronize its time to it up to an upper bound for its time 572 offset in unicast mode. After that, the client performs the 573 following steps: 575 1. It sends a client_bpar message to the server. 577 2. It waits for a reply in the form of a server_bpar message after 578 which it performs the following checks: 580 * The message must contain all the necessary information for the 581 TESLA protocol, as listed in Section 6.5.2. 583 * Verification of the message's signature. 585 If any information is missing or cannot be verified as signed by 586 the server, the client MUST abort the broadcast run. 588 3. The client awaits time synchronization data in the form of a 589 server_broadcast message. Upon receipt, it performs the 590 following checks: 592 1. Proof that the MAC is based on a key that is not yet 593 disclosed. This is achieved via a disclosure schedule, so 594 this is where loose time synchronization is required. If 595 verified the packet will be buffered for later 596 authentication. Otherwise, the client MUST discard it. Note 597 that the time information included in the packet will not be 598 used for synchronization until its authenticity could be 599 verified. 601 2. The client checks whether it already knows the disclosed key. 602 If so, the client SHOULD discard the packet to avoid a buffer 603 overrun. If not, the client verifies that the disclosed key 604 belongs to the one-way key chain by applying the one-way 605 function until equality with a previous disclosed key is 606 verified. If falsified, the client MUST discard the packet. 608 3. If the disclosed key is legitimate the client verifies the 609 authenticity of any packet that it received during the 610 corresponding time interval. If authenticity of a packet is 611 verified it is released from the buffer and the packet's time 612 information can be utilized. If the verification fails 613 authenticity is no longer given. In this case the client 614 MUST request authentic time from the server by means of a 615 unicast time request message. 617 See RFC 4082[RFC4082] for a detailed description of the packet 618 verification process. 620 The client's behaviour in broadcast mode can also be seen in 621 Figure 2. 623 7.2. The server 625 The server's behaviour is not as easy to express in sequential terms 626 as the client's, not even for a single association with one client. 627 This is because the server does not keep state of any connection. 629 7.2.1. The server in unicast mode 631 A broadcast server MUST also support unicast mode, in order to 632 provide the initial time synchronization is a precondition for any 633 broadcast association. To support unicast mode, the server MUST be 634 ready to perform the following actions: 636 o Upon receipt of a client_assoc message, the server constructs and 637 sends a reply in the form of a server_assoc message as described 638 in Section 6.1.2. 640 o Upon receipt of a client_cert message, the server checks whether 641 it supports the given signature algorithm. If so, it constructs 642 and sends a server_cert message as described in Section 6.2.2. 644 o Upon receipt of a client_cook message, the server calculates the 645 cookie according to the formula given in Section 5.1. With this, 646 it constructs a server_cook message as described in Section 6.3.2. 648 o Upon receipt of a time_request message, the server re-calculates 649 the cookie, then computes the necessary time synchronization data 650 and constructs a time_response message as given in Section 6.4.2. 652 Also, it must adhere to the rule of server seed refreshing, as given 653 in [1]. More information on that can be found in Section 7.3. 655 7.2.2. The server in broadcast mode 657 To support NTS broadcast, the server MUST be ready to perform the 658 following actions: 660 o Upon receipt of a client_bpar message, the server constructs and 661 sends a server_bpar message as described in Section 6.5.2. 663 o The server follows the TESLA protocol in all other aspects, by 664 regularly sending server_broad messages as described in 665 Section 6.6.1, adhering to its own disclosure schedule. 667 It is also the server's responsibility to watch for the expiration 668 date of the one-way key chain and generate a new key chain 669 accordingly. 671 7.3. Server Seed Refresh 673 According to the requirements in 674 [I-D.ietf-tictoc-security-requirements] the server has to refresh its 675 server seed periodically. As a consequence the cookie used in the 676 time request messages becomes invalid. In this case the client 677 cannot verify the attached MAC and has to respond accordingly by re- 678 initiating the protocol with a cookie request (Section 6.3). This is 679 true for the unicast and broadcast mode, respectively. 681 Additionally, in broadcast mode the client has to restart the 682 broadcast sequence with a time request message if the one-way key 683 chain expires. 685 During certificate message exchange the client reads the expiration 686 date of the period of validity of the server certificate. The client 687 MAY restart the protocol sequence with the association message before 688 the server certificate expires. 690 8. Hash Algorithms and MAC Generation 692 8.1. Hash Algorithms 694 Hash algorithms are used at different points: calculation of the 695 cookie and the MAC, and hashing of the public key. Client and server 696 negotiate a hash algorithm H during the association message exchange 697 (Section 6.1) at the beginning of a unicast run. The selected 698 algorithm H is used for all hashing processes in that run. 700 In broadcast mode, hash algorithms are used as pseudo random 701 functions to construct the one-way key chain. Here, the utilized 702 hash algorithm is communicated by the server and non-negotiable. 704 The list of the hash algorithms supported by the server has to 705 fulfill the following requirements: 707 o it MUST NOT include MD5 or weaker algorithms, 708 o it MUST include SHA-256 or stronger algorithms. 710 8.2. MAC Calculation 712 For the calculation of the MAC client and server are using a Keyed- 713 Hash Message Authentication Code (HMAC) approach [RFC2104]. The HMAC 714 is generated with the hash algorithm specified by the client (see 715 Section 8.1). 717 9. Server Seed Considerations 719 The server has to calculate a random seed which has to be kept secret 720 and which MUST be changed periodically. The server MUST generate a 721 seed for each supported hash algorithm. 723 9.1. Server Seed Algorithm 725 9.2. Server Seed Live Time 727 10. IANA Considerations 729 This document makes no request of IANA. 731 Note to RFC Editor: this section may be removed on publication as an 732 RFC. 734 11. Security Considerations 736 11.1. Initial Verification of the Server Certificates 738 The client has to verify the validity of the certificates during the 739 certification message exchange (Section 6.2). Since it generally has 740 no reliable time during this initial communication phase, it is 741 impossible to verify the period of validity of the certificates. 742 Therefore, the client MUST use one of the following approaches: 744 o The validity of the certificates is preconditioned. Usually this 745 will be the case in corporate networks. 747 o The client ensures that the certificates are not revoked. To this 748 end, the client uses the Online Certificate Status Protocol (OCSP) 749 defined in [RFC6277]. 751 o The client requests a different service to get an initial time 752 stamp in order to be able to verify the certificates' periods of 753 validity. To this end, it can, e.g., use a secure shell 754 connection to a reliable host. Another alternative is to request 755 a time stamp from a Time Stamping Authority (TSA) by means of the 756 Time-Stamp Protocol (TSP) defined in [RFC3161]. 758 11.2. Revocation of Server Certificates 760 According to Section 7.3, it is the client's responsibility to 761 initiate a new association with the server after the server's 762 certificate expires. To this end the client reads the expiration 763 date of the certificate during the certificate message exchange 764 (Section 6.2). Besides, certificates may also be revoked prior to 765 the normal expiration date. To increase security the client MAY 766 verify the state of the server's certificate via OCSP periodically. 768 11.3. Usage of NTP Pools 770 The certification based authentication scheme described in Section 6 771 is not applicable to the concept of NTP pools. Therefore, NTS is not 772 able to provide secure usage of NTP pools. 774 11.4. Denial-of-Service in Broadcast Mode 776 TESLA authentication buffers packets for delayed authentication. 777 This makes the protocol vulnerable to flooding attacks, causing the 778 client to buffer excessive numbers of packets. To add stronger DoS 779 protection to the protocol client and server SHALL use the "Not Re- 780 using Keys" scheme of TESLA as pointed out in section 3.7.2 of RFC 781 4082 [RFC4082]. In this scheme the server never uses a key for the 782 MAC generation more than once. Therefore the client can discard any 783 packet that contains a disclosed key it knows already, thus 784 preventing memory flooding attacks. 786 Note, an alternative approach to enhance TESLA's resistance against 787 DoS attacks involves the addition of a group MAC to each packet. 788 This requires the exchange of an additional shared key common to the 789 whole group. This adds additional complexity to the protocol and 790 hence is currently not considered in this document. 792 12. Acknowledgements 794 The authors would like to thank David Mills and Kurt Roeckx for 795 discussions and comments on the design of NTS. Also, thanks to 796 Harlan Stenn for his technical review and specific text contributions 797 to this document. 799 13. References 801 13.1. Normative References 803 [IEEE1588] 804 IEEE Instrumentation and Measurement Society. TC-9 Sensor 805 Technology, "IEEE standard for a precision clock 806 synchronization protocol for networked measurement and 807 control systems", 2008. 809 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 810 Hashing for Message Authentication", RFC 2104, February 811 1997. 813 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 814 Requirement Levels", BCP 14, RFC 2119, March 1997. 816 [RFC3161] Adams, C., Cain, P., Pinkas, D., and R. Zuccherato, 817 "Internet X.509 Public Key Infrastructure Time-Stamp 818 Protocol (TSP)", RFC 3161, August 2001. 820 [RFC4082] Perrig, A., Song, D., Canetti, R., Tygar, J., and B. 821 Briscoe, "Timed Efficient Stream Loss-Tolerant 822 Authentication (TESLA): Multicast Source Authentication 823 Transform Introduction", RFC 4082, June 2005. 825 [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 826 Time Protocol Version 4: Protocol and Algorithms 827 Specification", RFC 5905, June 2010. 829 [RFC5906] Haberman, B. and D. Mills, "Network Time Protocol Version 830 4: Autokey Specification", RFC 5906, June 2010. 832 [RFC6277] Santesson, S. and P. Hallam-Baker, "Online Certificate 833 Status Protocol Algorithm Agility", RFC 6277, June 2011. 835 13.2. Informative References 837 [I-D.ietf-tictoc-security-requirements] 838 Mizrahi, T., "Security Requirements of Time Protocols in 839 Packet Switched Networks", draft-ietf-tictoc-security- 840 requirements-05 (work in progress), April 2013. 842 [Roettger] 843 Roettger, S., "Analysis of the NTP Autokey Procedures", 844 February 2012. 846 13.3. URIs 848 [1] I-D.ietf-tictoc-security-requirements 850 Appendix A. Flow Diagrams of Client Behaviour 851 +---------------------+ 852 |Association Messages | 853 +----------+----------+ 854 | 855 v 856 +---------------------+ 857 |Certificate Messages | 858 +----------+----------+ 859 | 860 +------------------------------>o 861 | | 862 | v 863 | +---------------+ 864 | |Cookie Messages| 865 | +-------+-------+ 866 | | 867 | o<------------------------------+ 868 | | | 869 | v | 870 | +-------------------+ | 871 | |Time Sync. Messages| | 872 | +---------+---------+ | 873 | | | 874 | v | 875 | +-----+ | 876 | |Check| | 877 | +--+--+ | 878 | | | 879 | /------------------+------------------\ | 880 | v v v | 881 | .-----------. .-------------. .-------. | 882 | ( MAC Failure ) ( Nonce Failure ) ( Success ) | 883 | '-----+-----' '------+------' '---+---' | 884 | | | | | 885 | v v v | 886 | +-------------+ +-------------+ +--------------+ | 887 | |Discard Data | |Discard Data | |Sync. Process | | 888 | +-------------+ +------+------+ +------+-------+ | 889 | | | | | 890 | | | v | 891 +-----------+ +------------------>o-----------+ 893 Figure 1: The client's behaviour in NTS unicast mode. 895 +-----------------------------+ 896 |Broadcast Parameter Messages | 897 +--------------+--------------+ 898 | 899 o<--------------------------+ 900 | | 901 v | 902 +-----------------------------+ | 903 |Broadcast Time Sync. Message | | 904 +--------------+--------------+ | 905 | | 906 +-------------------------------------->o | 907 | | | 908 | v | 909 | +-------------------+ | 910 | |Key and Auth. Check| | 911 | +---------+---------+ | 912 | | | 913 | /----------------*----------------\ | 914 | v v | 915 | .---------. .---------. | 916 | ( Verified ) ( Falsified ) | 917 | '----+----' '----+----' | 918 | | | | 919 | v v | 920 | +-------------+ +-------+ | 921 | |Store Message| |Discard| | 922 | +------+------+ +---+---+ | 923 | | | | 924 | v +---------o 925 | +---------------+ | 926 | |Check Previous | | 927 | +-------+-------+ | 928 | | | 929 | /--------*--------\ | 930 | v v | 931 | .---------. .---------. | 932 | ( Verified ) ( Falsified ) | 933 | '----+----' '----+----' | 934 | | | | 935 | v v | 936 | +-------------+ +-----------------+ | 937 | |Sync. Process| |Discard Previous | | 938 | +------+------+ +--------+--------+ | 939 | | | | 940 +-----------+ +-----------------------------------+ 942 Figure 2: The client's behaviour in NTS broadcast mode. 944 Appendix B. Extension fields 946 In Section 6, some new extension fields for NTP packets are 947 introduced. They are listed here again, for reference. 949 +------------------------+---------------+ 950 | name | used in | 951 +------------------------+---------------+ 952 | "association" | client_assoc | 953 | | server_assoc | 954 | | | 955 | "certificate request" | client_cert | 956 | | | 957 | "certificate" | server_cert | 958 | | | 959 | "cookie request" | client_cook | 960 | | | 961 | "cookie transmit" | server_cook | 962 | | | 963 | "time request" | time_request | 964 | | | 965 | "time response" | time_response | 966 | | | 967 | "broadcast request" | client_bpar | 968 | | | 969 | "broadcast parameters" | server_bpar | 970 | | | 971 | "broadcast message" | server_broad | 972 +------------------------+---------------+ 974 Appendix C. TICTOC Security Requirements 976 The following table compares the NTS specifications against the 977 TICTOC security requirements [I-D.ietf-tictoc-security-requirements]. 979 +---------+------------------------------------+-------------+------+ 980 | Section | Requirement from I-D tictoc | Requirement | NTS | 981 | | security-requirements-05 | level | | 982 +---------+------------------------------------+-------------+------+ 983 | 5.1.1 | Authentication of Servers | MUST | OK | 984 +---------+------------------------------------+-------------+------+ 985 | 5.1.1 | Authorization of Servers | MUST | OK | 986 +---------+------------------------------------+-------------+------+ 987 | 5.1.2 | Recursive Authentication of | MUST | OK | 988 | | Servers (Stratum 1) | | | 989 +---------+------------------------------------+-------------+------+ 990 | 5.1.2 | Recursive Authorization of Servers | MUST | OK | 991 | | (Stratum 1) | | | 992 +---------+------------------------------------+-------------+------+ 993 | 5.1.3 | Authentication and Authorization | MAY | - | 994 | | of Slaves | | | 995 +---------+------------------------------------+-------------+------+ 996 | 5.2 | Integrity protection. | MUST | OK | 997 +---------+------------------------------------+-------------+------+ 998 | 5.3 | Protection against DoS attacks | SHOULD | OK | 999 +---------+------------------------------------+-------------+------+ 1000 | 5.4 | Replay protection | MUST | OK | 1001 +---------+------------------------------------+-------------+------+ 1002 | 5.5.1 | Key freshness. | MUST | OK | 1003 +---------+------------------------------------+-------------+------+ 1004 | 5.5.2 | Security association. | SHOULD | OK | 1005 +---------+------------------------------------+-------------+------+ 1006 | 5.5.3 | Unicast and multicast | SHOULD | OK | 1007 | | associations. | | | 1008 +---------+------------------------------------+-------------+------+ 1009 | 5.6 | Performance: no degradation in | MUST | OK | 1010 | | quality of time transfer. | | | 1011 +---------+------------------------------------+-------------+------+ 1012 | | Performance: lightweight | SHOULD | OK | 1013 | | computation | | | 1014 +---------+------------------------------------+-------------+------+ 1015 | | Performance: storage, bandwidth | SHOULD | OK | 1016 +---------+------------------------------------+-------------+------+ 1017 | 5.7 | Confidentiality protection | MAY | NO | 1018 +---------+------------------------------------+-------------+------+ 1019 | 5.8 | Protection against Packet Delay | SHOULD | NA*) | 1020 | | and Interception Attacks | | | 1021 +---------+------------------------------------+-------------+------+ 1022 | 5.9.1 | Secure mode | MUST | - | 1023 +---------+------------------------------------+-------------+------+ 1024 | 5.9.2 | Hybrid mode | MAY | - | 1025 +---------+------------------------------------+-------------+------+ 1027 *) Ensured by NTP via multi-source configuration. 1029 Comparsion of NTS sepecification against TICTOC security 1030 requirements. 1032 Appendix D. Broadcast Mode 1034 Authors' Addresses 1035 Dieter Sibold 1036 Physikalisch-Technische Bundesanstalt 1037 Bundesallee 100 1038 Braunschweig D-38116 1039 Germany 1041 Phone: +49-(0)531-592-8420 1042 Fax: +49-531-592-698420 1043 Email: dieter.sibold@ptb.de 1045 Stephen Roettger 1047 Email: stephen.roettger@googlemail.com 1049 Kristof Teichel 1050 Physikalisch-Technische Bundesanstalt 1051 Bundesallee 100 1052 Braunschweig D-38116 1053 Germany 1055 Email: kristof.teichel@ptb.de