NTP Working Group | D. Sibold |
Internet-Draft | PTB |
Intended status: Standards Track | S. Röttger |
Expires: April 26, 2015 | Google Inc |
K. Teichel | |
PTB | |
R. Housley | |
Vigil Security | |
October 23, 2014 |
Protecting Network Time Security Messages with the Cryptographic Message Syntax (CMS)
draft-ietf-ntp-cms-for-nts-message-00.txt
This document describes a convention for using the Cryptographic Message Syntax (CMS) to protect the messages in the Network Time Security (NTS) protocol. NTS provides authentication of time servers as well as integrity protection of time synchronization messages using Network Time Protocol (NTP) or Precision Time Protocol (PTP).
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 26, 2015.
Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document provides detail on how to construct NTS messages in practice. NTS provides secure time synchronization with time servers using Network Time Protocol (NTP) [RFC5905] or Precision Time Protocol (PTP) [IEEE1588]. Among other things, this document describes a convention for using the Cryptographic Message Syntax (CMS) [RFC5652] to protect messages in the Network Time Security (NTS) protocol. Encryption is used to provide confidentiality of secrets, and digital signatures are used to provide authentication and integrity of content.
Sometimes CMS is used in an exclusively ASN.1 [ASN1] environment. In this case, the NTS message may use any syntax that facilitates easy implementation.
Regarding the usage of CMS we differentiate between four archetypes according to which the NTS message types can be structured:
+---------------------------------------------------------+ | | | ContentInfo | | | | +-----------------------------------------------------+ | | | | | | | SignedData | | | | | | | | +-------------------------------------------------+ | | | | | | | | | | | EnvelopedData | | | | | | | | | | | | +---------------------------------------------+ | | | | | | | | | | | | | | | NTS Message Object | | | | | | | | | | | | | | | | | | | | | | | +---------------------------------------------+ | | | | | | | | | | | +-------------------------------------------------+ | | | | | | | +-----------------------------------------------------+ | | | +---------------------------------------------------------+
+---------------------------------------------------------+ | | | ContentInfo | | | | +-----------------------------------------------------+ | | | | | | | SignedData | | | | | | | | +-------------------------------------------------+ | | | | | | | | | | | NTS Message Object | | | | | | | | | | | | | | | | | +-------------------------------------------------+ | | | | | | | +-----------------------------------------------------+ | | | +---------------------------------------------------------+
Figure 1 illustrates this structure.
Figure 2 illustrates this structure.
Whichever archetype is used, the resulting structure is always transported in an extension field of an NTP packet. In the case of messages that also need to carry time synchronization data, this data is written into the regular fields of the NTP packet.
Overall, three CMS content types are used for NTS messages: ContentInfo, SignedData and EnvelopedData. The following is a description of how the fields of those content types are used in detail.
id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
The ContentInfo content type is used in all four archetypes. The fields of the SignedData content type are used as follows:
id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 }.
The SignedData content type is used in the NTS-Certified, NTS-Signed and NTS-Signed-and-Encrypted archetypes but not in the NTS-Plain archetype. The fields of the SignedData content type are used as follows:
In addition, it MAY contain the following attributes:
The EnvelopedData content type is used only in the NTS-Signed-and-Encrypted archetype. The fields of the EnvelopedData content type are used as follows:
The syntax and processing rules for certificates are specified in [RFC5652]. In the NTS protocol, the server certificate MUST contain the following extensions:
The Extended Key Usage extension MUST include the id-kp-NTSserver object identifier. When a certificate issuer includes this object identifier in the extended key usage extension, it provides an attestation that the certificate subject is a time server that supports the NTS protocol.
The id-kp-NTSserver object identifier is:
id-kp-NTSserver OBJECT IDENTIFIER ::= { TBD }
This section gives some hints on the structures of the NTS message objects for the different message types when one wishes to implement the protocol.
The following ASN.1 coded data type "NTSNonce" is needed for other types used below for NTS messages. It specifies a 128 bit nonce as required in several message types:
NTSNonce ::= OCTET STRING (SIZE(16))
This message is structured according to the NTS-Plain archetype. It is realized as an NTP packet with an extension field which holds all the data relevant for NTS. Explicitly, the extension field contains an ASN.1 object of type "ClientAssocData", which is structured as follows:
ClientAssocData ::= SEQUENCE { clientId SubjectKeyIdentifier, digestAlgos DigestAlgorithmIdentifiers, keyEncAlgos KeyEncryptionAlgorithms, contentEncAlgos ContentEncryptionAlgorithms }
This message is structured according to the NTS-Signed archetype. The NTS message object in this case is an ASN.1 object of type "ServerAssocData", which is structured as follows:
ServerAssocData ::= SEQUENCE { clientId SubjectKeyIdentifier, choiceDigestAlgo DigestAlgorithmIdentifier, choiceKeyEncAlgo KeyEncryptionAlgorithmIdentifier, choiceContentEncAlgo ContentEncryptionAlgorithmIdentifier }
This message is structured according to the NTS-Certified archetype. The NTS message object is a "ClientCookieData" type ASN.1 object, structured as follows:
ClientCookieData ::= SEQUENCE { nonce NTSNonce, signAlgo SignatureAlgorithmIdentifier, digestAlgo DigestAlgorithmIdentifier, encAlgo ContentEncryptionAlgorithmIdentifier, keyEncAlgo KeyEncryptionAlgorithmIdentifier }
It is identified by the following object identifier (fictional values):
id-clientCookieData OBJECT IDENTIFIER ::= {nts(??) cookie(3) clientcookiedata(1)}
This message is structured according to the "NTS-Signed-and-Encrypted" archetype. The NTS message object is a "ServerCookieData" object, specified as:
ServerCookieData ::= SEQUENCE { nonce NTSNonce, cookie OCTET STRING (SIZE(16)) }
It is identified by the following object identifier (fictional values):
id-serverCookieData OBJECT IDENTIFIER ::= {nts(??) cookie(3) servercookiedata(2)}
This message is structured according to the "NTS-Plain" archetype. It is realized as an NTP packet which actually contains regular NTP time synchronization data, as an unsecured NTP packet from a client to a server would. Furthermore, the packet has an extension field which contains an ASN.1 object of type "TimeRequestSecurityData", whose structure is as follows:
TimeRequestSecurityData ::= SEQUENCE { nonce_t NTSNonce, digestAlgo DigestAlgorithmIdentifier, hashOfClientCert BIT STRING }
This message is also structured according to "NTS-Plain". It is realized as an NTP packet which, like "time_request", contains regular NTP time synchronization data, as an unsecured NTP packet from a server back to a client would. The packet also has an extension field which contains an ASN.1 object of type "TimeResponseSecurityData", with the following structure:
TimeResponseSecurityData ::= SEQUENCE { nonce_t NTSNonce, }
Finally, this NTP packet has a MAC field which contains a Message Authentication Code generated over the whole packet (including the extension field).
This first broadcast message is structured according to the NTS-Plain archetype. It is realized as an NTP packet which is empty except for an extension field which contains ans ASN.1 object of type "BroadcastParameterRequest", which is structured as follows:
BroadcastParameterRequest ::= SEQUENCE { clientId SubjectKeyIdentifier }
This message is structured according to "NTS-Signed". It is realized as an NTP packet whose extension field carries the necessary CMS structure. The NTS message object in this case is an ASN.1 object of type "BroadcastParameterResponse", with the following structure:
BroadcastParameterRequest ::= SEQUENCE { oneWayAlgo1 DigestAlgorithmIdentifier, oneWayAlgo2 DigestAlgorithmIdentifier, lastKey OCTET STRING (SIZE (16)), intervalDuration BIT STRING, disclosureDelay INTEGER, nextIntervalTime BIT STRING, nextIntervalIndex INTEGER }
This message is structured according to the "NTS-Plain" archetype. Its realization works via an NTP packet which carries regular NTP broadcast time data as well as an extension field, which contains an ASN.1 object of type "BroadcastTime". It has the following structure:
BroadcastTime ::= SEQUENCE { thisIntervalIndex INTEGER, disclosedKey OCTET STRING (SIZE (16)), }
In addition, this packet has a MAC field which contains a Message Authentication Code generated over the whole packet (including the extension field).
This message is structured according to the "NTS-Plain" archetype. It is realized as an NTP packet with an extension field, which contains an ASN.1 object of type "ClientKeyCheckSecurityData", whose structure is as follows:
ClientKeyCheckSecurityData ::= SEQUENCE { nonce_k NTSNonce, interval_number INTEGER, digestAlgo DigestAlgorithmIdentifier, hashOfClientCert BIT STRING }
This message is also structured according to "NTS-Plain". It is also realized as an NTP packet with an extension field, which contains an ASN.1 object of type "ServerKeyCheckSecurityData", with the following structure:
ServerKeyCheckSecurityData ::= SEQUENCE { nonce_t NTSNonce, interval_number INTEGER }
Additionally, this NTP packet has a MAC field which contains a Message Authentication Code generated over the whole packet (including the extension field).
IANA needs to assign an object identifier for id-kp-NTSserver key purpose and another one for the ASN.1 module in the appendix.
To be written.
[ASN1] | International Telecommunication Union, "Abstract Syntax Notation One (ASN.1): Specification of basic notation", ITU-T Recommendation X.680, November 2008. |
[IEEE1588] | IEEE Instrumentation and Measurement Society. TC-9 Sensor Technology, "IEEE standard for a precision clock synchronization protocol for networked measurement and control systems", 2008. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC5652] | Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, September 2009. |
[RFC5905] | Mills, D., Martin, J., Burbank, J. and W. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, June 2010. |
[I-D.ietf-ntp-network-time-security] | Sibold, D., Roettger, S. and K. Teichel, "Network Time Security", Internet-Draft draft-ietf-ntp-network-time-security-04, July 2014. |
NTSserverKeyPurpose { TBD } DEFINITIONS IMPLICIT TAGS ::= BEGIN id-kp-NTSserver OBJECT IDENTIFIER ::= { TBD } END
The ASN.1 module contained in this appendix defines the id-kp- NTSserver object identifier.