idnits 2.17.1 draft-vanderstok-ace-coap-est-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC7030], [RFC7252]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 22, 2018) is 2279 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'Empty' is mentioned on line 1295, but not defined ** Obsolete normative reference: RFC 5751 (Obsoleted by RFC 8551) ** Downref: Normative reference to an Informational RFC: RFC 5967 ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) == Outdated reference: A later version (-02) exists of draft-hartke-core-pending-01 == Outdated reference: A later version (-15) exists of draft-ietf-6tisch-minimal-security-04 == Outdated reference: A later version (-45) exists of draft-ietf-anima-bootstrapping-keyinfra-09 -- Obsolete informational reference (is this intentional?): RFC 4492 (Obsoleted by RFC 8422) -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7230 (Obsoleted by RFC 9110, RFC 9112) -- Obsolete informational reference (is this intentional?): RFC 7525 (Obsoleted by RFC 9325) Summary: 4 errors (**), 0 flaws (~~), 5 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ACE P. van der Stok 3 Internet-Draft Consultant 4 Intended status: Standards Track P. Kampanakis 5 Expires: July 26, 2018 Cisco Systems 6 S. Kumar 7 Philips Lighting Research 8 M. Richardson 9 SSW 10 M. Furuhed 11 Nexus Group 12 S. Raza 13 RISE SICS 14 January 22, 2018 16 EST over secure CoAP (EST-coaps) 17 draft-vanderstok-ace-coap-est-04 19 Abstract 21 Enrollment over Secure Transport (EST) [RFC7030] is used as a 22 certificate management protocol over HTTPS. 24 Low-resource devices often use the lightweight Constrained 25 Application Protocol (CoAP) [RFC7252] for message exchanges. This 26 document defines how to transport EST payloads over secure CoAP (EST- 27 coaps). This allows low-resource constrained devices to re-use 28 existing EST functionality. Example low-resource use cases for EST 29 are: secure bootstrapping and certificate enrollment. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at https://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on July 26, 2018. 48 Copyright Notice 50 Copyright (c) 2018 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (https://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 66 1.1. EST operational differences . . . . . . . . . . . . . . . 3 67 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 68 2. Conformance to RFC7925 profiles . . . . . . . . . . . . . . . 4 69 3. Protocol Design and Layering . . . . . . . . . . . . . . . . 5 70 3.1. Payload format . . . . . . . . . . . . . . . . . . . . . 6 71 3.2. Message Bindings . . . . . . . . . . . . . . . . . . . . 6 72 3.3. CoAP response codes . . . . . . . . . . . . . . . . . . . 6 73 3.4. Message fragmentation . . . . . . . . . . . . . . . . . . 7 74 3.5. Deployment limits . . . . . . . . . . . . . . . . . . . . 8 75 4. Discovery and URI . . . . . . . . . . . . . . . . . . . . . . 8 76 5. DTLS Transport Protocol . . . . . . . . . . . . . . . . . . . 10 77 6. Proxying . . . . . . . . . . . . . . . . . . . . . . . . . . 11 78 7. Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 12 79 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 80 8.1. Content-Format registry . . . . . . . . . . . . . . . . . 12 81 8.2. Resource Type registry . . . . . . . . . . . . . . . . . 14 82 9. Security Considerations . . . . . . . . . . . . . . . . . . . 15 83 9.1. proxy considerations . . . . . . . . . . . . . . . . . . 15 84 9.2. EST server considerations . . . . . . . . . . . . . . . . 15 85 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 16 86 11. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 16 87 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 88 12.1. Normative References . . . . . . . . . . . . . . . . . . 17 89 12.2. Informative References . . . . . . . . . . . . . . . . . 18 90 Appendix A. EST messages to EST-coaps . . . . . . . . . . . . . 20 91 A.1. cacerts . . . . . . . . . . . . . . . . . . . . . . . . . 20 92 A.2. csrattrs . . . . . . . . . . . . . . . . . . . . . . . . 23 93 A.3. enroll / reenroll . . . . . . . . . . . . . . . . . . . . 23 94 A.4. serverkeygen . . . . . . . . . . . . . . . . . . . . . . 25 95 Appendix B. Encoding for server side key generation . . . . . . 27 96 Appendix C. EST-coaps Block message examples . . . . . . . . . . 27 97 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29 99 1. Introduction 101 Enrollment over Secure Transport (EST) [RFC7030] is used for 102 authenticated/authorized endpoint certificate enrollment (and 103 optionally key provisioning) through a Certificate Authority (CA) or 104 Registration Authority (RA). This functionality is also needed for 105 low resource devices. 107 "Classical" EST uses HTTPS and this specification defines a new 108 transport for EST using CoAP. It also profiles the use of EST to a 109 smaller subset. 111 IPv6 over Low-power Wireless Personal Area Networks (6LoWPANs) 112 [RFC4944] on IEEE 802.15.4 [ieee802.15.4] wireless networks are 113 becoming common in many industry application domains such as lighting 114 controls. Although IEEE 802.15.4 defines how security can be enabled 115 between nodes within a single mesh network, it does not specify the 116 provisioning and management of the keys. Therefore, securing a 117 6LoWPAN network with devices from multiple manufacturers with 118 different provisioning techniques is often tedious and time 119 consuming. An example use case is the application of Bootstrapping 120 of Remote Secure Infrastructures (BRSKI) 121 [I-D.ietf-anima-bootstrapping-keyinfra]. The low resource aspects 122 are detailed for 6tisch in [I-D.ietf-6tisch-minimal-security] and 123 [I-D.ietf-6tisch-dtsecurity-secure-join]. 125 Constrained networks use DTLS [RFC6347], CoAP [RFC7252], and UDP 126 instead of TLS [RFC5246], HTTP [RFC7230] and TCP. EST-coaps replaces 127 the invocations of TLS and HTTP by DTLS and CoAP invocations thus 128 enabling EST for CoAP-based low-resource devices. 130 Because the relatively large EST messages cannot be readily 131 transported over constrained (6LoWPAN, LLN) wireless networks, this 132 document specifies the use of CoAP Block-Wise Transfer ("Block") 133 [RFC7959] to fragment EST messages at the application layer. 135 1.1. EST operational differences 137 Only the differences to EST with respect to operational scenarios are 138 described in this section. EST-coaps server differs from EST server 139 as follows: 141 o Replacement of TLS by DTLS and HTTP by CoAP, resulting in: 143 * DTLS-secured CoAP sessions between EST-coaps client and EST- 144 coaps server. 146 o Only certificate-based client authentication is supported, which 147 results in: 149 * The EST-coaps client does not support HTTP Basic authentication 150 (as described in Section 3.2.3 of [RFC7030]). 152 * The EST-coaps client does not support authentication at the 153 application layer (as described in Section 3.2.3 of [RFC7030]). 155 1.2. Terminology 157 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 158 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 159 document are to be interpreted as described in [RFC2119]. 161 Many of the concepts in this document are taken over from [RFC7030]. 162 Consequently, much text is directly traceable to [RFC7030]. The same 163 document structure is followed to point out the differences and 164 commonalities between EST and EST-coaps. 166 2. Conformance to RFC7925 profiles 168 This section shows how EST-coaps fits into the profiles of low- 169 resource devices as described in [RFC7925]. 171 EST-coaps can transport certificates and private keys. Private keys 172 can be transported as response to a request to a server-side key 173 generation as described in section 4.4 of [RFC7030]. 175 The mandatory cipher suite for DTLS is 176 TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 defined in [RFC7251] which is the 177 mandatory-to-implement cipher suite in CoAP. Additionally, the curve 178 secp256r1 MUST be supported [RFC4492]; this curve is equivalent to 179 the NIST P-256 curve. The hash algorithm is SHA-256. DTLS 180 implementations MUST use the Supported Elliptic Curves and Supported 181 Point Formats Extensions [RFC4492]; the uncompressed point format 182 MUST be supported; [RFC6090] can be used as an implementation method. 184 The EST-coaps client MUST be configured with an explicit TA database 185 or at least an implicit TA database from its manufacturer. The 186 authentication of the EST-coaps server by the EST-coaps client is 187 based on Certificate authentication in the DTLS handshake. 189 The authentication of the EST-coaps client is based on client 190 certificate in the DTLS handshake. This can either be 191 o DTLS with a previously issued client certificate (e.g., an 192 existing certificate issued by the EST CA); this could be a common 193 case for simple re-enrollment of clients; 195 o DTLS with a previously installed certificate (e.g., manufacturer- 196 installed certificate or a certificate issued by some other 197 party); 199 3. Protocol Design and Layering 201 EST-coaps uses CoAP to transfer EST messages, aided by Block-Wise 202 Transfer [RFC7959] to transport CoAP messages in blocks thus avoiding 203 (excessive) 6LoWPAN fragmentation of UDP datagrams. The use of 204 "Block" for the transfer of larger EST messages is specified in 205 Section 3.4. The Figure 1 below shows the layered EST-coaps 206 architecture. 208 +------------------------------------------------+ 209 | EST request/response messages | 210 +------------------------------------------------+ 211 | CoAP for message transfer and signaling | 212 +------------------------------------------------+ 213 | DTLS for transport security | 214 +------------------------------------------------+ 215 | UDP for transport | 216 +------------------------------------------------+ 218 Figure 1: EST-coaps protocol layers 220 The EST-coaps protocol design follows closely the EST design. The 221 parts supported by EST-coaps are identified by their message types: 223 o Simple enroll and reenroll, for CA to sign public client-identity 224 key. 226 o CA certificate retrieval, needed to receive the complete set of CA 227 certificates. 229 o CSR Attributes request messages, informs the client of the fields 230 to include in generated CSR. 232 o Server-side key generation messages, to provide a private client- 233 identity key when the client is too restricted or because of lack 234 of an entropy source. [EDNOTE: Encrypting these keys is 235 important. RFC7030 specifies how the private key can be encrypted 236 with CMS using symmetric or asymmetric keys. Mention how 237 symmetric key can be derived for EST server side key generation 238 from the TLS KEM draft.] 240 3.1. Payload format 242 The content-format (media type equivalent) of the CoAP message 243 determines which EST message is transported in the CoAP payload. The 244 media types specified in the HTTP Content-Type header (see section 245 3.2.2 of [RFC7030]) are in EST-coaps specified by the Content-Format 246 Option (12) of CoAP. The combination of URI path-suffix and content- 247 format used for CoAP MUST map to an allowed combination of path- 248 suffix and media type as defined for EST. The required content- 249 formats for these request and response messages are defined in 250 Section 8. The CoAP response codes are defined in Section 3.3. 252 EST-coaps is designed for use between low-resource devices using CoAP 253 and hence does not need to send base64-encoded data. Simple binary 254 is more efficient (30% less payload compared to base64) and well 255 supported by CoAP. Therefore, the content formats specification in 256 Section 8 requires the use of binary for all EST-coaps Content- 257 Formats. 259 3.2. Message Bindings 261 This section describes the general EST CoAP message characteristics. 263 It is RECOMMENDED to use CoAP CON messages. This recommendation does 264 not influence the communication efficiency because all EST-coaps 265 messages expect a response. 267 The Ver, TKL, Token, and Message ID values of the CoAP header are not 268 influenced by EST. 270 CoAP options are used to convey Uri-Host, Uri-Path, Uri-Port, 271 Content-Format and more in CoAP. The CoAP Options are used to 272 communicate the HTTP fields specified in the EST REST messages. 274 EST URLs are HTTPS based (https://), in CoAP these will be assumed to 275 be transformed to coaps (coaps://) 277 Appendix A includes some practical examples of EST messages 278 translated to CoAP. 280 3.3. CoAP response codes 282 Section 5.9 of [RFC7252] specifies the mapping of HTTP response codes 283 to CoAP response codes. Every time the HTTP response code 200 is 284 specified in [RFC7030] in response to a GET (POST) request, in EST- 285 coaps the equivalent CoAP response code 2.05 (2.01) MUST be used. 286 Response code HTTP 202 in EST is mapped to CoAP _.__. In 287 [I-D.hartke-core-pending] it is specified how multiple concurrently 288 open requests may be handled. All other HTTP 2xx response codes are 289 not used by EST. For the following HTTP 4xx error codes that may 290 occur: 400, 401, 403, 404, 405, 406, 412, 413, 415; the equivalent 291 CoAP response code for EST-coaps is 4.xx. For the HTTP 5xx error 292 codes: 500, 501, 502, 503, 504 the equivalent CoAP response code is 293 5.xx. 295 3.4. Message fragmentation 297 DTLS defines fragmentation only for the handshake part and not for 298 secure data exchange (DTLS records). [RFC6347] states that to avoid 299 using IP fragmentation, which involves error-prone datagram 300 reconstitution, invokers of the DTLS record layer SHOULD size DTLS 301 records so that they fit within any Path MTU estimates obtained from 302 the record layer. In addition, invokers residing on a 6LoWPAN over 303 IEEE 802.15.4 network SHOULD attempt to size CoAP messages such that 304 each DTLS record will fit within one or two IEEE 802.15.4 frames. 306 That is not always possible. Even though ECC certificates are small 307 in size, they can vary greatly based on signature algorithms, key 308 sizes, and OID fields used. For 256-bit curves, common ECDSA cert 309 sizes are 500-1000 bytes which could fluctuate further based on the 310 algorithms, OIDs, SANs and cert fields. For 384-bit curves, ECDSA 311 certs increase in size and can sometimes reach 1.5KB. Additionally, 312 there are times when the EST cacerts response from the server can 313 include multiple certs that amount to large payloads. Section 4.6 of 314 CoAP [RFC7252] describes the possible payload sizes: "if nothing is 315 known about the size of the headers, good upper bounds are 1152 bytes 316 for the message size and 1024 bytes for the payload size". 317 Section 4.6 of [RFC7252] also suggests that IPv4 implementations may 318 want to limit themselves to more conservative IPv4 datagram sizes 319 such as 576 bytes. From [RFC0791] follows that the absolute minimum 320 value of the IP MTU for IPv4 is as low as 68 bytes, which would leave 321 only 40 bytes minus security overhead for a UDP payload. Thus, even 322 with ECC certs, EST-coaps messages can still exceed sizes in MTU of 323 1280 for IPv6 or 60-80 bytes for 6LoWPAN [RFC4919] as explained in 324 section 2 of [RFC7959]. EST-coaps needs to be able to fragment EST 325 messages into multiple DTLS datagrams. Fine-grained fragmentation of 326 EST messages is essential. 328 To perform fragmentation in CoAP, [RFC7959] specifies the "Block1" 329 option for fragmentation of the request payload and the "Block2" 330 option for fragmentation of the return payload of a CoAP flow. 332 The BLOCK draft defines SZX in the Block1 and Block2 option fields. 333 These are used to convey the size of the blocks in the requests or 334 responses. 336 The CoAP client MAY specify the Block1 size and MAY also specify the 337 Block2 size. The CoAP server MAY specify the Block2 size, but not 338 the Block1 size. As explained in Section 1 of [RFC7959]), blockwise 339 transfers SHOULD be used in Confirmable CoAP messages to avoid the 340 exacerbation of lost blocks. 342 The Size1 response MAY be parsed by the client as a size indication 343 of the Block2 resource in the server response or by the server as a 344 request for a size estimate by the client. Similarly, Size2 option 345 defined in BLOCK should be parsed by the server as an indication of 346 the size of the resource carried in Block1 options and by the client 347 as a maximum size expected in the 4.13 (Request Entity Too Large) 348 response to a request. 350 Examples of fragmented messages are shown in Appendix C. 352 3.5. Deployment limits 354 Although EST-coaps paves the way for the utilization of EST for 355 constrained devices on constrained networks, some devices will not 356 have enough resources to handle the large payloads that come with 357 EST-coaps. The specification of EST-coaps is intended to ensure that 358 EST works for networks of constrained devices that choose to limit 359 their communications stack to UDP/CoAP. It is up to the network 360 designer to decide which devices execute the EST protocol and which 361 not. 363 4. Discovery and URI 365 EST-coaps is targeted to low-resource networks with small packets. 366 Saving header space is important and an additional EST-coaps URI is 367 specified that is shorter than the EST URI. 369 In the context of CoAP, the presence and location of (path to) the 370 management data are discovered by sending a GET request to "/.well- 371 known/core" including a resource type (RT) parameter with the value 372 "ace.est" [RFC6690]. Upon success, the return payload will contain 373 the root resource of the EST resources. It is up to the 374 implementation to choose its root resource; throughout this document 375 the example root resource /est is used. The example below shows the 376 discovery of the presence and location of management data. 378 REQ: GET /.well-known/core?rt=ace.est 380 RES: 2.05 Content 381 ; rt="ace.est" 382 The additional EST-coaps server URIs differ from the EST URI by 383 replacing the scheme https by coaps and by specifying a shorter 384 resource path names: 386 coaps://www.example.com/est/short-name 388 The CoAP short URI exists next to the URI defined in [RFC7030]. 390 coaps://www.example.com/.well-known/est/est-name 391 OR 392 coaps://www.example.com/.well-known/est/ArbitraryLabel/est-name 394 Figure 5 in section 3.2.2 of [RFC7030] enumerates the operations and 395 corresponding paths which are supported by EST. Table 1 provides the 396 mapping from the EST URI path to the shorter EST-coaps URI path. 398 +------------------+-----------+ 399 | EST | EST-coaps | 400 +------------------+-----------+ 401 | /cacerts | /crts | 402 | /simpleenroll | /sen | 403 | /simplereenroll | /sren | 404 | /csrattrs | /att | 405 | /serverkeygen | /skg | 406 +------------------+-----------+ 408 Table 1 410 When discovering the root path for the EST resources, the server MAY 411 return the full resource paths and the used content types. This is 412 useful when multiple content types are specified for EST-coaps 413 server. For example, the following more complete response is 414 possible. 416 REQ: GET /.well-known/core?rt=ace.est 418 RES: 2.05 Content 419 ; rt="ace.est" 420 ; rt="ace.est";ct=TBD1 421 ; rt="ace.est";ct=TBD1 TBD4 422 ; rt="ace.est";ct=TBD1 TBD4 423 ; rt="ace.est";ct=TBD4 424 ; rt="ace.est";ct=TBD1 TBD4 TBD2 426 The return of the content-types allows the client to choose the most 427 appropriate one from multiple content types. 429 5. DTLS Transport Protocol 431 EST-coaps depends on a secure transport mechanism over UDP that can 432 secure (confidentiality, authenticity) the CoAP messages exchanged. 434 DTLS is one such secure protocol. When "TLS" is referred to in the 435 context of EST, it is understood that in EST-coaps, security is 436 provided using DTLS instead. No other changes are necessary (all 437 provisional modes etc. are the same as for TLS). 439 CoAP was designed to avoid fragmentation. DTLS is used to secure 440 CoAP messages. However, fragmentation is still possible at the DTLS 441 layer during the DTLS handshake when using ECC ciphersuites. If 442 fragmentation is necessary, "DTLS provides a mechanism for 443 fragmenting a handshake message over a number of records, each of 444 which can be transmitted separately, thus avoiding IP fragmentation" 445 [RFC6347]. 447 CoAP and DTLS can provide proof of identity for EST-coaps clients and 448 server with simple PKI messages conformant to section 3.1 of 449 [RFC5272]. EST-coaps supports the certificate types and Trust 450 Anchors (TA) that are specified for EST in section 3 of [RFC7030]. 452 Channel-binding information for linking proof-of-identity with 453 connection-based proof-of-possession is optional for EST-coaps. When 454 proof-of-possession is desired, a set of actions are required 455 regarding the use of tls-unique, described in section 3.5 in 456 [RFC7030]. The tls-unique information translates to the contents of 457 the first "Finished" message in the TLS handshake between server and 458 client [RFC5929]. The client is then supposed to add this "Finished" 459 message as a ChallengePassword in the attributes section of the 460 PKCS#10 Request Info to prove that the client is indeed in control of 461 the private key at the time of the TLS session when performing a 462 /simpleenroll, for example. In the case of EST-coaps, the same 463 operations can be performed during the DTLS handshake. In the event 464 of handshake message fragmentation, the Hash of the handshake 465 messages used in the MAC calculation of the Finished message 467 PRF(master_secret, finished_label, Hash(handshake_messages)) 468 [0..verify_data_length-1]; 470 MUST be computed as if each handshake message had been sent as a 471 single fragment [RFC6347]. 473 In a constrained CoAP environment, endpoints can't afford to 474 establish a DTLS connection for every EST transaction. 475 Authenticating and negotiating DTLS keys requires resources on low- 476 end endpoints and consumes valuable bandwidth. The DTLS connection 477 SHOULD remain open for persistent EST connections. For example, an 478 EST cacerts request that is followed by a simpleenroll request can 479 use the same authenticated DTLS connection. Given that after a 480 successful enrollment, it is more likely that a new EST transaction 481 will take place after a significant amount of time, the DTLS 482 connections SHOULD only be kept alive for EST messages that are 483 relatively close to each other. 485 Support for Observe CoAP options [RFC7641] is out-of-scope for this 486 document. Observe options could be used by the server to notify 487 clients about a change in the cacerts or csr attributes (resources) 488 and might be an area of future work. 490 6. Proxying 492 In real-world deployments, the EST server will not always reside 493 within the CoAP boundary. The EST-server can exist outside the 494 constrained network in a non-constrained network that supports TLS/ 495 HTTP. In such environments EST-coaps is used by the client within 496 the CoAP boundary and TLS is used to transport the EST messages 497 outside the CoAP boundary. A proxy entity at the edge is required to 498 operate between the CoAP environment and the external HTTP network. 499 The ESTcoaps-to-HTTPS proxy SHOULD terminate EST-coaps downstream and 500 initiate EST connections over TLS upstream. 502 One possible use-case, shown in one figure below, is expected to be 503 deployed in practice: 505 o A proxy between any EST-client and EST-server 507 Constrained Network 508 .---------. .----------------------------. 509 | RA | |.--------------------------.| 510 '---------' || || 511 | || || 512 .------. HTTP .-----------------. CoAPS .-----------. || 513 | EST |<------->|ESTcoaps-to-HTTPS|<-------->| EST Client| || 514 |Server|over TLS | Proxy | '-----------' || 515 '------' '-----------------' || 516 || || 517 |'--------------------------'| 518 '----------------------------' 520 ESTcoaps-to-HTTPS proxy at the CoAP boundary. 522 Table 1 contains the URI mapping between the EST-coaps and EST the 523 proxy SHOULD adhere to. Section 7 of [RFC8075] and Section 3.3 524 define the mapping between EST-coaps and HTTP response codes, that 525 determines how a proxy translates CoAP response codes from/to HTTP 526 status codes. The mapping from Content-Type to media type is defined 527 in Section 8. The conversion from binary to BSD64 needs to be done 528 in the proxy. Conversion is possible because a TLS link exists 529 between EST-coaps-to-HTTP proxy and EST server and a corresponding 530 DTLS linked exists between EST-coaps-to-HTTP proxy and EST client. 532 Due to fragmentation of large messages into blocks, an EST-coaps-to- 533 HTTP proxy SHOULD reassemble the BLOCKs before translating the binary 534 content to BSD64, and consecutively relay the message upstream into 535 the HTTP environment. 537 For the discovery of the EST server by the EST client in the coap 538 environment, the EST-coaps-to-HTTP proxy MUST announce itself 539 according to the rules of Section 4. The available functions of the 540 proxies MUST be announced with as many resource paths. The discovery 541 of EST server in the http environment follow the rules specified in 542 [RFC7030]. 544 [ EDNOTE: PoP will be addressed here. ] 546 A proxy SHOULD authenticate the client downstream and it should be 547 authenticated by the EST server or CA upstream. The Registration 548 Authority (RA) is necessary to (re-)create the secure connection from 549 DTLS to TLS and vice versa. A trust relationship needs to be pre- 550 established between the proxy and the EST servers to be able to proxy 551 these connections on behalf of various clients. 553 [EDNOTE: To add more details about trust relations in this section. ] 555 7. Parameters 557 [EDNOTE: This section to be populated. It will address transmission 558 parameters described in sections 4.7 and 4.8 of the CoAP draft. EST 559 does not impose any unique parameters that affect the CoAP parameters 560 in Table 2 and 3 in the CoAP draft but the ones in CoAP could be 561 affecting EST. For example, the processing delay of CAs could be 562 less then 2s, but in this case they should send a CoAP ACK every 2s 563 while processing.] 565 8. IANA Considerations 567 8.1. Content-Format registry 569 Additions to the sub-registry "CoAP Content-Formats", within the 570 "CoRE Parameters" registry are needed for the below media types. 571 These can be registered either in the Expert Review range (0-255) or 572 IETF Review range (256-9999). 574 1. 576 * application/pkcs7-mime 578 * Type name: application 580 * Subtype name: pkcs7-mime 582 * ID: TBD1 584 * Required parameters: None 586 * Optional parameters: None 588 * Encoding considerations: binary 590 * Security considerations: As defined in this specification 592 * Published specification: [RFC5751] 594 * Applications that use this media type: EST 596 2. 598 * application/pkcs8 600 * Type name: application 602 * Subtype name: pkcs8 604 * ID: TBD2 606 * Required parameters: None 608 * Optional parameters: None 610 * Encoding considerations: binary 612 * Security considerations: As defined in this specification 614 * Published specification: [RFC5958] 616 * Applications that use this media type: EST 618 3. 620 * application/csrattrs 621 * Type name: application 623 * Subtype name: csrattrs 625 * ID: TBD3 627 * Required parameters: None 629 * Optional parameters: None 631 * Encoding considerations: binary 633 * Security considerations: As defined in this specification 635 * Published specification: [RFC7030] 637 * Applications that use this media type: EST 639 4. 641 * application/pkcs10 643 * Type name: application 645 * Subtype name: pkcs10 647 * ID: TBD4 649 * Required parameters: None 651 * Optional parameters: None 653 * Encoding considerations: binary 655 * Security considerations: As defined in this specification 657 * Published specification: [RFC5967] 659 * Applications that use this media type: EST 661 8.2. Resource Type registry 663 Additions to the sub-registry "CoAP Resource Type", within the "CoRE 664 Parameters" registry are needed for a new resource type. 666 o rt="ace.est" needs registration with IANA. 668 9. Security Considerations 670 9.1. proxy considerations 672 The proxy proposed in Section 6 must be deployed with great care, and 673 only when the recommended connections are impossible. 675 [EDNOTE: To add more details about trust relations through proxies in 676 this section. ] 678 9.2. EST server considerations 680 The security considerations of section 6 of [RFC7030] are only 681 partially valid for the purposes of this document. As HTTP Basic 682 Authentication is not supported, the considerations expressed for 683 using passwords do not apply. 685 Given that the client has only limited resources and may not be able 686 to generate sufficiently random keys to encrypt its identity, it is 687 possible that the client uses server generated private/public keys to 688 encrypt its certificate. The transport of these keys is inherently 689 risky. A full probability analysis MUST be done to establish whether 690 server side key generation enhances or decreases the probability of 691 identity stealing. 693 When a client uses the Implicit TA database for certificate 694 validation, the client cannot verify that the implicit data base can 695 act as an RA. It is RECOMMENDED that such clients include "Linking 696 Identity and POP Information" Section 5 in requests (to prevent such 697 requests from being forwarded to a real EST server by a man in the 698 middle). It is RECOMMENDED that the Implicit Trust Anchor database 699 used for EST server authentication be carefully managed to reduce the 700 chance of a third-party CA with poor certification practices from 701 being trusted. Disabling the Implicit Trust Anchor database after 702 successfully receiving the Distribution of CA certificates response 703 (Section 4.1.3 of [RFC7030]) limits any vulnerability to the first 704 DTLS exchange. 706 In accordance with [RFC7030], TLS cipher suites that include 707 "_EXPORT_" and "_DES_" in their names MUST NOT be used. More 708 information about recommendations of TLS and DTLS are included in 709 [RFC7525]. 711 As described in CMC, Section 6.7 of [RFC5272], "For keys that can be 712 used as signature keys, signing the certification request with the 713 private key serves as a POP on that key pair". The inclusion of tls- 714 unique in the certification request links the proof-of-possession to 715 the TLS proof-of-identity. This implies but does not prove that the 716 authenticated client currently has access to the private key. 718 Regarding the CSR attributes that the CA may list for inclusion in an 719 enrollment request, an adversary could exclude attributes that a 720 server may want, include attributes that a server may not want, and 721 render meaningless other attributes that a server may want. The CA 722 is expected to be able to enforce policies to recover from improper 723 CSR requests. 725 Interpreters of ASN.1 structures should be aware of the use of 726 invalid ASN.1 length fields and should take appropriate measures to 727 guard against buffer overflows, stack overruns in particular, and 728 malicious content in general. 730 10. Acknowledgements 732 The authors are very grateful to Klaus Hartke for his detailed 733 explanations on the use of Block with DTLS. The authors would like 734 to thank Esko Dijk and Michael Verschoor for the valuable discussions 735 that helped in shaping the solution. They would also like to thank 736 Peter Panburana from Cisco for his feedback on technical details of 737 the solution. Constructive comments were received from Eliot Lear, 738 Jim Schaad, Hannes Tschofenig, and Julien Vermillard. 740 11. Change Log 742 -03: 744 removed all motivation to and dependence on BRKI 746 Supports full EST, except password support 748 discovery limited to EST functions 750 /.well-known/est is alternative path to short coap path 752 proxy discussion is simplified to one case 754 -02: 756 binary instead of CBOR binary in mime types. 758 supported content types are discoverable. 760 DTLS POP text improved. 762 First version of Security considerations section written. 764 First version of Proxying section written. 766 Various text improvements. 768 -01: 770 Merging of draft-vanderstok-ace-coap-est-00 and draft-pritikin- 771 coap-bootstrap-01 773 URI and discovery are modified 775 More text about 6tisch bootstrap including EDHOC and OSCoAP 777 mapping to DICE IoT profiles 779 adapted to BRSKI progress 781 12. References 783 12.1. Normative References 785 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 786 Requirement Levels", BCP 14, RFC 2119, 787 DOI 10.17487/RFC2119, March 1997, 788 . 790 [RFC5272] Schaad, J. and M. Myers, "Certificate Management over CMS 791 (CMC)", RFC 5272, DOI 10.17487/RFC5272, June 2008, 792 . 794 [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 795 Mail Extensions (S/MIME) Version 3.2 Message 796 Specification", RFC 5751, DOI 10.17487/RFC5751, January 797 2010, . 799 [RFC5967] Turner, S., "The application/pkcs10 Media Type", RFC 5967, 800 DOI 10.17487/RFC5967, August 2010, 801 . 803 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 804 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 805 January 2012, . 807 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 808 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 809 . 811 [RFC7030] Pritikin, M., Ed., Yee, P., Ed., and D. Harkins, Ed., 812 "Enrollment over Secure Transport", RFC 7030, 813 DOI 10.17487/RFC7030, October 2013, 814 . 816 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 817 Application Protocol (CoAP)", RFC 7252, 818 DOI 10.17487/RFC7252, June 2014, 819 . 821 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 822 the Constrained Application Protocol (CoAP)", RFC 7959, 823 DOI 10.17487/RFC7959, August 2016, 824 . 826 [RFC8075] Castellani, A., Loreto, S., Rahman, A., Fossati, T., and 827 E. Dijk, "Guidelines for Mapping Implementations: HTTP to 828 the Constrained Application Protocol (CoAP)", RFC 8075, 829 DOI 10.17487/RFC8075, February 2017, 830 . 832 12.2. Informative References 834 [I-D.hartke-core-pending] 835 Stok, P. and K. Hartke, "The 'Pending' Response Code for 836 the Constrained Application Protocol (CoAP)", draft- 837 hartke-core-pending-01 (work in progress), August 2017. 839 [I-D.ietf-6tisch-dtsecurity-secure-join] 840 Richardson, M., "6tisch Secure Join protocol", draft-ietf- 841 6tisch-dtsecurity-secure-join-01 (work in progress), 842 February 2017. 844 [I-D.ietf-6tisch-minimal-security] 845 Vucinic, M., Simon, J., Pister, K., and M. Richardson, 846 "Minimal Security Framework for 6TiSCH", draft-ietf- 847 6tisch-minimal-security-04 (work in progress), October 848 2017. 850 [I-D.ietf-anima-bootstrapping-keyinfra] 851 Pritikin, M., Richardson, M., Behringer, M., Bjarnason, 852 S., and K. Watsen, "Bootstrapping Remote Secure Key 853 Infrastructures (BRSKI)", draft-ietf-anima-bootstrapping- 854 keyinfra-09 (work in progress), October 2017. 856 [ieee802.15.4] 857 Institute of Electrical and Electronics Engineers, "IEEE 858 Standard 802.15.4-2006", 2006. 860 [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, 861 DOI 10.17487/RFC0791, September 1981, 862 . 864 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 865 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 866 for Transport Layer Security (TLS)", RFC 4492, 867 DOI 10.17487/RFC4492, May 2006, 868 . 870 [RFC4919] Kushalnagar, N., Montenegro, G., and C. Schumacher, "IPv6 871 over Low-Power Wireless Personal Area Networks (6LoWPANs): 872 Overview, Assumptions, Problem Statement, and Goals", 873 RFC 4919, DOI 10.17487/RFC4919, August 2007, 874 . 876 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 877 "Transmission of IPv6 Packets over IEEE 802.15.4 878 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 879 . 881 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 882 (TLS) Protocol Version 1.2", RFC 5246, 883 DOI 10.17487/RFC5246, August 2008, 884 . 886 [RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings 887 for TLS", RFC 5929, DOI 10.17487/RFC5929, July 2010, 888 . 890 [RFC5958] Turner, S., "Asymmetric Key Packages", RFC 5958, 891 DOI 10.17487/RFC5958, August 2010, 892 . 894 [RFC6090] McGrew, D., Igoe, K., and M. Salter, "Fundamental Elliptic 895 Curve Cryptography Algorithms", RFC 6090, 896 DOI 10.17487/RFC6090, February 2011, 897 . 899 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 900 Protocol (HTTP/1.1): Message Syntax and Routing", 901 RFC 7230, DOI 10.17487/RFC7230, June 2014, 902 . 904 [RFC7251] McGrew, D., Bailey, D., Campagna, M., and R. Dugal, "AES- 905 CCM Elliptic Curve Cryptography (ECC) Cipher Suites for 906 TLS", RFC 7251, DOI 10.17487/RFC7251, June 2014, 907 . 909 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 910 "Recommendations for Secure Use of Transport Layer 911 Security (TLS) and Datagram Transport Layer Security 912 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 913 2015, . 915 [RFC7641] Hartke, K., "Observing Resources in the Constrained 916 Application Protocol (CoAP)", RFC 7641, 917 DOI 10.17487/RFC7641, September 2015, 918 . 920 [RFC7925] Tschofenig, H., Ed. and T. Fossati, "Transport Layer 921 Security (TLS) / Datagram Transport Layer Security (DTLS) 922 Profiles for the Internet of Things", RFC 7925, 923 DOI 10.17487/RFC7925, July 2016, 924 . 926 Appendix A. EST messages to EST-coaps 928 This section takes all examples from Appendix A of [RFC7030], changes 929 the payload from Base64 to binary and replaces the http headers by 930 their CoAP equivalents. 932 The corresponding CoAP headers are only shown in Appendix A.1. 933 Creating CoAP headers are assumed to be generally known. 935 [EDNOTE: The payloads of the examples need to be re-generated with 936 appropriate tools and example certificates.] 938 A.1. cacerts 940 In EST-coaps, a coaps cacerts IPv4 message can be: 942 GET coaps://[192.0.2.1:8085]/est/crts 944 The corresponding CoAP header fields are shown below. The use of 945 block and DTLS are worked out in Appendix C. 947 Ver = 1 948 T = 0 (CON) 949 Code = 0x01 (0.01 is GET) 950 Options 951 Option1 (Uri-Host) 952 Option Delta = 0x3 (option nr = 3) 953 Option Length = 0x9 954 Option Value = 192.0.2.1 955 Option2 (Uri-Port) 956 Option Delta = 0x4 (option nr = 4+3=7) 957 Option Length = 0x4 958 Option Value = 8085 959 Option3 (Uri-Path) 960 Option Delta = 0x4 (option nr = 7+4= 11) 961 Option Length = 0x9 962 Option Value = /est/crts 963 Payload = [Empty] 965 A 2.05 Content response with a cert in EST-coaps will then be: 967 2.05 Content (Content-Format: application/pkcs7-mime) 968 {payload} 970 with CoAP fields 972 Ver = 1 973 T = 2 (ACK) 974 Code = 0x45 (2.05 Content) 975 Options 976 Option1 (Content-Format) 977 Option Delta = 0xC (option nr = 12) 978 Option Length = 0x2 979 Option Value = TBD1 (defined in this document) 981 Payload = 982 30233906092a6206734107028c2a3023260201013100300b06092a6206734107018 983 c0c3020bb302063c20102020900a61e75193b7acc0d06092a620673410105050030 984 1b31193017060355040313106573744578616d706c654341204f774f301e170d313 985 3303530393033353333315a170d3134303530393033353333315a301b3119301706 986 0355040313106573744578616d706c654341204f774f302062300d06092a6206734 987 10101050003204f0030204a022041003a923a2968bae4aae136ca4e2512c5200680 988 358482ac39d6f640e4574e654ea35f48b1e054c5da3372872f7a1e429f4edf39584 989 32efb2106591d3eb783c1034709f251fc86566bda2d541c792389eac4ec9e181f4b 990 9f596e5ef2679cc321542b11337f90a44df3c85f1516561fa968a1914f265bc0b82 991 76ebe3106a790d97d34c8c37c74fe1c30b396424664ac426284a9f6022e02693843 992 6880adfcd95c98ca1dfc2e6d75319b85d0458de28a9d13fb16d620fff7541f6a25d 993 7daf004355020301000130b040300f0603551d130101f10530030101fc1d0603551 994 d0e04160414084d321ca0135e77217a486b686b334b00e0603551d0f0101f104030 995 20106300d06092a62067341010505000320410023703b965746a0c2c978666d787a 996 94f89b495a11f0d369b28936ec2475c0f0855c8e83f823f2b871a1d92282f323c45 997 904ba008579216cf5223b8b1bc425a0677262047f7700240631c17f3035d1c3780b 998 2385241cba1f4a6e98e6be6820306b3a786de5a557795d1893822347b5f825d34a7 999 ad2876f8feba4d525b31066f6505796f71530003431a3e6bbfe788b4565029a7e20 1000 a51107677552586152d051e8eebf383e92288983421d5c5652a4870c3af74b9bdbe 1001 d6b462e2263d30f6d3020c330206bc20102020101300d06092a6206734101050500 1002 301b31193017060355040313106573744578616d706c654341204f774f301e170d3 1003 133303530393033353333325a170d3134303530393033353333325a301b31193017 1004 060355040313106573744578616d706c654341204e774f302062300d06092a62067 1005 3410101050003204f0030204a02204100ef6b677a3247c1fc03d2b9baf113e5e7e1 1006 1f49e0421120e6b8384160f2bf02630ef544d5fd0d5623b35713c79a7229283a790 1007 8751a634aa420a3e2a4b1f10519d046f02f5a5dd6d760c2a842356e067b7bd94338 1008 d1faa3b3ddd4813060a207b0a097067007e45b052b60fdbae4656e11562c4f5abb7 1009 b0cf87a79d221f1127313c53371ce1245d63db45a1203a23340ba08042c768d03b8 1010 076a028d3a51d87d2ef107bbd6f2305ce5e67668724002fb726df9c14476c37de0f 1011 55033f192a5ad21f9a2a71c20301000134b050300e0603551d0f0101f104030204c 1012 1d0603551d0e04160414112966e304761732fbfe6a2c823c301f0603551d2304183 1013 0165084d321ca0135e77217a486b686b334b00d06092a6206734101050500032041 1014 00b382ba3355a50e287bae15758b3beff63d34d3e357b90031495d018868e49589b 1015 9faf46a4ad49b1d35b06ef380106677440934663c2cc111c183655f4dc41c0b3401 1016 123d35387389db91f1e1b4131b16c291d35730b3f9b33c7475124851555fe5fc647 1017 e8fd029605367c7e01281bf6617110021b0d10847dce0e9f0ca6c764b6334784055 1018 172c3983d1e3a3a82301a54fcc9b0670c543a1c747164619101ff23b240b2a26394 1019 c1f7d38d0e2f4747928ece5c34627a075a8b3122011e9d9158055c28f020c330206 1020 bc20102020102300d06092a6206734101050500301b311930170603550403131065 1021 73744578616d706c654341204e774e301e170d3133303530393033353333325a170 1022 d3134303530393033353333325a301b31193017060355040313106573744578616d 1023 706c654341204f774e302062300d06092a620673410101050003204f0030204a022 1024 041003a923a2968bae4aae136ca4e2512c5200680358482ac39d6f640e4574e654e 1025 a35f48b1e054c5da3372872f7a1e429f4edf3958432efb2106591d3eb783c103470 1026 9f251fc86566bda2d541c792389eac4ec9e181f4b9f596e5ef2679cc321542b1133 1027 7f90a44df3c85f1516561fa968a1914f265bc0b8276ebe3106a790d97d34c8c37c7 1028 4fe1c30b396424664ac426284a9f6022e026938436880adfcd95c98ca1dfc2e6d75 1029 319b85d0458de28a9d13fb16d620fff7541f6a25d7daf004355020301000134b050 1030 300e0603551d0f0101f104030204c1d0603551d0e04160414084d321ca0135e7721 1031 7a486b686b334b01f0603551d230418301653112966e304761732fbfe6a2c823c30 1032 0d06092a6206734101050500032041002e106933a443070acf5594a3a584d08af7e 1033 06c295059370a06639eff9bd418d13bc25a298223164a6cf1856b11a81617282e4a 1034 410d82ef086839c6e235690322763065455351e4c596acc7c016b225dec094706c2 1035 a10608f403b10821984c7c152343b18a768c2ad30238dc45dd653ee6092b0d5cd4c 1036 2f7d236043269357f76d13f95fb5f00d0e19263c6833948e1ba612ce8197af650e2 1037 5d882c12f4b6b9b67252c608ef064aca3f9bc867d71172349d510bb7651cd438837 1038 73d927deb41c4673020bb302063c201020209009b9dda3324700d06092a62067341 1039 01050500301b31193017060355040313106573744578616d706c654341204e774e3 1040 01e170d3133303530393033353333325a170d3134303530393033353333325a301b 1041 31193017060355040313106573744578616d706c654341204e774e302062300d060 1042 92a620673410101050003204f0030204a02204100ef6b677a3247c1fc03d2b9baf1 1043 13e5e7e11f49e0421120e6b8384160f2bf02630ef544d5fd0d5623b35713c79a722 1044 9283a7908751a634aa420a3e2a4b1f10519d046f02f5a5dd6d760c2a842356e067b 1045 7bd94338d1faa3b3ddd4813060a207b0a097067007e45b052b60fdbae4656e11562 1046 c4f5abb7b0cf87a79d221f1127313c53371ce1245d63db45a1203a23340ba08042c 1047 768d03b8076a028d3a51d87d2ef107bbd6f2305ce5e67668724002fb726df9c1447 1048 6c37de0f55033f192a5ad21f9a2a71c20301000130b040300f0603551d130101f10 1049 530030101fc1d0603551d0e04160414112966e304761732fbfe6a2c823c300e0603 1050 551d0f0101f10403020106300d06092a620673410105050003204100423f06d4b76 1051 0f4b42744a279035571696f272a0060f1325a40898509601ad14004f652db6312a1 1052 475c4d7cd50f4b269035585d7856c5337765a66b38462d5bdaa7778aab24bbe2815 1053 e37722cd10e7166c50e75ab75a1271324460211991e7445a2960f47351a1a629253 1054 34119794b90e320bc730d6c1bee496e7ac125ce9a1eca595a3a4c54a865e6b623c9 1055 247bfd0a7c19b56077392555c955e233642bec643ae37c166c5e221d797aea3748f 1056 0391c8d692a5cf9bb71f6d0e37984d6fa673a30d0c006343116f58403100 1058 A.2. csrattrs 1060 In the following valid /csrattrs exchange, the EST-coaps client 1061 authenticates itself with a certificate issued by the connected CA. 1063 The initial DTLS handshake is identical to the enrollment example. 1064 The IPv6 CoAP GET request looks like: 1066 REQ: 1067 GET coaps://[2001:db8::2:1]:61616/est/att 1069 A 2.05 Content response contains attributes which are relevant for 1070 the authenticated client. In this example, the EST-coaps server two 1071 attributes that the client can ignore when they are unknown to him.: 1073 A.3. enroll / reenroll 1075 [EDNOTE: We might need a new Option for the Retry-After response 1076 message. We might need a new Option for the WWW-Authenticate 1077 response.] 1079 During the Enroll/Reenroll exchange, the EST-coaps client uses a CSR 1080 (PKCS#10) request in the POST request payload. 1082 After verification of the certificate by the server, a 2.05 Content 1083 response with the issued certificate will be returned. 1085 POST [2001:db8::2:1]:61616/est/sen 1086 (Content-Format: application/pkcs10) 1087 30208530206d020100301f311d301b0603550403131464656d6f7374657034203 1088 1333638313431333532302062300d06092a620673410101050003204f0030204a 1089 022041005d9f4dffd3c5949f646a9584367778560950b355c35b8e34726dd3764 1090 54231734795b4c09b9c6d75d408311307a81f7adef7f5d241f7d5be85620c5d44 1091 38bbb4242cf215c167f2ccf36c364ea2618a62f0536576369d6304e6a96877224 1092 7d86824f079faac7a6f694cfda5b84c42087dc062d462190c525813f210a036a7 1093 37b4f30d8891f4b75559fb72752453146332d51c937557716ccec624f5125c3a4 1094 447ad3115020048113fef54ad554ee88af09a2583aac9024075113db4990b1786 1095 b871691e0f02030100018701f06092a620673410907311213102b72724369722f 1096 372b45597535305434300d06092a620673410105050003204100441b40177a3a6 1097 5501487735a8ad5d3827a4eaa867013920e2afcda87aa81733c7c0353be47e1bf 1098 a7cda5176e7ccc6be22ae03498588d5f2de3b143f2b1a6175ec544e8e7625af6b 1099 836fd4416894c2e55ea99c6606f69075d6d53475d410729aa6d806afbb9986caf 1100 7b844b5b3e4545f19071865ada007060cad6db26a592d4a7bda7d586b68110962 1101 17071103407553155cddc75481e272b5ed553a8593fb7e25100a6f7605085dab4 1102 fc7e0731f0e7fe305703791362d5157e92e6b5c2e3edbcadb40 1104 RET: 1105 2.05 Content (Content-Format: application/pkcs7-mime) 1106 3020f806092a62067341070283293020e50201013100300b06092a62067341070 1107 1830b3020c730206fc20102020115300d06092a6206734101050500301b311930 1108 17060355040313106573744578616d706c654341204e774e301e170d313330353 1109 0393233313535335a170d3134303530393233313535335a301f311d301b060355 1110 0403131464656d6f73746570342031333638313431333532302062300d06092a6 1111 20673410101050003204f0030204a022041005d9f4dffd3c5949f646a95843677 1112 78560950b355c35b8e34726dd376454231734795b4c09b9c6d75d408311307a81 1113 f7adef7f5d241f7d5be85620c5d4438bbb4242cf215c167f2ccf36c364ea2618a 1114 62f0536576369d6304e6a968772247d86824f079faac7a6f694cfda5b84c42087 1115 dc062d462190c525813f210a036a737b4f30d8891f4b75559fb72752453146332 1116 d51c937557716ccec624f5125c3a4447ad3115020048113fef54ad554ee88af09 1117 a2583aac9024075113db4990b1786b871691e0f020301000134b050300e060355 1118 1d0f0101f104030204c1d0603551d0e04160414e81d0788aa2710304c5ecd4d1e 1119 065701f0603551d230418301653112966e304761732fbfe6a2c823c300d06092a 1120 6206734101050500032041002910d86f2ffeeb914c046816871de601567d291b4 1121 3fabee0f0e8ff81cea27302a7133e20e9d04029866a8963c7d14e26fbe8a0ab1b 1122 77fbb1214bbcdc906fbc381137ec1de685f79406c3e416b8d82f97174bc691637 1123 5a4e1c4bf744c7572b4b2c6bade9fb35da786392ee0d95e3970542565f3886ad6 1124 7746d1b12484bb02616e63302dc371dc6006e431fb7c457598dd204b367b0b3d3 1125 258760a303f1102db26327f929b7c5a60173e1799491b69150248756026b80553 1126 171e4733ad3d13c0103100 1128 [EDNOTE: If POP is used, make sure tls-unique in the CSR is a valid 1129 HMAC output. ] 1131 A.4. serverkeygen 1133 During this valid /serverkeygen exchange, the EST-coaps client 1134 authenticates itself using the certificate provided by the connected 1135 CA. 1137 [EDNOTE: the client incudes a CSR with a public key that the server 1138 should ignore, so we need a content-format here. ] 1140 [EDNote: If POP is used, make sure tls-unique in the CSR is a valid 1141 HMAC output. ] 1143 The initial DTLS handshake is identical to the enrollment example. 1144 The CoAP GET request looks like: 1146 POST coaps://[192.0.2.1:8085]/est/skg 1147 302081302069020100305b313e303c060355040313357365727665724b6579476 1148 56e2072657120627920636c69656e7420696e2064656d6f207374657020313220 1149 3133363831343139353531193017060355040513105049443a576964676574205 1150 34e3a3130302062300d06092a620673410101050003204f0030204a02204100f4 1151 dfa6c03f7f2766b23776c333d2c0f9d1a7a6ee36d01499bbe6f075d1e38a57e98 1152 ecc197f51b75228454b7f19652332de5e52e4a974c6ae34e1df80b33f15f47d3b 1153 cbf76116bb0e4d3e04a9651218a476a13fc186c2a255e4065ff7c271cff104e47 1154 31fad53c22b21a1e5138bf9ad0187314ac39445949a48805392390e78c7659621 1155 6d3e61327a534f5ea7721d2b1343c7362b37da502717cfc2475653c7a3860c5f4 1156 0612a5db6d33794d755264b6327e3a3263b149628585b85e57e42f6b3277591b0 1157 2030100018701f06092a6206734109073112131064467341586d4a6e6a6f6b427 1158 4447672300d06092a620673410105050003204100472d11007e5a2b2c2023d47a 1159 6d71d046c307701d8ebc9e47272713378390b4ee321462a3dbe54579f5a514f6f 1160 4050af497f428189b63655d03a194ef729f101743e5d03fbc6ae1e84486d1300a 1161 f9288724381909188c851fa9a5059802eb64449f2a3c9e441353d136768da27ff 1162 4f277651d676a6a7e51931b08f56135a2230891fd184960e1313e7a1a9139ed19 1163 28196867079a456cd2266cb754a45151b7b1b939e381be333fea61580fe5d25bf 1164 4823dbd2d6a98445b46305c10637e202856611 1166 RET: 1167 2.05 Content (Content-Format: application/pkcs8) 1168 30213e020100300d06092a6206734101010500042128302124020100022041003 1169 c0bc2748f2003e3e8ea15f746f2a71e83f585412b92cf6f8e64de02e056153274 1170 dd01c95dd9cff3112aa141774ab655c3d56359c3b3df055294692ed848e7e30a1 1171 1bf14e47e0693d93017022b4cdb3e6d40325356152b213c8b535851e681a7074c 1172 0c6d2b60e7c32fc0336b28e743eba4e5921074d47195d3c05e43c527526e692d5 1173 45e562578d2d4b5f2191bff89d3eef0222764a2674637a1f99257216647df6704 1174 efec5adbf54dab24231844eb595875795000e673dd6862310a146ad7e31083010 1175 001022041004e6b3f78b7791d6377f33117c17844531c81111fb8000282816264 1176 915565bc7c3f3f643b537a2c69140a31c22550fa97e5132c61b74166b68626704 1177 260620333050f510096b6570f5880e7e1c15dc0ca6ce2b5f187e2325da14ab705 1178 ad004717f3b2f779127b5c535e0cee6a343b502722f2397a26126e0af606b5aa7 1179 f96313511c0b7eb26354f91b82269de62757e3def807a6afdf83ddcbb0614bb7c 1180 542e6975d6456554e7bd9988fbd1930cd44d0e01ee9182ca54539418653150254 1181 1ad1a2a11e5021040bfce554b642c29131e7d65455e83c5406d76771912f758f5 1182 ee3ee36af386f38ffa313c0f661880c5a2b0970485d36f528e7f77a2e55b4ad76 1183 1242d1c2f75939c8061217d31491d305d3e07d6161c43e26f7de4477b1811de92 1184 33dc75b426302104015bf48ac376f52887813461fc54635517bcb67293837053e 1185 8ce1a33da7a35565a75a370dc14555b5316cb55742380350774d769d151ff0456 1186 0214389a232a2258326163167504cfce44cd316f63bb8a52da53a4cb74fd87194 1187 c0844881f791f23b0813ea0921325edd14459d41c8a1593f04316388e40b35fef 1188 7d2a195a5930fa54774427ac821eee2c62790d2c17bd192af794c611011506557 1189 83d4efe22185cbd83368786f2b1e68a5a27067e321066f0217b4b6d7971a3c21a 1190 241366b7907187583b511102103369047e5cce0b65012200df5ec697b5827575c 1191 db6821ff299d6a69574b31ddf0fbe9245ea2f74396c24b3a7565067e41366423b 1192 5bdd2b2a78194094dbe333f493d159b8e07722f2280d48388db7f1c9f0633bb0e 1193 173de2c3aa1f200af535411c7090210401421e2ea217e37312dcc606f453a6634 1194 f3df4dc31a9e910614406412e70eec9247f10672a500947a64356c015a845a7d1 1195 50e2e3911a2b3b61070a73247166da10bb45474cc97d1ec2bc392524307f35118 1196 f917438f607f18181684376e13a39e07 1197 --estServerExampleBoundary 1198 3020c506092a62067341070283363020f20201013100300b06092a62067341070 1199 183183020d430207cc20102020116300d06092a6206734101050500301b311930 1200 17060355040313106573744578616d706c654341204e774e301e170d313330353 1201 0393233323535365a170d3134303530393233323535365a302c312a3028060355 1202 0403132173657276657273696465206b65792067656e657261746564207265737 1203 06f6e7365302062300d06092a620673410101050003204f0030204a022041003c 1204 0bc2748f2003e3e8ea15f746f2a71e83f585412b92cf6f8e64de02e056153274d 1205 d01c95dd9cff3112aa141774ab655c3d56359c3b3df055294692ed848e7e30a11 1206 bf14e47e0693d93017022b4cdb3e6d40325356152b213c8b535851e681a7074c0 1207 c6d2b60e7c32fc0336b28e743eba4e5921074d47195d3c05e43c527526e692d54 1208 5e562578d2d4b5f2191bff89d3eef0222764a2674637a1f99257216647df6704e 1209 fec5adbf54dab24231844eb595875795000e673dd6862310a146ad7e310830100 1210 0134b050300e0603551d0f0101f104030204c1d0603551d0e04160414764b1bd5 1211 e69935626e476b195a1a8c1f0603551d230418301653112966e304761732fbfe6 1212 a2c823c300d06092a620673410105050003204100474e5100a9cdaaa813b30f48 1213 40340fb17e7d6d6063064a5a7f2162301c464b5a8176623dfb1a4a484e618de1c 1214 3c3c5927cf590f4541233ff3c251e772a9a3f2c5fc6e5ef2fe155e5e385deb846 1215 b36eb4c3c7ef713f2d137ae8be4c022715fd033a818d55250f4e6077718180755 1216 a4fa677130da60818175ca4ab2af1d15563624c51e13dfdcf381881b72327e2f4 1217 9b7467e631a27b5b5c7d542bd2edaf78c0ac294f3972278996bdf673a334ff74c 1218 84aa7d65726310252f6a4f41281ec10ca2243864e3c5743103100 1220 Without the DecryptKeyIdentifier attribute, the response has no 1221 additional encryption beyond DTLS. [EDNOTE: Add comment about 1222 deriving symmetric keys by using the TLS KEM draft. ] 1224 The response contains first a preamble that can be ignored. The EST- 1225 coaps server can use the preamble to include additional explanations, 1226 like ownership or support information 1228 Appendix B. Encoding for server side key generation 1230 Sever side key generation for CoAP can be implemented efficiently 1231 using multipart encoding 1233 [EDNOTE: text to be written.] 1235 Appendix C. EST-coaps Block message examples 1237 This section provides a detailed example of the messages using DTLS 1238 and BLOCK option Block2. The minimum PMTU is 1280 bytes, which is 1239 the example value assumed for the DTLS datagram size. The example 1240 block length is taken as 64 which gives an SZX value of 2. 1242 The following is an example of a valid /cacerts exchange over DTLS. 1243 The content length of the cacerts response in appendix A.1 of 1244 [RFC7030] is 4246 bytes using base64. This leads to a length of 2509 1245 bytes in binary. The CoAP message adds around 10 bytes, the DTLS 1246 record 29 bytes. To avoid IP fragmentation, the CoAP block option is 1247 used and an MTU of 127 is assumed to stay within one IEEE 802.15.4 1248 packet. To stay below the MTU of 127, the payload is split in 39 1249 packets with a payload of 64 bytes each, followed by a packet of 13 1250 bytes. The client sends an IPv6 packet containing the UDP datagram 1251 with the DTLS record that encapsulates the CoAP Request 40 times. 1252 The server returns an IPv6 packet containing the UDP datagram with 1253 the DTLS record that encapsulates the CoAP response. The CoAP 1254 request-response exchange with block option is shown below. Block 1255 option is shown in a decomposed way indicating the kind of Block 1256 option (2 in this case because used in the response) followed by a 1257 colon, and then the block number (NUM), the more bit (M = 0 means 1258 last block), and block size exponent (2**(SZX+4)) separated by 1259 slashes. The Length 64 is used with SZX= 2 to avoid IP 1260 fragmentation. The CoAP Request is sent with confirmable (CON) 1261 option and the content format of the Response is /application/ 1262 cacerts. 1264 GET [192.0.2.1:8085]/est/crts --> 1265 <-- (2:0/1/39) 2.05 Content 1266 GET URI (2:1/1/39) --> 1267 <-- (2:1/1/39) 2.05 Content 1268 | 1269 | 1270 | 1271 GET URI (2:65/1/39) --> 1272 <-- (2:65/0/39) 2.05 Content 1274 For further detailing the CoAP headers of the first two blocks are 1275 written out. 1277 The header of the first GET looks like: 1279 Ver = 1 1280 T = 0 (CON) 1281 Code = 0x01 (0.1 GET) 1282 Options 1283 Option1 (Uri-Host) 1284 Option Delta = 0x3 (option nr = 3) 1285 Option Length = 0x9 1286 Option Value = 192.0.2.1 1287 Option2 (Uri-Port) 1288 Option Delta = 0x4 (option nr = 3+4=7) 1289 Option Length = 0x4 1290 Option Value = 8085 1291 Option3 (Uri-Path) 1292 Option Delta = 0x4 (option nr = 7+4=11) 1293 Option Length = 0x9 1294 Option Value = /est/crts 1295 Payload = [Empty] 1297 The header of the first response looks like: 1299 Ver = 1 1300 T = 2 (ACK) 1301 Code = 0x45 (2.05 Content.) 1302 Options 1303 Option1 (Content-Format) 1304 Option Delta = 0xC (option 12) 1305 Option Length = 0x2 1306 Option Value = TBD1 1307 Option2 (Block2) 1308 Option Delta = 0xB (option 23 = 12 + 11) 1309 Option Length = 0x1 1310 Option Value = 0x0A (block number = 0, M=1, SZX=2) 1311 Payload = 1312 30233906092a6206734107028c2a3023260201013100300b06092a6206734107018 1313 c0c3020bb302063c20102020900a61e75193b7acc0d06092a6206734101 1315 The second Block2: 1317 Ver = 1 1318 T = 2 (means ACK) 1319 Code = 0x45 (2.05 Content.) 1320 Options 1321 Option1 (Content-Format) 1322 Option Delta = 0xC (option 12) 1323 Option Length = 0x2 1324 Option Value = TBD1 1325 Option2 (Block2) 1326 Option Delta = 0xB (option 23 = 12 + 11) 1327 Option Length = 0x1 1328 Option Value = 0x1A (block number = 1, M=1, SZX=2) 1329 Payload = 1330 05050030 1331 1b31193017060355040313106573744578616d706c654341204f774f301e170d313 1332 3303530393033353333315a170d3134303530393033353333315a 1334 The 40th and final Block2: 1336 Ver = 1 1337 T = 2 (means ACK) 1338 Code = 0x21 1339 Options 1340 Option1 (Content-Format) 1341 Option Delta = 0xC (option 12) 1342 Option Length = 0x2 1343 Option Value = TBD1 1344 Option2 (Block2) 1345 Option Delta = 0xB (option 23 = 12 + 11) 1346 Option Length = 0x2 1347 Option Value = 0x272 (block number = 39, M=0, SZX=2) 1348 Payload = 73a30d0c006343116f58403100 1350 Authors' Addresses 1352 Peter van der Stok 1353 Consultant 1355 Email: consultancy@vanderstok.org 1357 Panos Kampanakis 1358 Cisco Systems 1360 Email: pkampana@cisco.com 1361 Sandeep S. Kumar 1362 Philips Lighting Research 1363 High Tech Campus 7 1364 Eindhoven 5656 AE 1365 NL 1367 Email: ietf@sandeep.de 1369 Michael C. Richardson 1370 Sandelman Software Works 1372 Email: mcr+ietf@sandelman.ca 1373 URI: http://www.sandelman.ca/ 1375 Martin Furuhed 1376 Nexus Group 1378 Email: martin.furuhed@nexusgroup.com 1380 Shahid Raza 1381 RISE SICS 1382 Isafjordsgatan 22 1383 Kista, Stockholm 16440 1384 SE 1386 Email: shahid@sics.se