| < draft-ietf-ntp-network-time-security-08.txt | draft-ietf-ntp-network-time-security-09.txt > | |||
|---|---|---|---|---|
| NTP Working Group D. Sibold | NTP Working Group D. Sibold | |||
| Internet-Draft PTB | Internet-Draft PTB | |||
| Intended status: Standards Track S. Roettger | Intended status: Standards Track S. Roettger | |||
| Expires: September 6, 2015 Google Inc. | Expires: January 7, 2016 Google Inc. | |||
| K. Teichel | K. Teichel | |||
| PTB | PTB | |||
| March 5, 2015 | July 06, 2015 | |||
| Network Time Security | Network Time Security | |||
| draft-ietf-ntp-network-time-security-08.txt | draft-ietf-ntp-network-time-security-09 | |||
| Abstract | Abstract | |||
| This document describes Network Time Security (NTS), a collection of | This document describes Network Time Security (NTS), a collection of | |||
| measures that enable secure time synchronization with time servers | measures that enable secure time synchronization with time servers | |||
| using protocols like the Network Time Protocol (NTP) or the Precision | using protocols like the Network Time Protocol (NTP) or the Precision | |||
| Time Protocol (PTP). Its design considers the special requirements | Time Protocol (PTP). Its design considers the special requirements | |||
| of precise timekeeping which are described in Security Requirements | of precise timekeeping which are described in Security Requirements | |||
| of Time Protocols in Packet Switched Networks [RFC7384]. | of Time Protocols in Packet Switched Networks [RFC7384]. | |||
| skipping to change at page 1, line 44 ¶ | skipping to change at page 1, line 44 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on September 6, 2015. | This Internet-Draft will expire on January 7, 2016. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2015 IETF Trust and the persons identified as the | Copyright (c) 2015 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 30 ¶ | skipping to change at page 2, line 30 ¶ | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
| 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 2.1. Terms and Abbreviations . . . . . . . . . . . . . . . . . 4 | 2.1. Terms and Abbreviations . . . . . . . . . . . . . . . . . 4 | |||
| 2.2. Common Terminology for PTP and NTP . . . . . . . . . . . 4 | 2.2. Common Terminology for PTP and NTP . . . . . . . . . . . 4 | |||
| 3. Security Threats . . . . . . . . . . . . . . . . . . . . . . 4 | 3. Security Threats . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 4. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 4. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 5. NTS Overview . . . . . . . . . . . . . . . . . . . . . . . . 5 | 5. NTS Overview . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 6. Protocol Messages . . . . . . . . . . . . . . . . . . . . . . 6 | 6. Protocol Messages . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 6.1. Association Message Exchange . . . . . . . . . . . . . . 7 | 6.1. Unicast Time Synchronisation Messages . . . . . . . . . . 7 | |||
| 6.1.1. Goals of the Association Exchange . . . . . . . . . . 7 | 6.1.1. Preconditions for the Unicast Time Synchronization | |||
| 6.1.2. Message Type: "client_assoc" . . . . . . . . . . . . 7 | Exchange . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 6.1.3. Message Type: "server_assoc" . . . . . . . . . . . . 8 | 6.1.2. Goals of the Unicast Time Synchronization Exchange . 7 | |||
| 6.1.4. Procedure Overview of the Association Exchange . . . 8 | 6.1.3. Message Type: "time_request" . . . . . . . . . . . . 7 | |||
| 6.2. Cookie Messages . . . . . . . . . . . . . . . . . . . . . 9 | 6.1.4. Message Type: "time_response" . . . . . . . . . . . . 8 | |||
| 6.2.1. Goals of the Cookie Exchange . . . . . . . . . . . . 10 | 6.1.5. Procedure Overview of the Unicast Time | |||
| 6.2.2. Message Type: "client_cook" . . . . . . . . . . . . . 10 | Synchronization Exchange . . . . . . . . . . . . . . 8 | |||
| 6.2.3. Message Type: "server_cook" . . . . . . . . . . . . . 10 | 6.2. Broadcast Time Synchronization Exchange . . . . . . . . . 9 | |||
| 6.2.4. Procedure Overview of the Cookie Exchange . . . . . . 11 | 6.2.1. Preconditions for the Broadcast Time Synchronization | |||
| 6.3. Unicast Time Synchronisation Messages . . . . . . . . . . 12 | Exchange . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 6.3.1. Goals of the Unicast Time Synchronization Exchange . 12 | 6.2.2. Goals of the Broadcast Time Synchronization Exchange 10 | |||
| 6.3.2. Message Type: "time_request" . . . . . . . . . . . . 12 | 6.2.3. Message Type: "server_broad" . . . . . . . . . . . . 10 | |||
| 6.3.3. Message Type: "time_response" . . . . . . . . . . . . 13 | 6.2.4. Procedure Overview of Broadcast Time Synchronization | |||
| 6.3.4. Procedure Overview of the Unicast Time | Exchange . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| Synchronization Exchange . . . . . . . . . . . . . . 13 | 6.3. Broadcast Keycheck . . . . . . . . . . . . . . . . . . . 12 | |||
| 6.4. Broadcast Parameter Messages . . . . . . . . . . . . . . 14 | 6.3.1. Preconditions for the Broadcast Keycheck Exchange . . 12 | |||
| 6.4.1. Goals of the Broadcast Parameter Exchange . . . . . . 15 | 6.3.2. Goals of the Broadcast Keycheck Exchange . . . . . . 13 | |||
| 6.4.2. Message Type: "client_bpar" . . . . . . . . . . . . . 15 | 6.3.3. Message Type: "client_keycheck" . . . . . . . . . . . 13 | |||
| 6.4.3. Message Type: "server_bpar" . . . . . . . . . . . . . 15 | 6.3.4. Message Type: "server_keycheck" . . . . . . . . . . . 13 | |||
| 6.4.4. Procedure Overview of the Broadcast Parameter | 6.3.5. Procedure Overview of the Broadcast Keycheck Exchange 14 | |||
| Exchange . . . . . . . . . . . . . . . . . . . . . . 16 | 7. Server Seed Considerations . . . . . . . . . . . . . . . . . 15 | |||
| 6.5. Broadcast Time Synchronization Exchange . . . . . . . . . 17 | 8. Hash Algorithms and MAC Generation . . . . . . . . . . . . . 15 | |||
| 6.5.1. Goals of the Broadcast Time Synchronization Exchange 17 | 8.1. Hash Algorithms . . . . . . . . . . . . . . . . . . . . . 15 | |||
| 6.5.2. Message Type: "server_broad" . . . . . . . . . . . . 17 | 8.2. MAC Calculation . . . . . . . . . . . . . . . . . . . . . 16 | |||
| 6.5.3. Procedure Overview of Broadcast Time Synchronization | 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 | |||
| Exchange . . . . . . . . . . . . . . . . . . . . . . 18 | 10. Security Considerations . . . . . . . . . . . . . . . . . . . 16 | |||
| 6.6. Broadcast Keycheck . . . . . . . . . . . . . . . . . . . 19 | 10.1. Privacy . . . . . . . . . . . . . . . . . . . . . . . . 16 | |||
| 6.6.1. Goals of the Broadcast Keycheck Exchange . . . . . . 19 | 10.2. Initial Verification of the Server Certificates . . . . 16 | |||
| 6.6.2. Message Type: "client_keycheck" . . . . . . . . . . . 20 | 10.3. Revocation of Server Certificates . . . . . . . . . . . 17 | |||
| 6.6.3. Message Type: "server_keycheck" . . . . . . . . . . . 20 | 10.4. Mitigating Denial-of-Service for broadcast packets . . . 17 | |||
| 6.6.4. Procedure Overview of the Broadcast Keycheck Exchange 20 | 10.5. Delay Attack . . . . . . . . . . . . . . . . . . . . . . 17 | |||
| 7. Server Seed Considerations . . . . . . . . . . . . . . . . . 21 | 10.6. Random Number Generation . . . . . . . . . . . . . . . . 19 | |||
| 8. Hash Algorithms and MAC Generation . . . . . . . . . . . . . 22 | 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 8.1. Hash Algorithms . . . . . . . . . . . . . . . . . . . . . 22 | 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 8.2. MAC Calculation . . . . . . . . . . . . . . . . . . . . . 22 | 12.1. Normative References . . . . . . . . . . . . . . . . . . 19 | |||
| 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 | 12.2. Informative References . . . . . . . . . . . . . . . . . 19 | |||
| 10. Security Considerations . . . . . . . . . . . . . . . . . . . 22 | Appendix A. (informative) TICTOC Security Requirements . . . . . 20 | |||
| 10.1. Privacy . . . . . . . . . . . . . . . . . . . . . . . . 22 | Appendix B. (normative) Inherent Association Protocol Messages . 22 | |||
| 10.2. Initial Verification of the Server Certificates . . . . 23 | B.1. Overview of NTS with Inherent Association Protocol . . . 22 | |||
| 10.3. Revocation of Server Certificates . . . . . . . . . . . 23 | B.2. Association Message Exchange . . . . . . . . . . . . . . 22 | |||
| 10.4. Mitigating Denial-of-Service for broadcast packets . . . 23 | B.2.1. Goals of the Association Exchange . . . . . . . . . . 22 | |||
| 10.5. Delay Attack . . . . . . . . . . . . . . . . . . . . . . 24 | B.2.2. Message Type: "client_assoc" . . . . . . . . . . . . 23 | |||
| 10.6. Random Number Generation . . . . . . . . . . . . . . . . 25 | B.2.3. Message Type: "server_assoc" . . . . . . . . . . . . 23 | |||
| 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 25 | B.2.4. Procedure Overview of the Association Exchange . . . 24 | |||
| 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 25 | B.3. Cookie Messages . . . . . . . . . . . . . . . . . . . . . 25 | |||
| 12.1. Normative References . . . . . . . . . . . . . . . . . . 25 | B.3.1. Goals of the Cookie Exchange . . . . . . . . . . . . 25 | |||
| 12.2. Informative References . . . . . . . . . . . . . . . . . 26 | B.3.2. Message Type: "client_cook" . . . . . . . . . . . . . 26 | |||
| Appendix A. (informative) TICTOC Security Requirements . . . . . 27 | B.3.3. Message Type: "server_cook" . . . . . . . . . . . . . 26 | |||
| Appendix B. (normative) Using TESLA for Broadcast-Type Messages 28 | B.3.4. Procedure Overview of the Cookie Exchange . . . . . . 27 | |||
| B.1. Server Preparation . . . . . . . . . . . . . . . . . . . 28 | B.3.5. Broadcast Parameter Messages . . . . . . . . . . . . 28 | |||
| B.2. Client Preparation . . . . . . . . . . . . . . . . . . . 30 | Appendix C. (normative) Using TESLA for Broadcast-Type Messages 30 | |||
| B.3. Sending Authenticated Broadcast Packets . . . . . . . . . 31 | C.1. Server Preparation . . . . . . . . . . . . . . . . . . . 31 | |||
| B.4. Authentication of Received Packets . . . . . . . . . . . 31 | C.2. Client Preparation . . . . . . . . . . . . . . . . . . . 32 | |||
| Appendix C. (informative) Dependencies . . . . . . . . . . . . . 32 | C.3. Sending Authenticated Broadcast Packets . . . . . . . . . 33 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 | C.4. Authentication of Received Packets . . . . . . . . . . . 33 | |||
| Appendix D. (informative) Dependencies . . . . . . . . . . . . . 35 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 | ||||
| 1. Introduction | 1. Introduction | |||
| Time synchronization protocols are increasingly utilized to | Time synchronization protocols are increasingly utilized to | |||
| synchronize clocks in networked infrastructures. Successful attacks | synchronize clocks in networked infrastructures. Successful attacks | |||
| against the time synchronization protocol can seriously degrade the | against the time synchronization protocol can seriously degrade the | |||
| reliable performance of such infrastructures. Therefore, time | reliable performance of such infrastructures. Therefore, time | |||
| synchronization protocols have to be secured if they are applied in | synchronization protocols have to be secured if they are applied in | |||
| environments that are prone to malicious attacks. This can be | environments that are prone to malicious attacks. This can be | |||
| accomplished either by utilization of external security protocols, | accomplished either by utilization of external security protocols, | |||
| skipping to change at page 5, line 9 ¶ | skipping to change at page 5, line 9 ¶ | |||
| 3. Security Threats | 3. Security Threats | |||
| The document "Security Requirements of Time Protocols in Packet | The document "Security Requirements of Time Protocols in Packet | |||
| Switched Networks" [RFC7384] contains a profound analysis of security | Switched Networks" [RFC7384] contains a profound analysis of security | |||
| threats and requirements for time synchronization protocols. | threats and requirements for time synchronization protocols. | |||
| 4. Objectives | 4. Objectives | |||
| The objectives of the NTS specification are as follows: | The objectives of the NTS specification are as follows: | |||
| o Authenticity: NTS enables a client to authenticate its time | o Authenticity: NTS enables the client to authenticate its time | |||
| server(s). | server(s). | |||
| o Integrity: NTS protects the integrity of time synchronization | o Integrity: NTS protects the integrity of time synchronization | |||
| protocol packets via a message authentication code (MAC). | protocol packets via a message authentication code (MAC). | |||
| o Confidentiality: NTS does not provide confidentiality protection | o Confidentiality: NTS does not provide confidentiality protection | |||
| of the time synchronization packets. | of the time synchronization packets. | |||
| o Authorization: NTS optionally enables the server to verify the | o Authorization: NTS enables the client to verify its time server's | |||
| client's authorization. | authorization. NTS optionally enables the server to verify the | |||
| client's authorization as well. | ||||
| o Request-Response-Consistency: NTS enables a client to match an | o Request-Response-Consistency: NTS enables a client to match an | |||
| incoming response to a request it has sent. NTS also enables the | incoming response to a request it has sent. NTS also enables the | |||
| client to deduce from the response whether its request to the | client to deduce from the response whether its request to the | |||
| server has arrived without alteration. | server has arrived without alteration. | |||
| o Integration with protocols: NTS can be used to secure different | o Integration with protocols: NTS can be used to secure different | |||
| time synchronization protocols, specifically at least NTP and PTP. | time synchronization protocols, specifically at least NTP and PTP. | |||
| A client or server running an NTS-secured version of a time | A client or server running an NTS-secured version of a time | |||
| protocol does not negatively affect other participants who are | protocol does not negatively affect other participants who are | |||
| running unsecured versions of that protocol. | running unsecured versions of that protocol. | |||
| 5. NTS Overview | 5. NTS Overview | |||
| NTS applies X.509 certificates to verify the authenticity of the time | NTS initially verifies the authenticity of the time server and | |||
| server and to exchange a symmetric key, the so-called cookie. A | exchanges a symmetric key, the so-called cookie, as well as a key | |||
| client needs a public/private key pair for encryption, with the | input value (KIV). After the cookie and the KIV are exchanged, the | |||
| public key enclosed in a certificate. A server needs a public/ | client then uses them to protect the authenticity and the integrity | |||
| private key pair for signing, with the public key enclosed in a | of subsequent unicast-type time synchronization packets. In order to | |||
| certificate. If a participant intends to act as both a client and a | do this, a Message Authentication Code (MAC) is attached to each time | |||
| server, it MUST have two different key pairs for these purposes. | synchronization packet. The calculation of the MAC includes the | |||
| whole time synchronization packet and the cookie which is shared | ||||
| between client and server. | ||||
| After the cookie is exchanged, the client then uses it to protect the | The cookie is calculated according to: | |||
| authenticity and the integrity of subsequent unicast-type time | ||||
| synchronization packets. In order to do this, a Message | ||||
| Authentication Code (MAC) is attached to each time synchronization | ||||
| packet. The calculation of the MAC includes the whole time | ||||
| synchronization packet and the cookie which is shared between client | ||||
| and server. The cookie is calculated according to: | ||||
| cookie = MSB_<b> (HMAC(server seed, H(certificate of client))), | cookie = MSB_<b> (HMAC(server seed, KIV)), | |||
| with the server seed as the key, where H is a hash function, and | with the server seed as the key, where KIV is the client's key input | |||
| where the function MSB_<b> cuts off the b most significant bits of | value, and where the application of the function MSB_<b> returns only | |||
| the result of the HMAC function. The client's certificate contains | the b most significant bits. The server seed is a random value of | |||
| the client's public key and enables the server to identify the | bit length b that the server possesses, which has to remain secret. | |||
| client, if client authorization is desired. The server seed is a | ||||
| random value of bit length b that the server possesses, which has to | The cookie deterministically depends on KIV as long as the server | |||
| remain secret. The cookie never changes as long as the server seed | seed stays the same. The server seed has to be refreshed | |||
| stays the same, but the server seed has to be refreshed periodically | periodically in order to provide key freshness as required in | |||
| in order to provide key freshness as required in [RFC7384]. See | [RFC7384]. See Section 7 for details on seed refreshing. | |||
| Section 7 for details on seed refreshing. | ||||
| Since the server does not keep a state of the client, it has to | Since the server does not keep a state of the client, it has to | |||
| recalculate the cookie each time it receives a unicast time | recalculate the cookie each time it receives a unicast time | |||
| synchronization request from the client. To this end, the client has | synchronization request from the client. To this end, the client has | |||
| to attach the hash value of its certificate to each request (see | to attach its KIV to each request (see Section 6.1). | |||
| Section 6.3). | ||||
| For broadcast-type messages, authenticity and integrity of the time | For broadcast-type messages, authenticity and integrity of the time | |||
| synchronization packets are also ensured by a MAC, which is attached | synchronization packets are also ensured by a MAC, which is attached | |||
| to the time synchronization packet by the sender. Verification of | to the time synchronization packet by the sender. Verification of | |||
| the broadcast-type packets' authenticity is based on the TESLA | the broadcast-type packets' authenticity is based on the TESLA | |||
| protocol, in particular on its "not re-using keys" scheme, see | protocol, in particular on its "not re-using keys" scheme, see | |||
| Section 3.7.2 of [RFC4082]. TESLA uses a one-way chain of keys, | Section 3.7.2 of [RFC4082]. TESLA uses a one-way chain of keys, | |||
| where each key is the output of a one-way function applied to the | where each key is the output of a one-way function applied to the | |||
| previous key in the chain. The server securely shares the last | previous key in the chain. The server securely shares the last | |||
| element of the chain with all clients. The server splits time into | element of the chain with all clients. The server splits time into | |||
| intervals of uniform duration and assigns each key to an interval in | intervals of uniform duration and assigns each key to an interval in | |||
| reverse order, starting with the penultimate. At each time interval, | reverse order. At each time interval, the server sends a broadcast | |||
| the server sends a broadcast packet appended by a MAC, calculated | packet appended by a MAC, calculated using the corresponding key, and | |||
| using the corresponding key, and the key of the previous disclosure | the key of the previous disclosure interval. The client verifies the | |||
| interval. The client verifies the MAC by buffering the packet until | MAC by buffering the packet until disclosure of the key in its | |||
| disclosure of the key in its associated disclosure interval occurs. | associated disclosure interval occurs. In order to be able to verify | |||
| In order to be able to verify the timeliness of the packets, the | the timeliness of the packets, the client has to be loosely time | |||
| client has to be loosely time synchronized with the server. This has | synchronized with the server. This has to be accomplished before | |||
| to be accomplished before broadcast associations can be used. For | broadcast associations can be used. For checking timeliness of | |||
| checking timeliness of packets, NTS uses another, more rigorous check | packets, NTS uses another, more rigorous check in addition to just | |||
| in addition to just the clock lookup used in the TESLA protocol. For | the clock lookup used in the TESLA protocol. For a more detailed | |||
| a more detailed description of how NTS employs and customizes TESLA, | description of how NTS employs and customizes TESLA, see Appendix C. | |||
| see Appendix B. | ||||
| 6. Protocol Messages | 6. Protocol Messages | |||
| This section describes the types of messages needed for secure time | This section describes the types of messages needed for secure time | |||
| synchronization with NTS. | synchronization with NTS. | |||
| For some guidance on how these message types can be realized in | For some guidance on how these message types can be realized in | |||
| practice, and integrated into the communication flow of existing time | practice, and integrated into the communication flow of existing time | |||
| synchronization protocols, see [I-D.ietf-ntp-cms-for-nts-message], a | synchronization protocols, see [I-D.ietf-ntp-cms-for-nts-message], a | |||
| companion document for NTS. Said document describes ASN.1 encodings | companion document for NTS. Said document describes ASN.1 encodings | |||
| for those message parts that have to be added to a time | for those message parts that have to be added to a time | |||
| synchronization protocol for security reasons as well as CMS | synchronization protocol for security reasons. | |||
| (Cryptographic Message Syntax, see [RFC5652]) conventions that can be | ||||
| used to get the cryptographic aspects right. | ||||
| 6.1. Association Message Exchange | ||||
| In this message exchange, the participants negotiate the hash and | ||||
| encryption algorithms that are used throughout the protocol. In | ||||
| addition, the client receives the certification chain up to a trusted | ||||
| anchor. With the established certification chain the client is able | ||||
| to verify the server's signatures and, hence, the authenticity of | ||||
| future NTS messages from the server is ensured. | ||||
| 6.1.1. Goals of the Association Exchange | ||||
| The association exchange: | ||||
| o enables the client to verify any communication with the server as | ||||
| authentic, | ||||
| o lets the participants negotiate NTS version and algorithms, | ||||
| o guarantees authenticity of the negotiation result to the client, | ||||
| o guarantees to the client that the negotiation result is based on | ||||
| the client's original, unaltered request. | ||||
| 6.1.2. Message Type: "client_assoc" | ||||
| The protocol sequence starts with the client sending an association | ||||
| message, called client_assoc. This message contains | ||||
| o the NTS message ID "client_assoc", | ||||
| o a nonce, | ||||
| o the version number of NTS that the client wants to use (this | ||||
| SHOULD be the highest version number that it supports), | ||||
| o the hostname of the client, | ||||
| o a selection of accepted hash algorithms, and | ||||
| o a selection of accepted encryption algorithms. | ||||
| 6.1.3. Message Type: "server_assoc" | ||||
| This message is sent by the server upon receipt of client_assoc. It | ||||
| contains | ||||
| o the NTS message ID "server_assoc", | ||||
| o the nonce transmitted in client_assoc, | ||||
| o the client's proposal for the version number, selection of | ||||
| accepted hash algorithms and selection of accepted encryption | ||||
| algorithms, as transmitted in client_assoc, | ||||
| o the version number used for the rest of the protocol (which SHOULD | ||||
| be determined as the minimum over the client's suggestion in the | ||||
| client_assoc message and the highest supported by the server), | ||||
| o the hostname of the server, | ||||
| o the server's choice of algorithm for encryption and for | ||||
| cryptographic hashing, all of which MUST be chosen from the | ||||
| client's proposals, | ||||
| o a signature, calculated over the data listed above, with the | ||||
| server's private key and according to the signature algorithm | ||||
| which is also used for the certificates that are included (see | ||||
| below), and | ||||
| o a chain of certificates, which starts at the server and goes up to | ||||
| a trusted authority; each certificate MUST be certified by the one | ||||
| directly following it. | ||||
| 6.1.4. Procedure Overview of the Association Exchange | ||||
| For an association exchange, the following steps are performed: | ||||
| 1. The client sends a client_assoc message to the server. It MUST | ||||
| keep the transmitted values for the version number and algorithms | ||||
| available for later checks. | ||||
| 2. Upon receipt of a client_assoc message, the server constructs and | ||||
| sends a reply in the form of a server_assoc message as described | ||||
| in Section 6.1.3. Upon unsuccessful negotiation for version | ||||
| number or algorithms the server_assoc message MUST contain an | ||||
| error code. | ||||
| 3. The client waits for a reply in the form of a server_assoc | ||||
| message. After receipt of the message it performs the following | ||||
| checks: | ||||
| * The client checks that the message contains a conforming | ||||
| version number. | ||||
| * It checks that the nonce sent back by the server matches the | ||||
| one transmitted in client_assoc, | ||||
| * It also verifies that the server has chosen the encryption and | ||||
| hash algorithms from its proposal sent in the client_assoc | ||||
| message and that this proposal was not altered. | ||||
| * Furthermore, it performs authenticity checks on the | ||||
| certificate chain and the signature. | ||||
| If one of the checks fails, the client MUST abort the run. | ||||
| +------------------------+ | ||||
| | o Choose version | | ||||
| | o Choose algorithms | | ||||
| | o Acquire certificates | | ||||
| | o Assemble response | | ||||
| | o Create signature | | ||||
| +-----------+------------+ | ||||
| | | ||||
| <-+-> | ||||
| Server ---------------------------> | ||||
| /| \ | ||||
| client_ / \ server_ | ||||
| assoc / \ assoc | ||||
| / \| | ||||
| Client ---------------------------> | ||||
| <------ Association -----> | ||||
| exchange | ||||
| Procedure for association and cookie exchange. | ||||
| 6.2. Cookie Messages | ||||
| During this message exchange, the server transmits a secret cookie to | ||||
| the client securely. The cookie will later be used for integrity | ||||
| protection during unicast time synchronization. | ||||
| 6.2.1. Goals of the Cookie Exchange | ||||
| The cookie exchange: | ||||
| o enables the server to check the client's authorization via its | ||||
| certificate (optional), | ||||
| o supplies the client with the correct cookie for its association to | ||||
| the server, | ||||
| o guarantees to the client that the cookie originates from the | ||||
| server and that it is based on the client's original, unaltered | ||||
| request. | ||||
| o guarantees that the received cookie is unknown to anyone but the | ||||
| server and the client. | ||||
| 6.2.2. Message Type: "client_cook" | ||||
| This message is sent by the client upon successful authentication of | ||||
| the server. In this message, the client requests a cookie from the | ||||
| server. The message contains | ||||
| o the NTS message ID "client_cook", | ||||
| o a nonce, | ||||
| o the negotiated version number, | ||||
| o the negotiated signature algorithm, | ||||
| o the negotiated encryption algorithm, | ||||
| o the negotiated hash algorithm H, | ||||
| o the client's certificate. | ||||
| 6.2.3. Message Type: "server_cook" | ||||
| This message is sent by the server upon receipt of a client_cook | ||||
| message. The server generates the hash of the client's certificate, | ||||
| as conveyed during client_cook, in order to calculate the cookie | ||||
| according to Section 5. This message contains | ||||
| o the NTS message ID "server_cook" | ||||
| o the version number as transmitted in client_cook, | ||||
| o a concatenated datum which is encrypted with the client's public | ||||
| key, according to the encryption algorithm transmitted in the | ||||
| client_cook message. The concatenated datum contains | ||||
| * the nonce transmitted in client_cook, and | ||||
| * the cookie. | ||||
| o a signature, created with the server's private key, calculated | ||||
| over all of the data listed above. This signature MUST be | ||||
| calculated according to the transmitted signature algorithm from | ||||
| the client_cook message. | ||||
| 6.2.4. Procedure Overview of the Cookie Exchange | ||||
| For a cookie exchange, the following steps are performed: | ||||
| 1. The client sends a client_cook message to the server. The client | ||||
| MUST save the included nonce until the reply has been processed. | ||||
| 2. Upon receipt of a client_cook message, the server checks whether | ||||
| it supports the given cryptographic algorithms. It then | ||||
| calculates the cookie according to the formula given in | ||||
| Section 5. The server MAY use the client's certificate to check | ||||
| that the client is authorized to use the secure time | ||||
| synchronization service. With this, it MUST construct a | ||||
| server_cook message as described in Section 6.2.3. | ||||
| 3. The client awaits a reply in the form of a server_cook message; | ||||
| upon receipt it executes the following actions: | ||||
| * It verifies that the received version number matches the one | ||||
| negotiated beforehand. | ||||
| * It verifies the signature using the server's public key. The | ||||
| signature has to authenticate the encrypted data. | ||||
| * It decrypts the encrypted data with its own private key. | ||||
| * It checks that the decrypted message is of the expected | ||||
| format: the concatenation of a 128 bit nonce and a 128 bit | ||||
| cookie. | ||||
| * It verifies that the received nonce matches the nonce sent in | 6.1. Unicast Time Synchronisation Messages | |||
| the client_cook message. | ||||
| If one of those checks fails, the client MUST abort the run. | In this message exchange, the usual time synchronization process is | |||
| executed, with the addition of integrity protection for all messages | ||||
| that the server sends. This message exchange can be repeatedly | ||||
| performed as often as the client desires and as long as the integrity | ||||
| of the server's time responses is verified successfully. | ||||
| +----------------------------+ | 6.1.1. Preconditions for the Unicast Time Synchronization Exchange | |||
| | o OPTIONAL: Check client's | | ||||
| | authorization | | ||||
| | o Generate cookie | | ||||
| | o Encrypt inner message | | ||||
| | o Generate signature | | ||||
| +-------------+--------------+ | ||||
| | | ||||
| <-+-> | ||||
| Server ---------------------------> | Before this message exchange is available, there are some | |||
| /| \ | requirements that the client and server need to meet: | |||
| client_ / \ server_ | ||||
| cook / \ cook | ||||
| / \| | ||||
| Client ---------------------------> | ||||
| <--- Cookie exchange --> | o They MUST negotiate the hash algorithm for the MAC used in the | |||
| time synchronization messages. Authenticity and integrity of the | ||||
| communication MUST be ensured. | ||||
| Procedure for association and cookie exchange. | o The client MUST know a key input value KIV. Authenticity and | |||
| integrity of the communication MUST be ensured. | ||||
| 6.3. Unicast Time Synchronisation Messages | o Client and server MUST exchange the cookie (which depends on the | |||
| KIV as described in section Section 5). Authenticity, | ||||
| confidentiality and integrity of the communication MUST be | ||||
| ensured. | ||||
| In this message exchange, the usual time synchronization process is | One way of realising these requirements is to use the Association and | |||
| executed, with the addition of integrity protection for all messages | Cookie Message Exchanges described in Appendix B. | |||
| that the server sends. This message can be repeatedly exchanged as | ||||
| often as the client desires and as long as the integrity of the | ||||
| server's time responses is verified successfully. | ||||
| 6.3.1. Goals of the Unicast Time Synchronization Exchange | 6.1.2. Goals of the Unicast Time Synchronization Exchange | |||
| The unicast time synchronization exchange: | The unicast time synchronization exchange: | |||
| o exchanges (unicast) time synchronization data as specified by the | o exchanges (unicast) time synchronization data as specified by the | |||
| appropriate time synchronization protocol, | appropriate time synchronization protocol, | |||
| o guarantees to the client that the response originates from the | o guarantees authenticity and integrity of the response to the | |||
| server and is based on the client's original, unaltered request. | client, | |||
| 6.3.2. Message Type: "time_request" | o guarantees request-response-consistency to the client. | |||
| 6.1.3. Message Type: "time_request" | ||||
| This message is sent by the client when it requests a time exchange. | This message is sent by the client when it requests a time exchange. | |||
| It contains | It contains | |||
| o the NTS message ID "time_request", | o the NTS message ID "time_request", | |||
| o the negotiated version number, | o the negotiated version number, | |||
| o a nonce, | o a nonce, | |||
| o the negotiated hash algorithm H, | o the negotiated hash algorithm H, | |||
| o the hash of the client's certificate under H. | o the client's key input value (for which the client knows the | |||
| associated cookie). | ||||
| 6.3.3. Message Type: "time_response" | 6.1.4. Message Type: "time_response" | |||
| This message is sent by the server after it has received a | This message is sent by the server after it has received a | |||
| time_request message. Prior to this the server MUST recalculate the | time_request message. Prior to this the server MUST recalculate the | |||
| client's cookie by using the hash of the client's certificate and the | client's cookie by using the received key input value and the | |||
| transmitted hash algorithm. The message contains | transmitted hash algorithm. The message contains | |||
| o the NTS message ID "time_response", | o the NTS message ID "time_response", | |||
| o the version number as transmitted in time_request, | o the version number as transmitted in time_request, | |||
| o the server's time synchronization response data, | o the server's time synchronization response data, | |||
| o the nonce transmitted in time_request, | o the nonce transmitted in time_request, | |||
| o a MAC (generated with the cookie as key) for verification of all | o a MAC (generated with the cookie as key) for verification of all | |||
| of the above data. | of the above data. | |||
| 6.3.4. Procedure Overview of the Unicast Time Synchronization Exchange | 6.1.5. Procedure Overview of the Unicast Time Synchronization Exchange | |||
| For a unicast time synchronization exchange, the following steps are | For a unicast time synchronization exchange, the following steps are | |||
| performed: | performed: | |||
| 1. The client sends a time_request message to the server. The | 1. The client sends a time_request message to the server. The | |||
| client MUST save the included nonce and the transmit_timestamp | client MUST save the included nonce and the transmit_timestamp | |||
| (from the time synchronization data) as a correlated pair for | (from the time synchronization data) as a correlated pair for | |||
| later verification steps. | later verification steps. | |||
| 2. Upon receipt of a time_request message, the server re-calculates | 2. Upon receipt of a time_request message, the server re-calculates | |||
| the cookie, then computes the necessary time synchronization data | the cookie, then computes the necessary time synchronization data | |||
| and constructs a time_response message as given in Section 6.3.3. | and constructs a time_response message as given in Section 6.1.4. | |||
| 3. It awaits a reply in the form of a time_response message. Upon | 3. The client awaits a reply in the form of a time_response message. | |||
| receipt, it checks: | Upon receipt, it checks: | |||
| * that the transmitted version number matches the one negotiated | * that the transmitted version number matches the one negotiated | |||
| previously, | previously, | |||
| * that the transmitted nonce belongs to a previous time_request | * that the transmitted nonce belongs to a previous time_request | |||
| message, | message, | |||
| * that the transmit_timestamp in that time_request message | * that the transmit_timestamp in that time_request message | |||
| matches the corresponding time stamp from the synchronization | matches the corresponding time stamp from the synchronization | |||
| data received in the time_response, and | data received in the time_response, and | |||
| * that the appended MAC verifies the received synchronization | * that the appended MAC verifies the received synchronization | |||
| data, version number and nonce. | data, version number and nonce. | |||
| If at least one of the first three checks fails (i.e. if the | If at least one of the first three checks fails (i.e. if the | |||
| version number does not match, if the client has never used the | version number does not match, if the client has never used the | |||
| nonce transmitted in the time_response message, or if it has used | nonce transmitted in the time_response message, or if it has used | |||
| the nonce with initial time synchronization data different from | the nonce with initial time synchronization data different from | |||
| that in the response), then the client MUST ignore this | that in the response), then the client MUST ignore this | |||
| time_response message. If the MAC is invalid, the client MUST do | time_response message. If the MAC is invalid, the client MUST do | |||
| one of the following: abort the run or go back to step 5 (because | one of the following: abort the run or send another cookie | |||
| the cookie might have changed due to a server seed refresh). If | request (because the cookie might have changed due to a server | |||
| both checks are successful, the client SHOULD continue time | seed refresh). If both checks are successful, the client SHOULD | |||
| synchronization by going back to step 7. | continue time synchronization. | |||
| +-----------------------+ | +-----------------------+ | |||
| | o Re-generate cookie | | | o Re-generate cookie | | |||
| | o Assemble response | | | o Assemble response | | |||
| | o Generate MAC | | | o Generate MAC | | |||
| +-----------+-----------+ | +-----------+-----------+ | |||
| | | | | |||
| <-+-> | <-+-> | |||
| Server -----------------------------------------------> | Server -----------------------------------------------> | |||
| skipping to change at page 14, line 44 ¶ | skipping to change at page 9, line 44 ¶ | |||
| request / \ response | request / \ response | |||
| / \| | / \| | |||
| Client -----------------------------------------------> | Client -----------------------------------------------> | |||
| <------ Unicast time ------> <- Client-side -> | <------ Unicast time ------> <- Client-side -> | |||
| synchronization validity | synchronization validity | |||
| exchange checks | exchange checks | |||
| Procedure for unicast time synchronization exchange. | Procedure for unicast time synchronization exchange. | |||
| 6.4. Broadcast Parameter Messages | 6.2. Broadcast Time Synchronization Exchange | |||
| In this message exchange, the client receives the necessary | ||||
| information to execute the TESLA protocol in a secured broadcast | ||||
| association. The client can only initiate a secure broadcast | ||||
| association after successful association and cookie exchanges and | ||||
| only if it has made sure that its clock is roughly synchronized to | ||||
| the server's. | ||||
| See Appendix B for more details on TESLA. | ||||
| 6.4.1. Goals of the Broadcast Parameter Exchange | ||||
| The broadcast parameter exchange | ||||
| o provides the client with all the information necessary to process | ||||
| broadcast time synchronization messages from the server, and | ||||
| o guarantees authenticity, integrity and freshness of the broadcast | ||||
| parameters to the client. | ||||
| 6.4.2. Message Type: "client_bpar" | ||||
| This message is sent by the client in order to establish a secured | ||||
| time broadcast association with the server. It contains | ||||
| o the NTS message ID "client_bpar", | ||||
| o the NTS version number negotiated during association, | ||||
| o a nonce, | ||||
| o the client's hostname, and | ||||
| o the signature algorithm negotiated during association. | ||||
| 6.4.3. Message Type: "server_bpar" | ||||
| This message is sent by the server upon receipt of a client_bpar | ||||
| message during the broadcast loop of the server. It contains | ||||
| o the NTS message ID "server_bpar", | ||||
| o the version number as transmitted in the client_bpar message, | 6.2.1. Preconditions for the Broadcast Time Synchronization Exchange | |||
| o the nonce transmitted in client_bpar, | Before this message exchange is available, there are some | |||
| requirements that the client and server need to meet: | ||||
| o the one-way functions used for building the key chain, and | o The client MUST receive all the information necessary to process | |||
| broadcast time synchronization messages from the server. This | ||||
| includes | ||||
| o the disclosure schedule of the keys. This contains: | * the one-way functions used for building the key chain, | |||
| * the last key of the key chain, | * the last key of the key chain, | |||
| * time interval duration, | * time interval duration, | |||
| * the disclosure delay (number of intervals between use and | * the disclosure delay (number of intervals between use and | |||
| disclosure of a key), | disclosure of a key), | |||
| * the time at which the next time interval will start, and | * the time at which the next time interval will start, and | |||
| * the next interval's associated index. | * the next interval's associated index. | |||
| o The message also contains a signature signed by the server with | o The communication of the data listed above MUST guarantee | |||
| its private key, verifying all the data listed above. | authenticity of the server, as well as integrity and freshness of | |||
| the broadcast parameters to the client. | ||||
| 6.4.4. Procedure Overview of the Broadcast Parameter Exchange | ||||
| A broadcast parameter exchange consists of the following steps: | ||||
| 1. The client sends a client_bpar message to the server. It MUST | ||||
| remember the transmitted values for the nonce, the version number | ||||
| and the signature algorithm. | ||||
| 2. Upon receipt of a client_bpar message, the server constructs and | ||||
| sends a server_bpar message as described in Section 6.4.3. | ||||
| 3. The client waits for a reply in the form of a server_bpar | ||||
| message, on which it performs the following checks: | ||||
| * The message must contain all the necessary information for the | ||||
| TESLA protocol, as listed in Section 6.4.3. | ||||
| * The message must contain a nonce belonging to a client_bpar | ||||
| message that the client has previously sent. | ||||
| * Verification of the message's signature. | ||||
| If any information is missing or if the server's signature cannot | ||||
| be verified, the client MUST abort the broadcast run. If all | ||||
| checks are successful, the client MUST remember all the broadcast | ||||
| parameters received for later checks. | ||||
| +---------------------+ | ||||
| | o Assemble response | | ||||
| | o Create public-key | | ||||
| | signature | | ||||
| +----------+----------+ | ||||
| | | ||||
| <-+-> | ||||
| Server ---------------------------------------------> | ||||
| /| \ | ||||
| client_ / \ server_ | ||||
| bpar / \ bpar | ||||
| / \| | ||||
| Client ---------------------------------------------> | ||||
| <------- Broadcast ------> <- Client-side -> | ||||
| parameter validity | ||||
| exchange checks | ||||
| Procedure for unicast time synchronization exchange. | ||||
| 6.5. Broadcast Time Synchronization Exchange | ||||
| Via a stream of messages of the following message type, the server | ||||
| keeps sending broadcast time synchronization messages to all | ||||
| participating clients. | ||||
| 6.5.1. Goals of the Broadcast Time Synchronization Exchange | 6.2.2. Goals of the Broadcast Time Synchronization Exchange | |||
| The broadcast time synchronization exchange: | The broadcast time synchronization exchange: | |||
| o transmits (broadcast) time synchronization data from the server to | o transmits (broadcast) time synchronization data from the server to | |||
| the client as specified by the appropriate time synchronization | the client as specified by the appropriate time synchronization | |||
| protocol, | protocol, | |||
| o guarantees to the client that the received synchronization data | o guarantees to the client that the received synchronization data | |||
| has arrived in a timely manner as required by the TESLA protocol | has arrived in a timely manner as required by the TESLA protocol | |||
| and is trustworthy enough to be stored for later checks, | and is trustworthy enough to be stored for later checks, | |||
| o additionally guarantees authenticity of a certain broadcast | o additionally guarantees authenticity of a certain broadcast | |||
| synchronization message in the client's storage. | synchronization message in the client's storage. | |||
| 6.5.2. Message Type: "server_broad" | 6.2.3. Message Type: "server_broad" | |||
| This message is sent by the server over the course of its broadcast | This message is sent by the server over the course of its broadcast | |||
| schedule. It is part of any broadcast association. It contains | schedule. It is part of any broadcast association. It contains | |||
| o the NTS message ID "server_broad", | o the NTS message ID "server_broad", | |||
| o the version number that the server is working under, | o the version number that the server is working under, | |||
| o time broadcast data, | o time broadcast data, | |||
| o the index that belongs to the current interval (and therefore | o the index that belongs to the current interval (and therefore | |||
| identifies the current, yet undisclosed, key), | identifies the current, yet undisclosed, key), | |||
| o the disclosed key of the previous disclosure interval (current | o the disclosed key of the previous disclosure interval (current | |||
| time interval minus disclosure delay), | time interval minus disclosure delay), | |||
| o a MAC, calculated with the key for the current time interval, | o a MAC, calculated with the key for the current time interval, | |||
| verifying | verifying | |||
| * the message ID, | * the message ID, | |||
| * the version number, and | * the version number, and | |||
| * the time data. | * the time data. | |||
| 6.5.3. Procedure Overview of Broadcast Time Synchronization Exchange | 6.2.4. Procedure Overview of Broadcast Time Synchronization Exchange | |||
| A broadcast time synchronization message exchange consists of the | A broadcast time synchronization message exchange consists of the | |||
| following steps: | following steps: | |||
| 1. The server follows the TESLA protocol by regularly sending | 1. The server follows the TESLA protocol by regularly sending | |||
| server_broad messages as described in Section 6.5.2, adhering to | server_broad messages as described in Section 6.2.3, adhering to | |||
| its own disclosure schedule. | its own disclosure schedule. | |||
| 2. The client awaits time synchronization data in the form of a | 2. The client awaits time synchronization data in the form of a | |||
| server_broadcast message. Upon receipt, it performs the | server_broadcast message. Upon receipt, it performs the | |||
| following checks: | following checks: | |||
| * Proof that the MAC is based on a key that is not yet disclosed | * Proof that the MAC is based on a key that is not yet disclosed | |||
| (packet timeliness). This is achieved via a combination of | (packet timeliness). This is achieved via a combination of | |||
| checks. First, the disclosure schedule is used, which | checks. First, the disclosure schedule is used, which | |||
| requires loose time synchronization. If this is successful, | requires loose time synchronization. If this is successful, | |||
| skipping to change at page 19, line 36 ¶ | skipping to change at page 12, line 34 ¶ | |||
| \| | \| | |||
| Client ----------------------------------> | Client ----------------------------------> | |||
| < Broadcast > <- Client-side -> | < Broadcast > <- Client-side -> | |||
| time sync. validity and | time sync. validity and | |||
| exchange timeliness | exchange timeliness | |||
| checks | checks | |||
| Procedure for broadcast time synchronization exchange. | Procedure for broadcast time synchronization exchange. | |||
| 6.6. Broadcast Keycheck | 6.3. Broadcast Keycheck | |||
| This message exchange is performed for an additional check of packet | This message exchange is performed for an additional check of packet | |||
| timeliness in the course of the TESLA scheme, see Appendix B. | timeliness in the course of the TESLA scheme, see Appendix C. | |||
| 6.6.1. Goals of the Broadcast Keycheck Exchange | 6.3.1. Preconditions for the Broadcast Keycheck Exchange | |||
| Before this message exchange is available, there are some | ||||
| requirements that the client and server need to meet: | ||||
| o They MUST negotiate the hash algorithm for the MAC used in the | ||||
| time synchronization messages. Authenticity and integrity of the | ||||
| communication MUST be ensured. | ||||
| o The client MUST know a key input value KIV. Authenticity and | ||||
| integrity of the communication MUST be ensured. | ||||
| o Client and server MUST exchange the cookie (which depends on the | ||||
| KIV as described in section Section 5). Authenticity, | ||||
| confidentiality and integrity of the communication MUST be | ||||
| ensured. | ||||
| These requirements conform to those for the unicast time | ||||
| synchronization exchange. Accordingly, they too can be realised via | ||||
| the Association and Cookie Message Exchanges described in Appendix B | ||||
| (Appendix B). | ||||
| 6.3.2. Goals of the Broadcast Keycheck Exchange | ||||
| The keycheck exchange: | The keycheck exchange: | |||
| o guarantees to the client that the key belonging to the respective | o guarantees to the client that the key belonging to the respective | |||
| TESLA interval communicated in the exchange had not been disclosed | TESLA interval communicated in the exchange had not been disclosed | |||
| before the client_keycheck message was sent. | before the client_keycheck message was sent. | |||
| o guarantees to the client the timeliness of any broadcast packet | o guarantees to the client the timeliness of any broadcast packet | |||
| secured with this key if it arrived before client_keycheck was | secured with this key if it arrived before client_keycheck was | |||
| sent. | sent. | |||
| 6.6.2. Message Type: "client_keycheck" | 6.3.3. Message Type: "client_keycheck" | |||
| A message of this type is sent by the client in order to initiate an | A message of this type is sent by the client in order to initiate an | |||
| additional check of packet timeliness for the TESLA scheme. It | additional check of packet timeliness for the TESLA scheme. It | |||
| contains | contains | |||
| o the NTS message ID "client_keycheck", | o the NTS message ID "client_keycheck", | |||
| o the NTS version number negotiated during association, | o the NTS version number negotiated during association, | |||
| o a nonce, | o a nonce, | |||
| o an interval number from the TESLA disclosure schedule, | o an interval number from the TESLA disclosure schedule, | |||
| o the hash algorithm H negotiated during association, and | o the hash algorithm H negotiated during association, and | |||
| o the hash of the client's certificate under H. | o the client's key input value KIV. | |||
| 6.6.3. Message Type: "server_keycheck" | 6.3.4. Message Type: "server_keycheck" | |||
| A message of this type is sent by the server upon receipt of a | A message of this type is sent by the server upon receipt of a | |||
| client_keycheck message during the broadcast loop of the server. | client_keycheck message during the broadcast loop of the server. | |||
| Prior to this, the server MUST recalculate the client's cookie by | Prior to this, the server MUST recalculate the client's cookie by | |||
| using the hash of the client's certificate and the transmitted hash | using the received key input value and the transmitted hash | |||
| algorithm. It contains | algorithm. It contains | |||
| o the NTS message ID "server_keycheck" | o the NTS message ID "server_keycheck" | |||
| o the version number as transmitted in "client_keycheck, | o the version number as transmitted in "client_keycheck, | |||
| o the nonce transmitted in the client_keycheck message, | o the nonce transmitted in the client_keycheck message, | |||
| o the interval number transmitted in the client_keycheck message, | o the interval number transmitted in the client_keycheck message, | |||
| and | and | |||
| o a MAC (generated with the cookie as key) for verification of all | o a MAC (generated with the cookie as key) for verification of all | |||
| of the above data. | of the above data. | |||
| 6.6.4. Procedure Overview of the Broadcast Keycheck Exchange | 6.3.5. Procedure Overview of the Broadcast Keycheck Exchange | |||
| A broadcast keycheck message exchange consists of the following | A broadcast keycheck message exchange consists of the following | |||
| steps: | steps: | |||
| 1. The client sends a client_keycheck message. It MUST memorize the | 1. The client sends a client_keycheck message. It MUST memorize the | |||
| nonce and the time interval number that it sends as a correlated | nonce and the time interval number that it sends as a correlated | |||
| pair. | pair. | |||
| 2. Upon receipt of a client_keycheck message, the server looks up | 2. Upon receipt of a client_keycheck message, the server looks up | |||
| whether it has already disclosed the key associated with the | whether it has already disclosed the key associated with the | |||
| interval number transmitted in that message. If it has not | interval number transmitted in that message. If it has not | |||
| disclosed it, it constructs and sends the appropriate | disclosed it, it constructs and sends the appropriate | |||
| server_keycheck message as described in Section 6.6.3. For more | server_keycheck message as described in Section 6.3.4. For more | |||
| details, see also Appendix B. | details, see also Appendix C. | |||
| 3. The client awaits a reply in the form of a server_keycheck | 3. The client awaits a reply in the form of a server_keycheck | |||
| message. On receipt, it performs the following checks: | message. On receipt, it performs the following checks: | |||
| * that the transmitted version number matches the one negotiated | * that the transmitted version number matches the one negotiated | |||
| previously, | previously, | |||
| * that the transmitted nonce belongs to a previous | * that the transmitted nonce belongs to a previous | |||
| client_keycheck message, | client_keycheck message, | |||
| skipping to change at page 22, line 10 ¶ | skipping to change at page 15, line 36 ¶ | |||
| The server has to calculate a random seed which has to be kept | The server has to calculate a random seed which has to be kept | |||
| secret. The server MUST generate a seed for each supported hash | secret. The server MUST generate a seed for each supported hash | |||
| algorithm, see Section 8.1. | algorithm, see Section 8.1. | |||
| According to the requirements in [RFC7384], the server MUST refresh | According to the requirements in [RFC7384], the server MUST refresh | |||
| each server seed periodically. Consequently, the cookie memorized by | each server seed periodically. Consequently, the cookie memorized by | |||
| the client becomes obsolete. In this case, the client cannot verify | the client becomes obsolete. In this case, the client cannot verify | |||
| the MAC attached to subsequent time response messages and has to | the MAC attached to subsequent time response messages and has to | |||
| respond accordingly by re-initiating the protocol with a cookie | respond accordingly by re-initiating the protocol with a cookie | |||
| request (Section 6.2). | request (Appendix B.3). | |||
| 8. Hash Algorithms and MAC Generation | 8. Hash Algorithms and MAC Generation | |||
| 8.1. Hash Algorithms | 8.1. Hash Algorithms | |||
| Hash algorithms are used at different points: calculation of the | Hash algorithms are used for calculation of the cookie and the MAC. | |||
| cookie and the MAC, and hashing of the client's certificate. The | The client and the server negotiate a hash algorithm H during the | |||
| client and the server negotiate a hash algorithm H during the | association phase at the beginning. The selected algorithm H is used | |||
| association message exchange (Section 6.1) at the beginning. The | for all hashing processes in that run. | |||
| selected algorithm H is used for all hashing processes in that run. | ||||
| In the TESLA scheme, hash algorithms are used as pseudo-random | In the TESLA scheme, hash algorithms are used as pseudo-random | |||
| functions to construct the one-way key chain. Here, the utilized | functions to construct the one-way key chain. Here, the utilized | |||
| hash algorithm is communicated by the server and is non-negotiable. | hash algorithm is communicated by the server and is non-negotiable. | |||
| Note: | Note: | |||
| Any hash algorithm is prone to be compromised in the future. A | Any hash algorithm is prone to be compromised in the future. A | |||
| successful attack on a hash algorithm would enable any NTS client | successful attack on a hash algorithm would enable any NTS client | |||
| to derive the server seed from its own cookie. Therefore, the | to derive the server seed from its own cookie. Therefore, the | |||
| skipping to change at page 23, line 11 ¶ | skipping to change at page 16, line 37 ¶ | |||
| transfer approaches like NTP and PTP consists basically of time | transfer approaches like NTP and PTP consists basically of time | |||
| stamps, which are not considered secret [RFC7384]. Therefore, | stamps, which are not considered secret [RFC7384]. Therefore, | |||
| encryption of the time synchronization protocol packet's payload is | encryption of the time synchronization protocol packet's payload is | |||
| not considered in this document. However, an attacker can exploit | not considered in this document. However, an attacker can exploit | |||
| the exchange of time synchronization protocol packets for topology | the exchange of time synchronization protocol packets for topology | |||
| detection and inference attacks as described in | detection and inference attacks as described in | |||
| [I-D.iab-privsec-confidentiality-threat]. To make such attacks more | [I-D.iab-privsec-confidentiality-threat]. To make such attacks more | |||
| difficult, that draft recommends the encryption of the packet | difficult, that draft recommends the encryption of the packet | |||
| payload. Yet, in the case of time synchronization protocols the | payload. Yet, in the case of time synchronization protocols the | |||
| confidentiality protection of time synchronization packet's payload | confidentiality protection of time synchronization packet's payload | |||
| is of secondary role since the packets meta data (IP addresses, port | is of secondary importance since the packet's meta data (IP | |||
| numbers, possibly packet size and regular sending intervals) carry | addresses, port numbers, possibly packet size and regular sending | |||
| more information than the payload. To enhance the privacy of the | intervals) carry more information than the payload. To enhance the | |||
| time synchronization partners, the usage of tunnel protocols such as | privacy of the time synchronization partners, the usage of tunnel | |||
| IPsec and MACsec, where applicable, is therefore more suited than | protocols such as IPsec and MACsec, where applicable, is therefore | |||
| confidentiality protection of the payload. | more suited than confidentiality protection of the payload. | |||
| 10.2. Initial Verification of the Server Certificates | 10.2. Initial Verification of the Server Certificates | |||
| The client has to verify the validity of the certificates during the | The client may wish to verify the validity of certificates during the | |||
| certification message exchange (Section 6.1.3). Since it generally | initial association phase. Since it generally has no reliable time | |||
| has no reliable time during this initial communication phase, it is | during this initial communication phase, it is impossible to verify | |||
| impossible to verify the period of validity of the certificates. To | the period of validity of the certificates. To solve this chicken- | |||
| solve this chicken-and-egg problem, the client as to rely on external | and-egg problem, the client has to rely on external means. | |||
| means. | ||||
| 10.3. Revocation of Server Certificates | 10.3. Revocation of Server Certificates | |||
| According to Section 7, it is the client's responsibility to initiate | According to Section 7, it is the client's responsibility to initiate | |||
| a new association with the server after the server's certificate | a new association with the server after the server's certificate | |||
| expires. To this end, the client reads the expiration date of the | expires. To this end, the client reads the expiration date of the | |||
| certificate during the certificate message exchange (Section 6.1.3). | certificate during the certificate message exchange (Appendix B.2.3). | |||
| Furthermore, certificates may also be revoked prior to the normal | Furthermore, certificates may also be revoked prior to the normal | |||
| expiration date. To increase security the client MAY periodically | expiration date. To increase security the client MAY periodically | |||
| verify the state of the server's certificate via OCSP. | verify the state of the server's certificate via Online Certificate | |||
| Status Protocol (OCSP) Online Certificate Status Protocol (OCSP) | ||||
| [RFC6960]. | ||||
| 10.4. Mitigating Denial-of-Service for broadcast packets | 10.4. Mitigating Denial-of-Service for broadcast packets | |||
| TESLA authentication buffers packets for delayed authentication. | TESLA authentication buffers packets for delayed authentication. | |||
| This makes the protocol vulnerable to flooding attacks, causing the | This makes the protocol vulnerable to flooding attacks, causing the | |||
| client to buffer excessive numbers of packets. To add stronger DoS | client to buffer excessive numbers of packets. To add stronger DoS | |||
| protection to the protocol, the client and the server use the "not | protection to the protocol, the client and the server use the "not | |||
| re-using keys" scheme of TESLA as pointed out in Section 3.7.2 of RFC | re-using keys" scheme of TESLA as pointed out in Section 3.7.2 of RFC | |||
| 4082 [RFC4082]. In this scheme the server never uses a key for the | 4082 [RFC4082]. In this scheme the server never uses a key for the | |||
| MAC generation more than once. Therefore, the client can discard any | MAC generation more than once. Therefore, the client can discard any | |||
| packet that contains a disclosed key it already knows, thus | packet that contains a disclosed key it already knows, thus | |||
| preventing memory flooding attacks. | preventing memory flooding attacks. | |||
| Note that an alternative approach to enhance TESLA's resistance | Discussion: Note that an alternative approach to enhance TESLA's | |||
| against DoS attacks involves the addition of a group MAC to each | resistance against DoS attacks involves the addition of a group | |||
| packet. This requires the exchange of an additional shared key | MAC to each packet. This requires the exchange of an additional | |||
| common to the whole group. This adds additional complexity to the | shared key common to the whole group. This adds additional | |||
| protocol and hence is currently not considered in this document. | complexity to the protocol and hence is currently not considered | |||
| in this document. | ||||
| 10.5. Delay Attack | 10.5. Delay Attack | |||
| In a packet delay attack, an adversary with the ability to act as a | In a packet delay attack, an adversary with the ability to act as a | |||
| MITM delays time synchronization packets between client and server | MITM delays time synchronization packets between client and server | |||
| asymmetrically [RFC7384]. This prevents the client from accurately | asymmetrically [RFC7384]. This prevents the client from accurately | |||
| measuring the network delay, and hence its time offset to the server | measuring the network delay, and hence its time offset to the server | |||
| [Mizrahi]. The delay attack does not modify the content of the | [Mizrahi]. The delay attack does not modify the content of the | |||
| exchanged synchronization packets. Therefore, cryptographic means do | exchanged synchronization packets. Therefore, cryptographic means do | |||
| not provide a feasible way to mitigate this attack. However, several | not provide a feasible way to mitigate this attack. However, several | |||
| skipping to change at page 24, line 27 ¶ | skipping to change at page 18, line 7 ¶ | |||
| attack. | attack. | |||
| 1. Usage of multiple time servers: this enables the client to detect | 1. Usage of multiple time servers: this enables the client to detect | |||
| the attack, provided that the adversary is unable to delay the | the attack, provided that the adversary is unable to delay the | |||
| synchronization packets between the majority of servers. This | synchronization packets between the majority of servers. This | |||
| approach is commonly used in NTP to exclude incorrect time | approach is commonly used in NTP to exclude incorrect time | |||
| servers [RFC5905]. | servers [RFC5905]. | |||
| 2. Multiple communication paths: The client and server utilize | 2. Multiple communication paths: The client and server utilize | |||
| different paths for packet exchange as described in the I-D | different paths for packet exchange as described in the I-D | |||
| [I-D.shpiner-multi-path-synchronization]. The client can detect | [I-D.ietf-tictoc-multi-path-synchronization]. The client can | |||
| the attack, provided that the adversary is unable to manipulate | detect the attack, provided that the adversary is unable to | |||
| the majority of the available paths [Shpiner]. Note that this | manipulate the majority of the available paths [Shpiner]. Note | |||
| approach is not yet available, neither for NTP nor for PTP. | that this approach is not yet available, neither for NTP nor for | |||
| PTP. | ||||
| 3. Usage of an encrypted connection: the client exchanges all | 3. Usage of an encrypted connection: the client exchanges all | |||
| packets with the time server over an encrypted connection (e.g. | packets with the time server over an encrypted connection (e.g. | |||
| IPsec). This measure does not mitigate the delay attack, but it | IPsec). This measure does not mitigate the delay attack, but it | |||
| makes it more difficult for the adversary to identify the time | makes it more difficult for the adversary to identify the time | |||
| synchronization packets. | synchronization packets. | |||
| 4. For unicast-type messages: Introduction of a threshold value for | 4. For unicast-type messages: Introduction of a threshold value for | |||
| the delay time of the synchronization packets. The client can | the delay time of the synchronization packets. The client can | |||
| discard a time server if the packet delay time of this time | discard a time server if the packet delay time of this time | |||
| skipping to change at page 25, line 17 ¶ | skipping to change at page 18, line 46 ¶ | |||
| authenticity of any received broadcast packets. | authenticity of any received broadcast packets. | |||
| An adversary who is able to delay broadcast packets can cause a time | An adversary who is able to delay broadcast packets can cause a time | |||
| adjustment at the receiving broadcast clients. If the adversary | adjustment at the receiving broadcast clients. If the adversary | |||
| delays broadcast packets continuously, then the time adjustment will | delays broadcast packets continuously, then the time adjustment will | |||
| accumulate until the loose time synchronization requirement is | accumulate until the loose time synchronization requirement is | |||
| violated, which breaks the TESLA scheme. To mitigate this | violated, which breaks the TESLA scheme. To mitigate this | |||
| vulnerability the security condition in TESLA has to be supplemented | vulnerability the security condition in TESLA has to be supplemented | |||
| by an additional check in which the client, upon receipt of a | by an additional check in which the client, upon receipt of a | |||
| broadcast message, verifies the status of the corresponding key via a | broadcast message, verifies the status of the corresponding key via a | |||
| unicast message exchange with the broadcast server (see Appendix B.4 | unicast message exchange with the broadcast server (see Appendix C.4 | |||
| for a detailed description of this check). Note that a broadcast | for a detailed description of this check). Note that a broadcast | |||
| client should also apply the above-mentioned precautions as far as | client should also apply the above-mentioned precautions as far as | |||
| possible. | possible. | |||
| 10.6. Random Number Generation | 10.6. Random Number Generation | |||
| At various points of the protocol, the generation of random numbers | At various points of the protocol, the generation of random numbers | |||
| is required. The employed methods of generation need to be | is required. The employed methods of generation need to be | |||
| cryptographically secure. See [RFC4086] for guidelines concerning | cryptographically secure. See [RFC4086] for guidelines concerning | |||
| this topic. | this topic. | |||
| 11. Acknowledgements | 11. Acknowledgements | |||
| The authors would like to thank Tal Mizrahi, Russ Housley, Steven | The authors would like to thank Tal Mizrahi, Russ Housley, Steven | |||
| Bellovin, David Mills and Kurt Roeckx for discussions and comments on | Bellovin, David Mills, Kurt Roeckx, Rainer Bermbach, Martin Langer | |||
| the design of NTS. Also, thanks go to Harlan Stenn for his technical | and Florian Weimer for discussions and comments on the design of NTS. | |||
| review and specific text contributions to this document. | Also, thanks go to Harlan Stenn for his technical review and specific | |||
| text contributions to this document. | ||||
| 12. References | 12. References | |||
| 12.1. Normative References | 12.1. Normative References | |||
| [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | |||
| Hashing for Message Authentication", RFC 2104, February | Hashing for Message Authentication", RFC 2104, February | |||
| 1997. | 1997. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, March 1997. | Requirement Levels", BCP 14, RFC 2119, March 1997. | |||
| [RFC4082] Perrig, A., Song, D., Canetti, R., Tygar, J., and B. | [RFC4082] Perrig, A., Song, D., Canetti, R., Tygar, J., and B. | |||
| Briscoe, "Timed Efficient Stream Loss-Tolerant | Briscoe, "Timed Efficient Stream Loss-Tolerant | |||
| Authentication (TESLA): Multicast Source Authentication | Authentication (TESLA): Multicast Source Authentication | |||
| Transform Introduction", RFC 4082, June 2005. | Transform Introduction", RFC 4082, June 2005. | |||
| [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, | ||||
| RFC 5652, September 2009. | ||||
| [RFC7384] Mizrahi, T., "Security Requirements of Time Protocols in | [RFC7384] Mizrahi, T., "Security Requirements of Time Protocols in | |||
| Packet Switched Networks", RFC 7384, October 2014. | Packet Switched Networks", RFC 7384, October 2014. | |||
| 12.2. Informative References | 12.2. Informative References | |||
| [I-D.iab-privsec-confidentiality-threat] | [I-D.iab-privsec-confidentiality-threat] | |||
| Barnes, R., Schneier, B., Jennings, C., Hardie, T., | Barnes, R., Schneier, B., Jennings, C., Hardie, T., | |||
| Trammell, B., Huitema, C., and D. Borkmann, | Trammell, B., Huitema, C., and D. Borkmann, | |||
| "Confidentiality in the Face of Pervasive Surveillance: A | "Confidentiality in the Face of Pervasive Surveillance: A | |||
| Threat Model and Problem Statement", draft-iab-privsec- | Threat Model and Problem Statement", draft-iab-privsec- | |||
| confidentiality-threat-03 (work in progress), February | confidentiality-threat-07 (work in progress), May 2015. | |||
| 2015. | ||||
| [I-D.ietf-ntp-cms-for-nts-message] | [I-D.ietf-ntp-cms-for-nts-message] | |||
| Sibold, D., Roettger, S., Teichel, K., and R. Housley, | Sibold, D., Teichel, K., Roettger, S., and R. Housley, | |||
| "Protecting Network Time Security Messages with the | "Protecting Network Time Security Messages with the | |||
| Cryptographic Message Syntax (CMS)", draft-ietf-ntp-cms- | Cryptographic Message Syntax (CMS)", draft-ietf-ntp-cms- | |||
| for-nts-message-00 (work in progress), October 2014. | for-nts-message-03 (work in progress), April 2015. | |||
| [I-D.shpiner-multi-path-synchronization] | [I-D.ietf-tictoc-multi-path-synchronization] | |||
| Shpiner, A., Tse, R., Schelp, C., and T. Mizrahi, "Multi- | Shpiner, A., Tse, R., Schelp, C., and T. Mizrahi, "Multi- | |||
| Path Time Synchronization", draft-shpiner-multi-path- | Path Time Synchronization", draft-ietf-tictoc-multi-path- | |||
| synchronization-03 (work in progress), February 2014. | synchronization-02 (work in progress), April 2015. | |||
| [IEEE1588] | [IEEE1588] | |||
| IEEE Instrumentation and Measurement Society. TC-9 Sensor | IEEE Instrumentation and Measurement Society. TC-9 Sensor | |||
| Technology, "IEEE standard for a precision clock | Technology, "IEEE standard for a precision clock | |||
| synchronization protocol for networked measurement and | synchronization protocol for networked measurement and | |||
| control systems", 2008. | control systems", 2008. | |||
| [Mizrahi] Mizrahi, T., "A game theoretic analysis of delay attacks | [Mizrahi] Mizrahi, T., "A game theoretic analysis of delay attacks | |||
| against time synchronization protocols", in Proceedings of | against time synchronization protocols", in Proceedings of | |||
| Precision Clock Synchronization for Measurement Control | Precision Clock Synchronization for Measurement Control | |||
| and Communication, ISPCS 2012, pp. 1-6, September 2012. | and Communication, ISPCS 2012, pp. 1-6, September 2012. | |||
| [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness | [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness | |||
| Requirements for Security", BCP 106, RFC 4086, June 2005. | Requirements for Security", BCP 106, RFC 4086, June 2005. | |||
| [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network | [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network | |||
| Time Protocol Version 4: Protocol and Algorithms | Time Protocol Version 4: Protocol and Algorithms | |||
| Specification", RFC 5905, June 2010. | Specification", RFC 5905, June 2010. | |||
| [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., | ||||
| Galperin, S., and C. Adams, "X.509 Internet Public Key | ||||
| Infrastructure Online Certificate Status Protocol - OCSP", | ||||
| RFC 6960, June 2013. | ||||
| [Shpiner] Shpiner, A., Revah, Y., and T. Mizrahi, "Multi-path Time | [Shpiner] Shpiner, A., Revah, Y., and T. Mizrahi, "Multi-path Time | |||
| Protocols", in Proceedings of Precision Clock | Protocols", in Proceedings of Precision Clock | |||
| Synchronization for Measurement Control and Communication, | Synchronization for Measurement Control and Communication, | |||
| ISPCS 2013, pp. 1-6, September 2013. | ISPCS 2013, pp. 1-6, September 2013. | |||
| Appendix A. (informative) TICTOC Security Requirements | Appendix A. (informative) TICTOC Security Requirements | |||
| The following table compares the NTS specifications against the | The following table compares the NTS specifications against the | |||
| TICTOC security requirements [RFC7384]. | TICTOC security requirements [RFC7384]. | |||
| skipping to change at page 28, line 25 ¶ | skipping to change at page 22, line 5 ¶ | |||
| | 5.10 | Secure mode | MUST | OK | | | 5.10 | Secure mode | MUST | OK | | |||
| +---------+------------------------------+-------------+------------+ | +---------+------------------------------+-------------+------------+ | |||
| | | Hybrid mode | SHOULD | - | | | | Hybrid mode | SHOULD | - | | |||
| +---------+------------------------------+-------------+------------+ | +---------+------------------------------+-------------+------------+ | |||
| *) See discussion in Section 10.5. | *) See discussion in Section 10.5. | |||
| Comparison of NTS specification against Security Requirements of Time | Comparison of NTS specification against Security Requirements of Time | |||
| Protocols in Packet Switched Networks (RFC 7384) | Protocols in Packet Switched Networks (RFC 7384) | |||
| Appendix B. (normative) Using TESLA for Broadcast-Type Messages | Appendix B. (normative) Inherent Association Protocol Messages | |||
| For broadcast-type messages , NTS adopts the TESLA protocol with some | One option for completing association, cookie exchange, and also | |||
| broadcast parameter exchange between a client and server is to use | ||||
| the message exchanges listed below. | ||||
| B.1. Overview of NTS with Inherent Association Protocol | ||||
| This inherent association protocol applies X.509 certificates to | ||||
| verify the authenticity of the time server and to exchange the | ||||
| cookie. This is done in two separate message exchanges, described | ||||
| below. A client needs a public/private key pair for encryption, with | ||||
| the public key enclosed in a certificate. A server needs a public/ | ||||
| private key pair for signing, with the public key enclosed in a | ||||
| certificate. If a participant intends to act as both a client and a | ||||
| server, it MUST have two different key pairs for these purposes. | ||||
| If this protocol is employed, the hash value of the client's | ||||
| certificate is used as the client's key input value, i.e. the cookie | ||||
| is calculated according to: | ||||
| cookie = MSB_<b> (HMAC(server seed, H(certificate of client))). | ||||
| The client's certificate contains the client's public key and enables | ||||
| the server to identify the client, if client authorization is | ||||
| desired. | ||||
| B.2. Association Message Exchange | ||||
| In this message exchange, the participants negotiate the hash and | ||||
| encryption algorithms that are used throughout the protocol. In | ||||
| addition, the client receives the certification chain up to a trusted | ||||
| anchor. With the established certification chain the client is able | ||||
| to verify the server's signatures and, hence, the authenticity of | ||||
| future NTS messages from the server is ensured. | ||||
| B.2.1. Goals of the Association Exchange | ||||
| The association exchange: | ||||
| o enables the client to verify any communication with the server as | ||||
| authentic, | ||||
| o lets the participants negotiate NTS version and algorithms, | ||||
| o guarantees authenticity and integrity of the negotiation result to | ||||
| the client, | ||||
| o guarantees to the client that the negotiation result is based on | ||||
| the client's original, unaltered request. | ||||
| B.2.2. Message Type: "client_assoc" | ||||
| The protocol sequence starts with the client sending an association | ||||
| message, called client_assoc. This message contains | ||||
| o the NTS message ID "client_assoc", | ||||
| o a nonce, | ||||
| o the version number of NTS that the client wants to use (this | ||||
| SHOULD be the highest version number that it supports), | ||||
| o the hostname of the client, | ||||
| o a selection of accepted hash algorithms, and | ||||
| o a selection of accepted encryption algorithms. | ||||
| B.2.3. Message Type: "server_assoc" | ||||
| This message is sent by the server upon receipt of client_assoc. It | ||||
| contains | ||||
| o the NTS message ID "server_assoc", | ||||
| o the nonce transmitted in client_assoc, | ||||
| o the client's proposal for the version number, selection of | ||||
| accepted hash algorithms and selection of accepted encryption | ||||
| algorithms, as transmitted in client_assoc, | ||||
| o the version number used for the rest of the protocol (which SHOULD | ||||
| be determined as the minimum over the client's suggestion in the | ||||
| client_assoc message and the highest supported by the server), | ||||
| o the hostname of the server, | ||||
| o the server's choice of algorithm for encryption and for | ||||
| cryptographic hashing, all of which MUST be chosen from the | ||||
| client's proposals, | ||||
| o a signature, calculated over the data listed above, with the | ||||
| server's private key and according to the signature algorithm | ||||
| which is also used for the certificates that are included (see | ||||
| below), and | ||||
| o a chain of certificates, which starts at the server and goes up to | ||||
| a trusted authority; each certificate MUST be certified by the one | ||||
| directly following it. | ||||
| B.2.4. Procedure Overview of the Association Exchange | ||||
| For an association exchange, the following steps are performed: | ||||
| 1. The client sends a client_assoc message to the server. It MUST | ||||
| keep the transmitted values for the version number and algorithms | ||||
| available for later checks. | ||||
| 2. Upon receipt of a client_assoc message, the server constructs and | ||||
| sends a reply in the form of a server_assoc message as described | ||||
| in Appendix B.2.3. Upon unsuccessful negotiation for version | ||||
| number or algorithms the server_assoc message MUST contain an | ||||
| error code. | ||||
| 3. The client waits for a reply in the form of a server_assoc | ||||
| message. After receipt of the message it performs the following | ||||
| checks: | ||||
| * The client checks that the message contains a conforming | ||||
| version number. | ||||
| * It checks that the nonce sent back by the server matches the | ||||
| one transmitted in client_assoc, | ||||
| * It also verifies that the server has chosen the encryption and | ||||
| hash algorithms from its proposal sent in the client_assoc | ||||
| message and that this proposal was not altered. | ||||
| * Furthermore, it performs authenticity checks on the | ||||
| certificate chain and the signature. | ||||
| If one of the checks fails, the client MUST abort the run. | ||||
| +------------------------+ | ||||
| | o Choose version | | ||||
| | o Choose algorithms | | ||||
| | o Acquire certificates | | ||||
| | o Assemble response | | ||||
| | o Create signature | | ||||
| +-----------+------------+ | ||||
| | | ||||
| <-+-> | ||||
| Server ---------------------------> | ||||
| /| \ | ||||
| client_ / \ server_ | ||||
| assoc / \ assoc | ||||
| / \| | ||||
| Client ---------------------------> | ||||
| <------ Association -----> | ||||
| exchange | ||||
| Procedure for association and cookie exchange. | ||||
| B.3. Cookie Messages | ||||
| During this message exchange, the server transmits a secret cookie to | ||||
| the client securely. The cookie will later be used for integrity | ||||
| protection during unicast time synchronization. | ||||
| B.3.1. Goals of the Cookie Exchange | ||||
| The cookie exchange: | ||||
| o enables the server to check the client's authorization via its | ||||
| certificate (optional), | ||||
| o supplies the client with the correct cookie and corresponding KIV | ||||
| for its association to the server, | ||||
| o guarantees to the client that the cookie originates from the | ||||
| server and that it is based on the client's original, unaltered | ||||
| request. | ||||
| o guarantees that the received cookie is unknown to anyone but the | ||||
| server and the client. | ||||
| B.3.2. Message Type: "client_cook" | ||||
| This message is sent by the client upon successful authentication of | ||||
| the server. In this message, the client requests a cookie from the | ||||
| server. The message contains | ||||
| o the NTS message ID "client_cook", | ||||
| o a nonce, | ||||
| o the negotiated version number, | ||||
| o the negotiated signature algorithm, | ||||
| o the negotiated encryption algorithm, | ||||
| o the negotiated hash algorithm H, | ||||
| o the client's certificate. | ||||
| B.3.3. Message Type: "server_cook" | ||||
| This message is sent by the server upon receipt of a client_cook | ||||
| message. The server generates the hash of the client's certificate, | ||||
| as conveyed during client_cook, in order to calculate the cookie | ||||
| according to Section 5. This message contains | ||||
| o the NTS message ID "server_cook" | ||||
| o the version number as transmitted in client_cook, | ||||
| o a concatenated datum which is encrypted with the client's public | ||||
| key, according to the encryption algorithm transmitted in the | ||||
| client_cook message. The concatenated datum contains | ||||
| * the nonce transmitted in client_cook, and | ||||
| * the cookie. | ||||
| o a signature, created with the server's private key, calculated | ||||
| over all of the data listed above. This signature MUST be | ||||
| calculated according to the transmitted signature algorithm from | ||||
| the client_cook message. | ||||
| B.3.4. Procedure Overview of the Cookie Exchange | ||||
| For a cookie exchange, the following steps are performed: | ||||
| 1. The client sends a client_cook message to the server. The client | ||||
| MUST save the included nonce until the reply has been processed. | ||||
| 2. Upon receipt of a client_cook message, the server checks whether | ||||
| it supports the given cryptographic algorithms. It then | ||||
| calculates the cookie according to the formula given in | ||||
| Section 5. The server MAY use the client's certificate to check | ||||
| that the client is authorized to use the secure time | ||||
| synchronization service. With this, it MUST construct a | ||||
| server_cook message as described in Appendix B.3.3. | ||||
| 3. The client awaits a reply in the form of a server_cook message; | ||||
| upon receipt it executes the following actions: | ||||
| * It verifies that the received version number matches the one | ||||
| negotiated beforehand. | ||||
| * It verifies the signature using the server's public key. The | ||||
| signature has to authenticate the encrypted data. | ||||
| * It decrypts the encrypted data with its own private key. | ||||
| * It checks that the decrypted message is of the expected | ||||
| format: the concatenation of a nonce and a cookie of the | ||||
| expected bit lengths. | ||||
| * It verifies that the received nonce matches the nonce sent in | ||||
| the client_cook message. | ||||
| If one of those checks fails, the client MUST abort the run. | ||||
| +----------------------------+ | ||||
| | o OPTIONAL: Check client's | | ||||
| | authorization | | ||||
| | o Generate cookie | | ||||
| | o Encrypt inner message | | ||||
| | o Generate signature | | ||||
| +-------------+--------------+ | ||||
| | | ||||
| <-+-> | ||||
| Server ---------------------------> | ||||
| /| \ | ||||
| client_ / \ server_ | ||||
| cook / \ cook | ||||
| / \| | ||||
| Client ---------------------------> | ||||
| <--- Cookie exchange --> | ||||
| Procedure for association and cookie exchange. | ||||
| B.3.5. Broadcast Parameter Messages | ||||
| In this message exchange, the client receives the necessary | ||||
| information to execute the TESLA protocol in a secured broadcast | ||||
| association. The client can only initiate a secure broadcast | ||||
| association after successful association and cookie exchanges and | ||||
| only if it has made sure that its clock is roughly synchronized to | ||||
| the server's. | ||||
| See Appendix C for more details on TESLA. | ||||
| B.3.5.1. Goals of the Broadcast Parameter Exchange | ||||
| The broadcast parameter exchange | ||||
| o provides the client with all the information necessary to process | ||||
| broadcast time synchronization messages from the server, and | ||||
| o guarantees authenticity, integrity and freshness of the broadcast | ||||
| parameters to the client. | ||||
| B.3.5.2. Message Type: "client_bpar" | ||||
| This message is sent by the client in order to establish a secured | ||||
| time broadcast association with the server. It contains | ||||
| o the NTS message ID "client_bpar", | ||||
| o the NTS version number negotiated during association, | ||||
| o a nonce, | ||||
| o the client's hostname, and | ||||
| o the signature algorithm negotiated during association. | ||||
| B.3.5.3. Message Type: "server_bpar" | ||||
| This message is sent by the server upon receipt of a client_bpar | ||||
| message during the broadcast loop of the server. It contains | ||||
| o the NTS message ID "server_bpar", | ||||
| o the version number as transmitted in the client_bpar message, | ||||
| o the nonce transmitted in client_bpar, | ||||
| o the one-way functions used for building the key chain, and | ||||
| o the disclosure schedule of the keys. This contains: | ||||
| * the last key of the key chain, | ||||
| * time interval duration, | ||||
| * the disclosure delay (number of intervals between use and | ||||
| disclosure of a key), | ||||
| * the time at which the next time interval will start, and | ||||
| * the next interval's associated index. | ||||
| o The message also contains a signature signed by the server with | ||||
| its private key, verifying all the data listed above. | ||||
| B.3.5.4. Procedure Overview of the Broadcast Parameter Exchange | ||||
| A broadcast parameter exchange consists of the following steps: | ||||
| 1. The client sends a client_bpar message to the server. It MUST | ||||
| remember the transmitted values for the nonce, the version number | ||||
| and the signature algorithm. | ||||
| 2. Upon receipt of a client_bpar message, the server constructs and | ||||
| sends a server_bpar message as described in Appendix B.3.5.3. | ||||
| 3. The client waits for a reply in the form of a server_bpar | ||||
| message, on which it performs the following checks: | ||||
| * The message must contain all the necessary information for the | ||||
| TESLA protocol, as listed in Appendix B.3.5.3. | ||||
| * The message must contain a nonce belonging to a client_bpar | ||||
| message that the client has previously sent. | ||||
| * Verification of the message's signature. | ||||
| If any information is missing or if the server's signature cannot | ||||
| be verified, the client MUST abort the broadcast run. If all | ||||
| checks are successful, the client MUST remember all the broadcast | ||||
| parameters received for later checks. | ||||
| +---------------------+ | ||||
| | o Assemble response | | ||||
| | o Create public-key | | ||||
| | signature | | ||||
| +----------+----------+ | ||||
| | | ||||
| <-+-> | ||||
| Server ---------------------------------------------> | ||||
| /| \ | ||||
| client_ / \ server_ | ||||
| bpar / \ bpar | ||||
| / \| | ||||
| Client ---------------------------------------------> | ||||
| <------- Broadcast ------> <- Client-side -> | ||||
| parameter validity | ||||
| exchange checks | ||||
| Procedure for unicast time synchronization exchange. | ||||
| Appendix C. (normative) Using TESLA for Broadcast-Type Messages | ||||
| For broadcast-type messages, NTS adopts the TESLA protocol with some | ||||
| customizations. This appendix provides details on the generation and | customizations. This appendix provides details on the generation and | |||
| usage of the one-way key chain collected and assembled from | usage of the one-way key chain collected and assembled from | |||
| [RFC4082]. Note that NTS uses the "not re-using keys" scheme of | [RFC4082]. Note that NTS uses the "not re-using keys" scheme of | |||
| TESLA as described in Section 3.7.2. of [RFC4082]. | TESLA as described in Section 3.7.2. of [RFC4082]. | |||
| B.1. Server Preparation | C.1. Server Preparation | |||
| server setup: | Server setup: | |||
| 1. The server determines a reasonable upper bound B on the network | 1. The server determines a reasonable upper bound B on the network | |||
| delay between itself and an arbitrary client, measured in | delay between itself and an arbitrary client, measured in | |||
| milliseconds. | milliseconds. | |||
| 2. It determines the number n+1 of keys in the one-way key chain. | 2. It determines the number n+1 of keys in the one-way key chain. | |||
| This yields the number n of keys that are usable to authenticate | This yields the number n of keys that are usable to authenticate | |||
| broadcast packets. This number n is therefore also the number of | broadcast packets. This number n is therefore also the number of | |||
| time intervals during which the server can send authenticated | time intervals during which the server can send authenticated | |||
| broadcast messages before it has to calculate a new key chain. | broadcast messages before it has to calculate a new key chain. | |||
| skipping to change at page 29, line 33 ¶ | skipping to change at page 32, line 5 ¶ | |||
| * If d is chosen too short, the client might discard packets | * If d is chosen too short, the client might discard packets | |||
| because it fails to verify that the key used for its MAC has | because it fails to verify that the key used for its MAC has | |||
| not yet been disclosed. | not yet been disclosed. | |||
| * If d is chosen too long, the received packets have to be | * If d is chosen too long, the received packets have to be | |||
| buffered for an unnecessarily long time before they can be | buffered for an unnecessarily long time before they can be | |||
| verified by the client and be subsequently utilized for time | verified by the client and be subsequently utilized for time | |||
| synchronization. | synchronization. | |||
| The server SHOULD calculate d according to | It is RECOMMENDED that the server calculate d according to | |||
| d = ceil( 2*B / L) + 1, | d = ceil( 2*B / L) + 1, | |||
| where ceil yields the smallest integer greater than or equal to | where ceil yields the smallest integer greater than or equal to | |||
| its argument. | its argument. | |||
| < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |||
| Generation of Keys | Generation of Keys | |||
| F F F F | F F F F | |||
| skipping to change at page 30, line 24 ¶ | skipping to change at page 32, line 31 ¶ | |||
| v v v v | v v v v | |||
| K'_0 K'_1 ... K'_{n-1} K'_n | K'_0 K'_1 ... K'_{n-1} K'_n | |||
| [______________|____ ____|_________________|_______] | [______________|____ ____|_________________|_______] | |||
| I_1 ... I_{n-1} I_n | I_1 ... I_{n-1} I_n | |||
| Course of Time/Usage of Keys | Course of Time/Usage of Keys | |||
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -> | |||
| A schematic explanation of the TESLA protocol's one-way key chain | A schematic explanation of the TESLA protocol's one-way key chain | |||
| B.2. Client Preparation | C.2. Client Preparation | |||
| A client needs the following information in order to participate in a | A client needs the following information in order to participate in a | |||
| TESLA broadcast: | TESLA broadcast: | |||
| o One key K_i from the one-way key chain, which has to be | o One key K_i from the one-way key chain, which has to be | |||
| authenticated as belonging to the server. Typically, this will be | authenticated as belonging to the server. Typically, this will be | |||
| K_0. | K_0. | |||
| o The disclosure schedule of the keys. This consists of: | o The disclosure schedule of the keys. This consists of: | |||
| skipping to change at page 31, line 8 ¶ | skipping to change at page 33, line 14 ¶ | |||
| o The second one-way function F' used to derive the MAC keys K'_0, | o The second one-way function F' used to derive the MAC keys K'_0, | |||
| K'_1, ... , K'_n from the keys in the one-way chain. | K'_1, ... , K'_n from the keys in the one-way chain. | |||
| o An upper bound D_t on how far its own clock is "behind" that of | o An upper bound D_t on how far its own clock is "behind" that of | |||
| the server. | the server. | |||
| Note that if D_t is greater than (d - 1) * L, then some authentic | Note that if D_t is greater than (d - 1) * L, then some authentic | |||
| packets might be discarded. If D_t is greater than d * L, then all | packets might be discarded. If D_t is greater than d * L, then all | |||
| authentic packets will be discarded. In the latter case, the client | authentic packets will be discarded. In the latter case, the client | |||
| should not participate in the broadcast, since there will be no | SHOULD NOT participate in the broadcast, since there will be no | |||
| benefit in doing so. | benefit in doing so. | |||
| B.3. Sending Authenticated Broadcast Packets | C.3. Sending Authenticated Broadcast Packets | |||
| During each time interval I_i, the server sends at most one | During each time interval I_i, the server sends at most one | |||
| authenticated broadcast packet P_i. Such a packet consists of: | authenticated broadcast packet P_i. Such a packet consists of: | |||
| o a message M_i, | o a message M_i, | |||
| o the index i (in case a packet arrives late), | o the index i (in case a packet arrives late), | |||
| o a MAC authenticating the message M_i, with K'_i used as key, | o a MAC authenticating the message M_i, with K'_i used as key, | |||
| o the key K_{i-d}, which is included for disclosure. | o the key K_{i-d}, which is included for disclosure. | |||
| B.4. Authentication of Received Packets | C.4. Authentication of Received Packets | |||
| When a client receives a packet P_i as described above, it first | When a client receives a packet P_i as described above, it first | |||
| checks that it has not already received a packet with the same | checks that it has not already received a packet with the same | |||
| disclosed key. This is done to avoid replay/flooding attacks. A | disclosed key. This is done to avoid replay/flooding attacks. A | |||
| packet that fails this test is discarded. | packet that fails this test is discarded. | |||
| Next, the client begins to check the packet's timeliness by ensuring | Next, the client begins to check the packet's timeliness by ensuring | |||
| that according to the disclosure schedule and with respect to the | that according to the disclosure schedule and with respect to the | |||
| upper bound D_t determined above, the server cannot have disclosed | upper bound D_t determined above, the server cannot have disclosed | |||
| the key K_i yet. Specifically, it needs to check that the server's | the key K_i yet. Specifically, it needs to check that the server's | |||
| skipping to change at page 32, line 44 ¶ | skipping to change at page 35, line 5 ¶ | |||
| broadcast parameter exchange (because a falsification of this check | broadcast parameter exchange (because a falsification of this check | |||
| yields that the packet was not generated according to protocol, which | yields that the packet was not generated according to protocol, which | |||
| suggests an attack). | suggests an attack). | |||
| If a packet P_i passes all the tests listed above, it is stored for | If a packet P_i passes all the tests listed above, it is stored for | |||
| later authentication. Also, if at this time there is a package with | later authentication. Also, if at this time there is a package with | |||
| index i-d already buffered, then the client uses the disclosed key | index i-d already buffered, then the client uses the disclosed key | |||
| K_{i-d} to derive K'_{i-d} and uses that to check the MAC included in | K_{i-d} to derive K'_{i-d} and uses that to check the MAC included in | |||
| package P_{i-d}. Upon success, it regards M_{i-d} as authenticated. | package P_{i-d}. Upon success, it regards M_{i-d} as authenticated. | |||
| Appendix C. (informative) Dependencies | Appendix D. (informative) Dependencies | |||
| +---------+--------------+--------+-------------------------------+ | +---------+--------------+--------+-------------------------------+ | |||
| | Issuer | Type | Owner | Description | | | Issuer | Type | Owner | Description | | |||
| +---------+--------------+--------+-------------------------------+ | +---------+--------------+--------+-------------------------------+ | |||
| | Server | private key | server | Used for server_assoc, | | | Server | private key | server | Used for server_assoc, | | |||
| | PKI | (signature) | | server_cook, server_bpar. | | | PKI | (signature) | | server_cook, server_bpar. | | |||
| | +--------------+--------+ The server uses the private | | | +--------------+--------+ The server uses the private | | |||
| | | public key | client | key to sign these messages. | | | | public key | client | key to sign these messages. | | |||
| | | (signature) | | The client uses the public | | | | (signature) | | The client uses the public | | |||
| | +--------------+--------+ key to verify them. | | | +--------------+--------+ key to verify them. | | |||
| | | certificate | server | The certificate is used in | | | | certificate | server | The certificate is used in | | |||
| End of changes. 81 change blocks. | ||||
| 541 lines changed or deleted | 634 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||