idnits 2.17.1 draft-ietf-lake-reqs-03.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (29 April 2020) is 1458 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 8152 (Obsoleted by RFC 9052, RFC 9053) == Outdated reference: A later version (-19) exists of draft-ietf-lpwan-coap-static-context-hc-13 == Outdated reference: A later version (-09) exists of draft-ietf-cose-x509-06 == Outdated reference: A later version (-14) exists of draft-ietf-core-echo-request-tag-09 == Outdated reference: A later version (-14) exists of draft-irtf-cfrg-randomness-improvements-11 == Outdated reference: A later version (-05) exists of draft-selander-ace-ake-authz-01 Summary: 0 errors (**), 0 flaws (~~), 6 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Vucinic 3 Internet-Draft Inria 4 Intended status: Informational G. Selander 5 Expires: 31 October 2020 J. Mattsson 6 Ericsson AB 7 D. Garcia 8 Odin Solutions S.L. 9 29 April 2020 11 Requirements for a Lightweight AKE for OSCORE 12 draft-ietf-lake-reqs-03 14 Abstract 16 This document compiles the requirements for a lightweight 17 authenticated key exchange protocol for OSCORE. This draft is in a 18 working group last call (WGLC) in the LAKE working group. Post-WGLC, 19 the requirements will be considered sufficiently stable for the 20 working group to proceed with its work. It is not currently planned 21 to publish this draft as an RFC. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at https://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on 31 October 2020. 40 Copyright Notice 42 Copyright (c) 2020 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 47 license-info) in effect on the date of publication of this document. 48 Please review these documents carefully, as they describe your rights 49 and restrictions with respect to this document. Code Components 50 extracted from this document must include Simplified BSD License text 51 as described in Section 4.e of the Trust Legal Provisions and are 52 provided without warranty as described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 2. Problem description . . . . . . . . . . . . . . . . . . . . . 3 58 2.1. AKE for OSCORE . . . . . . . . . . . . . . . . . . . . . 3 59 2.2. Credentials . . . . . . . . . . . . . . . . . . . . . . . 5 60 2.2.1. Initial Focus . . . . . . . . . . . . . . . . . . . . 6 61 2.3. Mutual Authentication . . . . . . . . . . . . . . . . . . 7 62 2.4. Confidentiality . . . . . . . . . . . . . . . . . . . . . 7 63 2.5. Cryptographic Agility and Negotiation Integrity . . . . . 8 64 2.6. Cryptographic Strength . . . . . . . . . . . . . . . . . 9 65 2.7. Identity Protection . . . . . . . . . . . . . . . . . . . 9 66 2.8. Auxiliary Data . . . . . . . . . . . . . . . . . . . . . 10 67 2.9. Extensibility . . . . . . . . . . . . . . . . . . . . . . 11 68 2.10. Availability . . . . . . . . . . . . . . . . . . . . . . 11 69 2.11. Lightweight . . . . . . . . . . . . . . . . . . . . . . . 11 70 2.11.1. LoRaWAN . . . . . . . . . . . . . . . . . . . . . . 13 71 2.11.2. 6TiSCH . . . . . . . . . . . . . . . . . . . . . . . 15 72 2.11.3. NB-IoT . . . . . . . . . . . . . . . . . . . . . . . 16 73 2.11.4. Discussion and Summary of Benchmarks . . . . . . . . 18 74 2.11.5. AKE frequency . . . . . . . . . . . . . . . . . . . 20 75 3. Security Considerations . . . . . . . . . . . . . . . . . . . 21 76 4. Privacy Considerations . . . . . . . . . . . . . . . . . . . 21 77 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 78 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21 79 Informative References . . . . . . . . . . . . . . . . . . . . . 21 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 82 1. Introduction 84 OSCORE [RFC8613] is a lightweight communication security protocol 85 providing end-to-end security on application layer for constrained 86 IoT settings (cf. [RFC7228]). OSCORE lacks a matching authenticated 87 key exchange protocol (AKE). The intention with the LAKE WG 88 [LAKE-WG] is to create a simple yet secure AKE for implementation in 89 embedded devices supporting OSCORE. 91 To ensure that the AKE is efficient for the expected applications of 92 OSCORE, we list the relevant public specifications of technologies 93 where OSCORE is included: 95 * The IETF 6TiSCH WG charter identifies the need to "secur[e] the 96 join process and mak[e] that fit within the constraints of high 97 latency, low throughput and small frame sizes that characterize 98 IEEE802.15.4 TSCH". OSCORE protects the join protocol as 99 described in 6TiSCH Minimal Security 100 [I-D.ietf-6tisch-minimal-security]. 102 * The IETF LPWAN WG charter identifies the need to improve the 103 transport capabilities of LPWA networks such as NB-IoT and LoRa 104 whose "common traits include ... frame sizes ... [on] the order of 105 tens of bytes transmitted a few times per day at ultra-low 106 speeds". The application of OSCORE is described in 107 [I-D.ietf-lpwan-coap-static-context-hc]. 109 * OMA Specworks LwM2M version 1.1 [LwM2M] defines bindings to two 110 challenging radio technologies where OSCORE is planned to be 111 deployed: LoRaWAN and NB-IoT. 113 * Open Connectivity Foundation (OCF) plans to use OSCORE for end-to- 114 end security of unicast messages [OCF]. 116 This document compiles the requirements for the AKE for OSCORE. It 117 summarizes the security requirements that are expected from such an 118 AKE, as well as the main characteristics of the environments where 119 the solution is envisioned to be deployed. The solution will 120 presumably be useful in other scenarios as well since a low security 121 overhead improves the overall performance. 123 2. Problem description 125 2.1. AKE for OSCORE 127 The rationale for designing this protocol is that OSCORE is lacking a 128 matching AKE. OSCORE was designed for lightweight RESTful operations 129 for example by minimizing the overhead, and applying the protection 130 to the application layer, thereby limiting the data being encrypted 131 and integrity protected for the other endpoint. Moreover, OSCORE was 132 tailored for use with lightweight primitives that are likely to be 133 implemented in the device, specifically CoAP [RFC7252], CBOR 134 [RFC7049] and COSE [RFC8152]. The same properties should apply to 135 the AKE. 137 In order to be suitable for OSCORE, at the end of the AKE protocol 138 run the two parties must agree on (see Section 3.2 of [RFC8613]): 140 * A shared secret (OSCORE Master Secret) with Perfect Forward 141 Secrecy (PFS, see Section 2.4) and a good amount of randomness. 142 (The term "good amount of randomness" is borrowed from [HKDF] to 143 signify not necessarily uniformly distributed randomness.) 145 * OSCORE Sender IDs of peer endpoints, arbitrarily short. 147 - Sender IDs are expected to be unique for a given Master Secret, 148 more precisely the quartet (Master Secret, Master Salt, ID 149 Context, Sender ID) must be unique, see Section 3.3. of 150 [RFC8613]. 152 * COSE algorithms to use with OSCORE 154 COSE provides the crypto primitives for OSCORE. The AKE shall 155 specify how it provides COSE algorithms to OSCORE. It is strongly 156 recommended that COSE is reused by the AKE, for identification of 157 credentials and algorithms, as extension point for new schemes, and 158 to avoid duplicated implementation of crypto wrapper. 160 The AKE cannot rely on messages being exchanged in both directions 161 after the AKE has completed, because CoAP/OSCORE requests may not 162 have a response [RFC7967]. Furthermore, there is no assumption of 163 dependence between CoAP client/server and AKE initiator/responder 164 roles, and an OSCORE context may be used with CoAP client and server 165 roles interchanged as is done, for example, in [LwM2M]. 167 Moreover, the AKE must support transport over CoAP. When transported 168 over CoAP, the AKE must support the traversal of CoAP intermediaries, 169 as required by the 6TiSCH network formation setting 170 [I-D.ietf-6tisch-minimal-security]. 172 Since the AKE messages most commonly will be encapsulated in CoAP, 173 the AKE must not duplicate functionality provided by CoAP, or at 174 least not duplicate functionality in such a way that it adds non- 175 negligible extra costs in terms of code size, code maintenance, etc. 176 It is therefore assumed that the AKE is being transported in a 177 protocol that provides reliable transport, that can preserve packet 178 ordering and handle message duplication [RFC7252], that can perform 179 fragmentation [RFC7959] and protect against denial of service attacks 180 as provided by the CoAP Echo option [I-D.ietf-core-echo-request-tag]. 182 The AKE may use other transport than CoAP. In this case the 183 underlying layers must correspondingly handle message loss, 184 reordering, message duplication, fragmentation, and denial of service 185 protection. 187 2.2. Credentials 189 IoT deployments differ from one another in terms of what credentials 190 can be supported. Currently many systems use pre-shared keys (PSKs) 191 provisioned out of band, for various reasons. PSKs are sometimes 192 used in a first deployment because of their perceived simplicity. 193 The use of PSKs allows for protection of communication without major 194 additional security processing, and also enables the use of symmetric 195 crypto algorithms only, reducing the implementation and computational 196 effort in the endpoints. 198 However, PSK-based provisioning has inherent weaknesses. There has 199 been reports of massive breaches of PSK provisioning systems 200 [massive-breach], and as many systems use PSKs without Perfect 201 Forward Secrecy (PFS, see Section 2.4) they are vulnerable to passive 202 pervasive monitoring. The security of these systems can be improved 203 by adding PFS through an AKE authenticated by the provisioned PSK. 205 Shared keys can alternatively be established in the endpoints using 206 an AKE protocol authenticated with asymmetric public keys instead of 207 symmetric secret keys. Raw public keys (RPK) can be provisioned with 208 the same scheme as PSKs, which allows for a more relaxed trust model 209 since RPKs need not be secret. The corresponding private keys are 210 assumed to be provisioned to the party being authenticated beforehand 211 (e.g. in factory or generated on-board). 213 As a third option, by using a public key infrastructure and running 214 an asymmetric key AKE with public key certificates instead of RPKs, 215 key provisioning can be omitted, leading to a more automated ("zero- 216 touch") bootstrapping procedure. The root CA keys are assumed to be 217 provisioned beforehand. Public key certificates are important for 218 several IoT settings, e.g., facility management with a large number 219 of devices from many different manufacturers. 221 These steps provide an example of a migration path in limited scoped 222 steps from simple to more robust security bootstrapping and 223 provisioning schemes where each step improves the overall security 224 and/or simplicity of deployment of the IoT system, although not all 225 steps are necessarily feasible for the most constrained settings. 227 In order to allow for these different schemes, the AKE must support 228 PSK- (shared between two nodes), RPK- and certificate-based 229 authentication. These are also the schemes for which CoAP is 230 designed (see Section 9 of [RFC7252]). 232 Multiple public key authentication credential types may need to be 233 supported for RPK and certificate-based authentication. In case of a 234 Diffie-Hellman key exchange both the use of signature based public 235 keys (for compatibility with existing ecosystem) and static DH public 236 keys (for reduced message size) is expected. 238 To further minimize the bandwidth consumption it is required to 239 support transporting certificates and raw public keys by reference 240 rather than by value. Considering the wide variety of deployments, 241 the AKE must support different schemes for transporting and 242 identifying credentials. While there are many existing mechanisms 243 for doing so, ranging from PSK to raw public key by reference to 244 x5chain of in-band certificates [I-D.ietf-cose-x509], what is 245 appropriate for a given deployment will depend on the nature of that 246 deployment. In order to provide a clear initial effort, 247 Section 2.2.1 lists a set of credential types of immediate relevance; 248 the mechanism for selecting credential scheme is presumed to enable 249 future extensibility if needed. 251 The use of RPKs may be appropriate for the authentication of the AKE 252 initiator but not for the AKE responder. The AKE must support 253 different credentials for authentication in different directions of 254 the AKE run, e.g. certificate-based authentication for the initiating 255 endpoint and RPK-based authentication for the responding endpoint. 257 Assuming that both signature public keys and static DH public keys 258 are in use, then also the case of mixed credentials need to be 259 supported with one endpoint using a static DH public key and the 260 other using a signature public key. The AKE shall support 261 negotiation of public key credential mix and that both initiator and 262 responder can verify the variant that was executed. 264 2.2.1. Initial Focus 266 As illustrated above, the setting is much more diverse in terms of 267 credentials and trust anchors than that of the unconstrained web. In 268 order to deliver a timely result, there is a need to initially focus 269 on what is considered most important at the time of writing: RPK (by 270 reference and value) and certificate by reference. Information about 271 validity of a certificate may be omitted from the AKE if available 272 over unconstrained links. The case of transporting certificate 273 validation information over the AKE may be specified in the initial 274 phase if there is a lightweight solution that matches existing 275 standards and tools. 277 A subsequent extension beyond the initial focus may be inevitable to 278 maintain a homogenous deployment without having to implement a mix of 279 AKE protocols, for example, to support the migration path described 280 above. The AKE needs to make clear the scope of cases analysed in 281 the initial phase, and that a new analysis is required for additional 282 cases. 284 2.3. Mutual Authentication 286 The AKE must provide mutual authentication during the protocol run. 287 At the end of the AKE protocol, each endpoint shall have freshly 288 authenticated the other's credential. In particular, both endpoints 289 must agree on a fresh session identifier, and the roles and 290 credentials of both endpoints. 292 Since the protocol may be initiated by different endpoints, it shall 293 not be necessary to determine beforehand which endpoint takes the 294 role of initiator of the AKE. 296 The mutual authentication guarantees of the AKE shall at least 297 guarantee the following properties: 299 * The AKE shall provide Key Compromise Impersonation (KCI) 300 resistance [KCI]. 302 * The AKE shall protect against identity misbinding attacks 303 [Misbinding]. Note that the identity may be directly related to a 304 public key such as for example the public key itself, a hash of 305 the public key, or data unrelated to a key. 307 * The AKE shall protect against reflection attacks, but need not 308 protect against attacks when more than two parties legitimately 309 share keys (cf. the Selfie attack on TLS 1.3 [Selfie]) as that 310 setting is out of scope. 312 Replayed messages shall not affect the security of an AKE session. 314 As often is the case, it is expected that an AKE fulfilling these 315 goals would have at least three flights of messages (with each flight 316 potentially consisting of one or more messages, depending on the AKE 317 design and the mapping to OSCORE). 319 2.4. Confidentiality 321 The shared secret established by the AKE must be known only to the 322 two authenticated endpoints. 324 A passive network attacker should never learn any session keys, even 325 if it knows both endpoints' long-term keys. 327 An active attacker who has compromised the initiator or responder 328 credential shall still not be able to compute past session keys 329 (Perfect Forward Secrecy, PFS). These properties can be achieved, 330 e.g., with an ephemeral Diffie-Hellman key exchange. 332 PFS may also be achieved in other ways, for example, using hash-based 333 ratcheting or with a nonce exchange followed by appropriately derived 334 new session keys provided that state can be kept in the form of a 335 session counter. Note that OSCORE specifies a method for session key 336 update involving a nonce exchange (see Appendix B in [RFC8613]). 338 The AKE shall provide a mechanism to use the output of one handshake 339 to optimize future handshakes, e.g., by generating keying material 340 which can be used to authenticate a future handshake, thus avoiding 341 the need for public key authentication in that handshake. 343 The AKE should give recommendations for frequency of re-keying 344 potentially dependent on the amount of data. 346 To mitigate against bad random number generators the AKE shall 347 provide recommendations for randomness, for example to use 348 [I-D.irtf-cfrg-randomness-improvements]. 350 2.5. Cryptographic Agility and Negotiation Integrity 352 Motivated by long deployment lifetimes, the AKE is required to 353 support cryptographic agility, including the modularity of COSE 354 crypto algorithms and negotiation of preferred crypto algorithms for 355 OSCORE and the AKE. 357 * The protocol shall support both pre-shared key and asymmetric key 358 authentication. PAKE, post-quantum and "hybrid" (simultaneously 359 more than one) key exchange is out of scope, but may be supported 360 in a later version. 362 * The protocol shall allow negotiation of elliptic curves for 363 Diffie-Hellman operations and signature-based authentication. 365 * The AKE shall support negotiation of all COSE algorithms 366 [IANA-COSE-Algorithms] to be used in OSCORE. The AKE shall 367 support negotiation of algorithms used in the AKE. It is strongly 368 recommended that the AKE algorithms are identified using 369 [IANA-COSE-Algorithms] to reduce unnecessary complexity of a 370 combined OSCORE/AKE implementation. 372 * A successful negotiation shall result in the most preferred 373 algorithms of one of the parties which are supported by the other. 375 * The AKE may choose different sets of symmetric crypto algorithms 376 (AEAD, MAC, etc.) for AKE and for OSCORE. In particular, the 377 length of the MAC for the AKE may be required to be larger than 378 for OSCORE. 380 The AKE negotiation must provide strong integrity guarantees against 381 active attackers. At the end of the AKE protocol, both endpoints 382 must agree on both the crypto algorithms that were proposed and those 383 that were chosen. In particular, the protocol must protect against 384 downgrade attacks. 386 2.6. Cryptographic Strength 388 The AKE shall establish a key with a target security level 389 [keylength] of >= 127 bits. This level was chosen to include X25519 390 and applies to the strength of authentication, the established keys, 391 and the protection for the negotiation of all cryptographic 392 parameters. 394 2.7. Identity Protection 396 In general, it is necessary to transport identities as part of the 397 AKE run in order to provide authentication of an entity not 398 identified beforehand. In the case of constrained devices, the 399 identity may contain sensitive information on the manufacturer of the 400 device, the batch, default firmware version, etc. Protecting 401 identifying information from passive and active attacks is important 402 from a privacy point of view, but needs to be balanced with the other 403 requirements, including security and lightweightness. 405 In the case of public key identities, the AKE is required to protect 406 the identity of one of the peers against active attackers and the 407 identity of the other peer against passive attackers. SIGMA-I and 408 SIGMA-R differ in this respect. SIGMA-I protects the identity of the 409 initiator against active attackers and the identity of the responder 410 against passive attackers. For SIGMA-R, the properties of the roles 411 are reversed at the cost of an additional flight. 413 It is not required to protect the PSK identifier, and it may thus be 414 sent in the first flight. Protection of PSK identifier in many cases 415 require extra flights of the AKE. 417 Other identifying information may also need to be transported in 418 plain text, for example, identifiers to allow correlation between AKE 419 messages, and cipher suites. Mechanisms to encrypt these kind of 420 parameters, such as using pre-configured public keys typically adds 421 to message overhead. 423 2.8. Auxiliary Data 425 In order to reduce round trips and the number of flights, and in some 426 cases also streamline processing, certain security features may be 427 integrated into the AKE by transporting "auxiliary data" together 428 with the AKE messages. 430 One example is the transport of third-party authorization information 431 from initiator to responder or vice versa. Such a scheme could 432 enable the party receiving the authorization information to make a 433 decision about whether the party being authenticated is also 434 authorized before the protocol is completed, and if not then 435 discontinue the protocol before it is complete, thereby saving time, 436 message processing and data transmission. 438 Another, orthogonal, example is the embedding of a certificate 439 enrolment request or a newly issued certificate in the AKE. 441 For example, the auxiliary data in the first two messages of the AKE 442 may transport authorization related information as in 443 [I-D.selander-ace-ake-authz] followed by a Certificate Signing 444 Request (CSR) in the auxiliary data of the third message. 446 The AKE must support the transport of such auxiliary data together 447 with the protocol messages. The auxiliary data field must not 448 contain data that violates the AKE security properties. The 449 auxiliary data field must only be used with security analysed 450 protocols. 452 The auxiliary data may contain privacy sensitive information. The 453 auxiliary data must be protected to the same level as AKE data in the 454 same flight. For example, for a SIGMA-I AKE it is expected that the 455 3 flights will provide the following protection of the auxiliary 456 data: 458 * Auxiliary data in the first flight is unprotected 460 * Auxiliary data in the second flight is confidentiality protected 461 against passive attackers and integrity protected against active 462 attackers 464 * Auxiliary data in the third flight is confidentiality and 465 integrity protected against active attackers 467 2.9. Extensibility 469 It is desirable that the AKE supports some kind of extensibility, in 470 particular, the ability to later include new AKE modes such as PAKE 471 support. COSE provides an extension mechanism for new algorithms, 472 new certificate formats, ways to identify credentials, etc. 474 The main objective with this work is to create a simple yet secure 475 AKE. The AKE should avoid having multiple ways to express the same 476 thing. If the underlying encodings offered by CBOR offer multiple 477 possibility the AKE should be strongly opinionated, and clearly 478 specify which one will be used. 480 While remaining extensible, the AKE should avoid optional mechanisms 481 which introduce code paths that are less well tested. 483 The AKE should avoid mechanisms where an initiator takes a guess at 484 the policy, and when it receives a negative response, must guess, 485 based upon what it has tried, what to do next. 487 2.10. Availability 489 Jamming attacks, cutting cables etc. leading to long term loss of 490 availability may not be possible to mitigate, but an attacker 491 temporarily injecting messages or disturbing the communication shall 492 not have a similar impact. 494 2.11. Lightweight 496 We target an AKE which is efficiently deployable in 6TiSCH multi-hop 497 networks, LoRaWAN networks and NB-IoT networks. (For an overview of 498 low-power wide area networks, see e.g. [RFC8376].) The desire is to 499 optimize the AKE to be 'as lightweight as reasonably achievable' in 500 these environments, where 'lightweight' refers to: 502 * resource consumption, measured by bytes on the wire, wall-clock 503 time and number of round trips to complete, or power consumption 505 * the amount of new code required on end systems which already have 506 an OSCORE stack 508 These properties need to be considered in the context of the use of 509 an existing CoAP/OSCORE stack in the targeted networks and 510 technologies. Some properties are difficult to evaluate for a given 511 protocol, for example, because they depend on the radio conditions or 512 other simultaneous network traffic. Additionally, these properties 513 are not independent. Therefore the properties listed here should be 514 taken as input for identifying plausible protocol metrics that can be 515 more easily measured and compared between protocols. 517 Per 'bytes on the wire', it is desirable for the AKE messages to fit 518 into the MTU size of these protocols; and if not possible, within as 519 few frames as possible, since using multiple MTUs can have 520 significant costs in terms of time and power. Note that the MTU size 521 depends on radio technology and its characteristics, including data 522 rates, number of hops, etc. Example benchmarks are given further 523 down in this section. 525 Per 'time', it is desirable for the AKE message exchange(s) to 526 complete in a reasonable amount of time, both for a single 527 uncongested exchange and when multiple exchanges are running in an 528 interleaved fashion, like e.g. in a "network formation" setting when 529 multiple devices connect for the first time. This latency may not be 530 a linear function depending on congestion and the specific radio 531 technology used. As these are relatively low data rate networks, the 532 latency contribution due to computation is in general not expected to 533 be dominant. 535 Per 'round-trips', it is desirable that the number of completed 536 request/response message exchanges required before the initiating 537 endpoint can start sending protected traffic data is as small as 538 possible, since this reduces completion time. See Section 2.11.4 for 539 a discussion about the trade-off between message size and number of 540 flights. 542 Per 'power', it is desirable for the transmission of AKE messages and 543 crypto to draw as little power as possible. The best mechanism for 544 doing so differs across radio technologies. For example, NB-IoT uses 545 licensed spectrum and thus can transmit at higher power to improve 546 coverage, making the transmitted byte count relatively more important 547 than for other radio technologies. In other cases, the radio 548 transmitter will be active for a full MTU frame regardless of how 549 much of the frame is occupied by message content, which makes the 550 byte count less sensitive for the power consumption as long as it 551 fits into the MTU frame. The power consumption thus increases with 552 AKE message size and the largest impact is on average under poor 553 network conditions. Note that listening for messages to receive can 554 in many cases be a large contribution to the power consumption, for 555 which there are separate techniques to handle, e.g., time slots, 556 discontinuous reception, etc. but this is not considered in scope of 557 the AKE design. 559 Per 'new code', it is desirable to introduce as little new code as 560 possible onto OSCORE-enabled devices to support this new AKE. These 561 devices have on the order of 10s of kB of memory and 100 kB of 562 storage on which an embedded OS; a COAP stack; CORE and AKE 563 libraries; and target applications would run. It is expected that 564 the majority of this space is available for actual application logic, 565 as opposed to the support libraries. In a typical OSCORE 566 implementation COSE encrypt and signature structures will be 567 available, as will support for COSE algorithms relevant for IoT 568 enabling the same algorithms as is used for OSCORE (e.g. COSE 569 algorithm no. 10 = CCM* used by 6TiSCH). The use of those, or CBOR 570 or CoAP, would not add to the footprint. 572 While the large variety of settings and capabilities of the devices 573 and networks makes it challenging to produce exact values of some 574 these dimensions, there are some key benchmarks that are tractable 575 for security protocol engineering and which have a significant 576 impact. 578 2.11.1. LoRaWAN 580 Reflecting deployment reality as of now, we focus on the European 581 regulation as described in ETSI EN 300 220. LoRaWAN employs 582 unlicensed radio frequency bands in the 868 MHz ISM band. For 583 LoRaWAN the most relevant metric is the Time-on-Air, which determines 584 the period before the next communication can occur and also which can 585 be used as an indicator to calculate energy consumption. LoRaWAN is 586 legally required to use a duty cycle with values such as 0.1%, 1% and 587 10% depending on the sub-band that is being used, leading to a 588 payload split into fragments interleaved with unavailable times. For 589 Europe, the duty cycle is 1% (or smaller). Although there are 590 exceptions from the use of duty cycle, the use of an AKE for 591 providing end-to-end security on application layer needs to comply 592 with the duty cycle. 594 2.11.1.1. Bytes on the wire 596 LoRaWAN has a variable MTU depending on the Spreading Factor (SF). 597 The higher the spreading factor, the higher distances can be achieved 598 and/or better reception. If the coverage and distance allows it, 599 with SF7 - corresponding to higher data rates - the maximum payload 600 is 222 bytes. For a SF12 - and low data rates - the maximum payload 601 is 51 bytes on data link layer. 603 The size and number of packets impact the Time-on-Air (ToA). The 604 benchmark used here is based on SF12 and a packet size of 51 bytes 605 [LoRaWAN]. The use of larger packets depend on good radio conditions 606 which are not always present. Some libraries/providers only support 607 51-bytes packet size. 609 2.11.1.2. Time 611 The time it takes to send a message over the air in LoRaWAN can be 612 calculated as a function of the different parameters of the 613 communication. These are the Spreading Factor (SF), the message 614 size, the channel, bandwidth, coding rate, etc. An important feature 615 of LoRaWAN is the duty cycle limitation due to the use of the ISM 616 band. The duty cycle is evaluated in a 1-hour sliding window. It is 617 legal for a device to transmit a burst for a total of up to 36 618 seconds ToA on a 1%-duty-cyle sub-band, but the device must then 619 pause the transmission for the rest of the hour [lorawan-duty-cycle]. 620 In order to avoid extreme waiting times, the AKE needs to complete 621 before the duty cycle limit is exhausted, also taking into account 622 potential retransmissions and allowing additional air time for lower 623 level MAC frames and application data. As a challenging but 624 realistic example we assume each message is retransmitted 2 times and 625 allow a factor 2-3 for additional air time. With these assumptions 626 it is required with a ToA of 4-6 seconds for the uplink protocol 627 messages to ensure that the entire burst stays within the 36 seconds 628 duty cycle. 630 It should be noted that some libraries/providers enforce the duty 631 cycle limitation through a stop-and-wait operation, which restricts 632 the number of bytes to the size of the packets after which duty cycle 633 waiting times are incurred. 635 2.11.1.3. Round trips and number of flights 637 Considering the duty cycle of LoRaWAN and associated unavailable 638 times, the round trips and number of LoRaWAN packets needs to be 639 reduced as much as possible. 641 2.11.1.4. Power 643 The calculation of the power consumption in LoRaWAN is dependent on 644 several factors, such as the spreading factor used and the length of 645 the messages sent, both having a clear dependency with the time it 646 takes to transmit the messages. The communication model (inherent to 647 the different LoRaWAN classes of devices) also has an impact on the 648 energy consumption, but overall the Time-on-Air is an important 649 indication of the performance. 651 2.11.2. 6TiSCH 653 6TiSCH operates in the 2.4 GHz unlicensed frequency band and uses 654 hybrid Time Division/Frequency Division multiple access (TDMA/FDMA). 655 Nodes in a 6TiSCH network form a mesh. The basic unit of 656 communication, a cell, is uniquely defined by its time and frequency 657 offset in the communication schedule matrix. Cells can be assigned 658 for communication to a pair of nodes in the mesh and so be collision- 659 free, or shared by multiple nodes, for example during network 660 formation. In case of shared cells, some collision-resolution scheme 661 such as slotted-Aloha is employed. Nodes exchange frames which are 662 at most 127-bytes long, including the link-layer headers. To 663 preserve energy, the schedule is typically computed in such a way 664 that nodes switch on their radio below 1% of the time ("radio duty 665 cycle"). A 6TiSCH mesh can be several hops deep. In typical use 666 cases considered by the 6TiSCH working group, a network that is 2-4 667 hops deep is commonplace; a network which is more than 8 hops deep is 668 not common. 670 2.11.2.1. Bytes on the wire 672 Increasing the number of bytes on the wire in a protocol message has 673 an important effect on the 6TiSCH network in case the fragmentation 674 is triggered. More fragments contribute to congestion of shared 675 cells (and concomitant error rates) in a non-linear way. 677 The available size for key exchange messages depends on the topology 678 of the network, whether the message is traveling uplink or downlink, 679 and other stack parameters. A key performance indicator for a 6TiSCH 680 network is "network formation", i.e. the time it takes from switching 681 on all devices, until the last device has executed the AKE and 682 securely joined. As a benchmark, given the size limit on the frames 683 and taking into account the different headers (including link-layer 684 security), for a 6TiSCH network 5 hops deep, the maximum CoAP payload 685 size to avoid fragmentation is 47/45 bytes (uplink/downlink) 686 [AKE-for-6TiSCH]. 688 2.11.2.2. Time 690 Given the slotted nature of 6TiSCH, the number of bytes in a frame 691 has insignificant impact on latency, but the number of frames has. 692 The relevant metric for studying AKE is the network formation time, 693 which implies parallel AKE runs among nodes that are attempting to 694 join the network. Network formation time directly affects the time 695 installers need to spend on site at deployment time. 697 2.11.2.3. Round trips and number of flights 699 Given the mesh nature of the 6TiSCH network, and given that each 700 message may travel several hops before reaching its destination, it 701 is highly desirable to minimize the number of round trips to reduce 702 latency. 704 2.11.2.4. Power 706 From the power consumption point of view, it is more favorable to 707 send a small number of large frames than a larger number of short 708 frames. 710 2.11.3. NB-IoT 712 3GPP has specified Narrow-Band IoT (NB-IoT) for support of infrequent 713 data transmission via user plane and via control plane. NB-IoT is 714 built on cellular licensed spectrum at low data rates for the purpose 715 of supporting: 717 * operations in extreme coverage conditions, 719 * device battery life of 10 years or more, 721 * low device complexity and cost, and 723 * a high system capacity of millions of connected devices per square 724 kilometer. 726 NB-IoT achieves these design objectives by: 728 * Reduced baseband processing, memory and RF enabling low complexity 729 device implementation. 731 * A lightweight setup minimizing control signaling overhead to 732 optimize power consumption. 734 * In-band, guard-band, and stand-alone deployment enabling efficient 735 use of spectrum and network infrastructure. 737 2.11.3.1. Bytes on the wire 739 The number of bytes on the wire in a protocol message has a direct 740 effect on the performance for NB-IoT. In contrast to LoRaWAN and 741 6TiSCH, the NB-IoT radio bearers are not characterized by a fixed 742 sized PDU. Concatenation, segmentation and reassembly are part of 743 the service provided by the NB-IoT radio layer. As a consequence, 744 the byte count has a measurable impact on time and energy consumption 745 for running the AKE. 747 2.11.3.2. Time 749 Coverage significantly impacts the available bit rate and thereby the 750 time for transmitting a message, and there is also a difference 751 between downlink and uplink transmissions (see Section 2.11.3.4). 752 The transmission time for a message is essentially proportional to 753 the number of bytes. 755 Since NB-IoT is operating in licensed spectrum, in contrast to e.g. 756 LoRaWAN, the packets on the radio interface can be transmitted back- 757 to-back, so the time before sending OSCORE protected data is limited 758 by the number of round trips/flights of the AKE and not by a duty 759 cycle. 761 2.11.3.3. Round trips and number of flights 763 As indicated in Section 2.11.3.2, the number of frames and round- 764 trips is one limiting factor for protocol completion time. 766 2.11.3.4. Power 768 Since NB-IoT is operating in licensed spectrum, the device is allowed 769 to transmit at a relatively high power, which has a large impact on 770 the energy consumption. 772 The benchmark for NB-IoT energy consumption is based on the same 773 computational model as was used by 3GPP in the design of this radio 774 layer [NB-IoT-battery-life-evaluation]. The device power consumption 775 is assumed to be 500mW for transmission and 80mW for reception. 776 Power consumption for "light sleep" (~ 3mW) and "deep sleep" (~ 777 0.015mW) are negligible in comparison. The bitrates (uplink/ 778 downlink) are assumed to be 28/170 kbps for good coverage and 779 0,37/2,5 kbps for bad coverage. 781 The results [AKE-for-NB-IoT] show a high per-byte energy consumption 782 for uplink transmissions, in particular in bad coverage. Given that 783 the application decides about the device being initiator or responder 784 in the AKE, the protocol cannot be tailored for a particular message 785 being uplink or downlink. To perform well in both kind of 786 applications the overall number of bytes of the protocol needs to be 787 as low as possible. 789 2.11.4. Discussion and Summary of Benchmarks 791 The difference between uplink and downlink performance must not be 792 engineered into the protocol since it cannot be assumed that a 793 particular protocol message will be sent uplink or downlink. 795 For NB-IoT the byte count on the wire has a measurable impact on time 796 and energy consumption for running the AKE, so the number of bytes in 797 the messages needs to be as low as possible. 799 While "as small protocol messages as possible" does not lend itself 800 to a sharp boundary threshold, "as few flights as possible" does and 801 is relevant in all settings above. 803 The penalty is high for not fitting into the frame sizes of 6TiSCH 804 and LoRaWAN networks. Fragmentation is not defined within these 805 technologies so requires fragmentation scheme on a higher layer in 806 the stack. With fragmentation increases the number of frames per 807 message, each with its associated overhead in terms of power 808 consumption and latency. Additionally the probability for errors 809 increases, which leads to retransmissions of frames or entire 810 messages that in turn increases the power consumption and latency. 812 There are trade-offs between "few messages" and "few frames"; if 813 overhead is spread out over more messages such that each message fits 814 into a particular frame this may reduce the overall power 815 consumption. For example, with a frame size of 50 bytes, two 60-byte 816 messages will fragment into 4 frames in total, whereas three 40-byte 817 messages fragment into 3 frames in total. On the other hand, a 818 smaller message has less probability to collide with other messages 819 and incur retransmission. 821 While it may be possible to engineer such a solution for a particular 822 radio technology and AKE protocol, optimizing for a specific scenario 823 may not be optimal for other settings. It is expected that specific 824 scenarios are evaluated in the design phase to ensure that the AKE is 825 fit for purpose. But in order to start the design work some general 826 criteria for the AKE performance need to be formulated that takes 827 into account the differences in the expected deployments. 829 There are benefits in terms of fewer flights/round trips for NB-IoT 830 (Section 2.11.3.3) and 6TiSCH (Section 2.11.2.3). An AKE protocol 831 complying with the requirements of this memo is expected to have at 832 least 3 messages. With a 3-message AKE, the initiator is able to 833 derive the OSCORE security context after receiving message 2, 834 rendering the AKE essentially one round trip before traffic data can 835 be exchanged, which is ideal. 837 If the AKE has 3 messages then optimal performance for 6TiSCH is when 838 each message fits into as few frames as possible, ideally 1 frame per 839 message. 841 For LoRaWAN, optimal performance is determined by the duty cycle 842 which puts a limit to ToA or, for certain libraries/providers, the 843 number of packets (see Section 2.11.1.2). If the AKE has 3 messages 844 and each message fits into a 51 byte packet then this is optimal for 845 the latter case. The same assumption incurs a ToA for uplink 846 messages in the interval of 4-6 seconds at SF12 both for a device- 847 initiated and infrastructure-initiated AKE, which complies with the 848 challenging example stated in Section 2.11.1.2. 850 One avenue to good performance is therefore to target message sizes 851 which avoids fragmentation or with as few fragments as possible. For 852 the LoRaWAN benchmark, the limit for fragmentation is 51 bytes at 853 link layer. For the 6TiSCH benchmark, messages less than or equal to 854 45 bytes at CoAP payload layer need not be fragmented. 856 For the initial focus cases (Section 2.2.1), i.e. RPK (by reference 857 and value) and certificate by reference, it is required that the AKE 858 shall perform optimally with respect to the available criteria for 859 the radio technologies. 861 To determine with certainty what are the minimal number of fragments 862 for an AKE under different assumptions requires to design and analyse 863 the AKE, which is clearly beyond the requirements phase. However, by 864 means of an example we have reason to believe that an AKE with 3 865 messages can be designed to support RPK by reference in 3 fragments. 866 Thus the ideal number of fragments is expected for RPK by reference. 868 While such performance may not be possible for the other initial 869 focus cases, it is expected that if one of the peers send RPK by 870 value or certificate by reference, then one additional fragment is 871 sufficient, thus in total a maximum of 5 fragments. Alternatively, 872 for the LoRaWAN challenge (Section 2.11.1.2), it is expected that the 873 duty cycle for a burst can be complied with for RPK by value and 874 certificate by reference, assuming that each message only needs to be 875 retransmitted at most once (i.e. good AKE performance for RPK by 876 value and certificate by reference in not too poor radio 877 environments). 879 2.11.5. AKE frequency 881 One question that has been asked in the context of lightweightness 882 is: - How often is the AKE executed? While it may be impossible to 883 give a precise answer there are other perspectives to this question. 885 1. For some use cases, already one execution of the AKE is heavy, 886 for example, because 888 * there are a number of parallel executions of the AKE which 889 loads down the network, such as in a network formation 890 setting, or 892 * the duty cycle makes the completion time long for even one run 893 of the protocol. 895 2. If a device reboots it may not be able to recover the security 896 context, e.g. due to lack of persistent storage, and is required 897 to establish a new security context for which an AKE is 898 preferred. Reboot frequency may be difficult to predict in 899 general. 901 3. To limit the impact of a key compromise, BSI, NIST and ANSSI and 902 other organizations recommend in other contexts frequent renewal 903 of keys by means of Diffie-Hellman key exchange. This may be a 904 symmetric key authenticated key exchange, where the symmetric key 905 is obtained from a previous asymmetric key based run of the AKE. 907 To summarize, even if it we are unable to give precise numbers for 908 AKE frequency, a lightweight AKE: 910 * reduces the time for network formation and AKE runs in challenging 911 radio technologies, 913 * allows devices to quickly re-establish security in case of 914 reboots, and 916 * enables support for recommendations of frequent key renewal. 918 3. Security Considerations 920 This document compiles the requirements for an AKE and provides some 921 related security considerations. 923 The AKE must provide the security properties expected of IETF 924 protocols, e.g., providing mutual authentication, confidentiality, 925 and negotiation integrity as is further detailed in the requirements. 927 4. Privacy Considerations 929 In the privacy properties for the AKE, the transport over CoAP needs 930 to be considered. 932 5. IANA Considerations 934 None. 936 Acknowledgments 938 The authors want to thank Richard Barnes, Dominique Barthel, Karthik 939 Bhargavan, Stephen Farrell, Ivaylo Petrov, Eric Rescorla, Michael 940 Richardson, Jesus Sanchez-Gomez, Claes Tidestav, Hannes Tschofenig 941 and Christopher Wood for providing valuable input. 943 Informative References 945 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 946 Constrained-Node Networks", RFC 7228, 947 DOI 10.17487/RFC7228, May 2014, 948 . 950 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 951 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 952 October 2013, . 954 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 955 Application Protocol (CoAP)", RFC 7252, 956 DOI 10.17487/RFC7252, June 2014, 957 . 959 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 960 the Constrained Application Protocol (CoAP)", RFC 7959, 961 DOI 10.17487/RFC7959, August 2016, 962 . 964 [RFC7967] Bhattacharyya, A., Bandyopadhyay, S., Pal, A., and T. 965 Bose, "Constrained Application Protocol (CoAP) Option for 966 No Server Response", RFC 7967, DOI 10.17487/RFC7967, 967 August 2016, . 969 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 970 RFC 8152, DOI 10.17487/RFC8152, July 2017, 971 . 973 [RFC8613] Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 974 "Object Security for Constrained RESTful Environments 975 (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019, 976 . 978 [RFC8376] Farrell, S., Ed., "Low-Power Wide Area Network (LPWAN) 979 Overview", RFC 8376, DOI 10.17487/RFC8376, May 2018, 980 . 982 [I-D.ietf-6tisch-minimal-security] 983 Vucinic, M., Simon, J., Pister, K., and M. Richardson, 984 "Constrained Join Protocol (CoJP) for 6TiSCH", Work in 985 Progress, Internet-Draft, draft-ietf-6tisch-minimal- 986 security-15, 10 December 2019, . 990 [I-D.ietf-lpwan-coap-static-context-hc] 991 Minaburo, A., Toutain, L., and R. Andreasen, "LPWAN Static 992 Context Header Compression (SCHC) for CoAP", Work in 993 Progress, Internet-Draft, draft-ietf-lpwan-coap-static- 994 context-hc-13, 5 March 2020, . 998 [I-D.ietf-cose-x509] 999 Schaad, J., "CBOR Object Signing and Encryption (COSE): 1000 Header parameters for carrying and referencing X.509 1001 certificates", Work in Progress, Internet-Draft, draft- 1002 ietf-cose-x509-06, 9 March 2020, . 1005 [I-D.ietf-core-echo-request-tag] 1006 Amsuess, C., Mattsson, J., and G. Selander, "CoAP: Echo, 1007 Request-Tag, and Token Processing", Work in Progress, 1008 Internet-Draft, draft-ietf-core-echo-request-tag-09, 9 1009 March 2020, . 1012 [I-D.irtf-cfrg-randomness-improvements] 1013 Cremers, C., Garratt, L., Smyshlyaev, S., Sullivan, N., 1014 and C. Wood, "Randomness Improvements for Security 1015 Protocols", Work in Progress, Internet-Draft, draft-irtf- 1016 cfrg-randomness-improvements-11, 14 April 2020, 1017 . 1020 [I-D.selander-ace-ake-authz] 1021 Selander, G., Mattsson, J., Vucinic, M., Richardson, M., 1022 and A. Schellenbaum, "Lightweight Authorization for 1023 Authenticated Key Exchange.", Work in Progress, Internet- 1024 Draft, draft-selander-ace-ake-authz-01, 9 March 2020, 1025 . 1028 [AKE-for-6TiSCH] 1029 "AKE for 6TiSCH", March 2019, 1030 . 1033 [AKE-for-NB-IoT] 1034 "AKE for NB-IoT", March 2019, 1035 . 1038 [NB-IoT-battery-life-evaluation] 1039 "On mMTC, NB-IoT and eMTC battery life evaluation", 1040 January 2017, 1041 . 1044 [HKDF] Krawczyk, H., "Cryptographic Extraction and Key 1045 Derivation: The HKDF Scheme", May 2010, 1046 . 1048 [IANA-COSE-Algorithms] 1049 "COSE Algorithms", March 2020, 1050 . 1053 [LwM2M] "OMA SpecWorks LwM2M", August 2018, 1054 . 1058 [OCF] "OSCORE:OCF Status and Comments", March 2020, 1059 . 1063 [LoRaWAN] "LoRaWAN Regional Parameters v1.0.2rB", February 2017, 1064 . 1067 [LAKE-WG] "LAKE WG", March 2020, 1068 . 1070 [KCI] Hlauschek, C., Gruber, M., Fankhauser, F., and C. Schanes, 1071 "Prying open Pandoras box:KCI attacks against TLS", August 1072 2015, 1073 . 1076 [Misbinding] 1077 Sethi, M., Peltonen, A., and T. Aura, "Misbinding Attacks 1078 on Secure Device Pairing and Bootstrapping", Proceedings 1079 of the 2019 ACM Asia Conference on Computer and 1080 Communications Security , May 2019, 1081 . 1083 [Selfie] Drucker, N. and S. Gueron, "Selfie:Reflections on TLS 1.3 1084 with PSK", March 2019, . 1086 [massive-breach] 1087 "Sim card database hack gave US and UK spies access to 1088 billions of cellphones", February 2015, 1089 . 1092 [lorawan-duty-cycle] 1093 Saelens, M., Hoebeke, J., Shahid, A., and E. De Poorter, 1094 "Impact of EU duty cycle and transmission power 1095 limitations for sub-GHz LPWAN SRDs an overview and future 1096 challenges. EURASIP Journal on Wireless Communications and 1097 Networking. 2019. 10.1186/s13638-019-1502-5.", 2019, 1098 . 1102 [keylength] 1103 Lenstra, A., "Key Lengths:Contribution to The Handbook of 1104 Information Security", 2018, 1105 . 1108 Authors' Addresses 1110 Malisa Vucinic 1111 Inria 1113 Email: malisa.vucinic@inria.fr 1115 Goeran Selander 1116 Ericsson AB 1118 Email: goran.selander@ericsson.com 1120 John Preuss Mattsson 1121 Ericsson AB 1123 Email: john.mattsson@ericsson.com 1125 Dan Garcia-Carrillo 1126 Odin Solutions S.L. 1128 Email: dgarcia@odins.es