ACE P. van der Stok Internet-Draft Consultant Intended status: Standards Track P. Kampanakis Expires:September 1,December 8, 2018 Cisco Systems S. Kumar Philips Lighting Research M. Richardson SSW M. Furuhed Nexus Group S. Raza RISE SICSFebruary 28,June 6, 2018 EST over secure CoAP (EST-coaps)draft-ietf-ace-coap-est-00draft-ietf-ace-coap-est-01 Abstract Enrollment over Secure Transport (EST)[RFC7030]is used as a certificatemanagementprovisioning protocol over HTTPS. Low-resource devices often use the lightweight Constrained Application Protocol (CoAP)[RFC7252]for message exchanges. This document defines how to transport EST payloads over secure CoAP(EST- coaps). This(EST-coaps), which allows low-resource constrained devices tore-useuse existing ESTfunctionality. Example low-resource use casesfunctionality forEST are: secure bootstrapping and certificate enrollment.provisioning certificates. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onSeptember 1,December 8, 2018. Copyright Notice Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 31.1. EST operational differences2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 31.2. Terminology3. Conformance to RFC7925 profiles . . . . . . . . . . . . . . . 3 4. Protocol Design . . . . . . . .4 2. Conformance to RFC7925 profiles. . . . . . . . . . . . . . . 43. Protocol Design and Layering4.1. Payload format . . . . . . . . . . . . . . . . .5 3.1. Payload format. . . . 5 4.2. Message Bindings . . . . . . . . . . . . . . . . . . .6 3.2. Message Bindings. 6 4.3. CoAP response codes . . . . . . . . . . . . . . . . . . . 63.3. CoAP response codes4.4. Delayed Results . . . . . . . . . . . . . . . . . . . . . 63.4.4.5. Server-side Key Generation . . . . . . . . . . . . . . . 7 4.6. Message fragmentation . . . . . . . . . . . . . . . . . .7 3.5.8 4.7. Deployment limits . . . . . . . . . . . . . . . . . . . .8 4.9 5. Discovery and URI . . . . . . . . . . . . . . . . . . . . . .8 5.9 6. DTLS Transport Protocol . . . . . . . . . . . . . . . . . . . 106. Proxying7. HTTPS-CoAPS Registrar . . . . . . . . . . . . . . . . . . . . 12 8. Parameters . . . . . . .11 7. Parameters. . . . . . . . . . . . . . . . . . 14 9. IANA Considerations . . . . . . .12 8. IANA Considerations. . . . . . . . . . . . . . 14 9.1. Media-Type Registry . . . . . . .12 8.1. Content-Format registry. . . . . . . . . . . . 14 9.2. Content-Format Registry . . . . . .12 8.2. Resource Type registry. . . . . . . . . . . 15 9.2.1. Content Format application/multict . . . . . . . .14 9. Security Considerations. 16 9.3. Resource Type registry . . . . . . . . . . . . . . . . . 17 10. Security Considerations .15 9.1. proxy considerations. . . . . . . . . . . . . . . . . .15 9.2.17 10.1. EST server considerations . . . . . . . . . . . . . . . 17 10.2. HTTPS-CoAPS Registrar considerations . .15 10.. . . . . . . . 18 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .16 11.18 12. Change Log . . . . . . . . . . . . . . . . . . . . . . . . .16 12.19 13. References . . . . . . . . . . . . . . . . . . . . . . . . .16 12.1.19 13.1. Normative References . . . . . . . . . . . . . . . . . .16 12.2.19 13.2. Informative References . . . . . . . . . . . . . . . . .1721 Appendix A. EST messages to EST-coaps . . . . . . . . . . . . .1922 A.1. cacerts . . . . . . . . . . . . . . . . . . . . . . . . .2023 A.2. csrattrs . . . . . . . . . . . . . . . . . . . . . . . .2226 A.3. enroll / reenroll . . . . . . . . . . . . . . . . . . . .2227 A.4. serverkeygen . . . . . . . . . . . . . . . . . . . . . .2429 Appendix B.Encoding for server side key generation . . . . . . 26 Appendix C.EST-coaps Block message examples . . . . . . . . . .2631 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .2835 1. Introduction "Classical" Enrollment over Secure Transport (EST) [RFC7030] is used for authenticated/authorized endpoint certificate enrollment (and optionally key provisioning) through a Certificate Authority (CA) or Registration Authority (RA).This functionality is also needed for low resource devices. "Classical"ESTuses HTTPS and this specificationmessages run over HTTPS. This document defines a new transport for ESTusing CoAP. It also profilesbased on the Constrained Application Protocol (CoAP) since some Internet of Things (IoT) devices use CoAP instead ofEST to a smaller subset. IPv6 over Low-power Wireless Personal Area Networks (6LoWPANs) [RFC4944] on IEEE 802.15.4 [ieee802.15.4] wireless networks are becoming common in many industry application domains such as lighting controls. Although IEEE 802.15.4 defines how security can be enabled between nodes within a single mesh network, it does not specify the provisioning and management of the keys.HTTP. Therefore,securing a 6LoWPAN network with devices from multiple manufacturers with different provisioning techniques is often tedious and time consuming. An example use case is the application of Bootstrapping of Remote Secure Infrastructures (BRSKI) [I-D.ietf-anima-bootstrapping-keyinfra]. The low resource aspects are detailed for 6tisch in [I-D.ietf-6tisch-minimal-security] and [I-D.ietf-6tisch-dtsecurity-secure-join]. Constrained networks usethis specification utilizes DTLS [RFC6347], CoAP [RFC7252], and UDP instead of TLS [RFC5246], HTTP [RFC7230] and TCP.EST-coaps replaces the invocations of TLS and HTTP by DTLS and CoAP invocations thus enabling EST for CoAP-based low-resource devices. Because the relatively largeEST messagescannotmay bereadily transported over constrained (6LoWPAN, LLN) wireless networks,relatively large and for this reason this documentspecifies the use ofalso uses CoAP Block-Wise Transfer("Block")[RFC7959] tofragmentoffer a fragmentation mechanism of EST messages at theapplicationCoAP layer.1.1. EST operational differences Only the differencesCOAP Observe options [RFC7641] are also used to convey delayed ESTwith respectresponses tooperational scenarios are described in this section. EST-coaps server differs from EST server as follows: o Replacementclients. This specification also profiles the use ofTLS by DTLS and HTTP by CoAP, resulting in: * DTLS-secured CoAP sessions between EST-coaps client and EST- coaps server. o OnlyEST to only support certificate-based clientauthentication is supported, which results in: * The EST-coaps client does not supportAuthentication. HTTP Basic or Digest authentication (as described in Section 3.2.3 of[RFC7030]). * The EST-coaps client does[RFC7030] are notsupport authentication at the application layer (as described in Section 3.2.3 of [RFC7030]). 1.2.supported. 2. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Many of the concepts in this document are taken over from [RFC7030]. Consequently, much text is directly traceable to [RFC7030]. The same document structure is followed to point out the differences and commonalities between EST and EST-coaps.2.3. Conformance to RFC7925 profiles This section shows how EST-coaps fits into the profiles of low- resource devicesasdescribed in [RFC7925]. EST-coaps can transport certificates and private keys. Certificates are responses to (re-)enrollment requests or request for a trusted certificate list. Private keys can be transported asresponseresponses to a request to a server-sidekey generationkeygeneration as described in section 4.4 of[RFC7030].[RFC7030] and discussed in Section 4.5 of this document. The mandatory cipher suite for DTLS in EST-coaps is TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 defined in [RFC7251] which is the mandatory-to-implement cipher suite in CoAP. Additionally, the curve secp256r1 MUST be supported [RFC4492]; this curve is equivalent to the NIST P-256 curve.The hash algorithm[Q-EDNOTE: the NIST P-256 curve isSHA-256. DTLSa MUST- according to the terminology of RFC8247, and Curve25519 is a SHOULD+]. DTLS1.2 implementations MUST use the Supported Elliptic Curves and Supported Point Formats Extensions[RFC4492]; the uncompressed[RFC4492]. Uncompressed point format MUST also besupported;supported. [RFC6090] can be used asan implementation method. The EST-coaps client MUST be configured with an explicit TA database or at leastsummary of the ECC algorithms. DTLS 1.3 implementations differ from DTLS 1.2 because they do not support point format negotiation in favor of a single point format for each curve and thus support for DTLS 1.3 does not mandate point formation extensions and negotiation. The EST-coaps client MUST be configured with at least an implicit TA database from its manufacturer. The authentication of the EST-coaps server by the EST-coaps client is based onCertificatecertificate authentication in the DTLS handshake. The authentication of the EST-coaps client is based on a client certificate in the DTLS handshake. This can either be oDTLS witha previously issued client certificate (e.g., an existing certificate issued by the EST CA); this could be a common case for simple re-enrollment of clients; oDTLS witha previously installed certificate (e.g.,manufacturer- installedmanufacturer-installed certificate or a certificate issued by some other party);3.the server is expected to trust the manufacturer's root CA certificate in this case. 4. Protocol Designand LayeringEST-coaps uses CoAP to transfer EST messages, aided by Block-Wise Transfer [RFC7959] to transport CoAP messages in blocks thus avoiding (excessive)6LoWPANfragmentation of UDP datagrams. The use of "Block" for the transfer of larger EST messages is specified in Section3.4.4.6. The Figure 1 below shows the layered EST-coaps architecture. +------------------------------------------------+ | EST request/response messages | +------------------------------------------------+ | CoAP for message transfer and signaling | +------------------------------------------------+ | DTLS for transport security | +------------------------------------------------+ | UDP for transport | +------------------------------------------------+ Figure 1: EST-coaps protocol layers The EST-coaps protocol design follows closely the EST design. Thepartsactions supported by EST-coaps are identified by their message types: oSimple enroll and reenroll, for CA to sign public client-identity key. oCA certificate retrieval, needed to receive the complete set of CA certificates. oCSRSimple enroll and reenroll, for CA to sign public client-identity key. o Certificate Signing Request (CSR) Attributes request messages, informs the client of the fields to include in generated CSR. o Server-side key generation messages, to provide a private client- identity key when the clientis too restricted or because of lack ofchoses for anentropy source. [EDNOTE: Encrypting these keys is important. RFC7030 specifies how theexternal entity to generate its privatekey can be encrypted with CMS using symmetric or asymmetric keys. Mention how symmetric key can be derived for EST server side key generation from the TLS KEM draft.] 3.1.key. 4.1. Payload format The content-format (media type equivalent) of the CoAP message determines which EST message is transported in the CoAP payload. The media types specified in the HTTP Content-Type header(see section(section 3.2.2 of [RFC7030]) are in EST-coaps specified by the Content-Format Option (12) of CoAP. The combination of URIpath-suffixpath andcontent- formatcontent-format used for CoAP MUST map to an allowed combination ofpath- suffixURI and media type as defined for EST. The requiredcontent- formatscontent-formats for theserequestrequests and response messages are defined in Section8.9. The CoAP response codes are defined in Section3.3.4.3. EST-coaps is designed for use between low-resource devicesusing CoAPand hence does not need to send base64-encoded data. Simple binary is more efficient (30%less payload compared to base64)smaller payload) and well supported by CoAP. Therefore, the content formats specification in Section8 requires9 specifies that theuse ofbinary payload is transported as a CBOR major type 2, a byte string, for all EST-coapsContent- Formats. 3.2.Content-Formats. In the examples of Appendix A, the base16 diagnostic notation is used for CBOR major type 2, where h'450aafbb' represents an example binary payload. 4.2. Message BindingsThis section describes theThe general EST CoAP messagecharacteristics. It is RECOMMENDED to use CoAP CON messages. This recommendation does not influence the communication efficiency because allcharacteristics are: o All EST-coaps messages expect aresponse.response from the server, thus the client MUST send the requests over confirmable CON COAP messages. o The Ver, TKL, Token, and Message ID values of the CoAP header are notinfluencedaffected by EST. o The CoAP optionsareusedto conveyare Uri-Host, Uri-Path, Uri-Port,Content-FormatContent- Format, andmoreLocation-Path in CoAP.TheThese CoAP Options are used to communicate the HTTP fields specified in the EST REST messages. o EST URLs are HTTPS based (https://), in CoAP these will be assumed to be transformed to coaps (coaps://) Appendix A includes some practical examples of EST messages translated to CoAP.3.3.4.3. CoAP response codes Section 5.9 of [RFC7252] specifies the mapping of HTTP response codes to CoAP response codes. Every time the HTTP response code 200 is specified in [RFC7030] in response to a GET(POST)request, inEST- coapsEST-coaps the equivalent CoAP response code 2.05(2.01)or 2.03 MUST be used. Similarly, 2.01, 2.02 or 2.04 MUST be used in response to POST EST requests. Response code HTTP 202 has no equivalent inEST is mapped to CoAP _.__.CoAP. In[I-D.hartke-core-pending]Section 4.4 it is specified howmultiple concurrently openEST requestsmay be handled.over CoAP handle delayed messages. All other HTTP 2xx response codes are not used by EST. For the following HTTP 4xx error codes that may occur: 400, 401, 403, 404, 405, 406, 412, 413, 415; the equivalent CoAP response code forEST-coapsEST- coaps is 4.xx. For the HTTP 5xx error codes: 500, 501, 502, 503, 504 the equivalent CoAP response code is 5.xx.3.4. Message fragmentation DTLS defines fragmentation only for4.4. Delayed Results It is possible that responses are not always directly available by thehandshake partserver, andnot for secure data exchange (DTLS records). [RFC6347] states thatmay even require manual intervention toavoid using IP fragmentation, which involves error-prone datagram reconstitution, invokers ofgenerate theDTLS record layer SHOULD size DTLS records so that they fit within any Path MTU estimates obtained fromcertificate for therecord layer. In addition, invokers residing on a 6LoWPAN over IEEE 802.15.4 network SHOULD attemptserver response. Delays of minutes tosize CoAP messages such thathours are possible. Therefore, eachDTLS record will fit within one or two IEEE 802.15.4 frames. ThatGET request MUST be accompanied by the observe option. When the result isnot always possible. Even though ECC certificates are small in size, they can vary greatly based on signature algorithms, key sizes, and OID fields used. For 256-bit curves, common ECDSA cert sizes are 500-1000 bytes which could fluctuate further based ondirectly available, thealgorithms, OIDs, SANsclient receives the result andcert fields. For 384-bit curves, ECDSA certs increaseforgets about the observe as specified insize and can sometimes reach 1.5KB. Additionally, there are times whensection 3.6 of [RFC7641]. When a POST response is delayed, theEST cacertsPOST returns a 2.01 (Created) responsefromcode, having put a value in theserver can include multiple certs that amount to large payloads. Section 4.6Location-Path option. After reception ofCoAP [RFC7252] describes2.01 thepossible payload sizes: "if nothingclient does a GET request with the observe option to the newly returned location. Once the delayed result isknownnotified by the server, the client forgets about thesize ofobserve. Next to theheaders, good upper bounds are 1152 bytes forobserve option themessage size and 1024 bytes forserver MUST specify thepayload size". Section 4.6 of [RFC7252] also suggestsMax-Age option thatIPv4 implementations may wantindicates the maximum waiting time in minutes. 4.5. Server-side Key Generation Constrained devices sometimes do not have the necessary hardware tolimit themselvesgenerate statistically random numbers for private keys and DTLS ephemeral keys. Past experience has shown that low-resource endpoints sometimes generate numbers which could allow someone tomore conservative IPv4 datagram sizes suchdecrypt the communication or guess the private key and impersonate as576 bytes. From [RFC0791] followsthe device. Studies have shown that theabsolute minimum value ofsame keys are generated by theIP MTU for IPv4same model devices deployed on-line. Additionally, random number key generation isas low as 68 bytes, which would leave only 40 bytes minus security overheadcostly, thus energy draining. Even though the random numbers that constitute the identity/cert do not get generated often, an endpoint may not want to spend time and energy generating keypairs, and just ask fora UDP payload. Thus, even with ECC certs, EST-coaps messagesone from the server. In these scenarios, server-side key generation canstill exceed sizes in MTU of 1280be used. The client asks forIPv6the server or60-80 bytes for 6LoWPAN [RFC4919] as explained in section 2 of [RFC7959]. EST-coaps needs to be ableproxy tofragment EST messages into multiple DTLS datagrams. Fine-grained fragmentation of EST messagesgenerate the private key and the certificate which isessential. To perform fragmentationtransferred back to the client inCoAP, [RFC7959] specifiesthe"Block1" optionserver-side key generation response. [RFC7030] recommends forfragmentation of the request payload andthe"Block2" option for fragmentation ofprivate key returned by thereturn payload of a CoAP flow.server to be encrypted. TheBLOCK draft defines SZX inspecification provides two methods to encrypt theBlock1generated key, symmetric andBlock2 option fields. Theseasymmetric. The methods areused to convey the size of the blocks insignalled by therequests or responses. The CoAPclientMAY specifyby using theBlock1 sizerelevant attributes (SMIMECapabilities andMAY also specify the Block2 size. The CoAP server MAY specifyDecryptKeyIdentifier or AsymmetricDecryptKeyIdentifier) in theBlock2 size, but notCSR request. In theBlock1 size. As explained in Section 1 of [RFC7959]), blockwise transfers SHOULD be used in Confirmable CoAP messages to avoidsymmetric key case, theexacerbation of lost blocks. The Size1 response MAYkey can beparsedestablished out- of-band or alternatively derived by theclientestablished TLS connection asa size indication of the Block2 resourcedescribed inthe server[RFC5705]. The sever-side key generation responseor byis returned using a CBOR array Section 9.2.1. The certificate part exactly matches theserver asresponse from arequest forenrollment response. The private key is placed inside of asize estimateCMS SignedData. The SignedData is signed by theclient. Similarly, Size2 option defined in BLOCK shouldparty that generated the private key, which may or may not beparsed bythe EST serveras an indication of the size ofor theresource carried in Block1 options andEST CA. The SignedData is further protected bythe client asplacing it inside of amaximum size expectedCMS EnvelopedData as explained inthe 4.13 (Request Entity Too Large) response to a request. ExamplesSection 4.4.2 offragmented messages are shown in Appendix C. 3.5. Deployment limits Although EST-coaps paves the way[RFC7030]. 4.6. Message fragmentation DTLS defines fragmentation only for theutilization of EST for constrained devices on constrained networks, some devices willhandshake part and nothave enough resources to handle the large payloadsfor secure data exchange (DTLS records). [RFC6347] states thatcome with EST-coaps. The specification of EST-coaps is intendedtoensure that EST works for networksavoid using IP fragmentation, which involves error-prone datagram reconstitution, invokers ofconstrained devicesthe DTLS record layer SHOULD size DTLS records so thatchoose to limit their communications stack to UDP/CoAP. It is up tothey fit within any Path MTU estimates obtained from the record layer. In addition, invokers residing on a 6LoWPAN over IEEE 802.15.4 networkdesignerSHOULD attempt todecide which devices execute the EST protocolsize CoAP messages such that each DTLS record will fit within one or two IEEE 802.15.4 frames. That is not always possible. Even though ECC certificates are small in size, they can vary greatly based on signature algorithms, key sizes, and OID fields used. For 256-bit curves, common ECDSA cert sizes are 500-1000 bytes whichnot. 4. Discoverycould fluctuate further based on the algorithms, OIDs, SANs andURI EST-coaps is targeted to low-resource networks with small packets. Saving header space is importantcert fields. For 384-bit curves, ECDSA certs increase in size andan additional EST-coaps URI is specified that is shorter thancan sometimes reach 1.5KB. Additionally, there are times when the ESTURI. Incacerts response from thecontextserver can include multiple certs that amount to large payloads. Section 4.6 ofCoAP,CoAP [RFC7252] describes thepresence and locationpossible payload sizes: "if nothing is known about the size of(path to)themanagement dataheaders, good upper bounds arediscovered by sending a GET request to "/.well- known/core" including a resource type (RT) parameter with1152 bytes for thevalue "ace.est" [RFC6690]. Upon success,message size and 1024 bytes for thereturnpayloadwill contain the root resourcesize". Section 4.6 of [RFC7252] also suggests that IPv4 implementations may want to limit themselves to more conservative IPv4 datagram sizes such as 576 bytes. From [RFC0791] follows that theEST resources. Itabsolute minimum value of the IP MTU for IPv4 isupas low as 68 bytes, which would leave only 40 bytes minus security overhead for a UDP payload. Thus, even with ECC certs, EST-coaps messages can still exceed sizes in MTU of 1280 for IPv6 or 60-80 bytes for 6LoWPAN [RFC4919] as explained in section 2 of [RFC7959]. EST-coaps needs tothe implementationbe able tochoose its root resource; throughout this document the example root resource /estfragment EST messages into multiple DTLS datagrams. Fine-grained fragmentation of EST messages isused. The example below showsessential. To perform fragmentation in CoAP, [RFC7959] specifies thediscovery"Block1" option for fragmentation of thepresencerequest payload andlocation of management data. REQ: GET /.well-known/core?rt=ace.est RES: 2.05 Content </est>; rt="ace.est" The additional EST-coaps server URIs differ fromtheEST URI by replacing"Block2" option for fragmentation of thescheme https by coaps and by specifyingreturn payload of ashorter resource path names: coaps://www.example.com/est/short-name TheCoAPshort URI exists next to the URI defined in [RFC7030]. coaps://www.example.com/.well-known/est/est-name OR coaps://www.example.com/.well-known/est/ArbitraryLabel/est-name Figure 5flow. The BLOCK draft defines SZX insection 3.2.2 of [RFC7030] enumeratestheoperationsBlock1 andcorresponding paths whichBlock2 option fields. These aresupported by EST. Table 1 providesused to convey themapping fromsize of theEST URI path toblocks in theshorter EST-coaps URI path. +------------------+-----------+ | EST | EST-coaps | +------------------+-----------+ | /cacerts | /crts | | /simpleenroll | /sen | | /simplereenroll | /sren | | /csrattrs | /att | | /serverkeygen | /skg | +------------------+-----------+ Table 1 When discovering the root path forrequests or responses. The CoAP client MAY specify theEST resources,Block1 size and MAY also specify the Block2 size. The CoAP server MAYreturnspecify thefull resource paths andBlock2 size, but not the Block1 size. As explained in Section 1 of [RFC7959]), blockwise transfers SHOULD be usedcontent types. This is useful when multiple content types are specified for EST-coaps server. For example,in Confirmable CoAP messages to avoid thefollowing more complete response is possible. REQ: GET /.well-known/core?rt=ace.est RES: 2.05 Content </est>; rt="ace.est" </est/crts>; rt="ace.est";ct=TBD1 </est/sen>; rt="ace.est";ct=TBD1 TBD4 </est/sren>; rt="ace.est";ct=TBD1 TBD4 </est/att>; rt="ace.est";ct=TBD4 </est/skg>; rt="ace.est";ct=TBD1 TBD4 TBD2exacerbation of lost blocks. ThereturnSize1 response MAY be parsed by the client as a size indication of thecontent-types allowsBlock2 resource in theclient to chooseserver response or by themost appropriate one from multiple content types. 5. DTLS Transport Protocol EST-coaps depends onserver as asecure transport mechanism over UDP that can secure (confidentiality, authenticity)request for a size estimate by theCoAP messages exchanged. DTLS is one such secure protocol. When "TLS" is referred toclient. Similarly, Size2 option defined in BLOCK should be parsed by thecontextserver as an indication ofEST, it is understood thatthe size of the resource carried inEST-coaps, security is provided using DTLS instead. No other changes are necessary (all provisional modes etc. areBlock1 options and by thesameclient asfor TLS). CoAP was designed to avoid fragmentation. DTLS is used to secure CoAP messages. However, fragmentation is still possible ata maximum size expected in theDTLS layer during the DTLS handshake when using ECC ciphersuites. If fragmentation is necessary, "DTLS provides a mechanism for fragmenting a handshake message over4.13 (Request Entity Too Large) response to anumber of records, each of which can be transmitted separately, thus avoiding IP fragmentation" [RFC6347]. CoAP and DTLS can provide proofrequest. Examples ofidentity for EST-coaps clients and server with simple PKIfragmented messagesconformant to section 3.1 of [RFC5272].are shown in Appendix B. 4.7. Deployment limits Although EST-coapssupportspaves thecertificate types and Trust Anchors (TA) that are specifiedway forEST in section 3the utilization of[RFC7030]. Channel-binding informationEST forlinking proof-of-identityconstrained devices on constrained networks, some devices will not have enough resources to handle the large payloads that come withconnection-based proof-of-possession is optional forEST-coaps.When proof-of-possession is desired, a set of actions are required regarding the use of tls-unique, described in section 3.5 in [RFC7030].Thetls-unique information translatesspecification of EST-coaps is intended tothe contentsensure that EST works for networks ofthe first "Finished" message in the TLS handshake between server and client [RFC5929]. The clientconstrained devices that choose to limit their communications stack to UDP/CoAP. It isthen supposedup toadd this "Finished" message as a ChallengePassword intheattributes section ofnetwork designer to decide which devices execute thePKCS#10 Request InfoEST protocol and which do not. 5. Discovery and URI EST-coaps is targeted toprovelow-resource networks with small packets. Saving header space is important and an additional EST-coaps URI is specified thatthe clientisindeed in control of the private key atshorter than thetime of the TLS session when performing a /simpleenroll, for example. In the case of EST-coaps, the same operations can be performed during the DTLS handshake.EST URI. In theevent of handshake message fragmentation, the Hashcontext of CoAP, thehandshake messages used in the MAC calculationpresence and location of (path to) theFinished message PRF(master_secret, finished_label, Hash(handshake_messages)) [0..verify_data_length-1]; MUST be computed as if each handshake message had been sent as a single fragment [RFC6347]. In a constrained CoAP environment, endpoints can't afford to establish a DTLS connection for every EST transaction. Authenticating and negotiating DTLS keys requires resources on low- end endpoints and consumes valuable bandwidth. The DTLS connection SHOULD remain open for persistent EST connections. For example, an EST cacerts request that is followedmanagement data are discovered by sending asimpleenrollGET requestcan use the same authenticated DTLS connection. Given that after a successful enrollment, it is more likely thatto "/.well- known/core" including anew EST transactionresource type (RT) parameter with the value "ace.est" [RFC6690]. Upon success, the return payload willtake place after a significant amountcontain the root resource oftime,theDTLS connections SHOULD only be kept alive forESTmessages that are relatively close to each other. Support for Observe CoAP options [RFC7641]resources. It isout-of-scope forup to the implementation to choose its root resource; throughout thisdocument. Observe options could be used bydocument the example root resource /est is used. The individual EST-coaps serverto notify clients about a change inURIs differ from thecacerts or csr attributes (resources)EST URI by replacing the scheme https by coaps andmight be an area of future work. 6. Proxying In real-world deployments, the EST server will not always reside within the CoAP boundary.by specifying shorter resource path names: coaps://www.example.com/.well-known/est/ArbitraryLabel/<short-est>. TheEST-server can exist outsideArbitraryLabel Path-Segment SHOULD be of theconstrained networkshortest length possible. Figure 5 ina non-constrained network that supports TLS/ HTTP. In such environments EST-coaps is used by the client withinsection 3.2.2 of [RFC7030] enumerates theCoAP boundaryoperations andTLS is used to transport the EST messages outsidecorresponding paths which are supported by EST. Table 1 provides theCoAP boundary. A proxy entity atmapping from theedge is requiredEST URI path tooperate between the CoAP environment andtheexternal HTTP network. The ESTcoaps-to-HTTPS proxy SHOULD terminateshorter EST-coapsdownstream and initiateURI path. +------------------+-----------+ | ESTconnections over TLS upstream. One possible use-case, shown in one figure below, is expected to be deployed in practice: o A proxy between any EST-client and EST-server Constrained Network .---------. .----------------------------.|RAEST-coaps ||.--------------------------.| '---------' || ||+------------------+-----------+ ||| || .------. HTTP .-----------------. CoAPS .-----------. ||/cacerts |EST |<------->|ESTcoaps-to-HTTPS|<-------->| EST Client| || |Server|over TLS/crts |Proxy|'-----------' || '------' '-----------------' || || || |'--------------------------'| '----------------------------' ESTcoaps-to-HTTPS proxy at the CoAP boundary./simpleenroll | /sen | | /simplereenroll | /sren | | /csrattrs | /att | | /serverkeygen | /skg | +------------------+-----------+ Table 1containsThe short resource URIs MUST be supported. The corresponding longer URIs specified in [RFC7030] MAY be supported. When discovering theURI mapping betweenroot path for theEST-coaps andEST resources, theproxy SHOULD adhere to. Section 7 of [RFC8075]server MAY return all available resource paths andSection 3.3 definethemapping between EST-coaps and HTTP response codes, that determines how a proxy translates CoAP response codes from/to HTTP status codes. The mapping from Content-Type to media type is defined in Section 8. The conversion from binary to BSD64 needs to be done in the proxy. Conversionused content types. This ispossible because a TLS link exists between EST-coaps-to-HTTP proxy and EST server and a corresponding DTLS linked exists between EST-coaps-to-HTTP proxy and EST client. Due to fragmentation of large messages into blocks, an EST-coaps-to- HTTP proxy SHOULD reassemble the BLOCKs before translating the binaryuseful when multiple contentto BSD64, and consecutively relay the message upstream into the HTTP environment. Fortypes are specified for EST-coaps server. The example below shows the discovery of theEST server by the EST client in the coap environment, the EST-coaps-to-HTTP proxy MUST announce itself according to the rulespresence and location ofSection 4.management data. REQ: GET /.well-known/core?rt=ace.est RES: 2.05 Content </est>; rt="ace.est" </est/crts>;ct=TBD2 </est/sen>;ct=TBD2 TBD7 </est/sren>;ct=TBD2 TBD7 </est/att>;ct=TBD6 </est/skg>;ct=TBD1 TBD7 TBD8 Theavailable functionsfirst line of theproxiesdiscovery response MUST beannounced with as many resource paths.returned. Thediscoveryfive consecutive lines MAY be returned. The return ofEST server in the http environment followtherules specifiedcontent-types in[RFC7030]. [ EDNOTE: PoP will be addressed here. ] A proxy SHOULD authenticatetheclient downstream and it should be authenticated bylast four lines allows theEST server or CA upstream. The Registration Authority (RA) is necessaryclient to(re-)createchoose thesecure connectionmost appropriate one from multiple content types. 6. DTLSto TLS and vice versa. A trust relationship needs to be pre- established between the proxy andTransport Protocol EST-coaps depends on a secure transport mechanism over UDP that can secure (confidentiality, authenticity) theEST serversexchanged CoAP messages. DTLS is one such secure protocol. When "TLS" is referred tobe able to proxy these connections on behalfin the context ofvarious clients. [EDNOTE: To add more details about trust relationsEST, it is understood that inthis section. ] 7. Parameters [EDNOTE: This sectionEST-coaps, security is provided using DTLS instead. No other changes are necessary (all provisional modes etc. are the same as for TLS). CoAP was designed to avoid fragmentation. DTLS is used to secure CoAP messages. However, fragmentation is still possible at the DTLS layer during the DTLS handshake when using ECC ciphersuites. If fragmentation is necessary, "DTLS provides a mechanism for fragmenting a handshake message over several records, each of which can bepopulated. It will address transmission parameters described in sections 4.7transmitted separately, thus avoiding IP fragmentation" [RFC6347]. CoAP and4.8DTLS can provide proof of identity for EST-coaps clients and server with simple PKI messages conformant to section 3.1 of [RFC5272]. EST-coaps supports theCoAP draft. EST does not impose any unique parameterscertificate types and Trust Anchors (TA) thataffect the CoAP parametersare specified for EST inTable 2 andsection 3 of [RFC7030]. Channel-binding information for linking proof-of-identity with connection-based proof-of-possession is optional for EST-coaps. When proof-of-possession is desired, a set of actions are required regarding the use of tls-unique, described in section 3.5 in [RFC7030]. The tls-unique information translates to theCoAP draft butcontents of theonesfirst "Finished" message inCoAP could be affecting EST. For example,theprocessing delay of CAs could be less(D)TLS handshake between server and client [RFC5929]. The client is then2s, but insupposed to add thiscase they should send"Finished" message as aCoAP ACK every 2s while processing.] 8. IANA Considerations 8.1. Content-Format registry AdditionsChallengePassword in the attributes section of the PKCS#10 Request Info to prove that thesub-registry "CoAP Content-Formats", withinclient is indeed in control of the"CoRE Parameters" registry are neededprivate key at the time of the TLS session when performing a /simpleenroll, for example. In thebelow media types. Thesecase of EST-coaps, the same operations can beregistered eitherperformed during the DTLS handshake. For DTLS 1.2, in theExpert Review range (0-255) or IETF Review range (256-9999). 1. * application/pkcs7-mime * Type name: application * Subtype name: pkcs7-mime * ID: TBD1 * Required parameters: None * Optional parameters: None * Encoding considerations: binary * Security considerations: As definedevent of handshake message fragmentation, the Hash of the handshake messages used inthis specification * Published specification: [RFC5751] * Applications that use this media type: EST 2. * application/pkcs8 * Type name: application * Subtype name: pkcs8 * ID: TBD2 * Required parameters: None * Optional parameters: None * Encoding considerations: binarythe MAC calculation of the Finished message PRF(master_secret, finished_label, Hash(handshake_messages)) [0..verify_data_length-1]; MUST be computed as if each handshake message had been sent as a single fragment [RFC6347]. Similarly, for DTLS 1.3, the Finished message HMAC(finished_key, Transcript-Hash(Handshake Context, Certificate*, CertificateVerify*)) *Security considerations: As definedOnly included if present. MUST be computed as if each handshake message had been sent as a single fragment following the algorithm described inthis specification * Published specification: [RFC5958] * Applications that use this media type:4.4.4 of [I-D.ietf-tls-tls13]. In a constrained CoAP environment, endpoints can't afford to establish a DTLS connection for every EST3. * application/csrattrs * Type name: application * Subtype name: csrattrs * ID: TBD3 *transaction. Authenticating and negotiating DTLS keys requires resources on low- end endpoints and consumes valuable bandwidth. The DTLS connection SHOULD remain open for persistent EST connections. For example, an EST cacerts request that is followed by a simpleenroll request can use the same authenticated DTLS connection. Given that after a successful enrollment, it is more likely that a new EST transaction will take place after a significant amount of time, the DTLS connections SHOULD only be kept alive for EST messages that are relatively close to each other. In some cases, such as NAT rebinding, keeping the state of a connection is not possible when devices sleep for extended periods of time. In such occasions, [I-D.rescorla-tls-dtls-connection-id] negotiates a connection ID that can eliminate the need for new handshake and its additional cost. Support for Observe CoAP options [RFC7641] is compulsory. The necessity of Observer for long delays (minutes - hours)is explained in Section 4.4. Observe options could also be used by the server to notify clients about a change in the cacerts or csr attributes (resources) and might be an area of future work. 7. HTTPS-CoAPS Registrar In real-world deployments, the EST server will not always reside within the CoAP boundary. The EST-server can exist outside the constrained network in a non-constrained network that supports TLS/ HTTP. In such environments EST-coaps is used by the client within the CoAP boundary and TLS is used to transport the EST messages outside the CoAP boundary. A Registrar at the edge is required to operate between the CoAP environment and the external HTTP network. The EST coaps-to-HTTPS Registrar MUST terminate EST-coaps and authenticate the client downstream and initiate EST connections over TLS upstream. The Registrar SHOULD authenticate the client downstream and it should be authenticated by the EST server or CA upstream. The Registration Authority (re-)creates the secure connection from DTLS to TLS and vice versa. A trust relationship SHOULD be pre-established between the Registrar and the EST servers to be able to proxy these connections on behalf of various clients. When enforcing Proof-of-Possession (POP), the (D)TLS tls-unique value of the (D)TLS session needs to be used to prove that the private key corresponding to the public key is in the possession of and can be used by an end-entity or client. In other words, the CSR the client is using needs to include information from the DTLS connection the client establishes with the server. In EST, that information is the (D)TLS tls-unique value of the (D)TLS session. In the presence of ESTcoaps-to-HTTPS Registrar, the EST-coaps client MUST be authenticated and authorized by the Registrar and the Registrar MUST be authenticated as an EST Registrar client to the EST server. Thus the POP information is lost between the EST-coaps client and the EST server. The EST server becomes aware of the presence of an EST Registrar from its TLS client certificate that includes id-kp-cmcRA [RFC6402] extended key usage extension. As explained in Section 3.7 of [RFC7030], the EST server SHOULD apply an authorization policy consistent with a Registrar client. For example, it could be configured to accept POP linking information that does not match the current TLS session because the authenticated EST client Registrar has verified this information when acting as an EST server. One possible use-case, shown in one figure below, is expected to be deployed in practice: Constrained Network .---------. .----------------------------. | CA | |.--------------------------.| '---------' || || | || || .------. HTTP .-----------------. CoAPS .-----------. || | EST |<------->|ESTcoaps-to-HTTPS|<-------->| EST Client| || |Server|over TLS | Registrar | '-----------' || '------' '-----------------' || || || |'--------------------------'| '----------------------------' ESTcoaps-to-HTTPS Registrar at the CoAP boundary. Table 1 contains the URI mapping between the EST-coaps and EST the Registrar SHOULD adhere to. Section 7 of [RFC8075] and Section 4.3 define the mapping between EST-coaps and HTTP response codes, that determines how the Registrar translates CoAP response codes from/to HTTP status codes. The mapping from Content-Type to media type is defined in Section 9. The conversion from CBOR major type 2 to base64 encoding needs to be done in the Registrar. Conversion is possible because a TLS link exists between EST-coaps-to-HTTP Registrar and EST server and a corresponding DTLS link exists between EST-coaps-to-HTTP Registrar and EST client. Due to fragmentation of large messages into blocks, an EST-coaps-to- HTTP Registrar SHOULD reassemble the BLOCKs before translating the binary content to Base-64, and consecutively relay the message upstream. For the discovery of the EST server by the EST client in the coap environment, the EST-coaps-to-HTTP Registrar MUST announce itself according to the rules of Section 5. The available actions of the Registrars MUST be announced with as many resource paths. The discovery of EST server in the http environment follow the rules specified in [RFC7030]. When server-side key generation is used, if the private key is protected using symmetric keys then the Registrar needs to encrypt the private key down to the client with one symmetric key and decrypt it from the server with another. If no private key encryption takes place the Registrar will be able to see the key as it establishes a separate connection to the server. In the case of asymmetrically encrypted private key, the Registrar may not be able to decrypt it if the server encrypted it with a public key that corresponds to a private key that belongs to the client. 8. Parameters [EDNOTE: This section to be populated. It will address transmission parameters described in sections 4.7 and 4.8 of the CoAP draft. EST does not impose any unique parameters that affect the CoAP parameters in Table 2 and 3 in the CoAP draft but the ones in CoAP could be affecting EST. For example, the processing delay of CAs could be less then 2s, but in this case they should send a CoAP ACK every 2s while processing.] 9. IANA Considerations 9.1. Media-Type Registry This section registers the 'application/multict' media type in the "Media Types" registry. This media type is used to indicate that the payload is composed of multiple content formats. Type name: application Subtype name: multict Required parameters:None *none Optional parameters:None *none Encoding considerations: CBOR array of content-format. Security considerations: See Security Considerations Section Interoperability considerations: The format is designed to be broadly interoperable. Published specification: THIS RFC <xref target="cborpair"/>. Applications that use this media type: ACE, ANIMA, 6tisch, and other low-resource EST applications. Additional information: Magic number(s): None File extension(s): .cbor Macintosh file type code(s): none Person & email address to contact for further information: IETF ACE WG Intended usage: LIMITED Restrictions on usage: NONE Author: ACE WG Change controller: IETF Provisional registration? (standards tree only): NO 9.2. Content-Format Registry Additions to the sub-registry "CoAP Content-Formats", within the "CoRE Parameters" registry are specified in Table 2. These can be registered either in the Expert Review range (0-255) or IETF Review range (256-9999). +---------------------------------+----------+------+---------------+ | Media type | Encoding | ID | Reference | +---------------------------------+----------+------+---------------+ | application/pkcs7-mime; smime- | - | TBD1 | [RFC5751] | | type=server-generated-key | | | [RFC7030] | | application/pkcs7-mime; smime- | - | TBD2 | [RFC5751] | | type=certs-only | | | | | application/pkcs7-mime; smime- | - | TBD3 | [RFC5751] | | type=CMC-request | | | [RFC5273] | | application/pkcs7-mime; smime- | - | TBD4 | [RFC5751] | | type=CMC-response | | | [RFC5273] | | application/pkcs8 | - | TBD5 | [RFC5751] | | | | | [RFC5958] | | application/csrattrs | - | TBD6 | [RFC7030] | | | | | [RFC7231] | | application/pkcs10 | - | TBD7 | [RFC5751] | | | | | [RFC5967] | | application/multict | - | TBD8 | Section 9.2.1 | +---------------------------------+----------+------+---------------+ Table 2: New CoAP Content-Formats 9.2.1. Content Format application/multict A representation with content format ID TBD8 contains a collection of representations along with their respective content format. The collection is encoded as a CBOR array [RFC7049] with an even number of elements. The second, fourth, sixth, etc. element is a binary* Security considerations: As definedstring containing a representation. The first, third, fifth, etc. element is an unsigned integer specifying the content format ID of the following representation. For example, a collection containing two representations, one with content format ID TBD5 and one with content format ID TBD2, looks like this in diagnostic CBOR notation: [TBD5,h'0123456789abcdef',TBD2,h'fedcba9876543210']. An example is shown in Appendix A.4. [EDNOTE: the intention is that thisspecification * Published specification:text is replaced by draft- fossati-core-multipart-ct, which has yet to be adopted. The above text is a copy of the critical text, in the event that the CORE WG does not adopt the document] 9.3. Resource Type registry Additions to the sub-registry "CoAP Resource Type", within the "CoRE Parameters" registry are needed for a new resource type. o rt="ace.est" needs registration with IANA. 10. Security Considerations 10.1. EST server considerations The security considerations of Section 6 of [RFC7030]* Applicationsare only partially valid for the purposes of this document. As HTTP Basic Authentication is not supported, the considerations expressed for using passwords do not apply. Given that the client has only limited resources and may not be able to generate sufficiently random keys to encrypt its identity, it is possible that the client uses server generated private/public keys to encrypt its certificate. The transport of these keys is inherently risky. A full probability analysis MUST be done to establish whether server side key generation enhances or decreases the probability of identity stealing. When a client uses the Implicit TA database for certificate validation, the client cannot verify thatuse this media type:the implicit database can act as an RA. It is RECOMMENDED that such clients include "Linking Identity and POP Information" Section 6 in requests (to prevent such requests from being forwarded to a real EST4. * application/pkcs10 * Type name: application * Subtype name: pkcs10 * ID: TBD4 * Required parameters: None * Optional parameters: None * Encoding considerations: binary * Security considerations: As definedserver by a man inthis specification * Published specification: [RFC5967] * Applicationsthe middle). It is RECOMMENDED thatuse this media type:the Implicit Trust Anchor database used for EST8.2. Resource Type registry Additionsserver authentication be carefully managed to reduce thesub-registry "CoAP Resource Type", within the "CoRE Parameters" registry are needed forchance of anew resource type. o rt="ace.est" needs registrationthird-party CA withIANA. 9. Security Considerations 9.1. proxy considerations The proxy proposedpoor certification practices from being trusted. Disabling the Implicit Trust Anchor database after successfully receiving the Distribution of CA certificates response (Section 4.1.3 of [RFC7030]) limits any risk to the first DTLS exchange. In accordance with [RFC7030], TLS cipher suites that include "_EXPORT_" and "_DES_" inSection 6 musttheir names MUST NOT bedeployed with great care,used. More information about recommendations of TLS andonly when the recommended connectionsDTLS areimpossible. [EDNOTE: To add more details about trust relations through proxiesincluded inthis section. ] 9.2. EST server considerations[RFC7525]. As described in CMC, Section 6.7 of [RFC5272], "For keys that can be used as signature keys, signing the certification request with the private key serves as a POP on that key pair". Thesecurity considerations of section 6inclusion of[RFC7030] are only partially valid fortls- unique in thepurposes of this document. As HTTP Basic Authentication is not supported,certification request links theconsiderations expressed for using passwords doproof-of-possession to the TLS proof-of-identity. This implies but does notapply. Givenprove that the authenticated client currently hasonly limited resources andaccess to the private key. Regarding the Certificate Signing Request (CSR), an adversary could exclude attributes that a server may want, include attributes that a server may not want, and render meaningless other attributes that a server may want. The CA is expected to be able togenerate sufficiently random keysenforce policies toencrypt its identity, it is possible thatrecover from improper CSR requests. Interpreters of ASN.1 structures should be aware of theclient uses server generated private/public keysuse of invalid ASN.1 length fields and should take appropriate measures toencrypt its certificate.guard against buffer overflows, stack overruns in particular, and malicious content in general. 10.2. HTTPS-CoAPS Registrar considerations Thetransport of these keys is inherently risky. A full probability analysis MUSTRegistrar proposed in Section 7 must bedone to establish whether server side key generation enhances or decreasesdeployed with care, and only when theprobability of identity stealing.recommended connections are impossible. Whena client uses the Implicit TA database for certificate validation, the client cannot verify that the implicit data base can act as an RA. It is RECOMMENDED that such clients include "Linking Identity andPOPInformation" Section 5 in requests (to prevent such requests from being forwarded to a real EST server byis used the Registrar terminating the TLS connection establishes aman innew one with themiddle). Itupstream CA. Thus, it isRECOMMENDED that the Implicit Trust Anchor database usedimpossible for POP to be enforced throughout the EST transaction. The EST serverauthenticationcould becarefully managedconfigured toreduceaccept POP linking information that does not match thechancecurrent TLS session because the authenticated EST Registrar client has verified this information when acting as an EST server. The introduction ofa third-party CA with poor certification practices from being trusted. Disablingan EST-coaps-to-HTTP Registrar assumes theImplicit Trust Anchor database after successfully receivingclient can trust theDistribution of CA certificates response (Section 4.1.3 of [RFC7030]) limits any vulnerability toregistrar using its implicit or explicit TA database. It also assumes thefirst DTLS exchange. In accordanceRegistrar has a trust relationship with[RFC7030], TLS cipher suites that include "_EXPORT_" and "_DES_" in their names MUST NOT be used. More information about recommendations of TLS and DTLS are included in [RFC7525]. As describedthe upstream EST server inCMC, Section 6.7order to act on behalf of[RFC5272], "For keys that can be used as signature keys, signingthecertification request withclients. In a server-side key generation case, depending on the private keyservesencryption method, the Registrar may be able see the private key as it acts as aPOPman-in-the-middle. Thus, the clients puts its trust on the Registrar not exposing the private key. For some use cases, clients that leverage server-side keypair". The inclusion of tls- unique in the certification request linksgeneration might prefer for theproof-of-possessionenrolled keys to be generated by theTLS proof-of-identity. This implies butRegistrar if the CA does notprove thatsupport server-side key generation. In these cases the Registrar must support the random number generation using proper entropy. Since theauthenticatedclientcurrentlyhasaccess tono knowledge if theprivate key. RegardingRegistrar will be generating the keys and enrolling theCSR attributes thatcertificates with the CAmay list for inclusion in an enrollment request, an adversary could exclude attributes that a server may want, include attributes that a server may not want, and render meaningless other attributes that a server may want. Theor if the CAis expected to be able to enforce policies to recover from improper CSR requests. Interpreters of ASN.1 structures shouldwill beaware ofresponsible for generating theusekeys, the existence ofinvalid ASN.1 length fields and should take appropriate measuresa Registrar requires the client toguard against buffer overflows, stack overruns in particular, and malicious content in general. 10.put its trust on the registrar doing the right thing if it is generating they private keys. 11. Acknowledgements The authors are very grateful to Klaus Hartke for his detailed explanations on the use of Block withDTLS.DTLS and his support for the content-format specification. The authors would like to thank Esko Dijk and Michael Verschoor for the valuable discussions that helped in shaping the solution. They would also like to thank Peter Panburana from Cisco for his feedback on technical details of the solution. Constructive comments were received from Benjamin Kaduk, Eliot Lear, Jim Schaad, Hannes Tschofenig, and Julien Vermillard.11.12. Change Log-00:-01: Editorials done. Redefinition of proxy to Registrar in Section 7. Explained better the role of https-coaps Registrar, instead of "proxy" Provide "observe" option examples inserted new server key generation text in Section 4.5 and motivated server key generation. Broke down details for DTLS 1.3 New media type uses CBOR array for multiple content-format payloads provided new content format tables new media format for IANA -00 copied fromvanderstok-ace-coap-est-04 12.vanderstok-ace-coap-04 13. References12.1.13.1. Normative References [I-D.ietf-tls-tls13] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", draft-ietf-tls-tls13-28 (work in progress), March 2018. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>. [RFC5272] Schaad, J. and M. Myers, "Certificate Management over CMS (CMC)", RFC 5272, DOI 10.17487/RFC5272, June 2008, <https://www.rfc-editor.org/info/rfc5272>. [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Message Specification", RFC 5751, DOI 10.17487/RFC5751, January 2010, <https://www.rfc-editor.org/info/rfc5751>. [RFC5967] Turner, S., "The application/pkcs10 Media Type", RFC 5967, DOI 10.17487/RFC5967, August 2010, <https://www.rfc-editor.org/info/rfc5967>. [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, January 2012, <https://www.rfc-editor.org/info/rfc6347>. [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, <https://www.rfc-editor.org/info/rfc6690>. [RFC7030] Pritikin, M., Ed., Yee, P., Ed., and D. Harkins, Ed., "Enrollment over Secure Transport", RFC 7030, DOI 10.17487/RFC7030, October 2013, <https://www.rfc-editor.org/info/rfc7030>. [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, October 2013, <https://www.rfc-editor.org/info/rfc7049>. [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained Application Protocol (CoAP)", RFC 7252, DOI 10.17487/RFC7252, June 2014, <https://www.rfc-editor.org/info/rfc7252>. [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in the Constrained Application Protocol (CoAP)", RFC 7959, DOI 10.17487/RFC7959, August 2016, <https://www.rfc-editor.org/info/rfc7959>. [RFC8075] Castellani, A., Loreto, S., Rahman, A., Fossati, T., and E. Dijk, "Guidelines for Mapping Implementations: HTTP to the Constrained Application Protocol (CoAP)", RFC 8075, DOI 10.17487/RFC8075, February 2017, <https://www.rfc-editor.org/info/rfc8075>.12.2.13.2. Informative References[I-D.hartke-core-pending] Stok, P. and K. Hartke, ""Pending" Responses for the Constrained Application Protocol (CoAP)", draft-hartke- core-pending-02 (work in progress), February 2018. [I-D.ietf-6tisch-dtsecurity-secure-join] Richardson, M., "6tisch Secure Join protocol", draft-ietf- 6tisch-dtsecurity-secure-join-01 (work in progress), February 2017. [I-D.ietf-6tisch-minimal-security] Vucinic, M., Simon, J., Pister, K.,[I-D.rescorla-tls-dtls-connection-id] Rescorla, E., Tschofenig, H., Fossati, T., andM. Richardson, "MinimalT. Gondrom, "The Datagram Transport Layer SecurityFramework for 6TiSCH", draft-ietf- 6tisch-minimal-security-04(DTLS) Connection Identifier", draft-rescorla-tls-dtls-connection-id-02 (work in progress),OctoberNovember 2017.[I-D.ietf-anima-bootstrapping-keyinfra] Pritikin, M., Richardson, M., Behringer, M., Bjarnason, S., and K. Watsen, "Bootstrapping Remote Secure Key Infrastructures (BRSKI)", draft-ietf-anima-bootstrapping- keyinfra-11 (work in progress), February 2018. [ieee802.15.4] Institute of Electrical and Electronics Engineers, "IEEE Standard 802.15.4-2006", 2006.[RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, DOI 10.17487/RFC0791, September 1981, <https://www.rfc-editor.org/info/rfc791>. [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS)", RFC 4492, DOI 10.17487/RFC4492, May 2006, <https://www.rfc-editor.org/info/rfc4492>. [RFC4919] Kushalnagar, N., Montenegro, G., and C. Schumacher, "IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals", RFC 4919, DOI10.17487/RFC4919, August 2007, <https://www.rfc-editor.org/info/rfc4919>. [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, "Transmission of IPv6 Packets over IEEE 802.15.4 Networks", RFC 4944, DOI 10.17487/RFC4944, September10.17487/RFC4919, August 2007,<https://www.rfc-editor.org/info/rfc4944>.<https://www.rfc-editor.org/info/rfc4919>. [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008, <https://www.rfc-editor.org/info/rfc5246>. [RFC5273] Schaad, J. and M. Myers, "Certificate Management over CMS (CMC): Transport Protocols", RFC 5273, DOI 10.17487/RFC5273, June 2008, <https://www.rfc-editor.org/info/rfc5273>. [RFC5705] Rescorla, E., "Keying Material Exporters for Transport Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, March 2010, <https://www.rfc-editor.org/info/rfc5705>. [RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings for TLS", RFC 5929, DOI 10.17487/RFC5929, July 2010, <https://www.rfc-editor.org/info/rfc5929>. [RFC5958] Turner, S., "Asymmetric Key Packages", RFC 5958, DOI 10.17487/RFC5958, August 2010, <https://www.rfc-editor.org/info/rfc5958>. [RFC6090] McGrew, D., Igoe, K., and M. Salter, "Fundamental Elliptic Curve Cryptography Algorithms", RFC 6090, DOI 10.17487/RFC6090, February 2011, <https://www.rfc-editor.org/info/rfc6090>. [RFC6402] Schaad, J., "Certificate Management over CMS (CMC) Updates", RFC 6402, DOI 10.17487/RFC6402, November 2011, <https://www.rfc-editor.org/info/rfc6402>. [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, DOI 10.17487/RFC7230, June 2014, <https://www.rfc-editor.org/info/rfc7230>. [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 10.17487/RFC7231, June 2014, <https://www.rfc-editor.org/info/rfc7231>. [RFC7251] McGrew, D., Bailey, D., Campagna, M., and R. Dugal, "AES- CCM Elliptic Curve Cryptography (ECC) Cipher Suites for TLS", RFC 7251, DOI 10.17487/RFC7251, June 2014, <https://www.rfc-editor.org/info/rfc7251>. [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, "Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 2015, <https://www.rfc-editor.org/info/rfc7525>. [RFC7641] Hartke, K., "Observing Resources in the Constrained Application Protocol (CoAP)", RFC 7641, DOI 10.17487/RFC7641, September 2015, <https://www.rfc-editor.org/info/rfc7641>. [RFC7925] Tschofenig, H., Ed. and T. Fossati, "Transport Layer Security (TLS) / Datagram Transport Layer Security (DTLS) Profiles for the Internet of Things", RFC 7925, DOI 10.17487/RFC7925, July 2016, <https://www.rfc-editor.org/info/rfc7925>. Appendix A. EST messages to EST-coaps This section takes all examples from Appendix A of [RFC7030], changes the payload from Base64 to binary and replaces the http headers by their CoAP equivalents. The corresponding CoAP headers are only shown in Appendix A.1. Creating CoAP headers are assumed to be generally known. Binary payload is a CBOR major type 2 (byte array), that is shown with a base16 (hexadecimal) CBOR diagnostic notation. [EDNOTE: The payloads of the examples need to be re-generated with appropriate tools and example certificates.] A.1. cacerts These examples assume that the resource discovery, returned a short URL of "/est". In EST-coaps, a coaps cacerts IPv4 message can be: GETcoaps://[192.0.2.1:8085]/est/crtscoaps://192.0.2.1:8085/est/crts The corresponding CoAP header fields are shown below. The use of block and DTLS are worked out in AppendixC.B. Ver = 1 T = 0 (CON) Code = 0x01 (0.01 is GET) Token = 0x9a (client generated) Options Option1 (Uri-Host) [optional] Option Delta = 0x3 (option nr = 3) Option Length = 0x9 Option Value = 192.0.2.1 Option2 (Observe) Option Delta = 0x1 (option nr = 3+3=6) Option Length = 0x1 Option Value = 0 (register) Option3 (Uri-Port) [optional] Option Delta =0x40x1 (option nr =4+3=7)6+1=7) Option Length = 0x4 Option Value = 8085Option3Option4 (Uri-Path) Option Delta = 0x4 (option nr = 7+4= 11) Option Length =0x90x5 Option Value = "est" Option5 (Uri-Path) Option Delta = 0x0 (option nr = 11+0= 11) Option Length = 0x6 Option Value = "crts" Option6 (Max-Age) Option Delta = 0x3 (option nr = 11+3= 14) Option Length = 0x1 Option Value =/est/crts0x1 (1 minute) Payload = [Empty] A 2.05 Content response with a cert in EST-coaps will then be: 2.05 Content (Content-Format:application/pkcs7-mime)TBD2) {payload} with CoAP fields Ver = 1 T = 2 (ACK) Code = 0x45 (2.05 Content) Token = 0x9a (copied by server) Options Option1 (Observe) Option Delta = 0x6 (option nr =6) Option Length = 0x1 Option Value = 12 ( 12 > 0) Option2 (Content-Format) Option Delta = 0xC (option nr =12)6+6 =12) Option Length = 0x2 Option Value =TBD1TBD2 (defined in this document) Payload =30233906092a6206734107028c2a3023260201013100300b06092a6206734107018h'30233906092a6206734107028c2a3023260201013100300b06092a6206734107018 c0c3020bb302063c20102020900a61e75193b7acc0d06092a620673410105050030 1b31193017060355040313106573744578616d706c654341204f774f301e170d313 3303530393033353333315a170d3134303530393033353333315a301b3119301706 0355040313106573744578616d706c654341204f774f302062300d06092a6206734 10101050003204f0030204a022041003a923a2968bae4aae136ca4e2512c5200680 358482ac39d6f640e4574e654ea35f48b1e054c5da3372872f7a1e429f4edf39584 32efb2106591d3eb783c1034709f251fc86566bda2d541c792389eac4ec9e181f4b 9f596e5ef2679cc321542b11337f90a44df3c85f1516561fa968a1914f265bc0b82 76ebe3106a790d97d34c8c37c74fe1c30b396424664ac426284a9f6022e02693843 6880adfcd95c98ca1dfc2e6d75319b85d0458de28a9d13fb16d620fff7541f6a25d 7daf004355020301000130b040300f0603551d130101f10530030101fc1d0603551 d0e04160414084d321ca0135e77217a486b686b334b00e0603551d0f0101f104030 20106300d06092a62067341010505000320410023703b965746a0c2c978666d787a 94f89b495a11f0d369b28936ec2475c0f0855c8e83f823f2b871a1d92282f323c45 904ba008579216cf5223b8b1bc425a0677262047f7700240631c17f3035d1c3780b 2385241cba1f4a6e98e6be6820306b3a786de5a557795d1893822347b5f825d34a7 ad2876f8feba4d525b31066f6505796f71530003431a3e6bbfe788b4565029a7e20 a51107677552586152d051e8eebf383e92288983421d5c5652a4870c3af74b9bdbe d6b462e2263d30f6d3020c330206bc20102020101300d06092a6206734101050500 301b31193017060355040313106573744578616d706c654341204f774f301e170d3 133303530393033353333325a170d3134303530393033353333325a301b31193017 060355040313106573744578616d706c654341204e774f302062300d06092a62067 3410101050003204f0030204a02204100ef6b677a3247c1fc03d2b9baf113e5e7e1 1f49e0421120e6b8384160f2bf02630ef544d5fd0d5623b35713c79a7229283a790 8751a634aa420a3e2a4b1f10519d046f02f5a5dd6d760c2a842356e067b7bd94338 d1faa3b3ddd4813060a207b0a097067007e45b052b60fdbae4656e11562c4f5abb7 b0cf87a79d221f1127313c53371ce1245d63db45a1203a23340ba08042c768d03b8 076a028d3a51d87d2ef107bbd6f2305ce5e67668724002fb726df9c14476c37de0f 55033f192a5ad21f9a2a71c20301000134b050300e0603551d0f0101f104030204c 1d0603551d0e04160414112966e304761732fbfe6a2c823c301f0603551d2304183 0165084d321ca0135e77217a486b686b334b00d06092a6206734101050500032041 00b382ba3355a50e287bae15758b3beff63d34d3e357b90031495d018868e49589b 9faf46a4ad49b1d35b06ef380106677440934663c2cc111c183655f4dc41c0b3401 123d35387389db91f1e1b4131b16c291d35730b3f9b33c7475124851555fe5fc647 e8fd029605367c7e01281bf6617110021b0d10847dce0e9f0ca6c764b6334784055 172c3983d1e3a3a82301a54fcc9b0670c543a1c747164619101ff23b240b2a26394 c1f7d38d0e2f4747928ece5c34627a075a8b3122011e9d9158055c28f020c330206 bc20102020102300d06092a6206734101050500301b311930170603550403131065 73744578616d706c654341204e774e301e170d3133303530393033353333325a170 d3134303530393033353333325a301b31193017060355040313106573744578616d 706c654341204f774e302062300d06092a620673410101050003204f0030204a022 041003a923a2968bae4aae136ca4e2512c5200680358482ac39d6f640e4574e654e a35f48b1e054c5da3372872f7a1e429f4edf3958432efb2106591d3eb783c103470 9f251fc86566bda2d541c792389eac4ec9e181f4b9f596e5ef2679cc321542b1133 7f90a44df3c85f1516561fa968a1914f265bc0b8276ebe3106a790d97d34c8c37c7 4fe1c30b396424664ac426284a9f6022e026938436880adfcd95c98ca1dfc2e6d75 319b85d0458de28a9d13fb16d620fff7541f6a25d7daf004355020301000134b050 300e0603551d0f0101f104030204c1d0603551d0e04160414084d321ca0135e7721 7a486b686b334b01f0603551d230418301653112966e304761732fbfe6a2c823c30 0d06092a6206734101050500032041002e106933a443070acf5594a3a584d08af7e 06c295059370a06639eff9bd418d13bc25a298223164a6cf1856b11a81617282e4a 410d82ef086839c6e235690322763065455351e4c596acc7c016b225dec094706c2 a10608f403b10821984c7c152343b18a768c2ad30238dc45dd653ee6092b0d5cd4c 2f7d236043269357f76d13f95fb5f00d0e19263c6833948e1ba612ce8197af650e2 5d882c12f4b6b9b67252c608ef064aca3f9bc867d71172349d510bb7651cd438837 73d927deb41c4673020bb302063c201020209009b9dda3324700d06092a62067341 01050500301b31193017060355040313106573744578616d706c654341204e774e3 01e170d3133303530393033353333325a170d3134303530393033353333325a301b 31193017060355040313106573744578616d706c654341204e774e302062300d060 92a620673410101050003204f0030204a02204100ef6b677a3247c1fc03d2b9baf1 13e5e7e11f49e0421120e6b8384160f2bf02630ef544d5fd0d5623b35713c79a722 9283a7908751a634aa420a3e2a4b1f10519d046f02f5a5dd6d760c2a842356e067b 7bd94338d1faa3b3ddd4813060a207b0a097067007e45b052b60fdbae4656e11562 c4f5abb7b0cf87a79d221f1127313c53371ce1245d63db45a1203a23340ba08042c 768d03b8076a028d3a51d87d2ef107bbd6f2305ce5e67668724002fb726df9c1447 6c37de0f55033f192a5ad21f9a2a71c20301000130b040300f0603551d130101f10 530030101fc1d0603551d0e04160414112966e304761732fbfe6a2c823c300e0603 551d0f0101f10403020106300d06092a620673410105050003204100423f06d4b76 0f4b42744a279035571696f272a0060f1325a40898509601ad14004f652db6312a1 475c4d7cd50f4b269035585d7856c5337765a66b38462d5bdaa7778aab24bbe2815 e37722cd10e7166c50e75ab75a1271324460211991e7445a2960f47351a1a629253 34119794b90e320bc730d6c1bee496e7ac125ce9a1eca595a3a4c54a865e6b623c9 247bfd0a7c19b56077392555c955e233642bec643ae37c166c5e221d797aea3748f0391c8d692a5cf9bb71f6d0e37984d6fa673a30d0c006343116f584031000391c8d692a5cf9bb71f6d0e37984d6fa673a30d0c006343116f58403100' After reception of the 2.05 response, the client can forget the observe. A.2. csrattrs In the following valid /csrattrs exchange, the EST-coaps client authenticates itself with a certificate issued by the connected CA. The initial DTLS handshake is identical to the enrollment example. The IPv6 CoAP GET request looks like: REQ: GET coaps://[2001:db8::2:1]:61616/est/att (Content-Format: TBD6)(observe =0)(Max-Age =1) A 2.05 Content response contains attributes which are relevant for the authenticated client. In this example, the EST-coaps server returns two attributes that the client can ignore when they are unknown tohim.:him. A.3. enroll / reenroll[EDNOTE: We might need a new Option for the Retry-After response message. We might need a new Option for the WWW-Authenticate response.]During the Enroll/Reenroll exchange, the EST-coaps client uses a CSR(PKCS#10)(Content-Format TBD7) request in the POST request payload. After verification of thecertificateCSR by the server, a 2.05 Content response with the issued certificate will bereturned.returned to the client. As described in Section 4.4, if the server is not able to provide a response, then it ACKs the GET (with no payload), and the payload will be sent later as part of the OBSERVE processing. [EDNOTE: When redoing this example, given that proof of possession (POP) is also used, make sure it is obvious that the ChallengePassword attribute in the CSR is valid HMAC output. HMAC- REAL.] POST [2001:db8::2:1]:61616/est/sen (token 0x45) (Content-Format:application/pkcs10) 30208530206d020100301f311d301b0603550403131464656d6f7374657034203TBD7)(observe 0) h'30208530206d020100301f311d301b0603550403131464656d6f7374657034203 1333638313431333532302062300d06092a620673410101050003204f0030204a 022041005d9f4dffd3c5949f646a9584367778560950b355c35b8e34726dd3764 54231734795b4c09b9c6d75d408311307a81f7adef7f5d241f7d5be85620c5d44 38bbb4242cf215c167f2ccf36c364ea2618a62f0536576369d6304e6a96877224 7d86824f079faac7a6f694cfda5b84c42087dc062d462190c525813f210a036a7 37b4f30d8891f4b75559fb72752453146332d51c937557716ccec624f5125c3a4 447ad3115020048113fef54ad554ee88af09a2583aac9024075113db4990b1786 b871691e0f02030100018701f06092a620673410907311213102b72724369722f 372b45597535305434300d06092a620673410105050003204100441b40177a3a6 5501487735a8ad5d3827a4eaa867013920e2afcda87aa81733c7c0353be47e1bf a7cda5176e7ccc6be22ae03498588d5f2de3b143f2b1a6175ec544e8e7625af6b 836fd4416894c2e55ea99c6606f69075d6d53475d410729aa6d806afbb9986caf 7b844b5b3e4545f19071865ada007060cad6db26a592d4a7bda7d586b68110962 17071103407553155cddc75481e272b5ed553a8593fb7e25100a6f7605085dab4fc7e0731f0e7fe305703791362d5157e92e6b5c2e3edbcadb40fc7e0731f0e7fe305703791362d5157e92e6b5c2e3edbcadb40' RET:2.05 Content(Content-Format:application/pkcs7-mime) 3020f806092a62067341070283293020e50201013100300b06092a62067341070TBD2)(token =0x45)(observe =12) 2.01 Created h'3020f806092a62067341070283293020e50201013100300b06092a62067341070 1830b3020c730206fc20102020115300d06092a6206734101050500301b311930 17060355040313106573744578616d706c654341204e774e301e170d313330353 0393233313535335a170d3134303530393233313535335a301f311d301b060355 0403131464656d6f73746570342031333638313431333532302062300d06092a6 20673410101050003204f0030204a022041005d9f4dffd3c5949f646a95843677 78560950b355c35b8e34726dd376454231734795b4c09b9c6d75d408311307a81 f7adef7f5d241f7d5be85620c5d4438bbb4242cf215c167f2ccf36c364ea2618a 62f0536576369d6304e6a968772247d86824f079faac7a6f694cfda5b84c42087 dc062d462190c525813f210a036a737b4f30d8891f4b75559fb72752453146332 d51c937557716ccec624f5125c3a4447ad3115020048113fef54ad554ee88af09 a2583aac9024075113db4990b1786b871691e0f020301000134b050300e060355 1d0f0101f104030204c1d0603551d0e04160414e81d0788aa2710304c5ecd4d1e 065701f0603551d230418301653112966e304761732fbfe6a2c823c300d06092a 6206734101050500032041002910d86f2ffeeb914c046816871de601567d291b4 3fabee0f0e8ff81cea27302a7133e20e9d04029866a8963c7d14e26fbe8a0ab1b 77fbb1214bbcdc906fbc381137ec1de685f79406c3e416b8d82f97174bc691637 5a4e1c4bf744c7572b4b2c6bade9fb35da786392ee0d95e3970542565f3886ad6 7746d1b12484bb02616e63302dc371dc6006e431fb7c457598dd204b367b0b3d3 258760a303f1102db26327f929b7c5a60173e1799491b69150248756026b80553171e4733ad3d13c0103100 [EDNOTE: If POP is used, make sure tls-unique171e4733ad3d13c0103100' After reception of the 2.01 response the client can forget the observe registration The same example when delays occur (omitting the payloads in theCSRexamples) has a different behavior. The response to the POST is an empty payload with response code 2.01 (Created) that also returns the resource to query. The client issues avalid HMAC output. ]GET with an observe and a new token value, and waits for the notification after possibly receiving an empty payload first. POST [2001:db8::2:1]:61616/est/sen (token 0x45)(observe = 0) (Content-Format: TBD7)(Max-Age=120) [payload] RET: (token =0x45)(observe =12)(Location-Path=/est/1245) 2.01 Created [empty payload] GET [2001:db8::2:1]:61616/est/1245 (token 0x53) (observe =0)(Max-Age=120) RET: (token =0x53)(observe = 5) 2.01 Created [empty payload] RET: (token =0x53)(observe = 6) (Content-Format: TBD2) 2.04 Changed [payload] A.4. serverkeygen During this valid /serverkeygen exchange, the EST-coaps client authenticates itself using the certificate provided by the connected CA.[EDNOTE: the client incudes a CSR with a public key that the server should ignore, so we need a content-format here. ] [EDNote: If POP is used, make sure tls-unique in the CSR is a valid HMAC output. ]The initial DTLS handshake is identical to the enrollment example. The CoAP GET request looks like: [EDNOTE: same comment as HMAC-REAL above applies.] [EDNOTE: Suggestion to have only one example with complete encrypted payload (the short one) and point out the different fields. Update this example according to the agreed upon solution from Section 4.5. ] POSTcoaps://[192.0.2.1:8085]/est/skg 302081302069020100305b313e303c060355040313357365727665724b6579476coaps://192.0.2.1:8085/est/skg (token 0xa5)(observe = 0) (Content-Format: TBD7)(Max-Age=120) h'302081302069020100305b313e303c060355040313357365727665724b6579476 56e2072657120627920636c69656e7420696e2064656d6f207374657020313220 3133363831343139353531193017060355040513105049443a576964676574205 34e3a3130302062300d06092a620673410101050003204f0030204a02204100f4 dfa6c03f7f2766b23776c333d2c0f9d1a7a6ee36d01499bbe6f075d1e38a57e98 ecc197f51b75228454b7f19652332de5e52e4a974c6ae34e1df80b33f15f47d3b cbf76116bb0e4d3e04a9651218a476a13fc186c2a255e4065ff7c271cff104e47 31fad53c22b21a1e5138bf9ad0187314ac39445949a48805392390e78c7659621 6d3e61327a534f5ea7721d2b1343c7362b37da502717cfc2475653c7a3860c5f4 0612a5db6d33794d755264b6327e3a3263b149628585b85e57e42f6b3277591b0 2030100018701f06092a6206734109073112131064467341586d4a6e6a6f6b427 4447672300d06092a620673410105050003204100472d11007e5a2b2c2023d47a 6d71d046c307701d8ebc9e47272713378390b4ee321462a3dbe54579f5a514f6f 4050af497f428189b63655d03a194ef729f101743e5d03fbc6ae1e84486d1300a f9288724381909188c851fa9a5059802eb64449f2a3c9e441353d136768da27ff 4f277651d676a6a7e51931b08f56135a2230891fd184960e1313e7a1a9139ed19 28196867079a456cd2266cb754a45151b7b1b939e381be333fea61580fe5d25bf4823dbd2d6a98445b46305c10637e2028566114823dbd2d6a98445b46305c10637e202856611' RET:2.052.01 Content (Content-Format:application/pkcs8) 30213e020100300d06092a6206734101010500042128302124020100022041003TBD8) (observe = 5)(token=0xa5) [TBD5, h'30213e020100300d06092a6206734101010500042128302124020100022041003 c0bc2748f2003e3e8ea15f746f2a71e83f585412b92cf6f8e64de02e056153274 dd01c95dd9cff3112aa141774ab655c3d56359c3b3df055294692ed848e7e30a1 1bf14e47e0693d93017022b4cdb3e6d40325356152b213c8b535851e681a7074c 0c6d2b60e7c32fc0336b28e743eba4e5921074d47195d3c05e43c527526e692d5 45e562578d2d4b5f2191bff89d3eef0222764a2674637a1f99257216647df6704 efec5adbf54dab24231844eb595875795000e673dd6862310a146ad7e31083010 001022041004e6b3f78b7791d6377f33117c17844531c81111fb8000282816264 915565bc7c3f3f643b537a2c69140a31c22550fa97e5132c61b74166b68626704 260620333050f510096b6570f5880e7e1c15dc0ca6ce2b5f187e2325da14ab705 ad004717f3b2f779127b5c535e0cee6a343b502722f2397a26126e0af606b5aa7 f96313511c0b7eb26354f91b82269de62757e3def807a6afdf83ddcbb0614bb7c 542e6975d6456554e7bd9988fbd1930cd44d0e01ee9182ca54539418653150254 1ad1a2a11e5021040bfce554b642c29131e7d65455e83c5406d76771912f758f5 ee3ee36af386f38ffa313c0f661880c5a2b0970485d36f528e7f77a2e55b4ad76 1242d1c2f75939c8061217d31491d305d3e07d6161c43e26f7de4477b1811de92 33dc75b426302104015bf48ac376f52887813461fc54635517bcb67293837053e 8ce1a33da7a35565a75a370dc14555b5316cb55742380350774d769d151ff0456 0214389a232a2258326163167504cfce44cd316f63bb8a52da53a4cb74fd87194 c0844881f791f23b0813ea0921325edd14459d41c8a1593f04316388e40b35fef 7d2a195a5930fa54774427ac821eee2c62790d2c17bd192af794c611011506557 83d4efe22185cbd83368786f2b1e68a5a27067e321066f0217b4b6d7971a3c21a 241366b7907187583b511102103369047e5cce0b65012200df5ec697b5827575c db6821ff299d6a69574b31ddf0fbe9245ea2f74396c24b3a7565067e41366423b 5bdd2b2a78194094dbe333f493d159b8e07722f2280d48388db7f1c9f0633bb0e 173de2c3aa1f200af535411c7090210401421e2ea217e37312dcc606f453a6634 f3df4dc31a9e910614406412e70eec9247f10672a500947a64356c015a845a7d1 50e2e3911a2b3b61070a73247166da10bb45474cc97d1ec2bc392524307f35118f917438f607f18181684376e13a39e07 --estServerExampleBoundary 3020c506092a62067341070283363020f20201013100300b06092a62067341070f917438f607f18181684376e13a39e07', TBD2, h'3020c506092a62067341070283363020f20201013100300b06092a62067341070 183183020d430207cc20102020116300d06092a6206734101050500301b311930 17060355040313106573744578616d706c654341204e774e301e170d313330353 0393233323535365a170d3134303530393233323535365a302c312a3028060355 0403132173657276657273696465206b65792067656e657261746564207265737 06f6e7365302062300d06092a620673410101050003204f0030204a022041003c 0bc2748f2003e3e8ea15f746f2a71e83f585412b92cf6f8e64de02e056153274d d01c95dd9cff3112aa141774ab655c3d56359c3b3df055294692ed848e7e30a11 bf14e47e0693d93017022b4cdb3e6d40325356152b213c8b535851e681a7074c0 c6d2b60e7c32fc0336b28e743eba4e5921074d47195d3c05e43c527526e692d54 5e562578d2d4b5f2191bff89d3eef0222764a2674637a1f99257216647df6704e fec5adbf54dab24231844eb595875795000e673dd6862310a146ad7e310830100 0134b050300e0603551d0f0101f104030204c1d0603551d0e04160414764b1bd5 e69935626e476b195a1a8c1f0603551d230418301653112966e304761732fbfe6 a2c823c300d06092a620673410105050003204100474e5100a9cdaaa813b30f48 40340fb17e7d6d6063064a5a7f2162301c464b5a8176623dfb1a4a484e618de1c 3c3c5927cf590f4541233ff3c251e772a9a3f2c5fc6e5ef2fe155e5e385deb846 b36eb4c3c7ef713f2d137ae8be4c022715fd033a818d55250f4e6077718180755 a4fa677130da60818175ca4ab2af1d15563624c51e13dfdcf381881b72327e2f4 9b7467e631a27b5b5c7d542bd2edaf78c0ac294f3972278996bdf673a334ff74c84aa7d65726310252f6a4f41281ec10ca2243864e3c574310310084aa7d65726310252f6a4f41281ec10ca2243864e3c5743103100'] Without the DecryptKeyIdentifier attribute, the response has no additional encryption beyond DTLS.[EDNOTE: Add comment about deriving symmetric keys by using the TLS KEM draft. ]The response contains first a preamble that can be ignored. The EST- coaps server can use the preamble to include additional explanations, like ownership or support information Appendix B.Encoding for server side key generation Sever side key generation for CoAP can be implemented efficiently using multipart encoding [EDNOTE: text to be written.] Appendix C.EST-coaps Block message examples This section provides a detailed example of the messages using DTLS and BLOCK option Block2. The minimum PMTU is 1280 bytes, which is the example value assumed for the DTLS datagram size. The example block length is taken as 64 which gives an SZX value of 2. The following is an example of a valid /cacerts exchange over DTLS. The content length of the cacerts response in appendix A.1 of [RFC7030] is 4246 bytes using base64. This leads to a length of 2509 bytes in binary. The CoAP message adds around 10 bytes, the DTLS record 29 bytes. To avoid IP fragmentation, the CoAP block option is used and an MTU of 127 is assumed to stay within one IEEE 802.15.4 packet. To stay below the MTU of 127, the payload is split in 39 packets with a payload of 64 bytes each, followed by a packet of 13 bytes. The client sends an IPv6 packet containing the UDP datagram with the DTLS record that encapsulates the CoAP Request 40 times. The server returns an IPv6 packet containing the UDP datagram with the DTLS record that encapsulates the CoAP response. The CoAP request-response exchange with block option is shown below. Block option is shown in a decomposed way indicating the kind of Block option (2 in this case because used in the response) followed by a colon, and then the block number (NUM), the more bit (M = 0 means last block), and block size exponent (2**(SZX+4)) separated by slashes. The Length 64 is used with SZX= 2 to avoid IP fragmentation. The CoAP Request is sent with confirmable (CON) option and the content format of the Response is /application/ cacerts. GET[192.0.2.1:8085]/est/crts/192.0.2.1:8085/est/crts --> <-- (2:0/1/39) 2.05 Content GET URI (2:1/1/39) --> <-- (2:1/1/39) 2.05 Content | | | GET URI (2:65/1/39) --> <-- (2:65/0/39) 2.05 Content For further detailing the CoAP headers of the first two blocks are written out. The header of the first GET looks like: Ver = 1 T = 0 (CON) Code = 0x01 (0.1 GET) Token = 0x9a (client generated) Options Option1 (Uri-Host) [optional] Option Delta = 0x3 (option nr = 3) Option Length = 0x9 Option Value = 192.0.2.1 Option2 (Observe) Option Delta = 0x3 (option nr = 3+3=6) Option Length = 0x1 Option Value = 0 (register) Option3 (Uri-Port) [optional] Option Delta = 0x4 (option nr = 3+4=7) Option Length = 0x4 Option Value = 8085Option3Option4 (Uri-Path) Option Delta = 0x4 (option nr = 7+4=11) Option Length =0x90x5 Option Value = "est" Option5 (Uri-Path) Option Delta = 0x0 (option nr = 11+0=11) Option Length = 0x6 Option Value = "crts" Option6 (Max-Age) Option Delta = 0x3 (option nr = 11+3=14) Option Length = 0x1 Option Value =/est/crts0x1 ( 1 minute) Payload = [Empty] The header of the first response looks like: Ver = 1 T = 2 (ACK) Code = 0x45 (2.05Content.)Content) Token = 0x9a (copied by server) Options Option1 (Observe) Option Delta = 0x6 (option nr=6) Option Length = 0x1 Option Value = 12 (12 > 0) Option2 (Content-Format) Option Delta = 0xC (option12)nr =6+6=12) Option Length = 0x2 Option Value =TBD1TBD2 Option2 (Block2) Option Delta = 0xB (option 23 = 12 + 11) Option Length = 0x1 Option Value = 0x0A (block number = 0, M=1, SZX=2) Payload =30233906092a6206734107028c2a3023260201013100300b06092a6206734107018 c0c3020bb302063c20102020900a61e75193b7acc0d06092a6206734101h'30233906092a6206734107028c2a3023260201013100300b06092a6206734107018 c0c3020bb302063c20102020900a61e75193b7acc0d06092a6206734101' The second Block2: Ver = 1 T = 2 (means ACK) Code = 0x45 (2.05Content.)Content) Token = 0x9a (copied by server) Options Option1 (Observe) Option Delta = 0x6 (option nr=6) Option Length = 0x1 Option Value = 16 (16 > 12) Option2 (Content-Format) Option Delta = 0xC (option12)nr =6+6=12) Option Length = 0x2 Option Value =TBD1TBD2 Option2 (Block2) Option Delta = 0xB (option 23 = 12 + 11) Option Length = 0x1 Option Value = 0x1A (block number = 1, M=1, SZX=2) Payload =05050030h'05050030 1b31193017060355040313106573744578616d706c654341204f774f301e170d3133303530393033353333315a170d3134303530393033353333315a3303530393033353333315a170d3134303530393033353333315a' The 40th and final Block2: Ver = 1 T = 2 (means ACK) Code =0x210x45 (2.05 Content) Token = 0x9a (copied by server) Options Option1 (Observe) Option Delta = 0x6 (option nr=6) Option Length = 0x1 Option Value = 55 (55 > 12) Option2 (Content-Format) Option Delta = 0xC (option12)nr =6+6=12) Option Length = 0x2 Option Value =TBD1TBD2 Option2 (Block2) Option Delta = 0xB (option 23 = 12 + 11) Option Length = 0x2 Option Value = 0x272 (block number = 39, M=0, SZX=2) Payload =73a30d0c006343116f58403100h'73a30d0c006343116f58403100' Authors' Addresses Peter van der Stok Consultant Email: consultancy@vanderstok.org Panos Kampanakis Cisco Systems Email: pkampana@cisco.com Sandeep S. Kumar Philips Lighting Research High Tech Campus 7 Eindhoven 5656 AE NL Email: ietf@sandeep.de Michael C. Richardson Sandelman Software Works Email: mcr+ietf@sandelman.ca URI: http://www.sandelman.ca/ Martin Furuhed Nexus Group Email: martin.furuhed@nexusgroup.com Shahid Raza RISE SICS Isafjordsgatan 22 Kista, Stockholm 16440 SE Email: shahid@sics.se