idnits 2.17.1 draft-ietf-ace-coap-est-12.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 : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 5, 2019) is 1785 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 1782, but not defined == Unused Reference: 'I-D.ietf-lamps-rfc5751-bis' is defined on line 1317, but no explicit reference was found in the text == Outdated reference: A later version (-04) exists of draft-ietf-core-multipart-ct-03 == Outdated reference: A later version (-43) exists of draft-ietf-tls-dtls13-31 ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Downref: Normative reference to an Informational RFC: RFC 5967 ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) == Outdated reference: A later version (-13) exists of draft-ietf-tls-dtls-connection-id-05 == Outdated reference: A later version (-10) exists of draft-moskowitz-ecdsa-pki-05 -- Obsolete informational reference (is this intentional?): RFC 7230 (Obsoleted by RFC 9110, RFC 9112) -- Obsolete informational reference (is this intentional?): RFC 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 7525 (Obsoleted by RFC 9325) Summary: 3 errors (**), 0 flaws (~~), 8 warnings (==), 4 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: December 7, 2019 Cisco Systems 6 M. Richardson 7 SSW 8 S. Raza 9 RISE SICS 10 June 5, 2019 12 EST over secure CoAP (EST-coaps) 13 draft-ietf-ace-coap-est-12 15 Abstract 17 Enrollment over Secure Transport (EST) is used as a certificate 18 provisioning protocol over HTTPS. Low-resource devices often use the 19 lightweight Constrained Application Protocol (CoAP) for message 20 exchanges. This document defines how to transport EST payloads over 21 secure CoAP (EST-coaps), which allows constrained devices to use 22 existing EST functionality for provisioning certificates. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at https://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on December 7, 2019. 41 Copyright Notice 43 Copyright (c) 2019 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (https://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 60 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 61 4. DTLS and conformance to RFC7925 profiles . . . . . . . . . . 7 62 5. Protocol Design . . . . . . . . . . . . . . . . . . . . . . . 9 63 5.1. Discovery and URIs . . . . . . . . . . . . . . . . . . . 10 64 5.2. Mandatory/optional EST Functions . . . . . . . . . . . . 12 65 5.3. Payload formats . . . . . . . . . . . . . . . . . . . . . 13 66 5.4. Message Bindings . . . . . . . . . . . . . . . . . . . . 14 67 5.5. CoAP response codes . . . . . . . . . . . . . . . . . . . 15 68 5.6. Message fragmentation . . . . . . . . . . . . . . . . . . 15 69 5.7. Delayed Responses . . . . . . . . . . . . . . . . . . . . 16 70 5.8. Server-side Key Generation . . . . . . . . . . . . . . . 18 71 6. HTTPS-CoAPS Registrar . . . . . . . . . . . . . . . . . . . . 20 72 7. Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 22 73 8. Deployment limitations . . . . . . . . . . . . . . . . . . . 22 74 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 75 9.1. Content-Format Registry . . . . . . . . . . . . . . . . . 23 76 9.2. Resource Type registry . . . . . . . . . . . . . . . . . 23 77 10. Security Considerations . . . . . . . . . . . . . . . . . . . 24 78 10.1. EST server considerations . . . . . . . . . . . . . . . 24 79 10.2. HTTPS-CoAPS Registrar considerations . . . . . . . . . . 26 80 11. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 26 81 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 27 82 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 83 13.1. Normative References . . . . . . . . . . . . . . . . . . 27 84 13.2. Informative References . . . . . . . . . . . . . . . . . 28 85 Appendix A. EST messages to EST-coaps . . . . . . . . . . . . . 31 86 A.1. cacerts . . . . . . . . . . . . . . . . . . . . . . . . . 31 87 A.2. enroll / reenroll . . . . . . . . . . . . . . . . . . . . 33 88 A.3. serverkeygen . . . . . . . . . . . . . . . . . . . . . . 35 89 A.4. csrattrs . . . . . . . . . . . . . . . . . . . . . . . . 37 90 Appendix B. EST-coaps Block message examples . . . . . . . . . . 38 91 B.1. cacerts . . . . . . . . . . . . . . . . . . . . . . . . . 38 92 B.2. enroll / reenroll . . . . . . . . . . . . . . . . . . . . 42 93 Appendix C. Message content breakdown . . . . . . . . . . . . . 43 94 C.1. cacerts . . . . . . . . . . . . . . . . . . . . . . . . . 43 95 C.2. enroll / reenroll . . . . . . . . . . . . . . . . . . . . 45 96 C.3. serverkeygen . . . . . . . . . . . . . . . . . . . . . . 46 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 48 100 1. Change Log 102 EDNOTE: Remove this section before publication 104 -12 106 Updated section 5 based on Esko's comments and nits identified. 108 Nits and some clarifications for Esko's new review from 5/21/2019. 110 Nits and some clarifications for Esko's new review from 5/28/2019. 112 -11 114 Updated Server-side keygen to simplify motivation and added 115 paragraphs in Security considerations to point out that random 116 numbers are still needed (feedback from Hannes). 118 -10 120 Addressed WGLC comments 122 More consistent request format in the examples. 124 Explained root resource difference when there is resource 125 discovery 127 Clarified when the client is supposed to do discovery 129 Fixed nits and minor Option length inaccurracies in the examples. 131 -09 133 WGLC comments taken into account 135 consensus about discovery of content-format 137 added additional path for content-format selection 139 merged DTLS sections 141 -08 143 added application/pkix-cert Content-Format TBD287. 145 discovery text clarified 146 Removed text on ct negotiation in connection to multipart-core 148 removed text that duplicates or contradicts RFC7252 (thanks Klaus) 150 Stated that well-known/est is compulsory 152 Use of response codes clarified. 154 removed bugs: Max-Age and Content-Format Options in Request 156 Accept Option explained for est/skg and added in enroll example 158 Added second URI /skc for server-side key gen and a simple cert 159 (not PKCS#7) 161 Persistence of DTLS connection clarified. 163 Minor text fixes. 165 -07: 167 redone examples from scratch with openssl 169 Updated authors. 171 Added CoAP RST as a MAY for an equivalent to an HTTP 204 message. 173 Added serialization example of the /skg CBOR response. 175 Added text regarding expired IDevIDs and persistent DTLS 176 connection that will start using the Explicit TA Database in the 177 new DTLS connection. 179 Nits and fixes 181 Removed CBOR envelop for binary data 183 Replaced TBD8 with 62. 185 Added RFC8174 reference and text. 187 Clarified MTI for server-side key generation and Content-Formats. 188 Defined the /skg MTI (PKCS#8) and the cases where CMS encryption 189 will be used. 191 Moved Fragmentation section up because it was referenced in 192 sections above it. 194 -06: 196 clarified discovery section, by specifying that no discovery may 197 be needed for /.well-known/est URI. 199 added resource type values for IANA 201 added list of compulsory to implement and optional functions. 203 Fixed issues pointed out by the idnits tool. 205 Updated CoAP response codes section with more mappings between EST 206 HTTP codes and EST-coaps CoAP codes. 208 Minor updates to the MTI EST Functions section. 210 Moved Change Log section higher. 212 -05: 214 repaired again 216 TBD8 = 62 removed from C-F registration, to be done in CT draft. 218 -04: 220 Updated Delayed response section to reflect short and long delay 221 options. 223 -03: 225 Removed observe and simplified long waits 227 Repaired Content-Format specification 229 -02: 231 Added parameter discussion in section 8 233 Concluded Content-Format specification using multipart-ct draft 235 examples updated 237 -01: 239 Editorials done. 241 Redefinition of proxy to Registrar in Section 6. Explained better 242 the role of https-coaps Registrar, instead of "proxy" 244 Provide "observe" Option examples 246 extended block message example. 248 inserted new server key generation text in Section 5.8 and 249 motivated server key generation. 251 Broke down details for DTLS 1.3 253 New Media-Type uses CBOR array for multiple Content-Format 254 payloads 256 provided new Content-Format tables 258 new media format for IANA 260 -00 262 copied from vanderstok-ace-coap-04 264 2. Introduction 266 "Classical" Enrollment over Secure Transport (EST) [RFC7030] is used 267 for authenticated/authorized endpoint certificate enrollment (and 268 optionally key provisioning) through a Certificate Authority (CA) or 269 Registration Authority (RA). EST transports messages over HTTPS. 271 This document defines a new transport for EST based on the 272 Constrained Application Protocol (CoAP) since some Internet of Things 273 (IoT) devices use CoAP instead of HTTP. Therefore, this 274 specification utilizes DTLS [RFC6347] and CoAP [RFC7252] instead of 275 TLS [RFC8446] and HTTP [RFC7230]. 277 EST responses can be relatively large and for this reason this 278 specification also uses CoAP Block-Wise Transfer [RFC7959] to offer a 279 fragmentation mechanism of EST messages at the CoAP layer. 281 This document also profiles the use of EST to only support 282 certificate-based client authentication. HTTP Basic or Digest 283 authentication (as described in Section 3.2.3 of [RFC7030]) are not 284 supported. 286 3. Terminology 288 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 289 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 290 "OPTIONAL" in this document are to be interpreted as described in BCP 291 14 [RFC2119] [RFC8174] when, and only when, they appear in all 292 capitals, as shown here. 294 Many of the concepts in this document are taken from [RFC7030]. 295 Consequently, much text is directly traceable to [RFC7030]. 297 4. DTLS and conformance to RFC7925 profiles 299 This section describes how EST-coaps fits into the profiles of low- 300 resource devices described in [RFC7925]. EST-coaps can transport 301 certificates and private keys. Certificates are responses to 302 (re-)enrollment requests or requests for a trusted certificate list. 303 Private keys can be transported as responses to a server-side key 304 generation request as described in Section 4.4 of [RFC7030] and 305 discussed in Section 5.8 of this document. 307 EST-coaps depends on a secure transport mechanism that secures the 308 exchanged CoAP messages. DTLS is one such secure protocol. No other 309 changes are necessary regarding the secure transport of EST messages. 311 +------------------------------------------------+ 312 | EST request/response messages | 313 +------------------------------------------------+ 314 | CoAP for message transfer and signaling | 315 +------------------------------------------------+ 316 | Secure Transport | 317 +------------------------------------------------+ 319 Figure 1: EST-coaps protocol layers 321 As per sections 3.3 and 4.4 of [RFC7925], the mandatory cipher suite 322 for DTLS in EST-coaps is TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 323 [RFC7251]. Curve secp256r1 MUST be supported [RFC8422]; this curve 324 is equivalent to the NIST P-256 curve. Additionally, crypto agility 325 is important, and the recommendations in Section 4.4 of [RFC7925] and 326 any updates to it concerning Curve25519 and other curves also apply. 328 DTLS 1.2 implementations must use the Supported Elliptic Curves and 329 Supported Point Formats Extensions in [RFC8422]. Uncompressed point 330 format must also be supported. DTLS 1.3 [I-D.ietf-tls-dtls13] 331 implementations differ from DTLS 1.2 because they do not support 332 point format negotiation in favor of a single point format for each 333 curve. Thus, support for DTLS 1.3 does not mandate point format 334 extensions and negotiation. 336 CoAP was designed to avoid IP fragmentation. DTLS is used to secure 337 CoAP messages. However, fragmentation is still possible at the DTLS 338 layer during the DTLS handshake when using ECC ciphersuites. If 339 fragmentation is necessary, "DTLS provides a mechanism for 340 fragmenting a handshake message over several records, each of which 341 can be transmitted separately, thus avoiding IP fragmentation" 342 [RFC6347]. 344 The authentication of the EST-coaps server by the EST-coaps client is 345 based on certificate authentication in the DTLS handshake. The EST- 346 coaps client MUST be configured with at least an Implicit TA database 347 which will enable the authentication of the server the first time 348 before updating its trust anchor (Explicit TA) [RFC7030]. 350 The authentication of the EST-coaps client MUST be with a client 351 certificate in the DTLS handshake. This can either be 353 o a previously issued client certificate (e.g., an existing 354 certificate issued by the EST CA); this could be a common case for 355 simple re-enrollment of clients. 357 o a previously installed certificate (e.g., manufacturer IDevID 358 [ieee802.1ar] or a certificate issued by some other party); the 359 server is expected to trust that certificate. IDevID's are 360 expected to have a very long life, as long as the device, but 361 under some conditions could expire. In that case, the server MAY 362 want to authenticate a client certificate against its trust store 363 although the certificate is expired (Section 10). 365 EST-coaps supports the certificate types and Trust Anchors (TA) that 366 are specified for EST in Section 3 of [RFC7030]. 368 As described in Section 2.1 of [RFC5272] proof-of-identity refers to 369 a value that can be used to prove that the private key corresponding 370 to the public key is in the possession of and can be used by an end- 371 entity or client. Additionally, channel-binding information can link 372 proof-of-identity with an established connetion. Connection-based 373 proof-of-possession is OPTIONAL for EST-coaps clients and servers. 374 When proof-of-possession is desired, a set of actions are required 375 regarding the use of tls-unique, described in Section 3.5 in 376 [RFC7030]. The tls-unique information consists of the contents of 377 the first "Finished" message in the (D)TLS handshake between server 378 and client [RFC5929]. The client adds the "Finished" message as a 379 ChallengePassword in the attributes section of the PKCS#10 Request 381 [RFC5967] to prove that the client is indeed in control of the 382 private key at the time of the (D)TLS session establishment. 384 In the case of EST-coaps, the same operations can be performed during 385 the DTLS handshake. For DTLS 1.2, in the event of handshake message 386 fragmentation, the Hash of the handshake messages used in the MAC 387 calculation of the Finished message must be computed as if each 388 handshake message had been sent as a single fragment (Section 4.2.6 389 of [RFC6347]). The Finished message is calculated as shown in 390 Section 7.4.9 of [RFC5246]. Similarly, for DTLS 1.3, the Finished 391 message must be computed as if each handshake message had been sent 392 as a single fragment (Section 5.8 of [I-D.ietf-tls-dtls13]) following 393 the algorithm described in 4.4.4 of [RFC8446]. 395 In a constrained CoAP environment, endpoints can't always afford to 396 establish a DTLS connection for every EST transaction. 397 Authenticating and negotiating DTLS keys requires resources on low- 398 end endpoints and consumes valuable bandwidth. To alleviate this 399 situation, an EST-coaps DTLS connection MAY remain open for 400 sequential EST transactions. For example, an EST csrattrs request 401 that is followed by a simpleenroll request can use the same 402 authenticated DTLS connection. However, when a cacerts request is 403 included in the set of sequential EST transactions, some additional 404 security considerations apply regarding the use of the Implicit and 405 Explicit TA database as explained in Section 10.1. 407 Given that after a successful enrollment, it is more likely that a 408 new EST transaction will take place after a significant amount of 409 time, the DTLS connections SHOULD only be kept alive for EST messages 410 that are relatively close to each other. In some cases, like NAT 411 rebinding, keeping the state of a connection is not possible when 412 devices sleep for extended periods of time. In such occasions, 413 [I-D.ietf-tls-dtls-connection-id] negotiates a connection ID that can 414 eliminate the need for new handshake and its additional cost. 416 5. Protocol Design 418 EST-coaps uses CoAP to transfer EST messages, aided by Block-Wise 419 Transfer [RFC7959] to avoid IP fragmentation. The use of Blocks for 420 the transfer of larger EST messages is specified in Section 5.6. 421 Figure 1 shows the layered EST-coaps architecture. 423 The EST-coaps protocol design follows closely the EST design. The 424 supported message types in EST-coaps are: 426 o CA certificate retrieval needed to receive the complete set of CA 427 certificates. 429 o Simple enroll and re-enroll for a CA to sign public client 430 identity key. 432 o Certificate Signing Request (CSR) attribute messages that inform 433 the client of the fields to include in a CSR. 435 o Server-side key generation messages to provide a private client 436 identity key when the client choses so. 438 5.1. Discovery and URIs 440 EST-coaps is targeted for low-resource networks with small packets. 441 Saving header space is important and short EST-coaps URIs are 442 specified in this document. These URIs are shorter than the ones in 443 [RFC7030]. Two example EST-coaps resource path names are: 445 coaps://example.com:/.well-known/est/ 446 coaps://example.com:/.well-known/est/ 447 ArbitraryLabel/ 449 The short-est strings are defined in Table 1. Arbitrary Labels are 450 usually defined and used by EST CAs in order to route client requests 451 to the appropriate certificate profile. Implementers should consider 452 using short labels to minimize transmission overhead. 454 The EST-coaps server URIs, obtained through discovery of the EST- 455 coaps resource(s) as shown below, are of the form: 457 coaps://example.com:// 458 coaps://example.com:// 459 ArbitraryLabel/ 461 Figure 5 in Section 3.2.2 of [RFC7030] enumerates the operations and 462 corresponding paths which are supported by EST. Table 1 provides the 463 mapping from the EST URI path to the shorter EST-coaps URI path. 465 +------------------+-------------------------------+ 466 | EST | EST-coaps | 467 +------------------+-------------------------------+ 468 | /cacerts | /crts | 469 | /simpleenroll | /sen | 470 | /simplereenroll | /sren | 471 | /csrattrs | /att | 472 | /serverkeygen | /skg (PKCS#7) | 473 | /serverkeygen | /skc (application/pkix-cert) | 474 +------------------+-------------------------------+ 476 Table 1: Short EST-coaps URI path 478 The /skg message is the EST /serverkeygen equivalent where the client 479 requests for a certificate in PKCS#7 format and a private key. If 480 the client prefers a single application/pkix-cert certificate instead 481 of PKCS#7, she will make an /skc request. 483 Clients and servers MUST support the short resource EST-coaps URIs. 485 In the context of CoAP, the presence and location of (path to) the 486 EST resources are discovered by sending a GET request to "/.well- 487 known/core" including a resource type (RT) parameter with the value 488 "ace.est*" [RFC6690]. The example below shows the discovery over 489 CoAPS of the presence and location of EST-coaps resources. Linefeeds 490 are included only for readability. 492 REQ: GET /.well-known/core?rt=ace.est* 494 RES: 2.05 Content 495 ;rt="ace.est.crts";ct="281 TBD287", 496 ;rt="ace.est.sen";ct="281 TBD287", 497 ;rt="ace.est.sren";ct="281 TBD287", 498 ;rt="ace.est.att";ct=285, 499 ;rt="ace.est.skg";ct=62, 500 ;rt="ace.est.skc";ct=62 502 The first three lines of the discovery response above MUST be 503 returned if the server supports resource discovery. The last three 504 lines are only included if the corresponding EST functions are 505 implemented. The Content-Formats in the response allow the client to 506 request one that is supported by the server. These are the values 507 that would be sent in the client request with an Accept option. 509 Discoverable port numbers can be returned in the response payload. 510 An example response payload for non-default CoAPS server port 61617 511 follows below. Linefeeds are included only for readability. 513 REQ: GET /.well-known/core?rt=ace.est* 515 RES: 2.05 Content 516 ;rt="ace.est.crts"; 517 ct="281 TBD287", 518 ;rt="ace.est.sen"; 519 ct="281 TBD287", 520 ;rt="ace.est.sren"; 521 ct="281 TBD287", 522 ;rt="ace.est.att"; 523 ct=285, 524 ;rt="ace.est.skg"; 525 ct=62, 526 ;rt="ace.est.skc"; 527 ct=62 529 The server MUST support the default /.well-known/est root resource. 530 The server SHOULD support resource discovery when he supports non- 531 default URIs (like /est or /est/ArbitraryLabel) or ports. The client 532 SHOULD use resource discovery when she is unaware of the available 533 EST-coaps resources. 535 Throughout this document the example root resource of /est is used. 537 5.2. Mandatory/optional EST Functions 539 This specification contains a set of required-to-implement functions, 540 optional functions, and not specified functions. The latter ones are 541 deemed too expensive for low-resource devices in payload and 542 calculation times. 544 Table 2 specifies the mandatory-to-implement or optional 545 implementation of the EST-coaps functions. Discovery of the 546 existence of optional functions is described in Section 5.1. 548 +------------------+--------------------------+ 549 | EST Functions | EST-coaps implementation | 550 +------------------+--------------------------+ 551 | /cacerts | MUST | 552 | /simpleenroll | MUST | 553 | /simplereenroll | MUST | 554 | /csrattrs | OPTIONAL | 555 | /serverkeygen | OPTIONAL | 556 | /fullcmc | Not specified | 557 +------------------+--------------------------+ 559 Table 2: List of EST-coaps functions 561 While [RFC7030] permits a number of these functions to be used 562 without authentication, this specification requires that the client 563 MUST be authenticated for all functions. 565 5.3. Payload formats 567 EST-coaps is designed for low-resource devices and hence does not 568 need to send Base64-encoded data. Simple binary is more efficient 569 (30% smaller payload) and well supported by CoAP. Thus, the payload 570 for a given Media-Type follows the ASN.1 structure of the Media-Type 571 and is transported in binary format. 573 The Content-Format (HTTP Media-Type equivalent) of the CoAP message 574 determines which EST message is transported in the CoAP payload. The 575 Media-Types specified in the HTTP Content-Type header (Section 3.2.2 576 of [RFC7030]) are specified by the Content-Format Option (12) of 577 CoAP. The combination of URI-Path and Content-Format in EST-coaps 578 MUST map to an allowed combination of URI and Media-Type in EST. The 579 required Content-Formats for these requests and response messages are 580 defined in Section 9.1. The CoAP response codes are defined in 581 Section 5.5. 583 Content-Format TBD287 can be used in place of 281 to carry a single 584 certificate instead of a PKCS#7 container in a /crts, /sen, /sren or 585 /skg response. Content-Format 281 MUST be supported by EST-coaps 586 servers. Servers MAY also support Content-Format TBD287. It is up 587 to the client to support only Content-Format 281, TBD287 or both. 588 The client will use a COAP Accept Option in the request to express 589 the preferred response Content-Format. If an Accept Option is not 590 included in the request, the client is not expressing any preference 591 and the server SHOULD choose format 281. 593 Content-Format 286 is used in /sen, /sren and /skg requests and 285 594 in /att responses. 596 A representation with Content-Format identifier 62 contains a 597 collection of representations along with their respective Content- 598 Format. The Content-Format identifies the Media-Type application/ 599 multipart-core specified in [I-D.ietf-core-multipart-ct]. For 600 example, a collection, containing two representations in response to 601 a EST-coaps server-side key generation /skg request, could include a 602 private key in PKCS#8 [RFC5958] with Content-Format identifier 284 603 (0x011C) and a single certificate in a PKCS#7 container with Content- 604 Format identifier 281 (0x0119). Such a collection would look like 605 [284,h'0123456789abcdef', 281,h'fedcba9876543210'] in diagnostic CBOR 606 notation. The serialization of such CBOR content would be 607 84 # array(4) 608 19 011C # unsigned(284) 609 48 # bytes(8) 610 0123456789ABCDEF # "\x01#Eg\x89\xAB\xCD\xEF" 611 19 0119 # unsigned(281) 612 48 # bytes(8) 613 FEDCBA9876543210 # "\xFE\xDC\xBA\x98vT2\x10" 615 Multipart /skg response serialization 617 When the client makes an /skc request the certificate returned with 618 the private key is a single X.509 certificate (not a PKCS#7 619 container) with Content-Format identifier TBD287 (0x011F) instead of 620 281. In cases where the private key is encrypted with CMS (as 621 explained in Section 5.8) the Content-Format identifier is 280 622 (0x0118) instead of 284. The key and certificate representations are 623 ASN.1 encoded in binary format. An example is shown in Appendix A.3. 625 5.4. Message Bindings 627 The general EST-coaps message characteristics are: 629 o EST-coaps servers sometimes need to provide delayed responses 630 which are conveyed with an empty ACK or an ACK containing response 631 code 5.03 as explained in Section 5.7. Thus, it is RECOMMENDED 632 for implementers to send EST-coaps requests in confirmable CON 633 CoAP messages. 635 o The CoAP Options used are Uri-Host, Uri-Path, Uri-Port, Content- 636 Format, Block1, Block2, and Accept. These CoAP Options are used 637 to communicate the HTTP fields specified in the EST REST messages. 638 The Uri-host and Uri-Port Options can be omitted from the COAP 639 message sent on the wire. When omitted, they are logically 640 assumed to be the transport protocol destination address and port 641 respectively. Explicit Uri-Host and Uri-Port Options are 642 typically used when an endpoint hosts multiple virtual servers and 643 uses the Options to route the requests accordingly. Other COAP 644 Options should be handled in accordance with [RFC7252]. 646 o EST URLs are HTTPS based (https://), in CoAP these are assumed to 647 be translated to CoAPS (coaps://) 649 Table 1 provides the mapping from the EST URI path to the EST-coaps 650 URI path. Appendix A includes some practical examples of EST 651 messages translated to CoAP. 653 5.5. CoAP response codes 655 Section 5.9 of [RFC7252] and Section 7 of [RFC8075] specify the 656 mapping of HTTP response codes to CoAP response codes. The success 657 code in response to an EST-coaps GET request (/crts, /att), is 2.05. 658 Similarly, 2.04 is used in successfull response to EST-coaps POST 659 requests (/sen, /sren, /skg, /skc). 661 EST makes use of HTTP 204 or 404 responses when a resource is not 662 available for the client. In EST-coaps 2.04 is used in response to a 663 POST (/sen, /sren, /skg, /skc). 4.04 is used when the resource is not 664 available for the client. 666 HTTP response code 202 with a Retry-After header in [RFC7030] has no 667 equivalent in CoAP. HTTP 202 with Retry-After is used in EST for 668 delayed server responses. Section 5.7 specifies how EST-coaps 669 handles delayed messages with 5.03 responses with a Max-Age Option. 671 Additionally, EST's HTTP 400, 401, 403, 404 and 503 status codes have 672 their equivalent CoAP 4.00, 4.01, 4.03, 4.04 and 5.03 response codes 673 in EST-coaps. Table 3 summarizes the EST-coaps response codes. 675 +-----------------+-----------------+-------------------------------+ 676 | operation | EST-coaps | Description | 677 | | response code | | 678 +-----------------+-----------------+-------------------------------+ 679 | /crts, /att | 2.05 | Success. Certs included in | 680 | | | the response payload. | 681 | | 4.xx / 5.xx | Failure. | 682 | /sen, /skg, | 2.04 | Success. Cert included in the | 683 | /sren, /skc | | response payload. | 684 | | 5.03 | Retry in Max-Age Option time. | 685 | | 4.xx / 5.xx | Failure. | 686 +-----------------+-----------------+-------------------------------+ 688 Table 3: EST-coaps response codes 690 5.6. Message fragmentation 692 DTLS defines fragmentation only for the handshake and not for secure 693 data exchange (DTLS records). [RFC6347] states that to avoid using 694 IP fragmentation, which involves error-prone datagram reconstitution, 695 invokers of the DTLS record layer should size DTLS records so that 696 they fit within any Path MTU estimates obtained from the record 697 layer. In addition, invokers residing on a 6LoWPAN over IEEE 698 802.15.4 [ieee802.15.4] network should attempt to size CoAP messages 699 such that each DTLS record will fit within one or two IEEE 802.15.4 700 frames. 702 That is not always possible in EST-coaps. Even though ECC 703 certificates are small in size, they can vary greatly based on 704 signature algorithms, key sizes, and Object Identifier (OID) fields 705 used. For 256-bit curves, common ECDSA cert sizes are 500-1000 bytes 706 which could fluctuate further based on the algorithms, OIDs, Subject 707 Alternative Names (SAN) and cert fields. For 384-bit curves, ECDSA 708 certificates increase in size and can sometimes reach 1.5KB. 709 Additionally, there are times when the EST cacerts response from the 710 server can include multiple certificates that amount to large 711 payloads. Section 4.6 of CoAP [RFC7252] describes the possible 712 payload sizes: "if nothing is known about the size of the headers, 713 good upper bounds are 1152 bytes for the message size and 1024 bytes 714 for the payload size". Section 4.6 of [RFC7252] also suggests that 715 IPv4 implementations may want to limit themselves to more 716 conservative IPv4 datagram sizes such as 576 bytes. Even with ECC, 717 EST-coaps messages can still exceed MTU sizes on the Internet or 718 6LoWPAN [RFC4919] (Section 2 of [RFC7959]). EST-coaps needs to be 719 able to fragment messages into multiple DTLS datagrams. 721 To perform fragmentation in CoAP, [RFC7959] specifies the Block1 722 Option for fragmentation of the request payload and the Block2 Option 723 for fragmentation of the return payload of a CoAP flow. As explained 724 in Section 1 of [RFC7959], block-wise transfers should be used in 725 Confirmable CoAP messages to avoid the exacerbation of lost blocks. 726 Both EST-coaps clients and servers MUST support Block2. EST-coaps 727 servers MUST also support Block1. The EST-coaps client MUST support 728 Block1 only if it sends EST-coaps requests with an IP packet size 729 that exceeds the Path MTU. 731 [RFC7959] also defines Size1 and Size2 Options to provide size 732 information about the resource representation in a request and 733 response. EST-client and server MAY support Size1 and Size2 Options. 735 Examples of fragmented EST-coaps messages are shown in Appendix B. 737 5.7. Delayed Responses 739 Server responses can sometimes be delayed. According to 740 Section 5.2.2 of [RFC7252], a slow server can acknowledge the request 741 and respond later with the requested resource representation. In 742 particular, a slow server can respond to an EST-coaps enrollment 743 request with an empty ACK with code 0.00, before sending the 744 certificate to the client after a short delay. If the certificate 745 response is large, the server will need more than one Block2 blocks 746 to transfer it. 748 This situation is shown in Figure 2. The client sends an enrollment 749 request that uses N1+1 Block1 blocks. The server uses an empty 0.00 750 ACK to announce the delayed response which is provided later with 751 2.04 messages containing N2+1 Block2 Options. The first 2.04 is a 752 confirmable message that is acknowledged by the client. Onwards, 753 having received the first 256 bytes in the first Block2 block, the 754 client asks for a block reduction to 128 bytes in a confirmable 755 enrollment request and acknowledges the Block2 blocks sent up to that 756 point. 758 POST [2001:db8::2:1]:61616/est/sen (CON)(1:0/1/256) {CSR (frag# 1)} --> 759 <-- (ACK) (1:0/1/256) (2.31 Continue) 760 POST [2001:db8::2:1]:61616/est/sen (CON)(1:1/1/256) {CSR (frag# 2)} --> 761 <-- (ACK) (1:1/1/256) (2.31 Continue) 762 . 763 . 764 . 765 POST [2001:db8::2:1]:61616/est/sen(CON)(1:N1/0/256){CSR (frag# N1+1)}--> 766 <-- (0.00 empty ACK) 767 | 768 ... Short delay before the certificate is ready ... 769 | 770 <-- (CON) (1:N1/0/256)(2:0/1/256)(2.04 Changed) {Cert resp (frag# 1)} 771 (ACK) --> 772 POST [2001:db8::2:1]:61616/est/sen (CON)(2:1/0/128) --> 773 <-- (ACK) (2:1/1/128) (2.04 Changed) {Cert resp (frag# 2)} 774 . 775 . 776 . 777 POST [2001:db8::2:1]:61616/est/sen (CON)(2:N2/0/128) --> 778 <-- (ACK) (2:N2/0/128) (2.04 Changed) {Cert resp (frag# N2+1)} 780 Figure 2: EST-COAP enrollment with short wait 782 If the server is very slow (i.e. minutes) in providing the response 783 (i.e. when a manual intervention is needed), he SHOULD respond with 784 an ACK containing response code 5.03 (Service unavailable) and a Max- 785 Age Option to indicate the time the client SHOULD wait to request the 786 content later. After a delay of Max-Age, the client SHOULD resend 787 the identical CSR to the server. As long as the server responds with 788 response code 5.03 (Service Unavailable) with a Max-Age Option, the 789 client SHOULD keep resending the enrollment request until the server 790 responds with the certificate or the client abandons for other 791 reasons. 793 To demonstrate this scenario, Figure 3 shows a client sending an 794 enrollment request that uses N1+1 Block1 blocks to send the CSR to 795 the server. The server needs N2+1 Block2 blocks to respond, but also 796 needs to take a long delay (minutes) to provide the response. 798 Consequently, the server uses a 5.03 ACK response with a Max-Age 799 Option. The client waits for a period of Max-Age as many times as 800 she receives the same 5.03 response and retransmits the enrollment 801 request until she receives a certificate in a fragmented 2.04 802 response. Note that the server asks for a decrease in the block size 803 when acknowledging the first Block2. 805 POST [2001:db8::2:1]:61616/est/sen (CON)(1:0/1/256) {CSR (frag# 1)} --> 806 <-- (ACK) (1:0/1/256) (2.31 Continue) 807 POST [2001:db8::2:1]:61616/est/sen (CON)(1:1/1/256) {CSR (frag# 2)} --> 808 <-- (ACK) (1:1/1/256) (2.31 Continue) 809 . 810 . 811 . 812 POST [2001:db8::2:1]:61616/est/sen(CON)(1:N1/0/256){CSR (frag# N1+1)}--> 813 <-- (ACK) (1:N1/0/256) (5.03 Service Unavailable) (Max-Age) 814 | 815 | 816 ... Client tries again after Max-Age with identical payload ... 817 | 818 | 819 POST [2001:db8::2:1]:61616/est/sen(CON)(1:N1/0/256){CSR (frag# 1)}--> 820 <-- (ACK) (1:0/1/256) (2.31 Continue) 821 POST [2001:db8::2:1]:61616/est/sen (CON)(1:1/1/256) {CSR (frag# 2)} --> 822 <-- (ACK) (1:1/1/256) (2.31 Continue) 823 . 824 . 825 . 826 POST [2001:db8::2:1]:61616/est/sen(CON)(1:N1/0/256){CSR (frag# N1+1)}--> 827 <-- (ACK) (1:N1/0/256) (2:0/1/128) (2.04 Changed){Cert resp (frag# 1)} 828 POST [2001:db8::2:1]:61616/est/sen (CON)(2:1/0/128) --> 829 <-- (ACK) (2:1/1/128) (2.04 Changed) {Cert resp (frag# 2)} 830 . 831 . 832 . 833 POST [2001:db8::2:1]:61616/est/sen (CON)(2:N2/0/128) --> 834 <-- (ACK) (2:N2/0/128) (2.04 Changed) {Cert resp (frag# N2+1)} 836 Figure 3: EST-COAP enrollment with long wait 838 5.8. Server-side Key Generation 840 In scenarios where it is desirable that the server generates the 841 private key, server-side key generation should be used. Such 842 scenarios could be when it is considered more secure to generate at 843 the server the long-lived random private key that identifies the 844 client, or when the resources spent to generate a random private key 845 at the client are considered scarce, or when the security policy 846 requires that the certificate public and corresponding private keys 847 are centrally generated and controlled. Of course, that does not 848 eliminate the need for proper random numbers in various protocols 849 like (D)TLS (Section 10.1). 851 When requesting server-side key generation, the client asks for the 852 server or proxy to generate the private key and the certificate which 853 are transferred back to the client in the server-side key generation 854 response. In all respects, the server SHOULD treat the CSR as it 855 would treat any enroll or re-enroll CSR; the only distinction here is 856 that the server MUST ignore the public key values and signature in 857 the CSR. These are included in the request only to allow re-use of 858 existing codebases for generating and parsing such requests. 860 The client /skg request is for a certificate in a PKCS#7 container 861 and private key in two application/multipart-core elements. 862 Respectively, an /skc request is for a single application/pkix-cert 863 certificate and a private key. The private key Content-Format 864 requested by the client is depicted in the PKCS#10 CSR request. If 865 the request contains SMIMECapabilities and DecryptKeyIdentifier or 866 AsymmetricDecryptKeyIdentifier the client is expecting Content-Format 867 280 for the private key. Then the private key is encrypted 868 symmetrically or asymmetrically as per [RFC7030]. The symmetric key 869 or the asymmetric keypair establishment method is out of scope of the 870 specification. A /skg or /skc request with a CSR without 871 SMIMECapabilities expects an application/multipart-core with an 872 unencrypted PKCS#8 private key with Content-Format 284. 874 The EST-coaps server-side key generation response is returned with 875 Content-Format application/multipart-core 876 [I-D.ietf-core-multipart-ct] containing a CBOR array with four items 877 (Section 5.3) . The two representations (each consisting of two CBOR 878 array items) do not have to be in a particular order since each 879 representation is preceded by its Content-Format ID. The private key 880 can be in unprotected PKCS#8 [RFC5958] format (Content-Format 284) or 881 protected inside of CMS SignedData (Content-Format 280). The 882 SignedData is signed by the party that generated the private key, 883 which may be the EST server or the EST CA. The SignedData is further 884 protected by placing it inside of a CMS EnvelopedData as explained in 885 Section 4.4.2 of [RFC7030]. In summary, the symmetrically encrypted 886 key is included in the encryptedKey attribute in a KEKRecipientInfo 887 structure. In the case where the asymmetric encryption key is 888 suitable for transport key operations the generated private key is 889 encrypted with a symmetric key which is encrypted by the client 890 defined (in the CSR) asymmetric public key and is carried in an 891 encryptedKey attribute in a KeyTransRecipientInfo structure. 892 Finally, if the asymmetric encryption key is suitable for key 893 agreement, the generated private key is encrypted with a symmetric 894 key which is encrypted by the client defined (in the CSR) asymmetric 895 public key and is carried in an recipientEncryptedKeys attribute in a 896 KeyAgreeRecipientInfo. 898 [RFC7030] recommends the use of additional encryption of the returned 899 private key. For the context of this specification, clients and 900 servers that choose to support server-side key generation MUST 901 support unprotected (PKCS#8) private keys (Content-Format 284). 902 Symmetric or asymmetric encryption of the private key (CMS 903 EnvelopedData, Content-Format 280) SHOULD be supported for 904 deployments where end-to-end encryption needs to be provided between 905 the client and a server. Such cases could include architectures 906 where an entity between the client and the CA terminates the DTLS 907 connection (Registrar in Figure 4). 909 6. HTTPS-CoAPS Registrar 911 In real-world deployments, the EST server will not always reside 912 within the CoAP boundary. The EST server can exist outside the 913 constrained network in which case it will support TLS/HTTP instead of 914 CoAPS. In such environments EST-coaps is used by the client within 915 the CoAP boundary and TLS is used to transport the EST messages 916 outside the CoAP boundary. A Registrar at the edge is required to 917 operate between the CoAP environment and the external HTTP network as 918 shown in Figure 4. 920 Constrained Network 921 .------. .----------------------------. 922 | CA | |.--------------------------.| 923 '------' || || 924 | || || 925 .------. HTTP .-----------------. CoAPS .-----------. || 926 | EST |<------->|EST-coaps-to-HTTPS|<------->| EST Client| || 927 |Server|over TLS | Registrar | '-----------' || 928 '------' '-----------------' || 929 || || 930 |'--------------------------'| 931 '----------------------------' 933 Figure 4: EST-coaps-to-HTTPS Registrar at the CoAP boundary. 935 The EST-coaps-to-HTTPS Registrar MUST terminate EST-coaps downstream 936 and initiate EST connections over TLS upstream. The Registrar MUST 937 authenticate and OPTIONALLY authorize the clients and it MUST be 938 authenticated by the EST server or CA. The trust relationship 939 between the Registrar and the EST server SHOULD be pre-established 940 for the Registrar to proxy these connections on behalf of various 941 clients. 943 When enforcing Proof-of-Possession (POP) linking, the DTLS tls-unique 944 value of the (D)TLS session is used to prove that the private key 945 corresponding to the public key is in the possession of the client 946 and was used to establish the connection as explained in Section 4. 947 The POP linking information is lost between the EST-coaps client and 948 the EST server when a Registrar is present. The EST server becomes 949 aware of the presence of a Registrar from its TLS client certificate 950 that includes id-kp-cmcRA [RFC6402] extended key usage extension 951 (EKU). As explained in Section 3.7 of [RFC7030], the EST server 952 SHOULD apply an authorization policy consistent with a Registrar 953 client. For example, it could be configured to accept POP linking 954 information that does not match the current TLS session because the 955 authenticated EST client Registrar has verified this information when 956 acting as an EST server. 958 For some use cases, clients that leverage server-side key generation 959 might prefer for the enrolled keys to be generated by the Registrar 960 if the CA does not support server-side key generation. Such 961 Registrar is responsible for generating a new CSR signed by a new key 962 which will be returned to the client along with the certificate from 963 the CA. In these cases, the Registrar MUST support random number 964 generation using proper entropy. 966 Table 1 contains the URI mappings between EST-coaps and EST that the 967 Registrar MUST adhere to. Section 5.5 of this specification and 968 Section 7 of [RFC8075] define the mappings between EST-coaps and HTTP 969 response codes, that determine how the Registrar MUST translate CoAP 970 response codes from/to HTTP status codes. The mapping from CoAP 971 Content-Format to HTTP Media-Type is defined in Section 9.1. 972 Additionally, a conversion from CBOR major type 2 to Base64 encoding 973 MUST take place at the Registrar when server-side key generation is 974 supported. If CMS end-to-end encryption is employed for the private 975 key, the encrypted CMS EnvelopedData blob MUST be converted to binary 976 in CBOR type 2 downstream to the client. 978 Due to fragmentation of large messages into blocks, an EST-coaps-to- 979 HTTP Registrar MUST reassemble the BLOCKs before translating the 980 binary content to Base64, and consecutively relay the message 981 upstream. 983 The EST-coaps-to-HTTP Registrar MUST support resource discovery 984 according to the rules in Section 5.1. Section 5.1. 986 7. Parameters 988 This section addresses transmission parameters described in sections 989 4.7 and 4.8 of [RFC7252]. EST does not impose any unique values on 990 the CoAP parameters in [RFC7252], but the EST parameter values need 991 to be tuned to the CoAP parameter values. 993 It is recommended, based on experiments, to follow the default CoAP 994 configuration parameters ([RFC7252]). However, depending on the 995 implementation scenario, retransmissions and timeouts can also occur 996 on other networking layers, governed by other configuration 997 parameters. A change in a server parameter MUST ensure the adjusted 998 value is also available to all the endpoints with which these 999 adjusted values are to be used to communicate. 1001 Some further comments about some specific parameters, mainly from 1002 Table 2 in [RFC7252]: 1004 o NSTART: A parameter that controls the number of simultaneous 1005 outstanding interactions that a client maintains to a given 1006 server. An EST-coaps client is not expected to interact with more 1007 than one servers at the same time, which is the default NSTART 1008 value defined in [RFC7252]. 1010 o DEFAULT_LEISURE: This setting is only relevant in multicast 1011 scenarios, outside the scope of EST-coaps. 1013 o PROBING_RATE: A parameter which specifies the rate of re-sending 1014 non-confirmable messages. The EST messages are defined to be sent 1015 as CoAP confirmable messages, hence this setting is not 1016 applicable. 1018 Finally, the Table 3 parameters in [RFC7252] are mainly derived from 1019 Table 2. Directly changing parameters on one table would affect 1020 parameters on the other. 1022 8. Deployment limitations 1024 Although EST-coaps paves the way for the utilization of EST by 1025 constrained devices in constrained networks, some classes of devices 1026 [RFC7228] will not have enough resources to handle the payloads that 1027 come with EST-coaps. The specification of EST-coaps is intended to 1028 ensure that EST works for networks of constrained devices that choose 1029 to limit their communications stack to DTLS/CoAP. It is up to the 1030 network designer to decide which devices execute the EST protocol and 1031 which do not. 1033 9. IANA Considerations 1035 9.1. Content-Format Registry 1037 Additions to the sub-registry "CoAP Content-Formats", within the 1038 "CoRE Parameters" registry [COREparams] are specified in Table 4. 1039 These have been registered provisionally in the IETF Review or IESG 1040 Approval range (256-9999). 1042 +------------------------------+-------+----------------------------+ 1043 | HTTP Media-Type | ID | Reference | 1044 +------------------------------+-------+----------------------------+ 1045 | application/pkcs7-mime; | 280 | [RFC7030] [I-D.ietf-lamps- | 1046 | smime-type=server-generated- | | rfc5751-bis] | 1047 | key | | | 1048 | application/pkcs7-mime; | 281 | [I-D.ietf-lamps-rfc5751-bi | 1049 | smime-type=certs-only | | s] | 1050 | application/pkcs8 | 284 | [RFC5958] [I-D.ietf-lamps- | 1051 | | | rfc5751-bis] | 1052 | application/csrattrs | 285 | [RFC7030] [RFC7231] | 1053 | application/pkcs10 | 286 | [RFC5967] [I-D.ietf-lamps- | 1054 | | | rfc5751-bis] | 1055 | application/pkix-cert | TBD28 | [RFC2585] | 1056 | | 7 | | 1057 +------------------------------+-------+----------------------------+ 1059 Table 4: New CoAP Content-Formats 1061 It is suggested that 287 is allocated to TBD287. 1063 9.2. Resource Type registry 1065 This memo registers new Resource Type (rt=) Link Target Attributes in 1066 the "Resource Type (rt=) Link Target Attribute Values" subregistry 1067 under the "Constrained RESTful Environments (CoRE) Parameters" 1068 registry. 1070 o rt="ace.est.crts". This resource depicts the support of EST get 1071 cacerts. 1073 o rt="ace.est.sen". This resource depicts the support of EST simple 1074 enroll. 1076 o rt="ace.est.sren". This resource depicts the support of EST 1077 simple reenroll. 1079 o rt="ace.est.att". This resource depicts the support of EST CSR 1080 attributes. 1082 o rt="ace.est.skg". This resource depicts the support of EST 1083 server-side key generation with the returned certificate in a 1084 PKCS#7 container. 1086 o rt="ace.est.skc". This resource depicts the support of EST 1087 server-side key generation with the returned certificate in 1088 application/pkix-cert format. 1090 10. Security Considerations 1092 10.1. EST server considerations 1094 The security considerations of Section 6 of [RFC7030] are only 1095 partially valid for the purposes of this document. As HTTP Basic 1096 Authentication is not supported, the considerations expressed for 1097 using passwords do not apply. 1099 Modern security protocols require random numbers to be available 1100 during the protocol run, for example for nonces, ephemeral (EC) 1101 Diffie-Hellman key generation. This capability to generate random 1102 numbers is also needed when the constrained device generates the 1103 private key (that corresponds to the public key enrolled in the CSR). 1104 When server-side key generation is used, the constrained device 1105 depends on the server to generate the private key randomly, but it 1106 still needs locally generated random numbers for use in security 1107 protocols, as explained in Section 12 of [RFC7925]. Additionally, 1108 the transport of keys generated at the server is inherently risky. 1109 Analysis SHOULD be done to establish whether server-side key 1110 generation increases or decreases the probability of digital identity 1111 theft. 1113 It is important to note that sources contributing to the randomness 1114 pool used to generate random numbers on laptops or desktop PCs are 1115 not available on many constrained devices, such as mouse movement, 1116 timing of keystrokes, air turbulence on the movement of hard drive 1117 heads, as pointed out in [PsQs]. Other sources have to be used or 1118 dedicated hardware has to be added. Selecting hardware for an IoT 1119 device that is capable of producing high-quality random numbers is 1120 therefore important [RSAfact]. 1122 It is also RECOMMENDED that the Implicit Trust Anchor database used 1123 for EST server authentication is carefully managed to reduce the 1124 chance of a third-party CA with poor certification practices 1125 jeopardizing authentication. Disabling the Implicit Trust Anchor 1126 database after successfully receiving the Distribution of CA 1127 certificates response (Section 4.1.3 of [RFC7030]) limits any risk to 1128 the first DTLS exchange. Alternatively, in a case where a /sen 1129 request immediately follows a /crts, a client MAY choose to keep the 1130 connection authenticated by the Implicit TA open for efficiency 1131 reasons (Section 4). A client that pipelines EST-coaps /crts request 1132 with other requests in the same DTLS connection SHOULD revalidate the 1133 server certificate chain against the updated Explicit TA from the 1134 /crts response before proceeding with the subsequent requests. If 1135 the server certificate chain does not authenticate against the 1136 database, the client SHOULD close the connection without completing 1137 the rest of the requests. The updated Explicit TA MUST continue to 1138 be used in new DTLS connections. 1140 In cases where the IDevID used to authenticate the client is expired 1141 the server MAY still authenticate the client because IDevIDs are 1142 expected to live as long as the device itself (Section 4). In such 1143 occasions, checking the certificate revocation status or authorizing 1144 the client using another method is important for the server to ensure 1145 that the client is to be trusted. 1147 In accordance with [RFC7030], TLS cipher suites that include 1148 "_EXPORT_" and "_DES_" in their names MUST NOT be used. More 1149 information about recommendations of TLS and DTLS are included in 1150 [RFC7525]. 1152 As described in CMC, Section 6.7 of [RFC5272], "For keys that can be 1153 used as signature keys, signing the certification request with the 1154 private key serves as a POP on that key pair". The inclusion of tls- 1155 unique in the certificate request links the proof-of-possession to 1156 the TLS proof-of-identity. This implies but does not prove that only 1157 the authenticated client currently has access to the private key. 1159 What's more, POP linking uses tls-unique as it is defined in 1160 [RFC5929]. The 3SHAKE attack [tripleshake] poses a risk by allowing 1161 a man-in-the-middle to leverage session resumption and renegotiation 1162 to inject himself between a client and server even when channel 1163 binding is in use. The attack was possible because of certain (D)TLS 1164 implementation imperfections. In the context of this specification, 1165 an attacker could invalidate the purpose of the POP linking 1166 ChallengePassword in the client request by resuming an EST-coaps 1167 connection. Even though the practical risk of such an attack to EST- 1168 coaps is not devastating, we would rather use a more secure channel 1169 binding mechanism. Such a mechanism could include an updated tls- 1170 unique value generation like the tls-unique-prf defined in 1171 [I-D.josefsson-sasl-tls-cb] by using a TLS exporter [RFC5705] in TLS 1172 1.2 or TLS 1.3's updated exporter (Section 7.5 of [RFC8446]). Such 1173 mechanism has not been standardized yet. Adopting a channel binding 1174 value generated from an exporter would break backwards compatibility. 1175 Thus, in this specification we still depend on the tls-unique 1176 mechanism defined in [RFC5929], especially since a 3SHAKE attack does 1177 not expose messages exchanged with EST-coaps. 1179 Regarding the Certificate Signing Request (CSR), an EST-coaps server 1180 is expected to be able to recover from improper CSR requests. 1182 Interpreters of ASN.1 structures should be aware of the use of 1183 invalid ASN.1 length fields and should take appropriate measures to 1184 guard against buffer overflows, stack overruns in particular, and 1185 malicious content in general. 1187 10.2. HTTPS-CoAPS Registrar considerations 1189 The Registrar proposed in Section 6 must be deployed with care, and 1190 only when the recommended connections are impossible. When POP 1191 linking is used the Registrar terminating the TLS connection 1192 establishes a new one with the upstream CA. Thus, it is impossible 1193 for POP linking to be enforced end-to-end for the EST transaction. 1194 The EST server could be configured to accept POP linking information 1195 that does not match the current TLS session because the authenticated 1196 EST Registrar client has verified this information when acting as an 1197 EST server. 1199 The introduction of an EST-coaps-to-HTTP Registrar assumes the client 1200 can trust the registrar using its implicit or explicit TA database. 1201 It also assumes the Registrar has a trust relationship with the 1202 upstream EST server in order to act on behalf of the clients. When a 1203 client uses the Implicit TA database for certificate validation, she 1204 SHOULD confirm if the server is acting as an RA by the presence of 1205 the id-kp-cmcRA EKU [RFC6402] in the server certificate. 1207 In a server-side key generation case, if no end-to-end encryption is 1208 used, the Registrar may be able see the private key as it acts as a 1209 man-in-the-middle. Thus, the client puts its trust on the Registrar 1210 not exposing the private key. 1212 Clients that leverage server-side key generation without end-to-end 1213 encryption of the private key (Section 5.8) have no knowledge if the 1214 Registrar will be generating the private key and enrolling the 1215 certificates with the CA or if the CA will be responsible for 1216 generating the key. In such cases, the existence of a Registrar 1217 requires the client to put its trust on the registrar doing the right 1218 thing if it is generating the private key. 1220 11. Contributors 1222 Martin Furuhed contributed to the EST-coaps specification by 1223 providing feedback based on the Nexus EST over CoAPS server 1224 implementation that started in 2015. Sandeep Kumar kick-started this 1225 specification and was instrumental in drawing attention to the 1226 importance of the subject. 1228 12. Acknowledgements 1230 The authors are very grateful to Klaus Hartke for his detailed 1231 explanations on the use of Block with DTLS and his support for the 1232 Content-Format specification. The authors would like to thank Esko 1233 Dijk and Michael Verschoor for the valuable discussions that helped 1234 in shaping the solution. They would also like to thank Peter 1235 Panburana for his feedback on technical details of the solution. 1236 Constructive comments were received from Benjamin Kaduk, Eliot Lear, 1237 Jim Schaad, Hannes Tschofenig, Julien Vermillard, John Manuel, Oliver 1238 Pfaff, Pete Beal and Carsten Bormann. 1240 Interop tests were done by Oliver Pfaff, Thomas Werner, Oskar 1241 Camezind, Bjorn Elmers and Joel Hoglund. 1243 Robert Moskowitz provided code to create the examples. 1245 13. References 1247 13.1. Normative References 1249 [I-D.ietf-core-multipart-ct] 1250 Fossati, T., Hartke, K., and C. Bormann, "Multipart 1251 Content-Format for CoAP", draft-ietf-core-multipart-ct-03 1252 (work in progress), March 2019. 1254 [I-D.ietf-tls-dtls13] 1255 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 1256 Datagram Transport Layer Security (DTLS) Protocol Version 1257 1.3", draft-ietf-tls-dtls13-31 (work in progress), March 1258 2019. 1260 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1261 Requirement Levels", BCP 14, RFC 2119, 1262 DOI 10.17487/RFC2119, March 1997, 1263 . 1265 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 1266 Infrastructure Operational Protocols: FTP and HTTP", 1267 RFC 2585, DOI 10.17487/RFC2585, May 1999, 1268 . 1270 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1271 (TLS) Protocol Version 1.2", RFC 5246, 1272 DOI 10.17487/RFC5246, August 2008, 1273 . 1275 [RFC5967] Turner, S., "The application/pkcs10 Media Type", RFC 5967, 1276 DOI 10.17487/RFC5967, August 2010, 1277 . 1279 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 1280 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 1281 January 2012, . 1283 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 1284 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 1285 . 1287 [RFC7030] Pritikin, M., Ed., Yee, P., Ed., and D. Harkins, Ed., 1288 "Enrollment over Secure Transport", RFC 7030, 1289 DOI 10.17487/RFC7030, October 2013, 1290 . 1292 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 1293 Application Protocol (CoAP)", RFC 7252, 1294 DOI 10.17487/RFC7252, June 2014, 1295 . 1297 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 1298 the Constrained Application Protocol (CoAP)", RFC 7959, 1299 DOI 10.17487/RFC7959, August 2016, 1300 . 1302 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1303 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1304 May 2017, . 1306 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1307 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1308 . 1310 13.2. Informative References 1312 [COREparams] 1313 "Constrained RESTful Environments (CoRE) Parameters", 1314 . 1317 [I-D.ietf-lamps-rfc5751-bis] 1318 Schaad, J., Ramsdell, B., and S. Turner, "Secure/ 1319 Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 1320 Message Specification", draft-ietf-lamps-rfc5751-bis-12 1321 (work in progress), September 2018. 1323 [I-D.ietf-tls-dtls-connection-id] 1324 Rescorla, E., Tschofenig, H., and T. Fossati, "Connection 1325 Identifiers for DTLS 1.2", draft-ietf-tls-dtls-connection- 1326 id-05 (work in progress), May 2019. 1328 [I-D.josefsson-sasl-tls-cb] 1329 Josefsson, S., "Channel Bindings for TLS based on the 1330 PRF", draft-josefsson-sasl-tls-cb-03 (work in progress), 1331 March 2015. 1333 [I-D.moskowitz-ecdsa-pki] 1334 Moskowitz, R., Birkholz, H., Xia, L., and M. Richardson, 1335 "Guide for building an ECC pki", draft-moskowitz-ecdsa- 1336 pki-05 (work in progress), March 2019. 1338 [ieee802.15.4] 1339 "IEEE Standard 802.15.4-2006", 2006. 1341 [ieee802.1ar] 1342 "IEEE 802.1AR Secure Device Identifier", December 2009. 1344 [PsQs] "Mining Your Ps and Qs: Detection of Widespread Weak Keys 1345 in Network Devices", USENIX Security Symposium 2012 ISBN 1346 978-931971-95-9, August 2012. 1348 [RFC4919] Kushalnagar, N., Montenegro, G., and C. Schumacher, "IPv6 1349 over Low-Power Wireless Personal Area Networks (6LoWPANs): 1350 Overview, Assumptions, Problem Statement, and Goals", 1351 RFC 4919, DOI 10.17487/RFC4919, August 2007, 1352 . 1354 [RFC5272] Schaad, J. and M. Myers, "Certificate Management over CMS 1355 (CMC)", RFC 5272, DOI 10.17487/RFC5272, June 2008, 1356 . 1358 [RFC5705] Rescorla, E., "Keying Material Exporters for Transport 1359 Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, 1360 March 2010, . 1362 [RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings 1363 for TLS", RFC 5929, DOI 10.17487/RFC5929, July 2010, 1364 . 1366 [RFC5958] Turner, S., "Asymmetric Key Packages", RFC 5958, 1367 DOI 10.17487/RFC5958, August 2010, 1368 . 1370 [RFC6402] Schaad, J., "Certificate Management over CMS (CMC) 1371 Updates", RFC 6402, DOI 10.17487/RFC6402, November 2011, 1372 . 1374 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 1375 Constrained-Node Networks", RFC 7228, 1376 DOI 10.17487/RFC7228, May 2014, 1377 . 1379 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1380 Protocol (HTTP/1.1): Message Syntax and Routing", 1381 RFC 7230, DOI 10.17487/RFC7230, June 2014, 1382 . 1384 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1385 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 1386 DOI 10.17487/RFC7231, June 2014, 1387 . 1389 [RFC7251] McGrew, D., Bailey, D., Campagna, M., and R. Dugal, "AES- 1390 CCM Elliptic Curve Cryptography (ECC) Cipher Suites for 1391 TLS", RFC 7251, DOI 10.17487/RFC7251, June 2014, 1392 . 1394 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 1395 "Recommendations for Secure Use of Transport Layer 1396 Security (TLS) and Datagram Transport Layer Security 1397 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 1398 2015, . 1400 [RFC7925] Tschofenig, H., Ed. and T. Fossati, "Transport Layer 1401 Security (TLS) / Datagram Transport Layer Security (DTLS) 1402 Profiles for the Internet of Things", RFC 7925, 1403 DOI 10.17487/RFC7925, July 2016, 1404 . 1406 [RFC8075] Castellani, A., Loreto, S., Rahman, A., Fossati, T., and 1407 E. Dijk, "Guidelines for Mapping Implementations: HTTP to 1408 the Constrained Application Protocol (CoAP)", RFC 8075, 1409 DOI 10.17487/RFC8075, February 2017, 1410 . 1412 [RFC8422] Nir, Y., Josefsson, S., and M. Pegourie-Gonnard, "Elliptic 1413 Curve Cryptography (ECC) Cipher Suites for Transport Layer 1414 Security (TLS) Versions 1.2 and Earlier", RFC 8422, 1415 DOI 10.17487/RFC8422, August 2018, 1416 . 1418 [RSAfact] "Factoring RSA keys from certified smart cards: 1419 Coppersmith in the wild", Advances in Cryptology - 1420 ASIACRYPT 2013, August 2013. 1422 [tripleshake] 1423 "Triple Handshakes and Cookie Cutters: Breaking and Fixing 1424 Authentication over TLS", IEEE Security and Privacy ISBN 1425 978-1-4799-4686-0, May 2014. 1427 Appendix A. EST messages to EST-coaps 1429 This section shows similar examples to the ones presented in 1430 Appendix A of [RFC7030]. The payloads in the examples are the hex 1431 encoded binary, generated with 'xxd -p', of the PKI certificates 1432 created following [I-D.moskowitz-ecdsa-pki]. Hex is used for 1433 visualization purposes because a binary representation cannot be 1434 rendered well in text. The hexadecimal representations would not be 1435 transported in hex, but in binary. The payloads are shown 1436 unencrypted. In practice the message content would be transferred 1437 over an encrypted DTLS tunnel. 1439 The certificate responses included in the examples contain Content- 1440 Format 281 (application/pkcs7). If the client had requested Content- 1441 Format TBD287 (application/pkix-cert) by querying /est/skc, the 1442 server would respond with a single DER binary certificate. 1444 These examples assume a short resource path of "/est". Even though 1445 omitted from the examples for brevity, before making the EST-coaps 1446 requests, a client would learn about the server supported EST-coaps 1447 resources with a GET request for /.well-known/core?rt=ace.est* as 1448 explained in Section 5.1. 1450 The corresponding CoAP headers are only shown in Appendix A.1. 1451 Creating CoAP headers is assumed to be generally understood. 1453 The message content breakdown is presented in Appendix C. 1455 A.1. cacerts 1457 In EST-coaps, a cacerts message can be: 1459 GET example.com:9085/est/crts 1460 (Accept: 281) 1462 The corresponding CoAP header fields are shown below. The use of 1463 block and DTLS are worked out in Appendix B. 1465 Ver = 1 1466 T = 0 (CON) 1467 Code = 0x01 (0.01 is GET) 1468 Token = 0x9a (client generated) 1469 Options 1470 Option (Uri-Host) 1471 Option Delta = 0x3 (option# 3) 1472 Option Length = 0xD 1473 Option Value = "example.com" 1474 Option (Uri-Port) 1475 Option Delta = 0x4 (option# 3+4=7) 1476 Option Length = 0x4 1477 Option Value = 9085 1478 Option (Uri-Path) 1479 Option Delta = 0x4 (option# 7+4=11) 1480 Option Length = 0x5 1481 Option Value = "est" 1482 Option (Uri-Path) 1483 Option Delta = 0x0 (option# 11+0=11) 1484 Option Length = 0x6 1485 Option Value = "crts" 1486 Option (Accept) 1487 Option Delta = 0x6 (option# 11+6=17) 1488 Option Length = 0x2 1489 Option Value = 281 1490 Payload = [Empty] 1492 The Uri-Host and Uri-Port Options can be omitted if they coincide 1493 with the transport protocol destination address and port 1494 respectively. Explicit Uri-Host and Uri-Port Options are typically 1495 used when an endpoint hosts multiple virtual servers and uses the 1496 Options to route the requests accordingly. 1498 A 2.05 Content response with a cert in EST-coaps will then be 1500 2.05 Content (Content-Format: 281) 1501 {payload with certificate in binary format} 1503 with CoAP fields 1504 Ver = 1 1505 T = 2 (ACK) 1506 Code = 0x45 (2.05 Content) 1507 Token = 0x9a (copied from request by server) 1508 Options 1509 Option (Content-Format) 1510 Option Delta = 0xC (option# 12) 1511 Option Length = 0x2 1512 Option Value = 281 1514 [ The hexadecimal representation below would NOT be transported 1515 in hex, but in binary. Hex is used because a binary representation 1516 cannot be rendered well in text. ] 1518 Payload = 1519 3082027b06092a864886f70d010702a082026c308202680201013100300b 1520 06092a864886f70d010701a082024e3082024a308201f0a0030201020209 1521 009189bcdf9c99244b300a06082a8648ce3d0403023067310b3009060355 1522 040613025553310b300906035504080c024341310b300906035504070c02 1523 4c4131143012060355040a0c0b4578616d706c6520496e63311630140603 1524 55040b0c0d63657274696669636174696f6e3110300e06035504030c0752 1525 6f6f74204341301e170d3139303130373130343034315a170d3339303130 1526 323130343034315a3067310b3009060355040613025553310b3009060355 1527 04080c024341310b300906035504070c024c4131143012060355040a0c0b 1528 4578616d706c6520496e6331163014060355040b0c0d6365727469666963 1529 6174696f6e3110300e06035504030c07526f6f742043413059301306072a 1530 8648ce3d020106082a8648ce3d03010703420004814994082b6e8185f3df 1531 53f5e0bee698973335200023ddf78cd17a443ffd8ddd40908769c55652ac 1532 2ccb75c4a50a7c7ddb7c22dae6c85cca538209fdbbf104c9a38184308181 1533 301d0603551d0e041604142495e816ef6ffcaaf356ce4adffe33cf492abb 1534 a8301f0603551d230418301680142495e816ef6ffcaaf356ce4adffe33cf 1535 492abba8300f0603551d130101ff040530030101ff300e0603551d0f0101 1536 ff040403020106301e0603551d1104173015811363657274696679406578 1537 616d706c652e636f6d300a06082a8648ce3d0403020348003045022100da 1538 e37c96f154c32ec0b4af52d46f3b7ecc9687ddf267bcec368f7b7f135327 1539 2f022047a28ae5c7306163b3c3834bab3c103f743070594c089aaa0ac870 1540 cd13b902caa1003100 1542 The breakdown of the payload is shown in Appendix C.1. 1544 A.2. enroll / reenroll 1546 During the (re-)enroll exchange the EST-coaps client uses a CSR 1547 (Content-Format 286) request in the POST request payload. The Accept 1548 option tells the server that the client is expecting Content-Format 1549 281 (PKCS#7) in the response. As shown in Appendix C.2, the CSR 1550 contains a ChallengePassword which is used for POP linking 1551 (Section 4). 1553 POST [2001:db8::2:321]:61616/est/sen 1554 (Token: 0x45) 1555 (Accept: 281) 1556 (Content-Format: 286) 1558 [ The hexadecimal representation below would NOT be transported 1559 in hex, but in binary. Hex is used because a binary representation 1560 cannot be rendered well in text. ] 1562 3082018b30820131020100305c310b3009060355040613025553310b3009 1563 06035504080c024341310b300906035504070c024c413114301206035504 1564 0a0c0b6578616d706c6520496e63310c300a060355040b0c03496f54310f 1565 300d060355040513065774313233343059301306072a8648ce3d02010608 1566 2a8648ce3d03010703420004c8b421f11c25e47e3ac57123bf2d9fdc494f 1567 028bc351cc80c03f150bf50cff958d75419d81a6a245dffae790be95cf75 1568 f602f9152618f816a2b23b5638e59fd9a073303406092a864886f70d0109 1569 0731270c2576437630292a264a4b4a3bc3a2c280c2992f3e3c2e2c3d6b6e 1570 7634332323403d204e787e60303b06092a864886f70d01090e312e302c30 1571 2a0603551d1104233021a01f06082b06010505070804a013301106092b06 1572 010401b43b0a01040401020304300a06082a8648ce3d0403020348003045 1573 02210092563a546463bd9ecff170d0fd1f2ef0d3d012160e5ee90cffedab 1574 ec9b9a38920220179f10a3436109051abad17590a09bc87c4dce5453a6fc 1575 1135a1e84eed754377 1577 After verification of the CSR by the server, a 2.04 Changed response 1578 with the issued certificate will be returned to the client. 1580 2.04 Changed 1581 (Token: 0x45) 1582 (Content-Format: 281) 1584 [ The hexadecimal representation below would NOT be transported 1585 in hex, but in binary. Hex is used because a binary representation 1586 cannot be rendered well in text. ] 1588 3082026e06092a864886f70d010702a082025f3082025b0201013100300b 1589 06092a864886f70d010701a08202413082023d308201e2a0030201020208 1590 7e7661d7b54e4632300a06082a8648ce3d040302305d310b300906035504 1591 0613025553310b300906035504080c02434131143012060355040a0c0b45 1592 78616d706c6520496e6331163014060355040b0c0d636572746966696361 1593 74696f6e3113301106035504030c0a3830322e3141522043413020170d31 1594 39303133313131323931365a180f39393939313233313233353935395a30 1595 5c310b3009060355040613025553310b300906035504080c024341310b30 1596 0906035504070c024c4131143012060355040a0c0b6578616d706c652049 1597 6e63310c300a060355040b0c03496f54310f300d06035504051306577431 1598 3233343059301306072a8648ce3d020106082a8648ce3d03010703420004 1599 c8b421f11c25e47e3ac57123bf2d9fdc494f028bc351cc80c03f150bf50c 1600 ff958d75419d81a6a245dffae790be95cf75f602f9152618f816a2b23b56 1601 38e59fd9a3818a30818730090603551d1304023000301d0603551d0e0416 1602 041496600d8716bf7fd0e752d0ac760777ad665d02a0301f0603551d2304 1603 183016801468d16551f951bfc82a431d0d9f08bc2d205b1160300e060355 1604 1d0f0101ff0404030205a0302a0603551d1104233021a01f06082b060105 1605 05070804a013301106092b06010401b43b0a01040401020304300a06082a 1606 8648ce3d0403020349003046022100c0d81996d2507d693f3c48eaa5ee94 1607 91bda6db214099d98117c63b361374cd86022100a774989f4c321a5cf25d 1608 832a4d336a08ad67df20f1506421188a0ade6d349236a1003100 1610 The breakdown of the request and response is shown in Appendix C.2. 1612 A.3. serverkeygen 1614 In a serverkeygen exchange the CoAP POST request looks like 1615 POST 192.0.2.1:8085/est/skg 1616 (Token: 0xa5) 1617 (Accept: 62) 1618 (Content-Format: 286) 1620 [ The hexadecimal representation below would NOT be transported 1621 in hex, but in binary. Hex is used because a binary representation 1622 cannot be rendered well in text. ] 1624 3081cf3078020100301631143012060355040a0c0b736b67206578616d70 1625 6c653059301306072a8648ce3d020106082a8648ce3d030107034200041b 1626 b8c1117896f98e4506c03d70efbe820d8e38ea97e9d65d52c8460c5852c5 1627 1dd89a61370a2843760fc859799d78cd33f3c1846e304f1717f8123f1a28 1628 4cc99fa000300a06082a8648ce3d04030203470030440220387cd4e9cf62 1629 8d4af77f92ebed4890d9d141dca86cd2757dd14cbd59cdf6961802202f24 1630 5e828c77754378b66660a4977f113cacdaa0cc7bad7d1474a7fd155d090d 1632 The response would follow [I-D.ietf-core-multipart-ct] and could look 1633 like 1634 2.04 Changed 1635 (Token: 0xa5) 1636 (Content-Format: 62) 1638 [ The hexadecimal representations below would NOT be transported 1639 in hex, but in binary. Hex is used because a binary representation 1640 cannot be rendered well in text. ] 1642 84 # array(4) 1643 19 011C # unsigned(284) 1644 58 8A # bytes(138) 1645 308187020100301306072a8648ce3d020106082a8648ce3d030107046d30 1646 6b02010104200b9a67785b65e07360b6d28cfc1d3f3925c0755799deeca7 1647 45372b01697bd8a6a144034200041bb8c1117896f98e4506c03d70efbe82 1648 0d8e38ea97e9d65d52c8460c5852c51dd89a61370a2843760fc859799d78 1649 cd33f3c1846e304f1717f8123f1a284cc99f 1650 19 0119 # unsigned(281) 1651 59 01D3 # bytes(467) 1652 308201cf06092a864886f70d010702a08201c0308201bc0201013100300b 1653 06092a864886f70d010701a08201a23082019e30820143a0030201020208 1654 126de8571518524b300a06082a8648ce3d04030230163114301206035504 1655 0a0c0b736b67206578616d706c65301e170d313930313039303835373038 1656 5a170d3339303130343038353730385a301631143012060355040a0c0b73 1657 6b67206578616d706c653059301306072a8648ce3d020106082a8648ce3d 1658 030107034200041bb8c1117896f98e4506c03d70efbe820d8e38ea97e9d6 1659 5d52c8460c5852c51dd89a61370a2843760fc859799d78cd33f3c1846e30 1660 4f1717f8123f1a284cc99fa37b307930090603551d1304023000302c0609 1661 6086480186f842010d041f161d4f70656e53534c2047656e657261746564 1662 204365727469666963617465301d0603551d0e04160414494be598dc8dbc 1663 0dbc071c486b777460e5cce621301f0603551d23041830168014494be598 1664 dc8dbc0dbc071c486b777460e5cce621300a06082a8648ce3d0403020349 1665 003046022100a4b167d0f9add9202810e6bf6a290b8cfdfc9b9c9fea2cc1 1666 c8fc3a464f79f2c202210081d31ba142751a7b4a34fd1a01fcfb08716b9e 1667 b53bdaadc9ae60b08f52429c0fa1003100 1669 The private key in the response above is without CMS EnvelopedData 1670 and has no additional encryption beyond DTLS (Section 5.8). 1672 The breakdown of the request and response is shown in Appendix C.3 1674 A.4. csrattrs 1676 Below is a csrattrs exchange 1677 REQ: 1678 GET example.com:61616/est/att 1680 RES: 1681 2.05 Content 1682 (Content-Format: 285) 1684 [ The hexadecimal representation below would NOT be transported 1685 in hex, but in binary. Hex is used because a binary representation 1686 cannot be rendered well in text. ] 1688 307c06072b06010101011630220603883701311b131950617273652053455 1689 420617320322e3939392e31206461746106092a864886f70d010907302c06 1690 0388370231250603883703060388370413195061727365205345542061732 1691 0322e3939392e32206461746106092b240303020801010b06096086480165 1692 03040202 1694 A 2.05 Content response should contain attributes which are relevant 1695 for the authenticated client. This example is copied from 1696 Section A.2 in [RFC7030], where the base64 representation is replaced 1697 with a hexadecimal representation of the equivalent binary format. 1698 The EST-coaps server returns attributes that the client can ignore if 1699 they are unknown to him. 1701 Appendix B. EST-coaps Block message examples 1703 Two examples are presented in this section: 1705 1. a cacerts exchange shows the use of Block2 and the block headers 1707 2. an enroll exchange shows the Block1 and Block2 size negotiation 1708 for request and response payloads. 1710 The payloads are shown unencrypted. In practice the message contents 1711 would be binary formatted and transferred over an encrypted DTLS 1712 tunnel. The corresponding CoAP headers are only shown in 1713 Appendix B.1. Creating CoAP headers is assumed to be generally 1714 known. 1716 B.1. cacerts 1718 This section provides a detailed example of the messages using DTLS 1719 and BLOCK option Block2. The minimum PMTU is 1280 bytes, which is 1720 the example value assumed for the DTLS datagram size. The example 1721 block length is taken as 64 which gives an SZX value of 2. 1723 The following is an example of a cacerts exchange over DTLS. The 1724 content length of the cacerts response in appendix A.1 of [RFC7030] 1725 contains 639 bytes in binary. The CoAP message adds around 10 bytes, 1726 the DTLS record 29 bytes. To avoid IP fragmentation, the CoAP Block 1727 Option is used and an MTU of 127 is assumed to stay within one IEEE 1728 802.15.4 packet. To stay below the MTU of 127, the payload is split 1729 in 9 packets with a payload of 64 bytes each, followed by a last 1730 tenth packet of 63 bytes. The client sends an IPv6 packet containing 1731 the UDP datagram with the DTLS record that encapsulates the CoAP 1732 request 10 times. The server returns an IPv6 packet containing the 1733 UDP datagram with the DTLS record that encapsulates the CoAP 1734 response. The CoAP request-response exchange with block option is 1735 shown below. Block Option is shown in a decomposed way (block- 1736 option:NUM/M/size) indicating the kind of Block Option (2 in this 1737 case) followed by a colon, and then the block number (NUM), the more 1738 bit (M = 0 in Block2 response means it is last block), and block size 1739 with exponent (2**(SZX+4)) separated by slashes. The Length 64 is 1740 used with SZX=2 to avoid IP fragmentation. The CoAP Request is sent 1741 confirmable (CON) and the Content-Format of the response, even though 1742 not shown, is 281 (application/pkcs7-mime; smime-type=certs-only). 1743 The transfer of the 10 blocks with partially filled block NUM=9 is 1744 shown below 1746 GET example.com:9085/est/crts (2:0/0/64) --> 1747 <-- (2:0/1/64) 2.05 Content 1748 GET example.com:9085/est/crts (2:1/0/64) --> 1749 <-- (2:1/1/64) 2.05 Content 1750 | 1751 | 1752 | 1753 GET example.com:9085/est/crts (2:9/0/64) --> 1754 <-- (2:9/0/64) 2.05 Content 1756 The header of the GET request looks like 1757 Ver = 1 1758 T = 0 (CON) 1759 Code = 0x01 (0.1 GET) 1760 Token = 0x9a (client generated) 1761 Options 1762 Option (Uri-Host) 1763 Option Delta = 0x3 (option# 3) 1764 Option Length = 0xD 1765 Option Value = "example.com" 1766 Option (Uri-Port) 1767 Option Delta = 0x4 (option# 3+4=7) 1768 Option Length = 0x4 1769 Option Value = 9085 1770 Option (Uri-Path) 1771 Option Delta = 0x4 (option# 7+4=11) 1772 Option Length = 0x5 1773 Option Value = "est" 1774 Option (Uri-Path)Uri-Path) 1775 Option Delta = 0x0 (option# 11+0=11) 1776 Option Length = 0x6 1777 Option Value = "crts" 1778 Option (Accept) 1779 Option Delta = 0x6 (option# 11+6=17) 1780 Option Length = 0x2 1781 Option Value = 281 1782 Payload = [Empty] 1784 The Uri-Host and Uri-Port Options can be omitted if they coincide 1785 with the transport protocol destination address and port 1786 respectively. Explicit Uri-Host and Uri-Port Options are typically 1787 used when an endpoint hosts multiple virtual servers and uses the 1788 Options to route the requests accordingly. 1790 For further detailing the CoAP headers, the first two and the last 1791 blocks are written out below. The header of the first Block2 1792 response looks like 1793 Ver = 1 1794 T = 2 (ACK) 1795 Code = 0x45 (2.05 Content) 1796 Token = 0x9a (copied from request by server) 1797 Options 1798 Option 1799 Option Delta = 0xC (option# 12 Content-Format) 1800 Option Length = 0x2 1801 Option Value = 281 1802 Option 1803 Option Delta = 0xB (option# 12+11=23 Block2) 1804 Option Length = 0x1 1805 Option Value = 0x0A (block#=0, M=1, SZX=2) 1807 [ The hexadecimal representation below would NOT be transported 1808 in hex, but in binary. Hex is used because a binary representation 1809 cannot be rendered well in text. ] 1811 Payload = 1812 3082027b06092a864886f70d010702a082026c308202680201013100300b 1813 06092a864886f70d010701a082024e3082024a308201f0a0030201020209 1814 009189bc 1816 The second Block2: 1818 Ver = 1 1819 T = 2 (means ACK) 1820 Code = 0x45 (2.05 Content) 1821 Token = 0x9a (copied from request by server) 1822 Options 1823 Option 1824 Option Delta = 0xC (option# 12 Content-Format) 1825 Option Length = 0x2 1826 Option Value = 281 1827 Option 1828 Option Delta = 0xB (option 12+11=23 Block2) 1829 Option Length = 0x1 1830 Option Value = 0x1A (block#=1, M=1, SZX=2) 1832 [ The hexadecimal representation below would NOT be transported 1833 in hex, but in binary. Hex is used because a binary representation 1834 cannot be rendered well in text. ] 1836 Payload = 1837 df9c99244b300a06082a8648ce3d0403023067310b300906035504061302 1838 5553310b300906035504080c024341310b300906035504070c024c413114 1839 30120603 1840 The 10th and final Block2: 1842 Ver = 1 1843 T = 2 (means ACK) 1844 Code = 0x45 (2.05 Content) 1845 Token = 0x9a (copied from request by server) 1846 Options 1847 Option 1848 Option Delta = 0xC (option# 12 Content-Format) 1849 Option Length = 0x2 1850 Option Value = 281 1851 Option 1852 Option Delta = 0xB (option# 12+11=23 Block2 ) 1853 Option Length = 0x1 1854 Option Value = 0x92 (block#=9, M=0, SZX=2) 1856 [ The hexadecimal representation below would NOT be transported 1857 in hex, but in binary. Hex is used because a binary representation 1858 cannot be rendered well in text. ] 1860 Payload = 1861 2ec0b4af52d46f3b7ecc9687ddf267bcec368f7b7f1353272f022047a28a 1862 e5c7306163b3c3834bab3c103f743070594c089aaa0ac870cd13b902caa1 1863 003100 1865 B.2. enroll / reenroll 1867 In this example, the requested Block2 size of 256 bytes, required by 1868 the client, is transferred to the server in the very first request 1869 message. The block size 256=(2**(SZX+4)) which gives SZX=4. The 1870 notation for block numbering is the same as in Appendix B.1. The 1871 header fields and the payload are omitted for brevity. 1873 POST [2001:db8::2:321]:61616/est/sen (CON)(1:0/1/256) {CSR req} --> 1874 <-- (ACK) (1:0/1/256) (2.31 Continue) 1875 POST [2001:db8::2:321]:61616/est/sen (CON)(1:1/1/256) {CSR req} --> 1876 <-- (ACK) (1:1/1/256) (2.31 Continue) 1877 . 1878 . 1879 . 1880 POST [2001:db8::2:321]:61616/est/sen (CON)(1:N1/0/256){CSR req} --> 1881 <-- (ACK) (1:N1/0/256)(2:0/1/256)(2.04 Changed){Cert resp} 1882 POST [2001:db8::2:321]:61616/est/sen (CON)(2:1/0/256) --> 1883 <-- (ACK) (2:1/1/256)(2.04 Changed) {Cert resp} 1884 . 1885 . 1886 . 1887 POST [2001:db8::2:321]:61616/est/sen (CON)(2:N2/0/256) --> 1888 <-- (ACK) (2:N2/0/256) (2.04 Changed) {Cert resp} 1890 Figure 5: EST-COAP enrollment with multiple blocks 1892 N1+1 blocks have been transferred from client to the server and N2+1 1893 blocks have been transferred from server to client. 1895 Appendix C. Message content breakdown 1897 This appendix presents the breakdown of the hexadecimal dumps of the 1898 binary payloads shown in Appendix A. 1900 C.1. cacerts 1902 The breakdown of cacerts response containing one root CA certificate 1903 is 1904 Certificate: 1905 Data: 1906 Version: 3 (0x2) 1907 Serial Number: 1908 91:89:bc:df:9c:99:24:4b 1909 Signature Algorithm: ecdsa-with-SHA256 1910 Issuer: C=US, ST=CA, L=LA, O=Example Inc, 1911 OU=certification, CN=Root CA 1912 Validity 1913 Not Before: Jan 7 10:40:41 2019 GMT 1914 Not After : Jan 2 10:40:41 2039 GMT 1915 Subject: C=US, ST=CA, L=LA, O=Example Inc, 1916 OU=certification, CN=Root CA 1917 Subject Public Key Info: 1918 Public Key Algorithm: id-ecPublicKey 1919 Public-Key: (256 bit) 1920 pub: 1921 04:81:49:94:08:2b:6e:81:85:f3:df:53:f5:e0:be: 1922 e6:98:97:33:35:20:00:23:dd:f7:8c:d1:7a:44:3f: 1923 fd:8d:dd:40:90:87:69:c5:56:52:ac:2c:cb:75:c4: 1924 a5:0a:7c:7d:db:7c:22:da:e6:c8:5c:ca:53:82:09: 1925 fd:bb:f1:04:c9 1926 ASN1 OID: prime256v1 1927 NIST CURVE: P-256 1928 X509v3 extensions: 1929 X509v3 Subject Key Identifier: 1930 24:95:E8:16:EF:6F:FC:AA:F3:56:CE:4A:DF:FE:33:CF:49:2A:BB:A8 1931 X509v3 Authority Key Identifier: 1932 keyid: 1933 24:95:E8:16:EF:6F:FC:AA:F3:56:CE:4A:DF:FE:33:CF:49:2A:BB:A8 1935 X509v3 Basic Constraints: critical 1936 CA:TRUE 1937 X509v3 Key Usage: critical 1938 Certificate Sign, CRL Sign 1939 X509v3 Subject Alternative Name: 1940 email:certify@example.com 1941 Signature Algorithm: ecdsa-with-SHA256 1942 30:45:02:21:00:da:e3:7c:96:f1:54:c3:2e:c0:b4:af:52:d4: 1943 6f:3b:7e:cc:96:87:dd:f2:67:bc:ec:36:8f:7b:7f:13:53:27: 1944 2f:02:20:47:a2:8a:e5:c7:30:61:63:b3:c3:83:4b:ab:3c:10: 1945 3f:74:30:70:59:4c:08:9a:aa:0a:c8:70:cd:13:b9:02:ca 1947 C.2. enroll / reenroll 1949 The breakdown of the enrollment request is 1951 Certificate Request: 1952 Data: 1953 Version: 0 (0x0) 1954 Subject: C=US, ST=CA, L=LA, O=example Inc, 1955 OU=IoT/serialNumber=Wt1234 1956 Subject Public Key Info: 1957 Public Key Algorithm: id-ecPublicKey 1958 Public-Key: (256 bit) 1959 pub: 1960 04:c8:b4:21:f1:1c:25:e4:7e:3a:c5:71:23:bf:2d: 1961 9f:dc:49:4f:02:8b:c3:51:cc:80:c0:3f:15:0b:f5: 1962 0c:ff:95:8d:75:41:9d:81:a6:a2:45:df:fa:e7:90: 1963 be:95:cf:75:f6:02:f9:15:26:18:f8:16:a2:b2:3b: 1964 56:38:e5:9f:d9 1965 ASN1 OID: prime256v1 1966 NIST CURVE: P-256 1967 Attributes: 1968 challengePassword : <256-bit POP linking value> 1969 Requested Extensions: 1970 X509v3 Subject Alternative Name: 1971 othername: 1972 Signature Algorithm: ecdsa-with-SHA256 1973 30:45:02:21:00:92:56:3a:54:64:63:bd:9e:cf:f1:70:d0:fd: 1974 1f:2e:f0:d3:d0:12:16:0e:5e:e9:0c:ff:ed:ab:ec:9b:9a:38: 1975 92:02:20:17:9f:10:a3:43:61:09:05:1a:ba:d1:75:90:a0:9b: 1976 c8:7c:4d:ce:54:53:a6:fc:11:35:a1:e8:4e:ed:75:43:77 1978 The CSR contained a ChallengePassword which is used for POP linking 1979 (Section 4). 1981 The breakdown of the issued certificate is 1982 Certificate: 1983 Data: 1984 Version: 3 (0x2) 1985 Serial Number: 9112578475118446130 (0x7e7661d7b54e4632) 1986 Signature Algorithm: ecdsa-with-SHA256 1987 Issuer: C=US, ST=CA, O=Example Inc, OU=certification, 1988 CN=802.1AR CA 1989 Validity 1990 Not Before: Jan 31 11:29:16 2019 GMT 1991 Not After : Dec 31 23:59:59 9999 GMT 1992 Subject: C=US, ST=CA, L=LA, O=example Inc, 1993 OU=IoT/serialNumber=Wt1234 1994 Subject Public Key Info: 1995 Public Key Algorithm: id-ecPublicKey 1996 Public-Key: (256 bit) 1997 pub: 1998 04:c8:b4:21:f1:1c:25:e4:7e:3a:c5:71:23:bf:2d: 1999 9f:dc:49:4f:02:8b:c3:51:cc:80:c0:3f:15:0b:f5: 2000 0c:ff:95:8d:75:41:9d:81:a6:a2:45:df:fa:e7:90: 2001 be:95:cf:75:f6:02:f9:15:26:18:f8:16:a2:b2:3b: 2002 56:38:e5:9f:d9 2003 ASN1 OID: prime256v1 2004 NIST CURVE: P-256 2005 X509v3 extensions: 2006 X509v3 Basic Constraints: 2007 CA:FALSE 2008 X509v3 Subject Key Identifier: 2009 96:60:0D:87:16:BF:7F:D0:E7:52:D0:AC:76:07:77:AD:66:5D:02:A0 2011 X509v3 Authority Key Identifier: 2012 keyid: 2013 68:D1:65:51:F9:51:BF:C8:2A:43:1D:0D:9F:08:BC:2D:20:5B:11:60 2015 X509v3 Key Usage: critical 2016 Digital Signature, Key Encipherment 2017 X509v3 Subject Alternative Name: 2018 othername: 2019 Signature Algorithm: ecdsa-with-SHA256 2020 30:46:02:21:00:c0:d8:19:96:d2:50:7d:69:3f:3c:48:ea:a5: 2021 ee:94:91:bd:a6:db:21:40:99:d9:81:17:c6:3b:36:13:74:cd: 2022 86:02:21:00:a7:74:98:9f:4c:32:1a:5c:f2:5d:83:2a:4d:33: 2023 6a:08:ad:67:df:20:f1:50:64:21:18:8a:0a:de:6d:34:92:36 2025 C.3. serverkeygen 2027 The following is the breakdown of the server-side key generation 2028 request. 2030 Certificate Request: 2031 Data: 2032 Version: 0 (0x0) 2033 Subject: O=skg example 2034 Subject Public Key Info: 2035 Public Key Algorithm: id-ecPublicKey 2036 Public-Key: (256 bit) 2037 pub: 2038 04:1b:b8:c1:11:78:96:f9:8e:45:06:c0:3d:70:ef: 2039 be:82:0d:8e:38:ea:97:e9:d6:5d:52:c8:46:0c:58: 2040 52:c5:1d:d8:9a:61:37:0a:28:43:76:0f:c8:59:79: 2041 9d:78:cd:33:f3:c1:84:6e:30:4f:17:17:f8:12:3f: 2042 1a:28:4c:c9:9f 2043 ASN1 OID: prime256v1 2044 NIST CURVE: P-256 2045 Attributes: 2046 a0:00 2047 Signature Algorithm: ecdsa-with-SHA256 2048 30:44:02:20:38:7c:d4:e9:cf:62:8d:4a:f7:7f:92:eb:ed:48: 2049 90:d9:d1:41:dc:a8:6c:d2:75:7d:d1:4c:bd:59:cd:f6:96:18: 2050 02:20:2f:24:5e:82:8c:77:75:43:78:b6:66:60:a4:97:7f:11: 2051 3c:ac:da:a0:cc:7b:ad:7d:14:74:a7:fd:15:5d:09:0d 2053 Following is the breakdown of the private key content of the server- 2054 side key generation response. 2056 Private-Key: (256 bit) 2057 priv: 2058 0b:9a:67:78:5b:65:e0:73:60:b6:d2:8c:fc:1d:3f: 2059 39:25:c0:75:57:99:de:ec:a7:45:37:2b:01:69:7b: 2060 d8:a6 2061 pub: 2062 04:1b:b8:c1:11:78:96:f9:8e:45:06:c0:3d:70:ef: 2063 be:82:0d:8e:38:ea:97:e9:d6:5d:52:c8:46:0c:58: 2064 52:c5:1d:d8:9a:61:37:0a:28:43:76:0f:c8:59:79: 2065 9d:78:cd:33:f3:c1:84:6e:30:4f:17:17:f8:12:3f: 2066 1a:28:4c:c9:9f 2067 ASN1 OID: prime256v1 2068 NIST CURVE: P-256 2070 The following is the breakdown of the certificate in the server-side 2071 key generation response payload. 2073 Certificate: 2074 Data: 2075 Version: 3 (0x2) 2076 Serial Number: 1327972925857878603 (0x126de8571518524b) 2077 Signature Algorithm: ecdsa-with-SHA256 2078 Issuer: O=skg example 2079 Validity 2080 Not Before: Jan 9 08:57:08 2019 GMT 2081 Not After : Jan 4 08:57:08 2039 GMT 2082 Subject: O=skg example 2083 Subject Public Key Info: 2084 Public Key Algorithm: id-ecPublicKey 2085 Public-Key: (256 bit) 2086 pub: 2087 04:1b:b8:c1:11:78:96:f9:8e:45:06:c0:3d:70:ef: 2088 be:82:0d:8e:38:ea:97:e9:d6:5d:52:c8:46:0c:58: 2089 52:c5:1d:d8:9a:61:37:0a:28:43:76:0f:c8:59:79: 2090 9d:78:cd:33:f3:c1:84:6e:30:4f:17:17:f8:12:3f: 2091 1a:28:4c:c9:9f 2092 ASN1 OID: prime256v1 2093 NIST CURVE: P-256 2094 X509v3 extensions: 2095 X509v3 Basic Constraints: 2096 CA:FALSE 2097 Netscape Comment: 2098 OpenSSL Generated Certificate 2099 X509v3 Subject Key Identifier: 2100 49:4B:E5:98:DC:8D:BC:0D:BC:07:1C:48:6B:77:74:60:E5:CC:E6:21 2101 X509v3 Authority Key Identifier: 2102 keyid: 2103 49:4B:E5:98:DC:8D:BC:0D:BC:07:1C:48:6B:77:74:60:E5:CC:E6:21 2105 Signature Algorithm: ecdsa-with-SHA256 2106 30:46:02:21:00:a4:b1:67:d0:f9:ad:d9:20:28:10:e6:bf:6a: 2107 29:0b:8c:fd:fc:9b:9c:9f:ea:2c:c1:c8:fc:3a:46:4f:79:f2: 2108 c2:02:21:00:81:d3:1b:a1:42:75:1a:7b:4a:34:fd:1a:01:fc: 2109 fb:08:71:6b:9e:b5:3b:da:ad:c9:ae:60:b0:8f:52:42:9c:0f 2111 Authors' Addresses 2113 Peter van der Stok 2114 Consultant 2116 Email: consultancy@vanderstok.org 2117 Panos Kampanakis 2118 Cisco Systems 2120 Email: pkampana@cisco.com 2122 Michael C. Richardson 2123 Sandelman Software Works 2125 Email: mcr+ietf@sandelman.ca 2126 URI: http://www.sandelman.ca/ 2128 Shahid Raza 2129 RISE SICS 2130 Isafjordsgatan 22 2131 Kista, Stockholm 16440 2132 SE 2134 Email: shahid@sics.se