RFC 9148: EST-coaps: Enrollment over Secure Transport with the Secure Constrained Application Protocol
- P. van der Stok,
- P. Kampanakis,
- M. Richardson,
- S. Raza
This RFC was updated
Abstract
Enrollment over Secure Transport (EST) is used as a certificate provisioning protocol over HTTPS. Low-resource devices often use the lightweight Constrained Application Protocol (CoAP) for message exchanges. This document defines how to transport EST payloads over secure CoAP (EST-coaps), which allows constrained devices to use existing EST functionality for provisioning certificates.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2022 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
(https://
1. Introduction
"Classical" Enrollment over Secure Transport (EST) [RFC7030]
is used for authenticated
This document defines a new transport for EST based on the Constrained Application Protocol (CoAP) since some Internet of Things (IoT) devices use CoAP instead of HTTP. Therefore, this specification utilizes DTLS [RFC6347] and CoAP [RFC7252] instead of TLS [RFC8446] and HTTP [RFC7230].¶
EST responses can be relatively large, and for this reason, this specification also uses CoAP Block-Wise Transfer [RFC7959] to offer a fragmentation mechanism of EST messages at the CoAP layer.¶
This document also profiles the use of EST to support
certificate
2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Many of the concepts in this document are taken from [RFC7030]. Consequently, much text is directly traceable to [RFC7030].¶
3. DTLS and Conformance to RFC 7925 Profiles
This section describes how EST-coaps conforms to the profiles of low-resource devices described in [RFC7925]. EST-coaps can transport certificates and private keys. Certificates are responses to (re-)enrollment requests or requests for a trusted certificate list. Private keys can be transported as responses to a server-side key generation request as described in Section 4.4 of [RFC7030] (and subsections) and discussed in Section 4.8 of this document.¶
EST-coaps depends on a secure transport mechanism that secures the exchanged CoAP messages. DTLS is one such secure protocol. No other changes are necessary regarding the secure transport of EST messages.¶
In accordance with Sections 3.3 and 4.4 of [RFC7925], the
mandatory cipher suite for DTLS in EST-coaps is
TLS
DTLS 1.2 implementations must use the Supported Elliptic Curves and Supported Point Formats Extensions in [RFC8422]. Uncompressed point format must also be supported. DTLS 1.3 [RFC9147] implementations differ from DTLS 1.2 because they do not support point format negotiation in favor of a single point format for each curve. Thus, support for DTLS 1.3 does not mandate point format extensions and negotiation. In addition, in DTLS 1.3, the Supported Elliptic Curves extension has been renamed to Supported Groups.¶
CoAP was designed to avoid IP fragmentation. DTLS is used to secure CoAP messages. However, fragmentation is still possible at the DTLS layer during the DTLS handshake even when using Elliptic Curve Cryptography (ECC) cipher suites. If fragmentation is necessary, "DTLS provides a mechanism for fragmenting a handshake message over a number of records, each of which can be transmitted separately, thus avoiding IP fragmentation" [RFC6347].¶
The authentication of the EST-coaps server by the EST-coaps client is based on certificate authentication in the DTLS handshake. The EST-coaps client MUST be configured with at least an Implicit Trust Anchor database, which will enable the authentication of the server the first time before updating its trust anchor (Explicit TA) [RFC7030].¶
The authentication of the EST-coaps client MUST be with a client certificate in the DTLS handshake. This can either be:¶
EST-coaps supports the certificate types and TAs that are specified for EST in Section 3 of [RFC7030].¶
As described in Section 2.1 of [RFC5272], proof
For (D)TLS 1.3, Appendix C.5 of [RFC8446] describes the lack of channel bindings similar to
tls-unique.
[TLS13
In a constrained CoAP environment, endpoints can't always afford to establish a DTLS connection for every EST transaction. An EST-coaps DTLS connection MAY remain open for sequential EST transactions, which was not the case with [RFC7030]. For example, if a /crts request is followed by a /sen request, both can use the same authenticated DTLS connection. However, when a /crts request is included in the set of sequential EST transactions, some additional security considerations apply regarding the use of the Implicit and Explicit TA database as explained in Section 9.1.¶
Given that after a successful enrollment, it is more likely that a new EST transaction will not take place for a significant amount of time, the DTLS connections SHOULD only be kept alive for EST messages that are relatively close to each other. These could include a /sen immediately following a /crts when a device is getting bootstrapped. In some cases, like NAT rebinding, keeping the state of a connection is not possible when devices sleep for extended periods of time. In such occasions, [RFC9146] negotiates a connection ID that can eliminate the need for a new handshake and its additional cost; or, DTLS session resumption provides a less costly alternative than redoing a full DTLS handshake.¶
4. Protocol Design
EST-coaps uses CoAP to transfer EST messages, aided by Block-Wise Transfer [RFC7959], to avoid IP fragmentation. The use of blocks for the transfer of larger EST messages is specified in Section 4.6. Figure 1 shows the layered EST-coaps architecture.¶
The EST-coaps protocol design follows closely the EST design. The supported message types in EST-coaps are:¶
While [RFC7030] permits a number of the EST functions to be used without authentication, this specification requires that the client MUST be authenticated for all functions.¶
4.1. Discovery and URIs
EST-coaps is targeted for low-resource networks with small packets. Two types of installations are possible: (1) a rigid one, where the address and the supported functions of the EST server(s) are known, and (2) a flexible one, where the EST server and its supported functions need to be discovered.¶
For both types of installations, saving header space is important and short EST-coaps URIs are specified in this document. These URIs are shorter than the ones in [RFC7030]. Two example EST-coaps resource path names are:¶
The short-est strings are defined in Table 1. Arbitrary Labels are usually defined and used by EST CAs in order to route client requests to the appropriate certificate profile. Implementers should consider using short labels to minimize transmission overhead.¶
The EST-coaps server URIs, obtained through discovery of the EST-coaps resource(s) as shown below, are of the form:¶
Figure 5 in Section 3.2.2 of [RFC7030] enumerates the operations and corresponding paths that are supported by EST. Table 1 provides the mapping from the EST URI path to the shorter EST-coaps URI path.¶
The /skg message is the EST /serverkeygen equivalent where the
client requests a certificate in PKCS #7 format and a private key. If
the client prefers a single application
Clients and servers MUST support the short resource EST-coaps URIs.¶
In the context of CoAP, the presence and location of (path to) the
EST resources are discovered by sending a GET request to
"
The first three lines, describing ace.est.crts, ace.est.sen, and ace.est.sren, of the discovery response above MUST be returned if the server supports resource discovery. The last three lines are only included if the corresponding EST functions are implemented (see Table 2). The Content-Formats in the response allow the client to request one that is supported by the server. These are the values that would be sent in the client request with an Accept Option.¶
Discoverable port numbers can be returned in the response payload. An example response payload for non-default CoAPS server port 61617 follows below. Linefeeds are included only for readability.¶
The server MUST support the default
Throughout this document, the example root resource of /est is used.¶
4.2. Mandatory/Optional EST Functions
This specification contains a set of required
Table 2 specifies the
mandatory
4.3. Payload Formats
EST-coaps is designed for low-resource devices; hence, it does not need to send Base64-encoded data. Simple binary is more efficient (30% smaller payload for DER-encoded ASN.1) and well supported by CoAP. Thus, the payload for a given media type follows the ASN.1 structure of the media type and is transported in binary format.¶
The Content-Format (HTTP Content-Type equivalent) of the CoAP message determines which EST message is transported in the CoAP payload. The media types specified in the HTTP Content-Type header field (Section 3.2.4 of [RFC7030]) are specified by the Content-Format Option (12) of CoAP. The combination of URI-Path and Content-Format in EST-coaps MUST map to an allowed combination of URI and media type in EST. The required Content-Formats for these requests and response messages are defined in Section 8.1. The CoAP response codes are defined in Section 4.5.¶
Content-Format 287 can be used in place of 281 to carry a single certificate instead of a PKCS #7 container in a /crts, /sen, /sren, or /skg response. Content-Format 281 MUST be supported by EST-coaps servers. Servers MAY also support Content-Format 287. It is up to the client to support only Content-Format 281, 287 or both. The client will use a CoAP Accept Option in the request to express the preferred response Content-Format. If an Accept Option is not included in the request, the client is not expressing any preference and the server SHOULD choose format 281.¶
Content-Format 286 is used in /sen, /sren, and /skg requests and 285 in /att responses.¶
A representation with Content-Format identifier 62 contains a collection
of representations along with their respective Content-Format. The
Content-Format identifies the media type application
When the client makes an /skc request, the certificate returned with the private key is a single X.509 certificate (not a PKCS #7 container) with Content-Format identifier 287 (0x011F) instead of 281. In cases where the private key is encrypted with Cryptographic Message Syntax (CMS) (as explained in Section 4.8), the Content-Format identifier is 280 (0x0118) instead of 284. The Content-Format used in the response is summarized in Table 3.¶
The key and certificate representations are DER-encoded ASN.1, in its binary form. An example is shown in Appendix A.3.¶
4.4. Message Bindings
The general EST-coaps message characteristics are:¶
Table 1 provides the mapping from the EST URI path to the EST-coaps URI path. Appendix A includes some practical examples of EST messages translated to CoAP.¶
4.5. CoAP Response Codes
Section 5.9 of [RFC7252] and Section 7 of [RFC8075] specify the mapping of HTTP response codes to CoAP response codes. The success code in response to an EST-coaps GET request (/crts, /att) is 2.05. Similarly, 2.04 is used in successful response to EST-coaps POST requests (/sen, /sren, /skg, /skc).¶
EST makes use of HTTP 204 or 404 responses when a resource is not available for the client. In EST-coaps, 2.04 is used in response to a POST (/sen, /sren, /skg, /skc). 4.04 is used when the resource is not available for the client.¶
HTTP response code 202 with a Retry-After header field in [RFC7030] has no equivalent in CoAP. HTTP 202 with Retry-After is used in EST for delayed server responses. Section 4.7 specifies how EST-coaps handles delayed messages with 5.03 responses with a Max-Age Option.¶
Additionally, EST's HTTP 400, 401, 403, 404, and 503 status codes have their equivalent CoAP 4.00, 4.01, 4.03, 4.04, and 5.03 response codes in EST-coaps. Table 4 summarizes the EST-coaps response codes.¶
4.6. Message Fragmentation
DTLS defines fragmentation only for the handshake and not for secure data exchange (DTLS records). [RFC6347] states that to avoid using IP fragmentation, which involves error-prone datagram reconstitution, invokers of the DTLS record layer should size DTLS records so that they fit within any Path MTU estimates obtained from the record layer. In addition, invokers residing on 6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) over IEEE 802.15.4 networks [IEEE802.15.4] are recommended to size CoAP messages such that each DTLS record will fit within one or two IEEE 802.15.4 frames.¶
That is not always possible in EST-coaps. Even though ECC certificates are small in size, they can vary greatly based on signature algorithms, key sizes, and Object Identifier (OID) fields used. For 256-bit curves, common Elliptic Curve Digital Signature Algorithm (ECDSA) cert sizes are 500-1000 bytes, which could fluctuate further based on the algorithms, OIDs, Subject Alternative Names (SANs), and cert fields. For 384-bit curves, ECDSA certificates increase in size and can sometimes reach 1.5KB. Additionally, there are times when the EST cacerts response from the server can include multiple certificates that amount to large payloads. Section 4.6 of [RFC7252] (CoAP) describes the possible payload sizes: "if nothing is known about the size of the headers, good upper bounds are 1152 bytes for the message size and 1024 bytes for the payload size". Section 4.6 of [RFC7252] also suggests that IPv4 implementations may want to limit themselves to more conservative IPv4 datagram sizes such as 576 bytes. Even with ECC, EST-coaps messages can still exceed MTU sizes on the Internet or 6LoWPAN [RFC4919] (Section 2 of [RFC7959]). EST-coaps needs to be able to fragment messages into multiple DTLS datagrams.¶
To perform fragmentation in CoAP, [RFC7959] specifies the Block1 Option for fragmentation of the request payload and the Block2 Option for fragmentation of the return payload of a CoAP flow. As explained in Section 1 of [RFC7959], block-wise transfers should be used in Confirmable CoAP messages to avoid the exacerbation of lost blocks. EST-coaps servers MUST implement Block1 and Block2. EST-coaps clients MUST implement Block2. EST-coaps clients MUST implement Block1 only if they are expecting to send EST-coaps requests with a packet size that exceeds the path MTU.¶
[RFC7959] also defines Size1 and Size2 Options to provide size information about the resource representation in a request and response. The EST-coaps client and server MAY support Size1 and Size2 Options.¶
Examples of fragmented EST-coaps messages are shown in Appendix B.¶
4.7. Delayed Responses
Server responses can sometimes be delayed. According to Section 5.2.2 of [RFC7252], a slow server can acknowledge the request and respond later with the requested resource representation. In particular, a slow server can respond to an EST-coaps enrollment request with an empty ACK with code 0.00 before sending the certificate to the client after a short delay. If the certificate response is large, the server will need more than one Block2 block to transfer it.¶
This situation is shown in Figure 3. The client sends an enrollment request that uses N1+1 Block1 blocks. The server uses an empty 0.00 ACK to announce the delayed response, which is provided later with 2.04 messages containing N2+1 Block2 Options. The first 2.04 is a Confirmable message that is acknowledged by the client. Onwards, the client acknowledges all subsequent Block2 blocks. The notation of Figure 3 is explained in Appendix B.1.¶
If the server is very slow (for example, manual intervention is required, which would take minutes), it SHOULD respond with an ACK containing response code 5.03 (Service unavailable) and a Max-Age Option to indicate the time the client SHOULD wait before sending another request to obtain the content. After a delay of Max-Age, the client SHOULD resend the identical CSR to the server. As long as the server continues to respond with response code 5.03 (Service Unavailable) with a Max-Age Option, the client will continue to delay for Max-Age and then resend the enrollment request until the server responds with the certificate or the client abandons the request due to policy or other reasons.¶
To demonstrate this scenario, Figure 4 shows a client sending an enrollment request that uses N1+1 Block1 blocks to send the CSR to the server. The server needs N2+1 Block2 blocks to respond but also needs to take a long delay (minutes) to provide the response. Consequently, the server uses a 5.03 ACK response with a Max-Age Option. The client waits for a period of Max-Age as many times as it receives the same 5.03 response and retransmits the enrollment request until it receives a certificate in a fragmented 2.04 response.¶
4.8. Server-Side Key Generation
Private keys can be generated on the server to support scenarios where server-side key generation is needed. Such scenarios include those where it is considered more secure to generate the long-lived, random private key that identifies the client at the server, or where the resources spent to generate a random private key at the client are considered scarce, or where the security policy requires that the certificate public and corresponding private keys are centrally generated and controlled. As always, it is necessary to use proper random numbers in various protocols such as (D)TLS (Section 9.1).¶
When requesting server-side key generation, the client asks for the server or proxy to generate the private key and the certificate, which are transferred back to the client in the server-side key generation response. In all respects, the server treats the CSR as it would treat any enroll or re-enroll CSR; the only distinction here is that the server MUST ignore the public key values and signature in the CSR. These are included in the request only to allow reuse of existing codebases for generating and parsing such requests.¶
The client /skg request is for a certificate in a PKCS #7 container
and private key in two application
The EST-coaps server-side key generation response is returned with
Content-Format application
[RFC7030] recommends the use of additional encryption of the returned private key. For the context of this specification, clients and servers that choose to support server-side key generation MUST support unprotected (PKCS #8) private keys (Content-Format 284). Symmetric or asymmetric encryption of the private key (CMS EnvelopedData, Content-Format 280) SHOULD be supported for deployments where end-to-end encryption is needed between the client and a server. Such cases could include architectures where an entity between the client and the CA terminates the DTLS connection (Registrar in Figure 5). Though [RFC7030] strongly recommends that clients request the use of CMS encryption on top of the TLS channel's protection, this document does not make such a recommendation; CMS encryption can still be used when mandated by the use case.¶
5. HTTPS-CoAPS Registrar
In real-world deployments, the EST server will not always reside within the CoAP boundary. The EST server can exist outside the constrained network, in which case it will support TLS/HTTP instead of CoAPS. In such environments, EST-coaps is used by the client within the CoAP boundary and TLS is used to transport the EST messages outside the CoAP boundary. A Registrar at the edge is required to operate between the CoAP environment and the external HTTP network as shown in Figure 5.¶
The EST
When enforcing Proof
Table 1 contains the URI mappings between EST-coaps and EST that the Registrar MUST adhere to. Section 4.5 of this specification and Section 7 of [RFC8075] define the mappings between EST-coaps and HTTP response codes that determine how the Registrar MUST translate CoAP response codes from/to HTTP status codes. The mapping from CoAP Content-Format to HTTP Content-Type is defined in Section 8.1. Additionally, a conversion from CBOR major type 2 to Base64 encoding MUST take place at the Registrar. If CMS end-to-end encryption is employed for the private key, the encrypted CMS EnvelopedData blob MUST be converted at the Registrar to binary CBOR type 2 downstream to the client. This is a format conversion that does not require decryption of the CMS EnvelopedData.¶
A deviation from the mappings in Table 1 could take place if clients that leverage server-side key generation preferred for the enrolled keys to be generated by the Registrar in the case the CA does not support server-side key generation. Such a Registrar is responsible for generating a new CSR signed by a new key that will be returned to the client along with the certificate from the CA. In these cases, the Registrar MUST use random number generation with proper entropy.¶
Due to fragmentation of large messages into blocks, an
EST
The EST
6. Parameters
This section addresses transmission parameters described in Sections 4.7 and 4.8 of [RFC7252]. EST does not impose any unique values on the CoAP parameters in [RFC7252], but the setting of the CoAP parameter values may have consequence for the setting of the EST parameter values.¶
Implementations should follow the default CoAP configuration parameters [RFC7252]. However, depending on the implementation scenario, retransmissions and timeouts can also occur on other networking layers, governed by other configuration parameters. When a change in a server parameter has taken place, the parameter values in the communicating endpoints MUST be adjusted as necessary. Examples of how parameters could be adjusted include higher-layer congestion protocols, provisioning agents, and configurations included in firmware updates.¶
Some further comments about some specific parameters, mainly from Table 2 in [RFC7252], include the following:¶
- NSTART:
- A parameter that controls the number of simultaneous outstanding interactions that a client maintains to a given server. An EST-coaps client is expected to control at most one interaction with a given server, which is the default NSTART value defined in [RFC7252].¶
- DEFAULT_LEISURE:
- A setting that is only relevant in multicast scenarios and is outside the scope of EST-coaps.¶
- PROBING_RATE:
- A parameter that specifies the rate of resending Non-confirmable messages. In the rare situations that Non-confirmable messages are used, the default PROBING_RATE value defined in [RFC7252] applies.¶
Finally, the Table 3 parameters in [RFC7252] are mainly derived from Table 2. Directly changing parameters on one table would affect parameters on the other.¶
7. Deployment Limitations
Although EST-coaps paves the way for the utilization of EST by constrained devices in constrained networks, some classes of devices [RFC7228] will not have enough resources to handle the payloads that come with EST-coaps. The specification of EST-coaps is intended to ensure that EST works for networks of constrained devices that choose to limit their communications stack to DTLS/CoAP. It is up to the network designer to decide which devices execute the EST protocol and which do not.¶
8. IANA Considerations
8.1. Content-Formats Registry
IANA has registered the following Content-Formats given in Table 5 in the "CoAP Content
8.2. Resource Type Registry
IANA has registered the following Resource Type (rt=) Link Target Attributes given in Table 6 in the "Resource Type (rt=) Link Target Attribute Values" subregistry under the "Constrained RESTful Environments (CoRE) Parameters" registry.¶
9. Security Considerations
9.1. EST Server Considerations
The security considerations in Section 6 of [RFC7030] are only partially valid for the purposes of this document. As HTTP Basic Authentication is not supported, the considerations expressed for using passwords do not apply. The other portions of the security considerations in [RFC7030] continue to apply.¶
Modern security protocols require random numbers to be available during the protocol run, for example, for nonces and ephemeral (EC) Diffie-Hellman key generation. This capability to generate random numbers is also needed when the constrained device generates the private key (that corresponds to the public key enrolled in the CSR). When server-side key generation is used, the constrained device depends on the server to generate the private key randomly, but it still needs locally generated random numbers for use in security protocols, as explained in Section 12 of [RFC7925]. Additionally, the transport of keys generated at the server is inherently risky. For those deploying server-side key generation, analysis SHOULD be done to establish whether server-side key generation increases or decreases the probability of digital identity theft.¶
It is important to note that, as pointed out in [PsQs], sources contributing to the randomness pool used to generate random numbers on laptops or desktop PCs, such as mouse movement, timing of keystrokes, or air turbulence on the movement of hard drive heads, are not available on many constrained devices. Other sources have to be used or dedicated hardware has to be added. Selecting hardware for an IoT device that is capable of producing high-quality random numbers is therefore important [RSA-FACT].¶
As discussed in Section 6 of [RFC7030], it is¶
RECOMMENDED that the Implicit Trust Anchor database used for EST server authentication be carefully managed to reduce the chance of a third-party CA with poor certification practices from being trusted. Disabling the Implicit Trust Anchor database after successfully receiving the Distribution of CA certificates response ([RFC7030], Section 6) limits any vulnerability to the first TLS exchange.¶
Alternatively, in a case where a /sen request immediately follows a /crts, a client MAY choose to keep the connection authenticated by the Implicit TA open for efficiency reasons (Section 3). A client that interleaves EST-coaps /crts request with other requests in the same DTLS connection SHOULD revalidate the server certificate chain against the updated Explicit TA from the /crts response before proceeding with the subsequent requests. If the server certificate chain does not authenticate against the database, the client SHOULD close the connection without completing the rest of the requests. The updated Explicit TA MUST continue to be used in new DTLS connections.¶
In cases where the Initial Device Identifier (IDevID) used to authenticate the client is expired, the server MAY still authenticate the client because IDevIDs are expected to live as long as the device itself (Section 3). In such occasions, checking the certificate revocation status or authorizing the client using another method is important for the server to raise its confidence that the client can be trusted.¶
In accordance with [RFC7030], TLS cipher suites that include "_EXPORT_" and "_DES_" in their names MUST NOT be used. More recommendations for secure use of TLS and DTLS are included in [BCP195].¶
As described in Certificate Management over CMS (CMC), Section 6.7 of [RFC5272], "For keys that can
be used as signature keys, signing the certification request with the
private key serves as a POP on that key pair". In (D)TLS 1.2, the
inclusion of tls-unique in the certificate request links the
proof
What's more, CMC POP linking uses tls-unique as it is defined in
[RFC5929]. The 3SHAKE attack [TRIPLESHAKE] poses a risk by allowing an
on-path active attacker to leverage session resumption and
renegotiation to inject itself between a client and server even when
channel binding is in use. Implementers should use the Extended Master
Secret Extension in DTLS [RFC7627] to
prevent such attacks. In the context of this specification, an
attacker could invalidate the purpose of the POP linking
challenge
Interpreters of ASN.1 structures should be aware of the use of invalid ASN.1 length fields and should take appropriate measures to guard against buffer overflows, stack overruns in particular, and malicious content in general.¶
9.2. HTTPS-CoAPS Registrar Considerations
The Registrar proposed in Section 5 must be deployed with care and only when direct client-server connections are not possible. When POP linking is used, the Registrar terminating the DTLS connection establishes a new TLS connection with the upstream CA. Thus, it is impossible for POP linking to be enforced end to end for the EST transaction. The EST server could be configured to accept POP linking information that does not match the current TLS session because the authenticated EST Registrar is assumed to have verified POP linking downstream to the client.¶
The introduction of an EST
In a server-side key generation case, if no end-to-end encryption is used, the Registrar may be able see the private key as it acts as a man in the middle. Thus, the client puts its trust on the Registrar not exposing the private key.¶
Clients that leverage server-side key generation without end-to-end encryption of the private key (Section 4.8) have no knowledge as to whether the Registrar will be generating the private key and enrolling the certificates with the CA or if the CA will be responsible for generating the key. In such cases, the existence of a Registrar requires the client to put its trust on the Registrar when it is generating the private key.¶
10. References
10.1. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC2585]
-
Housley, R. and P. Hoffman, "Internet X.509 Public Key Infrastructure Operational Protocols: FTP and HTTP", RFC 2585, DOI 10
.17487 , , <https:///RFC2585 www >..rfc -editor .org /info /rfc2585 - [RFC5246]
-
Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10
.17487 , , <https:///RFC5246 www >..rfc -editor .org /info /rfc5246 - [RFC5958]
-
Turner, S., "Asymmetric Key Packages", RFC 5958, DOI 10
.17487 , , <https:///RFC5958 www >..rfc -editor .org /info /rfc5958 - [RFC5967]
-
Turner, S., "The application
/pkcs10 Media Type" , RFC 5967, DOI 10.17487 , , <https:///RFC5967 www >..rfc -editor .org /info /rfc5967 - [RFC6347]
-
Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, DOI 10
.17487 , , <https:///RFC6347 www >..rfc -editor .org /info /rfc6347 - [RFC6690]
-
Shelby, Z., "Constrained RESTful Environments (CoRE) Link Format", RFC 6690, DOI 10
.17487 , , <https:///RFC6690 www >..rfc -editor .org /info /rfc6690 - [RFC7030]
-
Pritikin, M., Ed., Yee, P., Ed., and D. Harkins, Ed., "Enrollment over Secure Transport", RFC 7030, DOI 10
.17487 , , <https:///RFC7030 www >..rfc -editor .org /info /rfc7030 - [RFC7252]
-
Shelby, Z., Hartke, K., and C. Bormann, "The Constrained Application Protocol (CoAP)", RFC 7252, DOI 10
.17487 , , <https:///RFC7252 www >..rfc -editor .org /info /rfc7252 - [RFC7925]
-
Tschofenig, H., Ed. and T. Fossati, "Transport Layer Security (TLS) / Datagram Transport Layer Security (DTLS) Profiles for the Internet of Things", RFC 7925, DOI 10
.17487 , , <https:///RFC7925 www >..rfc -editor .org /info /rfc7925 - [RFC7959]
-
Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in the Constrained Application Protocol (CoAP)", RFC 7959, DOI 10
.17487 , , <https:///RFC7959 www >..rfc -editor .org /info /rfc7959 - [RFC8075]
-
Castellani, A., Loreto, S., Rahman, A., Fossati, T., and E. Dijk, "Guidelines for Mapping Implementations
: HTTP to the Constrained Application Protocol (CoAP)" , RFC 8075, DOI 10.17487 , , <https:///RFC8075 www >..rfc -editor .org /info /rfc8075 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8422]
-
Nir, Y., Josefsson, S., and M. Pegourie
-Gonnard , "Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS) Versions 1.2 and Earlier", RFC 8422, DOI 10.17487 , , <https:///RFC8422 www >..rfc -editor .org /info /rfc8422 - [RFC8446]
-
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10
.17487 , , <https:///RFC8446 www >..rfc -editor .org /info /rfc8446 - [RFC8551]
-
Schaad, J., Ramsdell, B., and S. Turner, "Secure
/Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 Message Specification" , RFC 8551, DOI 10.17487 , , <https:///RFC8551 www >..rfc -editor .org /info /rfc8551 - [RFC8710]
-
Fossati, T., Hartke, K., and C. Bormann, "Multipart Content-Format for the Constrained Application Protocol (CoAP)", RFC 8710, DOI 10
.17487 , , <https:///RFC8710 www >..rfc -editor .org /info /rfc8710 - [RFC9147]
-
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3", RFC 9147, DOI 10
.17487 , , <https:///RFC9147 www >..rfc -editor .org /info /rfc9147
10.2. Informative References
- [BCP195]
-
Sheffer, Y., Holz, R., and P. Saint-Andre, "Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)", BCP 195, RFC 7525, .<https://
www >.rfc -editor .org /info /bcp195 - [CORE-PARAMS]
-
IANA, "Constrained RESTful Environments (CoRE) Parameters", <https://
www >..iana .org /assignments /core -parameters / - [IEEE802.15.4]
- IEEE, "IEEE 802.15.4-2020 - IEEE Standard for Low-Rate Wireless Networks", .
- [IEEE802.1AR]
- IEEE, "IEEE Standard for Local and metropolitan area networks - Secure Device Identity", .
- [PKI-GUIDE]
-
Moskowitz, R., Birkholz, H., Xia, L., and M. Richardson, "Guide for building an ECC pki", Work in Progress, Internet-Draft, draft
-moskowitz , , <https://-ecdsa -pki -10 datatracker >..ietf .org /doc /html /draft -moskowitz -ecdsa -pki -10 - [PsQs]
- Heninger, N., Durumeric, Z., Wustrow, E., and J. Alex Halderman, "Mining Your Ps and Qs: Detection of Widespread Weak Keys in Network Devices", USENIX Security Symposium 2012, ISBN 978-931971-95-9, .
- [RFC4919]
-
Kushalnagar, N., Montenegro, G., and C. Schumacher, "IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals", RFC 4919, DOI 10
.17487 , , <https:///RFC4919 www >..rfc -editor .org /info /rfc4919 - [RFC5272]
-
Schaad, J. and M. Myers, "Certificate Management over CMS (CMC)", RFC 5272, DOI 10
.17487 , , <https:///RFC5272 www >..rfc -editor .org /info /rfc5272 - [RFC5929]
-
Altman, J., Williams, N., and L. Zhu, "Channel Bindings for TLS", RFC 5929, DOI 10
.17487 , , <https:///RFC5929 www >..rfc -editor .org /info /rfc5929 - [RFC6402]
-
Schaad, J., "Certificate Management over CMS (CMC) Updates", RFC 6402, DOI 10
.17487 , , <https:///RFC6402 www >..rfc -editor .org /info /rfc6402 - [RFC7228]
-
Bormann, C., Ersue, M., and A. Keranen, "Terminology for Constrained
-Node Networks" , RFC 7228, DOI 10.17487 , , <https:///RFC7228 www >..rfc -editor .org /info /rfc7228 - [RFC7230]
-
Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, DOI 10
.17487 , , <https:///RFC7230 www >..rfc -editor .org /info /rfc7230 - [RFC7251]
-
McGrew, D., Bailey, D., Campagna, M., and R. Dugal, "AES-CCM Elliptic Curve Cryptography (ECC) Cipher Suites for TLS", RFC 7251, DOI 10
.17487 , , <https:///RFC7251 www >..rfc -editor .org /info /rfc7251 - [RFC7299]
-
Housley, R., "Object Identifier Registry for the PKIX Working Group", RFC 7299, DOI 10
.17487 , , <https:///RFC7299 www >..rfc -editor .org /info /rfc7299 - [RFC7627]
-
Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., Langley, A., and M. Ray, "Transport Layer Security (TLS) Session Hash and Extended Master Secret Extension", RFC 7627, DOI 10
.17487 , , <https:///RFC7627 www >..rfc -editor .org /info /rfc7627 - [RFC7748]
-
Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves for Security", RFC 7748, DOI 10
.17487 , , <https:///RFC7748 www >..rfc -editor .org /info /rfc7748 - [RFC9146]
-
Rescorla, E., Ed., Tschofenig, H., Ed., Fossati, T., and A. Kraus, "Connection Identifier for DTLS 1.2", RFC 9146, DOI 10
.17487 , , <https:///RFC9146 www >..rfc -editor .org /info /rfc9146 - [RSA-FACT]
- Bernstein, D., Chang, Y., Cheng, C., Chou, L., Heninger, N., Lange, T., and N. Someren, "Factoring RSA keys from certified smart cards: Coppersmith in the wild", Advances in Cryptology - ASIACRYPT 2013, .
- [TLS13
-CHANNEL -BINDINGS] -
Whited, S., "Channel Bindings for TLS 1.3", Work in Progress, Internet-Draft, draft
-ietf , , <https://-kitten -tls -channel -bindings -for -tls13 -15 datatracker >..ietf .org /doc /html /draft -ietf -kitten -tls -channel -bindings -for -tls13 -15 - [TRIPLESHAKE]
-
Bhargavan, B., Delignat-Lavaud, A., Fournet, C., Pironti, A., and P. Strub, "Triple Handshakes and Cookie Cutters: Breaking and Fixing Authentication over TLS", ISBN 978
-1 , DOI 10-4799 -4686 -0 .1109 , , <https:///SP .2014 .14 doi >..org /10 .1109 /SP .2014 .14
Appendix A. EST Messages to EST-coaps
This section shows similar examples to the ones presented in Appendix A of [RFC7030]. The payloads in the examples are the hex-encoded binary, generated with 'xxd -p', of the PKI certificates created following [PKI-GUIDE]. Hex is used for visualization purposes because a binary representation cannot be rendered well in text. The hexadecimal representations would not be transported in hex, but in binary. The payloads are shown unencrypted. In practice, the message content would be transferred over an encrypted DTLS channel.¶
The certificate responses included in the examples contain
Content-Format 281
These examples assume a short resource path of "/est". Even though
omitted from the examples for brevity, before making the EST-coaps
requests, a client would learn about the server supported EST-coaps
resources with a GET request for
The corresponding CoAP headers are only shown in Appendix A.1. Creating CoAP headers is assumed to be generally understood.¶
The message content is presented in plain text in Appendix C.¶
A.1. cacerts
In EST-coaps, a cacerts message can be the following:¶
The corresponding CoAP header fields are shown below. The use of block and DTLS are shown in Appendix B.¶
As specified in Section 5.10.1 of [RFC7252], the Uri-Host and Uri-Port Options can be omitted if they coincide with the transport protocol destination address and port, respectively.¶
A 2.05 Content response with a cert in EST-coaps will then be the following:¶
With the following CoAP fields:¶
The payload is shown in plain text in Appendix C.1.¶
A.2. enroll / reenroll
During the (re-)enroll exchange, the EST-coaps client uses a CSR
(Content-Format 286) request in the POST request payload. The
Accept Option tells the server that the client is expecting
Content-Format 281 (PKCS #7) in the response. As shown in Appendix C.2, the CSR contains a
challenge
After verification of the CSR by the server, a 2.04 Changed response with the issued certificate will be returned to the client.¶
The request and response is shown in plain text in Appendix C.2.¶
A.3. serverkeygen
In a serverkeygen exchange, the CoAP POST request looks like the following:¶
The response would follow [RFC8710] and could look like the following:¶
The private key in the response above is without CMS EnvelopedData and has no additional encryption beyond DTLS (Section 4.8).¶
The request and response is shown in plain text in Appendix C.3.¶
A.4. csrattrs
The following is a csrattrs exchange:¶
A 2.05 Content response should contain attributes that are relevant for the authenticated client. This example is copied from Appendix A.2 of [RFC7030], where the base64 representation is replaced with a hexadecimal representation of the equivalent binary format. The EST-coaps server returns attributes that the client can ignore if they are unknown to the client.¶
Appendix B. EST-coaps Block Message Examples
Two examples are presented in this section:¶
The payloads are shown unencrypted. In practice, the message contents would be binary formatted and transferred over an encrypted DTLS tunnel. The corresponding CoAP headers are only shown in Appendix B.1. Creating CoAP headers is assumed to be generally known.¶
B.1. cacerts
This section provides a detailed example of the messages using DTLS and CoAP Option Block2. The example block length is taken as 64, which gives an SZX value of 2.¶
The following is an example of a cacerts exchange over DTLS. The
content length of the cacerts response in Appendix A.1 of [RFC7030] contains 639 bytes in binary in
this example. The CoAP message adds around 10 bytes in this example,
and the DTLS record around 29 bytes. To avoid IP fragmentation, the
CoAP Block Option is used and an MTU of 127 is assumed to stay within
one IEEE 802.15.4 packet. To stay below the MTU of 127, the payload is
split in 9 packets with a payload of 64 bytes each, followed by a
last tenth packet of 63 bytes. The client sends an IPv6 packet
containing a UDP datagram with DTLS record protection that
encapsulates a CoAP request 10 times (one fragment of the request per
block). The server returns an IPv6 packet containing a UDP datagram
with the DTLS record that encapsulates the CoAP response. The CoAP
request
The header of the GET request looks like the following:¶
The Uri-Host and Uri-Port Options can be omitted if they coincide with the transport protocol destination address and port, respectively. Explicit Uri-Host and Uri-Port Options are typically used when an endpoint hosts multiple virtual servers and uses the Options to route the requests accordingly.¶
To provide further details on the CoAP headers, the first two and the last blocks are written out below. The header of the first Block2 response looks like the following:¶
The header of the second Block2 response looks like the following:¶
The header of the tenth and final Block2 response looks like the following:¶
B.2. enroll / reenroll
In this example, the requested Block2 size of 256 bytes, required by the client, is transferred to the server in the very first request message. The block size of 256 is equal to (2(SZX+4)), which gives SZX=4. The notation for block numbering is the same as in Appendix B.1. The header fields and the payload are omitted for brevity.¶
N1+1 blocks have been transferred from client to server, and N2+1 blocks have been transferred from server to client.¶
Appendix C. Message Content Breakdown
This appendix presents the hexadecimal dumps of the binary payloads in plain text shown in Appendix A.¶
C.1. cacerts
The cacerts response containing one root CA certificate is presented in plain text in the following:¶
C.2. enroll / reenroll
The enrollment request is presented in plain text in the following:¶
The CSR contains a challenge
The issued certificate presented in plain text in the following:¶
C.3. serverkeygen
The following is the server-side key generation request presented in plain text:¶
The following is the private key content of the server-side key generation response presented in plain text:¶
The following is the certificate in the server-side key generation response payload presented in plain text:¶
Acknowledgements
The authors are very grateful to Klaus Hartke for his detailed explanations on the use of Block with DTLS and his support for the Content-Format specification. The authors would like to thank Esko Dijk and Michael Verschoor for the valuable discussions that helped in shaping the solution. They would also like to thank Peter Panburana for his feedback on technical details of the solution. Constructive comments were received from Benjamin Kaduk, Eliot Lear, Jim Schaad, Hannes Tschofenig, Julien Vermillard, John Manuel, Oliver Pfaff, Pete Beal, and Carsten Bormann.¶
Interop tests were done by Oliver Pfaff, Thomas Werner, Oskar Camezind, Bjorn Elmers, and Joel Hoglund.¶
Robert Moskowitz provided code to create the examples.¶
Contributors
Martin Furuhed contributed to the EST-coaps specification by providing feedback based on the Nexus EST-over-CoAPS server implementation that started in 2015. Sandeep Kumar kick-started this specification and was instrumental in drawing attention to the importance of the subject.¶