draft-ietf-6tisch-minimal-security-07.txt   draft-ietf-6tisch-minimal-security-08.txt 
6TiSCH Working Group M. Vucinic, Ed. 6TiSCH Working Group M. Vucinic, Ed.
Internet-Draft University of Montenegro Internet-Draft Inria
Intended status: Standards Track J. Simon Intended status: Standards Track J. Simon
Expires: April 26, 2019 Analog Devices Expires: May 12, 2019 Analog Devices
K. Pister K. Pister
University of California Berkeley University of California Berkeley
M. Richardson M. Richardson
Sandelman Software Works Sandelman Software Works
October 23, 2018 November 08, 2018
Minimal Security Framework for 6TiSCH Minimal Security Framework for 6TiSCH
draft-ietf-6tisch-minimal-security-07 draft-ietf-6tisch-minimal-security-08
Abstract Abstract
This document describes the minimal framework required for a new This document describes the minimal framework required for a new
device, called "pledge", to securely join a 6TiSCH (IPv6 over the device, called "pledge", to securely join a 6TiSCH (IPv6 over the
TSCH mode of IEEE 802.15.4e) network. The framework requires that TSCH mode of IEEE 802.15.4e) network. The framework requires that
the pledge and the JRC (join registrar/coordinator, a central the pledge and the JRC (join registrar/coordinator, a central
entity), share a symmetric key. How this key is provisioned is out entity), share a symmetric key. How this key is provisioned is out
of scope of this document. Through a single CoAP (Constrained of scope of this document. Through a single CoAP (Constrained
Application Protocol) request-response exchange secured by OSCORE Application Protocol) request-response exchange secured by OSCORE
(Object Security for Constrained RESTful Environments), the pledge (Object Security for Constrained RESTful Environments), the pledge
requests admission into the network and the JRC configures it with requests admission into the network and the JRC configures it with
link-layer keying material and other parameters. The JRC may at any link-layer keying material and other parameters. The JRC may at any
time update the parameters through another request-response exchange time update the parameters through another request-response exchange
secured by OSCORE. This specification defines the Constrained Join secured by OSCORE. This specification defines the Constrained Join
Protocol and its CBOR (Concise Binary Object Representation) data Protocol and its CBOR (Concise Binary Object Representation) data
structures and configures the rest of the 6TiSCH communication stack structures, and configures the rest of the 6TiSCH communication stack
for this join process to occur in a secure manner. Additional for this join process to occur in a secure manner. Additional
security mechanisms may be added on top of this minimal framework. security mechanisms may be added on top of this minimal framework.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 26, 2019. This Internet-Draft will expire on May 12, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Provisioning Phase . . . . . . . . . . . . . . . . . . . . . 5
4. One-Touch Assumption . . . . . . . . . . . . . . . . . . . . 6 4. Join Process Overview . . . . . . . . . . . . . . . . . . . . 7
5. Join Process Overview . . . . . . . . . . . . . . . . . . . . 7 4.1. Step 1 - Enhanced Beacon . . . . . . . . . . . . . . . . 8
5.1. Step 1 - Enhanced Beacon . . . . . . . . . . . . . . . . 8 4.2. Step 2 - Neighbor Discovery . . . . . . . . . . . . . . . 9
5.2. Step 2 - Neighbor Discovery . . . . . . . . . . . . . . . 9 4.3. Step 3 - Constrained Join Protocol (CoJP) Execution . . . 9
5.3. Step 3 - Constrained Join Protocol (CoJP) Execution . . . 9 4.4. The Special Case of the 6LBR Pledge Joining . . . . . . . 10
5.4. The Special Case of the 6LBR Pledge Joining . . . . . . . 10 5. Link-layer Configuration . . . . . . . . . . . . . . . . . . 10
6. Link-layer Configuration . . . . . . . . . . . . . . . . . . 10 6. Network-layer Configuration . . . . . . . . . . . . . . . . . 11
7. Network-layer Configuration . . . . . . . . . . . . . . . . . 11 6.1. Identification of Unauthenticated Traffic . . . . . . . . 12
7.1. Identification of Join Request Traffic . . . . . . . . . 12 7. Application-level Configuration . . . . . . . . . . . . . . . 13
7.2. Identification of Join Response Traffic . . . . . . . . . 12 7.1. Statelessness of the JP . . . . . . . . . . . . . . . . . 13
8. Application-level Configuration . . . . . . . . . . . . . . . 13 7.2. Recommended Settings . . . . . . . . . . . . . . . . . . 14
8.1. Statelessness of the JP . . . . . . . . . . . . . . . . . 13 7.3. OSCORE . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.2. OSCORE Security Context . . . . . . . . . . . . . . . . . 14 8. Constrained Join Protocol (CoJP) . . . . . . . . . . . . . . 18
9. Constrained Join Protocol (CoJP) . . . . . . . . . . . . . . 16 8.1. Join Exchange . . . . . . . . . . . . . . . . . . . . . . 19
9.1. Join Exchange . . . . . . . . . . . . . . . . . . . . . . 17 8.2. Parameter Update Exchange . . . . . . . . . . . . . . . . 20
9.2. Parameter Update Exchange . . . . . . . . . . . . . . . . 18 8.3. Error Handling . . . . . . . . . . . . . . . . . . . . . 22
9.3. Error Handling . . . . . . . . . . . . . . . . . . . . . 19 8.4. CoJP Objects . . . . . . . . . . . . . . . . . . . . . . 24
9.4. CoJP Objects . . . . . . . . . . . . . . . . . . . . . . 22 8.5. Recommended Settings . . . . . . . . . . . . . . . . . . 35
9.5. Parameters . . . . . . . . . . . . . . . . . . . . . . . 34 9. Security Considerations . . . . . . . . . . . . . . . . . . . 36
9.6. Mandatory to Implement Algorithms . . . . . . . . . . . . 34 10. Privacy Considerations . . . . . . . . . . . . . . . . . . . 37
10. Security Considerations . . . . . . . . . . . . . . . . . . . 35 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 38
11. Privacy Considerations . . . . . . . . . . . . . . . . . . . 36 11.1. CoJP Parameters Registry . . . . . . . . . . . . . . . . 38
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 11.2. CoJP Key Usage Registry . . . . . . . . . . . . . . . . 39
12.1. CoJP Parameters Registry . . . . . . . . . . . . . . . . 37 11.3. CoJP Error Registry . . . . . . . . . . . . . . . . . . 39
12.2. CoJP Key Usage Registry . . . . . . . . . . . . . . . . 37 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 40
12.3. CoJP Error Registry . . . . . . . . . . . . . . . . . . 38 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 40
13.1. Normative References . . . . . . . . . . . . . . . . . . 40
13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 39 13.2. Informative References . . . . . . . . . . . . . . . . . 41
14. References . . . . . . . . . . . . . . . . . . . . . . . . . 39 Appendix A. Example . . . . . . . . . . . . . . . . . . . . . . 43
14.1. Normative References . . . . . . . . . . . . . . . . . . 39 Appendix B. Lightweight Implementation Option . . . . . . . . . 46
14.2. Informative References . . . . . . . . . . . . . . . . . 40 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 47
Appendix A. Example . . . . . . . . . . . . . . . . . . . . . . 42
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 44
1. Introduction 1. Introduction
This document defines a "secure join" solution for a new device,
called "pledge", to securely join a 6TiSCH network. The term "secure
join" refers to network access authentication, authorization and
parameter distribution, as defined in [I-D.ietf-6tisch-terminology].
The Constrained Join Protocol (CoJP) defined in this document handles
parameter distribution needed for a pledge to become a joined node.
Authorization mechanisms are considered out of scope. Mutual
authentication during network access is achieved through the use of a
secure channel, as configured by this document. This document also
specifies a configuration of different layers of the 6TiSCH protocol
stack that reduces the Denial of Service (DoS) attack surface during
the join process.
This document presumes a 6TiSCH network as described by [RFC7554] and This document presumes a 6TiSCH network as described by [RFC7554] and
[RFC8180]. By design, nodes in a 6TiSCH network [RFC7554] have their [RFC8180]. By design, nodes in a 6TiSCH network [RFC7554] have their
radio turned off most of the time, to conserve energy. As a radio turned off most of the time, to conserve energy. As a
consequence, the link used by a new device for joining the network consequence, the link used by a new device for joining the network
has limited bandwidth [RFC8180]. The secure join solution defined in has limited bandwidth [RFC8180]. The secure join solution defined in
this document therefore keeps the number of over-the-air exchanges this document therefore keeps the number of over-the-air exchanges to
for join purposes to a minimum. a minimum.
The micro-controllers at the heart of 6TiSCH nodes have a small The micro-controllers at the heart of 6TiSCH nodes have a small
amount of code memory. It is therefore paramount to reuse existing amount of code memory. It is therefore paramount to reuse existing
protocols available as part of the 6TiSCH stack. At the application protocols available as part of the 6TiSCH stack. At the application
layer, the 6TiSCH stack already relies on CoAP [RFC7252] for web layer, the 6TiSCH stack already relies on CoAP [RFC7252] for web
transfer, and on OSCORE [I-D.ietf-core-object-security] for its end- transfer, and on OSCORE [I-D.ietf-core-object-security] for its end-
to-end security. The secure join solution defined in this document to-end security. The secure join solution defined in this document
therefore reuses those two protocols as its building blocks. therefore reuses those two protocols as its building blocks.
This document defines a secure join solution for a new device, called CoJP is a generic protocol that can be used as-is in all modes of
"pledge", to securely join a 6TiSCH network. The specification IEEE Std 802.15.4, including the Time-Slotted Channel Hopping (TSCH)
defines the Constrained Join Protocol (CoJP) used by the pledge to mode 6TiSCH is based on. CoJP may as well be used in other (low-
request admission into a network managed by the JRC, and for the JRC power) networking technologies where efficiency in terms of
to configure the pledge with the necessary parameters and update them communication overhead and code footprint is important. In such a
at a later time, a new CoAP option, and configures different layers case, it may be necessary to define configuration parameters specific
of the 6TiSCH protocol stack for the join process to occur in a to the technology in question, through companion documents. The
secure manner. overall process described in Section 4 and the configuration of the
stack is specific to 6TiSCH.
The Constrained Join Protocol defined in this document is generic and
can be used as-is in modes of IEEE Std 802.15.4 other than TSCH, that
6TiSCH is based on. The Constrained Join Protocol may as well be
used in other (low-power) networking technologies where efficiency in
terms of communication overhead and code footprint is important. In
such a case, it may be necessary to register configuration parameters
specific to the technology in question, through the IANA process.
The overall join process described in Section 5 and the configuration
of the stack is, however, specific to 6TiSCH.
The Constrained Join Protocol assumes the presence of a JRC (join CoJP assumes the presence of a Join Registrar/Coordinator (JRC), a
registrar/coordinator), a central entity. It further assumes that central entity. The configuration defined in this document assumes
the pledge and the JRC share a symmetric key, called PSK (pre-shared that the pledge and the JRC share a secret cryptographic key, called
key). The PSK is used to configure OSCORE to provide a secure PSK (pre-shared key). The PSK is used to configure OSCORE to provide
channel to CoJP. How the PSK is installed is out of scope of this a secure channel to CoJP. How the PSK is installed is out of scope
document: this may happen through the one-touch provisioning process of this document: this may happen during the provisioning phase or by
or by a key exchange protocol that may precede the execution of the a key exchange protocol that may precede the execution of CoJP.
6TiSCH Join protocol.
When the pledge seeks admission to a 6TiSCH network, it first When the pledge seeks admission to a 6TiSCH network, it first
synchronizes to it, by initiating the passive scan defined in synchronizes to it, by initiating the passive scan defined in
[IEEE802.15.4]. The pledge then exchanges messages with the JRC; [IEEE802.15.4]. The pledge then exchanges CoJP messages with the
these messages can be forwarded by nodes already part of the 6TiSCH JRC; these messages can be forwarded by nodes already part of the
network. The messages exchanged allow the JRC and the pledge to 6TiSCH network, called Join Proxies. The messages exchanged allow
mutually authenticate, based on the PSK. They also allow the JRC to the JRC and the pledge to mutually authenticate, based on the
configure the pledge with link-layer keying material, short properties provided by OSCORE. They also allow the JRC to configure
identifier and other parameters. After this secure join process the pledge with link-layer keying material, short identifier and
successfully completes, the joined node can interact with its other parameters. After this secure join process successfully
neighbors to request additional bandwidth using the 6top Protocol completes, the joined node can interact with its neighbors to request
[I-D.ietf-6tisch-6top-protocol] and start sending the application additional bandwidth using the 6top Protocol [RFC8480] and start
traffic. sending application traffic.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
document are to be interpreted as described in [RFC2119]. These "OPTIONAL" in this document are to be interpreted as described in
words may also appear in this document in lowercase, absent their BCP14 [RFC2119] [RFC8174] when, and only when, they appear in all
normative meanings. capitals, as shown here.
The reader is expected to be familiar with the terms and concepts The reader is expected to be familiar with the terms and concepts
defined in [I-D.ietf-6tisch-terminology], [RFC7252], defined in [I-D.ietf-6tisch-terminology], [RFC7252],
[I-D.ietf-core-object-security], and [RFC8152]. [I-D.ietf-core-object-security], and [RFC8152].
The specification also includes a set of informative specifications The specification also includes a set of informative specifications
using the Concise data definition language (CDDL) using the Concise data definition language (CDDL)
[I-D.ietf-cbor-cddl]. [I-D.ietf-cbor-cddl].
The following terms defined in [I-D.ietf-6tisch-terminology] are used The following terms defined in [I-D.ietf-6tisch-terminology] are used
skipping to change at page 5, line 16 skipping to change at page 5, line 20
The following terms defined in [RFC6775] are also used throughout The following terms defined in [RFC6775] are also used throughout
this document: this document:
o 6LoWPAN Border Router (6LBR) o 6LoWPAN Border Router (6LBR)
The term "6LBR" is used interchangeably with the term "DODAG root" The term "6LBR" is used interchangeably with the term "DODAG root"
defined in [RFC6550], assuming the two entities are co-located, as defined in [RFC6550], assuming the two entities are co-located, as
recommended by [I-D.ietf-6tisch-architecture]. recommended by [I-D.ietf-6tisch-architecture].
The term "pledge", as used throughout the document, explicitly The term "pledge", as used throughout the document, explicitly
denotes non-6LBR devices attempting to join over an IEEE Std 802.15.4 denotes non-6LBR devices attempting to join the network using their
network interface. The device that attempts to join as the 6LBR of IEEE Std 802.15.4 network interface. The device that attempts to
the network and does so over another network interface is explicitly join as the 6LBR of the network and does so over another network
denoted as the "6LBR pledge". When the text equally applies to the interface is explicitly denoted as the "6LBR pledge". When the text
pledge and the 6LBR pledge, the "(6LBR) pledge" form is used. equally applies to the pledge and the 6LBR pledge, the "(6LBR)
pledge" form is used.
In addition, we use the generic terms "network identifier" and
"pledge identifier". See Section 3.
3. Identifiers
The "network identifier" identifies the 6TiSCH network. The network
identifier MUST be carried within Enhanced Beacon (EB) frames.
Typically, the 16-bit Personal Area Network Identifier (PAN ID)
defined in [IEEE802.15.4] is used as the network identifier.
However, PAN ID is not considered a stable network identifier as it
may change during network lifetime if a collision with another
network is detected. Companion documents can specify the use of a
different network identifier for join purposes, but this is out of
scope of this specification.
The "pledge identifier" identifies the (6LBR) pledge. The pledge In addition, we use generic terms "pledge identifier" and "network
identifier MUST be unique in the set of all pledge identifiers identifier". See Section 3.
managed by a JRC. The pledge identifier uniqueness is an important
security requirement, as discussed in Section 10. The pledge
identifier is typically the globally unique 64-bit Extended Unique
Identifier (EUI-64) of the IEEE Std 802.15.4 device. This identifier
is used to generate the IPv6 addresses of the (6LBR) pledge and to
identify it during the execution of the join protocol. For privacy
reasons (see Section 11), it is possible to use a pledge identifier
different from the EUI-64. For example, a pledge identifier may be a
random byte string, but care needs to be taken that such a string
meets the uniqueness requirement. How pledge identifier is
configured at the pledge is out of scope of this specification.
4. One-Touch Assumption The terms "secret key" and "symmetric key" are used interchangeably.
This document assumes a one-touch scenario. The (6LBR) pledge is 3. Provisioning Phase
provisioned with certain parameters before attempting to join the
network, and the same parameters are provisioned to the JRC.
There are many ways by which this provisioning can be done. The (6LBR) pledge is provisioned with certain parameters before
Physically, the parameters can be written into the (6LBR) pledge attempting to join the network, and the same parameters are
using a number of mechanisms, such as a JTAG interface, a serial provisioned to the JRC. There are many ways by which this
(craft) console interface, pushing buttons simultaneously on provisioning can be done. Physically, the parameters can be written
different devices, over-the-air configuration in a Faraday cage, etc. into the (6LBR) pledge using a number of mechanisms, such as a JTAG
The provisioning can be done by the vendor, the manufacturer, the interface, a serial (craft) console interface, pushing buttons
integrator, etc. simultaneously on different devices, over-the-air configuration in a
Faraday cage, etc. The provisioning can be done by the vendor, the
manufacturer, the integrator, etc.
Details of how this provisioning is done is out of scope of this Details of how this provisioning is done is out of scope of this
document. What is assumed is that there can be a secure, private document. What is assumed is that there can be a secure, private
conversation between the JRC and the (6LBR) pledge, and that the two conversation between the JRC and the (6LBR) pledge, and that the two
devices can exchange the parameters. devices can exchange the parameters.
Parameters that are provisioned to the (6LBR) pledge include: Parameters that are provisioned to the (6LBR) pledge include:
o Pre-Shared Key (PSK). The JRC additionally needs to store the o pledge identifier. The pledge identifier identifies the (6LBR)
pledge identifier bound to the given PSK. Each (6LBR) pledge MUST pledge. The pledge identifier MUST be unique in the set of all
be provisioned with a unique PSK. The PSK SHOULD be a pledge identifiers managed by a JRC. The pledge identifier
uniqueness is an important security requirement, as discussed in
Section 9. The pledge identifier is typically the globally unique
64-bit Extended Unique Identifier (EUI-64) of the IEEE Std
802.15.4 device, in which case it is provisioned by the hardware
manufacturer. The pledge identifier is used to generate the IPv6
addresses of the (6LBR) pledge and to identify it during the
execution of the join protocol. For privacy reasons (see
Section 10), it is possible to use a pledge identifier different
from the EUI-64. For example, a pledge identifier may be a random
byte string, but care needs to be taken that such a string meets
the uniqueness requirement.
o Pre-Shared Key (PSK). A secret cryptographic key shared between
the (6LBR) pledge and the JRC. The JRC additionally needs to
store the pledge identifier bound to the given PSK. Each (6LBR)
pledge MUST be provisioned with a unique PSK. The PSK SHOULD be a
cryptographically strong key, at least 128 bits in length, cryptographically strong key, at least 128 bits in length,
indistinguishable by feasible computation from a random uniform indistinguishable by feasible computation from a random uniform
string of the same length. How the PSK is generated and/or string of the same length. How the PSK is generated and/or
provisioned is out of scope of this specification. This could be provisioned is out of scope of this specification. This could be
done during a provisioning step or companion documents can specify done during a provisioning step or companion documents can specify
the use of a key agreement protocol. Common pitfalls when the use of a key agreement protocol. Common pitfalls when
generating PSKs are discussed in Section 10. generating PSKs are discussed in Section 9.
o Optionally, a network identifier. Provisioning the network o Optionally, a network identifier. The network identifier
identifier is RECOMMENDED. However, due to the operational identifies the 6TiSCH network. The network identifier MUST be
constraints the network identifier may not be known at the time carried within Enhanced Beacon (EB) frames. Typically, the 16-bit
when the provisioning is done. In case this parameter is not Personal Area Network Identifier (PAN ID) defined in
provisioned to the pledge, the pledge attempts to join one network [IEEE802.15.4] is used as the network identifier. However, PAN ID
at a time, which significantly prolongs the join process. In case is not considered a stable network identifier as it may change
this parameter is not provisioned to the 6LBR pledge, the 6LBR during network lifetime if a collision with another network is
pledge can receive it from the JRC as part of the join protocol. detected. Companion documents can specify the use of a different
network identifier for join purposes, but this is out of scope of
this specification. Provisioning the network identifier is
RECOMMENDED. However, due to operational constraints, the network
identifier may not be known at the time when the provisioning is
done. In case this parameter is not provisioned to the pledge,
the pledge attempts to join one advertised network at a time,
which significantly prolongs the join process. In case this
parameter is not provisioned to the 6LBR pledge, the 6LBR pledge
can receive it from the JRC as part of the join protocol.
o Optionally, any non-default algorithms. The default algorithms o Optionally, any non-default algorithms. The default algorithms
are specified in Section 9.6. When algorithm identifiers are not are specified in Section 7.3.3. When algorithm identifiers are
exchanged, the use of these default algorithms is implied. not exchanged, the use of these default algorithms is implied.
Additionally, the 6LBR pledge that is not co-located with the JRC Additionally, the 6LBR pledge that is not co-located with the JRC
needs to be provisioned with: needs to be provisioned with:
o Global IPv6 address of the JRC. This address is used by the 6LBR o Global IPv6 address of the JRC. This address is used by the 6LBR
pledge to address the JRC during the join process. The 6LBR pledge to address the JRC during the join process. The 6LBR
pledge may also obtain the IPv6 address of the JRC through other pledge may also obtain the IPv6 address of the JRC through other
available mechanisms, such as DHCPv6, GRASP, mDNS, the use of available mechanisms, such as DHCPv6, GRASP, mDNS, the use of
which is out of scope of this document. Pledges do not need to be which is out of scope of this document. Pledges do not need to be
provisioned with this address as they discover it dynamically provisioned with this address as they discover it dynamically
during the join process. through CoJP.
5. Join Process Overview 4. Join Process Overview
This section describes the steps taken by a pledge in a 6TiSCH This section describes the steps taken by a pledge in a 6TiSCH
network. When a pledge seeks admission to a 6TiSCH network, the network. When a pledge seeks admission to a 6TiSCH network, the
following exchange occurs: following exchange occurs:
1. The pledge listens for an Enhanced Beacon (EB) frame 1. The pledge listens for an Enhanced Beacon (EB) frame
[IEEE802.15.4]. This frame provides network synchronization [IEEE802.15.4]. This frame provides network synchronization
information, and tells the device when it can send a frame to the information, and tells the device when it can send a frame to the
node sending the beacons, which acts as a Join Proxy (JP) for the node sending the beacons, which acts as a Join Proxy (JP) for the
pledge, and when it can expect to receive a frame. The Enhanced pledge, and when it can expect to receive a frame. The Enhanced
skipping to change at page 8, line 19 skipping to change at page 8, line 19
| | | | | |
|<---Enhanced Beacon (1)---| | |<---Enhanced Beacon (1)---| |
| | | | | |
|<-Neighbor Discovery (2)->| | |<-Neighbor Discovery (2)->| |
| | | | | |
|-----Join Request (3a)----|----Join Request (3a)---->| \ |-----Join Request (3a)----|----Join Request (3a)---->| \
| | | | CoJP | | | | CoJP
|<----Join Response (3b)---|----Join Response (3b)----| / |<----Join Response (3b)---|----Join Response (3b)----| /
| | | | | |
Figure 1: Overview of a successful join process. CoJP stands for Figure 1: Overview of a successful join process.
Constrained Join Protocol.
As other nodes in the network, the 6LBR node may act as the JP. The As other nodes in the network, the 6LBR node may act as the JP. The
6LBR may in addition be co-located with the JRC. 6LBR may in addition be co-located with the JRC.
The details of each step are described in the following sections. The details of each step are described in the following sections.
5.1. Step 1 - Enhanced Beacon 4.1. Step 1 - Enhanced Beacon
The pledge synchronizes to the network by listening for, and The pledge synchronizes to the network by listening for, and
receiving, an Enhanced Beacon (EB) sent by a node already in the receiving, an Enhanced Beacon (EB) sent by a node already in the
network. This process is entirely defined by [IEEE802.15.4], and network. This process is entirely defined by [IEEE802.15.4], and
described in [RFC7554]. described in [RFC7554].
Once the pledge hears an EB, it synchronizes to the joining schedule Once the pledge hears an EB, it synchronizes to the joining schedule
using the cells contained in the EB. The pledge can hear multiple using the cells contained in the EB. The pledge can hear multiple
EBs; the selection of which EB to use is out of the scope for this EBs; the selection of which EB to use is out of the scope for this
document, and is discussed in [RFC7554]. Implementers should make document, and is discussed in [RFC7554]. Implementers should make
use of information such as: what network identifier the EB contains, use of information such as: what network identifier the EB contains,
the value of the Join Metric field within EBs, whether the source the value of the Join Metric field within EBs, whether the source
link-layer address of the EB has been tried before, what signal link-layer address of the EB has been tried before, what signal
strength the different EBs were received at, etc. In addition, the strength the different EBs were received at, etc. In addition, the
pledge may be pre-configured to search for EBs with a specific pledge may be pre-configured to search for EBs with a specific
network identifier. network identifier.
If the pledge is not provisioned with the network identifier, it If the pledge is not provisioned with the network identifier, it
attempts to join one network at a time, as described in attempts to join one network at a time, as described in
Section 9.3.1. Section 8.1.1.
Once the pledge selects the EB, it synchronizes to it and transitions Once the pledge selects the EB, it synchronizes to it and transitions
into a low-power mode. It follows the provided schedule which into a low-power mode. It follows the schedule information contained
indicates the slots that the pledge may use for the join process. in the EB which indicates the slots that the pledge may use for the
join process. During the remainder of the join process, the node
During the remainder of the join process, the node that has sent the that has sent the EB to the pledge acts as the JP.
EB to the pledge acts as the JP.
At this point, the pledge may proceed to step 2, or continue to At this point, the pledge may proceed to step 2, or continue to
listen for additional EBs. listen for additional EBs.
5.2. Step 2 - Neighbor Discovery 4.2. Step 2 - Neighbor Discovery
The pledge forms its link-local IPv6 address based on the interface The pledge forms its link-local IPv6 address based on the interface
identifier, as per [RFC4944]. The pledge MAY perform the Neighbor identifier, as per [RFC4944]. The pledge MAY perform the Neighbor
Solicitation / Neighbor Advertisement exchange with the JP, as per Solicitation / Neighbor Advertisement exchange with the JP, as per
Section 5.5.1 of [RFC6775]. The pledge and the JP use their link- Section 5.5.1 of [RFC6775]. The pledge and the JP use their link-
local IPv6 addresses for all subsequent communication during the join local IPv6 addresses for all subsequent communication during the join
process. process.
Note that Neighbor Discovery exchanges at this point are not Note that Neighbor Discovery exchanges at this point are not
protected with link-layer security as the pledge is not in possession protected with link-layer security as the pledge is not in possession
of the keys. How JP accepts these unprotected frames is discussed in of the keys. How JP accepts these unprotected frames is discussed in
Section 6. Section 5.
5.3. Step 3 - Constrained Join Protocol (CoJP) Execution 4.3. Step 3 - Constrained Join Protocol (CoJP) Execution
The pledge triggers the join exchange of the Constrained Join The pledge triggers the join exchange of the Constrained Join
Protocol (CoJP). The join exchange consists of two messages: the Protocol (CoJP). The join exchange consists of two messages: the
Join Request message (Step 3a), and the Join Response message Join Request message (Step 3a), and the Join Response message
conditioned on the successful security processing of the request conditioned on the successful security processing of the request
(Step 3b). (Step 3b).
All CoJP messages are exchanged over a secure end-to-end channel that All CoJP messages are exchanged over a secure end-to-end channel that
provides confidentiality, data authenticity and replay protection. provides confidentiality, data authenticity and replay protection.
Frames carrying CoJP messages are not protected with link-layer Frames carrying CoJP messages are not protected with link-layer
security when exchanged between the pledge and the JP as the pledge security when exchanged between the pledge and the JP as the pledge
is not in possession of the link-layer keys in use. How JP and is not in possession of the link-layer keys in use. How JP and
pledge accept these unprotected frames is discussed in Section 6. pledge accept these unprotected frames is discussed in Section 5.
When frames carrying CoJP messages are exchanged between nodes that When frames carrying CoJP messages are exchanged between nodes that
have already joined the network, the link-layer security is applied have already joined the network, the link-layer security is applied
according to the security configuration used in the network. according to the security configuration used in the network.
5.3.1. Step 3a - Join Request 4.3.1. Step 3a - Join Request
The Join Request is a message sent from the pledge to the JP, and The Join Request is a message sent from the pledge to the JP, and
which the JP forwards to the JRC. The pledge indicates in the Join which the JP forwards to the JRC. The pledge indicates in the Join
Request the role it requests to play in the network as well as the Request the role it requests to play in the network, as well as the
identifier of the network it requests to join. The JP forwards the identifier of the network it requests to join. The JP forwards the
Join Request to the JRC on the existing 6TiSCH network. How exactly Join Request to the JRC on the existing links. How exactly this
this happens is out of scope of this document; some networks may wish happens is out of scope of this document; some networks may wish to
to dedicate specific slots for this join traffic. dedicate specific link layer resources for this join traffic.
5.3.2. Step 3b - Join Response 4.3.2. Step 3b - Join Response
The Join Response is sent by the JRC to the pledge, and is forwarded The Join Response is sent by the JRC to the pledge, and is forwarded
through the JP. The packet containing the Join Response travels from through the JP. The packet containing the Join Response travels from
the JRC to JP using the operating routes in the 6TiSCH network. The the JRC to the JP using the operating routes in the network. The JP
JP delivers it to the pledge. The JP operates as the application- delivers it to the pledge. The JP operates as the application-layer
layer proxy, and does not keep any state to forward the message. proxy.
The Join Response contains different parameters needed by the pledge The Join Response contains different parameters needed by the pledge
to become a fully operational network node. For example, these to become a fully operational network node. These parameters include
parameters are the link-layer key(s) currently in use in the network, the link-layer key(s) currently in use in the network, the short
the short link-layer address assigned to the pledge, the IPv6 address address assigned to the pledge, the IPv6 address of the JRC needed by
of the JRC needed by the pledge to operate as the JP, and others. the pledge to operate as the JP, amoung others.
5.4. The Special Case of the 6LBR Pledge Joining 4.4. The Special Case of the 6LBR Pledge Joining
The 6LBR pledge performs Section 5.3 of the join process described The 6LBR pledge performs Section 4.3 of the join process described
above, just as any other pledge, albeit over another network above, just as any other pledge, albeit over a different network
interface. There is no JP intermediating the communication between interface. There is no JP intermediating the communication between
the 6LBR pledge and the JRC, as described in Section 7. The other the 6LBR pledge and the JRC, as described in Section 6. The other
steps of the described join process do not apply to the 6LBR pledge. steps of the described join process do not apply to the 6LBR pledge.
How the 6LBR pledge obtains an IPv6 address and triggers the How the 6LBR pledge obtains an IPv6 address and triggers the
execution of the CoJP protocol is out of scope of this document. execution of the CoJP protocol is out of scope of this document.
6. Link-layer Configuration 5. Link-layer Configuration
In an operational 6TiSCH network, all frames MUST use link-layer In an operational 6TiSCH network, all frames MUST use link-layer
frame security [RFC8180]. The IEEE Std 802.15.4 security attributes frame security [RFC8180]. The IEEE Std 802.15.4 security attributes
MUST include frame authenticity, and MAY include frame MUST include frame authenticity, and MAY include frame
confidentiality (i.e. encryption). confidentiality (i.e. encryption).
The pledge does not initially do any authenticity check of the EB The pledge does not initially do any authenticity check of the EB
frames, as it does not possess the link-layer key(s) in use. The frames, as it does not possess the link-layer key(s) in use. The
pledge is still able to parse the contents of the received EBs and pledge is still able to parse the contents of the received EBs and
synchronize to the network, as EBs are not encrypted [RFC8180]. synchronize to the network, as EBs are not encrypted [RFC8180].
skipping to change at page 10, line 52 skipping to change at page 10, line 52
unencrypted and unauthenticated frames. The JP accepts these unencrypted and unauthenticated frames. The JP accepts these
unsecured frames for the duration of the join process. This behavior unsecured frames for the duration of the join process. This behavior
may be implemented by setting the "secExempt" attribute in the IEEE may be implemented by setting the "secExempt" attribute in the IEEE
Std 802.15.4 security configuration tables. How the JP learns Std 802.15.4 security configuration tables. How the JP learns
whether the join process is ongoing is out of scope of this whether the join process is ongoing is out of scope of this
specification. specification.
As the EB itself cannot be authenticated by the pledge, an attacker As the EB itself cannot be authenticated by the pledge, an attacker
may craft a frame that appears to be a valid EB, since the pledge can may craft a frame that appears to be a valid EB, since the pledge can
neither verify the freshness nor verify the address of the JP. This neither verify the freshness nor verify the address of the JP. This
opens up a possibility of DoS attack, as discussed in Section 10. opens up a DoS vector, as discussed in Section 9.
7. Network-layer Configuration 6. Network-layer Configuration
The pledge and the JP SHOULD keep a separate neighbor cache for The pledge and the JP SHOULD keep a separate neighbor cache for
untrusted entries and use it to store each other's information during untrusted entries and use it to store each other's information during
the join process. Mixing neighbor entries belonging to pledges and the join process. Mixing neighbor entries belonging to pledges and
nodes that are part of the network opens up the JP to a DoS attack, nodes that are part of the network opens up the JP to a DoS attack,
as the attacker may fill JP's neighbor table and prevent the as the attacker may fill JP's neighbor table and prevent the
discovery of legitimate neighbors. discovery of legitimate neighbors.
Once the pledge obtains link-layer keys and becomes a joined node, it Once the pledge obtains link-layer keys and becomes a joined node, it
is able to securely communicate with its neighbors, obtain the is able to securely communicate with its neighbors, obtain the
network IPv6 prefix and form a global IPv6 address. The joined node network IPv6 prefix and form its global IPv6 address. The joined
then undergoes an independent process to bootstrap the neighbor cache node then undergoes an independent process to bootstrap its neighbor
entries, possibly with a node that formerly acted as a JP, following cache entries, possibly with a node that formerly acted as a JP,
[RFC6775]. From the point of view of the JP, there is no relation following [RFC6775]. From the point of view of the JP, there is no
between the neighbor cache entry belonging to a pledge and the joined relationship between the neighbor cache entry belonging to a pledge
node that formerly acted as a pledge. and the joined node that formerly acted as a pledge.
The pledge does not communicate with the JRC at the network layer. The pledge does not communicate with the JRC at the network layer.
This allows the pledge to join without knowing the IPv6 address of This allows the pledge to join without knowing the IPv6 address of
the JRC. Instead, the pledge communicates with the JP at the network the JRC. Instead, the pledge communicates with the JP at the network
layer using link-local addressing, and with the JRC at the layer using link-local addressing, and with the JRC at the
application layer, as specified in Section 8. application layer, as specified in Section 7.
The JP communicates with the JRC over global IPv6 addresses. The JP The JP communicates with the JRC over global IPv6 addresses. The JP
discovers the network IPv6 prefix and configures its global IPv6 discovers the network IPv6 prefix and configures its global IPv6
address upon successful completion of the join process and the address upon successful completion of the join process and the
obtention of link-layer keys. The pledge learns the actual IPv6 obtention of link-layer keys. The pledge learns the IPv6 address of
address of the JRC from the Join Response, as specified in the JRC from the Join Response, as specified in Section 8.1.2; it
Section 9.1.2; it uses it once joined in order to operate as a JP. uses it once joined in order to operate as a JP.
As a special case, the 6LBR pledge is expected to have an additional As a special case, the 6LBR pledge is expected to have an additional
network interface that it uses in order to obtain the configuration network interface that it uses in order to obtain the configuration
parameters from the JRC and start advertising the 6TiSCH network. parameters from the JRC and start advertising the 6TiSCH network.
This additional interface needs to be configured with a global IPv6 This additional interface needs to be configured with a global IPv6
address, by a mechanism that is out of scope of this document. The address, by a mechanism that is out of scope of this document. The
6LBR pledge uses this interface to directly communicate with the JRC 6LBR pledge uses this interface to directly communicate with the JRC
using global IPv6 addressing. using global IPv6 addressing.
The JRC can be co-located on the 6LBR. In this special case, the The JRC can be co-located on the 6LBR. In this special case, the
IPv6 address of the JRC can be omitted from the Join Response message IPv6 address of the JRC can be omitted from the Join Response message
for space optimization. The 6LBR then MUST set the DODAGID field in for space optimization. The 6LBR then MUST set the DODAGID field in
the RPL DIOs [RFC6550] to its IPv6 address. The pledge learns the the RPL DIOs [RFC6550] to its IPv6 address. The pledge learns the
address of the JRC once joined and upon the reception of the first address of the JRC once joined and upon the reception of the first
RPL DIO message, and uses it to operate as a JP. RPL DIO message, and uses it to operate as a JP.
7.1. Identification of Join Request Traffic 6.1. Identification of Unauthenticated Traffic
The join request traffic that is proxied by the Join Proxy (JP) comes The traffic that is proxied by the Join Proxy (JP) comes from
from unauthenticated nodes, and there may be an arbitrary amount of unauthenticated pledges, and there may be an arbitrary amount of it.
it. In particular, an attacker may send fraudulent traffic in In particular, an attacker may send fraudulent traffic in an attempt
attempt to overwhelm the network. to overwhelm the network.
When operating as part of a [RFC8180] 6TiSCH minimal network using When operating as part of a [RFC8180] 6TiSCH minimal network using
distributed scheduling algorithms, the join request traffic present distributed scheduling algorithms, the traffic from unauthenticated
may cause intermediate nodes to request additional bandwidth. An pledges may cause intermediate nodes to request additional bandwidth.
attacker could use this property to cause the network to overcommit An attacker could use this property to cause the network to
bandwidth (and energy) to the join process. overcommit bandwidth (and energy) to the join process.
The Join Proxy is aware of what traffic is join request traffic, and The Join Proxy is aware of what traffic originates from
so can avoid allocating additional bandwidth itself. The Join Proxy unauthenticated pledges, and so can avoid allocating additional
SHOULD implement a bandwidth cap on outgoing join request traffic. bandwidth itself. The Join Proxy implements a bandwidth cap on
outgoing join traffic through CoAP's congestion control mechanism.
This cap will not protect intermediate nodes as they can not tell This cap will not protect intermediate nodes as they can not tell
join request traffic from regular traffic. Despite the bandwidth cap join traffic from regular traffic. Despite the bandwidth cap
implemented separately on each Join Proxy, the aggregate join request implemented separately on each Join Proxy, the aggregate join traffic
traffic from many Join Proxies may cause intermediate nodes to decide from many Join Proxies may cause intermediate nodes to decide to
to allocate additional cells. It is undesirable to do so in response allocate additional cells. It is undesirable to do so in response to
to the join request traffic. In order to permit the intermediate the traffic originated at unauthenticated pledges. In order to
nodes to avoid this, the traffic needs to be tagged. permit the intermediate nodes to avoid this, the traffic needs to be
tagged. [RFC2597] defines a set of per-hop behaviors that may be
encoded into the Diffserv Code Points (DSCPs). Based on the DSCP,
intermediate nodes can decide whether to act on a given packet.
[RFC2597] defines a set of per-hop behaviors that may be encoded into 6.1.1. Traffic from JP to JRC
the Diffserv Code Points (DSCPs). The Join Proxy SHOULD set the DSCP
of join request packets that it produces as part of the relay process
to AF43 code point (See Section 6 of [RFC2597]).
A Join Proxy that does not set the DSCP on traffic forwarded should The Join Proxy SHOULD set the DSCP of packets that it produces as
set it to zero so that it is compressed out. part of the forwarding process to AF43 code point (See Section 6 of
[RFC2597]). A Join Proxy that does not set the DSCP on traffic
forwarded should set it to zero so that it is compressed out.
A Scheduling Function (SF) running on 6TiSCH nodes SHOULD NOT A Scheduling Function (SF) running on 6TiSCH nodes SHOULD NOT
allocate additional cells as a result of traffic with code point allocate additional cells as a result of traffic with code point
AF43. Companion SF documents SHOULD specify how this recommended AF43. Companion SF documents SHOULD specify how this recommended
behavior is achieved. behavior is achieved.
7.2. Identification of Join Response Traffic 6.1.2. Traffic from JRC to JP
The JRC SHOULD set the DSCP of join response packets addressed to the The JRC SHOULD set the DSCP of join response packets addressed to the
Join Proxy to AF42 code point. Join response traffic can not be Join Proxy to AF42 code point. AF42 has lower drop probability than
induced by an attacker as it is generated only in response to AF43, giving this traffic priority in buffers over the traffic going
legitimate pledges (see Section 9.3.1). AF42 has lower drop towards the JRC.
probability than AF43, giving join response traffic priority in
buffers over join request traffic.
Due to the convergecast nature of the DODAG, the 6LBR links are often Due to the convergecast nature of the DODAG, the 6LBR links are often
the most congested, and from that point down there is progressively the most congested, and from that point down there is progressively
less (or equal) congestion. If the 6LBR paces itself when sending less (or equal) congestion. If the 6LBR paces itself when sending
join response traffic then it ought to never exceed the bandwidth join response traffic then it ought to never exceed the bandwidth
allocated to the best effort traffic cells. If the 6LBR has the allocated to the best effort traffic cells. If the 6LBR has the
capacity (if it is not constrained) then it should provide some capacity (if it is not constrained) then it should provide some
buffers in order to satisfy the Assured Forwarding behavior. buffers in order to satisfy the Assured Forwarding behavior.
Companion SF documents SHOULD specify how traffic with code point Companion SF documents SHOULD specify how traffic with code point
AF42 is handled with respect to cell allocation. AF42 is handled with respect to cell allocation.
8. Application-level Configuration 7. Application-level Configuration
The CoJP join exchange in Figure 1 is carried over CoAP [RFC7252] and The CoJP join exchange in Figure 1 is carried over CoAP [RFC7252] and
the secure channel provided by OSCORE the secure channel provided by OSCORE
[I-D.ietf-core-object-security]. The (6LBR) acts as a CoAP client; [I-D.ietf-core-object-security]. The (6LBR) acts as a CoAP client;
the JRC acts as a CoAP server. The JP implements CoAP forward proxy the JRC acts as a CoAP server. The JP implements CoAP forward proxy
functionality [RFC7252]. Because the JP can also be a constrained functionality [RFC7252]. Because the JP can also be a constrained
device, it cannot implement a cache. device, it cannot implement a cache.
The pledge designates a JP as a proxy by including the Proxy-Scheme The pledge designates a JP as a proxy by including the Proxy-Scheme
option in CoAP requests it sends to the JP. The pledge also includes option in CoAP requests it sends to the JP. The pledge also includes
in the requests the Uri-Host option with its value set to the well- in the requests the Uri-Host option with its value set to the well-
known JRC's alias, as specified in Section 9.1.1. known JRC's alias, as specified in Section 8.1.1.
The JP resolves the alias to the IPv6 address of the JRC that it The JP resolves the alias to the IPv6 address of the JRC that it
learned when it acted as a pledge, and joined the network. This learned when it acted as a pledge, and joined the network. This
allows the JP to reach the JRC at the network layer and forward the allows the JP to reach the JRC at the network layer and forward the
requests on behalf of the pledge. requests on behalf of the pledge.
The JP also tags all packets carrying the Join Request message at the 7.1. Statelessness of the JP
network layer, as specified in Section 7.1.
8.1. Statelessness of the JP
The CoAP proxy defined in [RFC7252] keeps per-client state The CoAP proxy defined in [RFC7252] keeps per-client state
information in order to forward the response towards the originator information in order to forward the response towards the originator
of the request. This state information includes at least the CoAP of the request. This state information includes at least the CoAP
token, the IPv6 address of the client, and the UDP source port token, the IPv6 address of the client, and the UDP source port
number. Since the JP can be a constrained device that acts as a CoAP number. Since the JP can be a constrained device that acts as a CoAP
proxy, memory limitations make it prone to Denial-of-Service (DoS) proxy, memory limitations make it prone to a Denial-of-Service (DoS)
attacks. attack.
The DoS risk on the JP can be mitigated by making the JP act as a
stateless CoAP proxy. The JP can wrap the state it needs to keep for
a given pledge throughout the network stack in a "state object" and
include it as a CoAP token in the forwarded request to the JRC (i.e.
origin server). The JP may use the CoAP token as defined in
[RFC7252], if the size of the serialized state object permits, or use
the extended CoAP token being defined in [I-D.hartke-core-stateless].
Since the CoAP token is echoed back in the response, the JP is able This DoS vector on the JP can be mitigated by making the JP act as a
to decode the token and configure the state needed to forward the stateless CoAP proxy, where "state" refers to individual pledges.
The JP can wrap the state it needs to keep for a given pledge
throughout the network stack in a "state object" and include it as a
CoAP token in the forwarded request to the JRC. The JP may use the
CoAP token as defined in [RFC7252], if the size of the serialized
state object permits, or use the extended CoAP token defined in
[I-D.hartke-core-stateless], to transport the state object. Since
the CoAP token is echoed back in the response, the JP is able to
decode the state object and configure the state needed to forward the
response to the pledge. The information that the JP needs to encode response to the pledge. The information that the JP needs to encode
in the state object to operate in a fully stateless manner with in the state object to operate in a fully stateless manner with
respect to a given pledge is implementation specific. In all cases, respect to a given pledge is implementation specific.
the state object communicated in the token SHOULD be integrity
protected, with a key that is known only to the JP, and SHOULD
include a freshness indicator. It is RECOMMENDED that the JP
operates in a stateless manner and signals the per-pledge state
within the CoAP token, for every request it forwards into the network
on behalf of unauthenticated pledges.
Note, however, that in some networking stack implementations, a fully It is RECOMMENDED that the JP operates in a stateless manner and
stateless operation of the JP may be challenging from the signals the per-pledge state within the CoAP token, for every request
implementation point of view. In those cases, the JP may operate as it forwards into the network on behalf of unauthenticated pledges.
a statefull proxy that stores the per-pledge state until the response When operating in a stateles manner, the state object communicated in
is received or timed out, but this comes at an increased risk of DoS the token MUST be integrity protected, potentially with a key that is
attacks. known only to the JP, MUST include a freshness indicator, and MAY be
encrypted. Security considerations from [I-D.hartke-core-stateless]
apply.
8.2. OSCORE Security Context When operating in a stateless manner, the type of the CoAP message
that the JP forwards on behalf of the pledge MUST be non-confirmable
(NON), regardless of the message type received from the pledge. The
use of a non-confirmable message by the JP alleviates the JP from
keeping CoAP message exchange state. The retransmission burden is
then entirely shifted to the pledge. A JP that operates in a
stateless manner still needs to keep congestion control state with
the JRC, see Section 9. Recommended values of CoAP settings for use
during the join process, both by the pledge and the JP, are given in
Section 7.2.
Before the (6LBR) pledge and the JRC may start exchanging CoAP Note that in some networking stack implementations, a fully (per-
messages protected with OSCORE, they need to derive the OSCORE pledge) stateless operation of the JP may be challenging from the
security context from the parameters provisioned out-of-band, as implementation's point of view. In those cases, the JP may operate
discussed in Section 4. as a statefull proxy that stores the per-pledge state until the
response is received or timed out, but this comes at a price of an
additional DoS vector.
7.2. Recommended Settings
This section gives RECOMMENDED values of CoAP settings during the
join process.
+-------------------+-----------------------+-------------------+
| Name | Default Value: Pledge | Default Value: JP |
+-------------------+-----------------------+-------------------+
| ACK_TIMEOUT | 10 seconds | (10 seconds) |
| | | |
| ACK_RANDOM_FACTOR | 1.5 | (1.5) |
| | | |
| MAX_RETRANSMIT | 4 | (4) |
| | | |
| NSTART | 1 | (3) |
| | | |
| PROBING_RATE | 4 byte/second | 12 byte/second |
+-------------------+-----------------------+-------------------+
Recommended CoAP settings. Values enclosed in () have no effect when
JP operates in a stateless manner.
These values may be configured to values specific to the deployment.
The default values have been chosen to accommodate a wide range of
deployments, taking into account dense networks. Increased values of
NSTART and PROBING_RATE at the JP enable multiple pledges
(approximately 3 pledges by default) to concurrently join through the
same JP. Following [RFC7252], the average data rate in sending to JP
or JRC must not exceed PROBING_RATE. For security reasons, the
average data rate SHOULD be measured over a rather short window, e.g.
ACK_TIMEOUT, see Section 9.
7.3. OSCORE
Before the (6LBR) pledge and the JRC start exchanging CoAP messages
protected with OSCORE, they need to derive the OSCORE security
context from the provisioned parameters, as discussed in Section 3.
The OSCORE security context MUST be derived as per Section 3 of The OSCORE security context MUST be derived as per Section 3 of
[I-D.ietf-core-object-security]. [I-D.ietf-core-object-security].
o the Master Secret MUST be the PSK. o the Master Secret MUST be the PSK.
o the Master Salt MUST be the empty byte string. o the Master Salt MUST be the empty byte string.
o the ID of the pledge MUST be set to the byte string 0x00. This o the ID Context MUST be set to the pledge identifier.
o the ID of the pledge MUST be set to the empty byte string. This
identifier is used as the OSCORE Sender ID of the pledge in the identifier is used as the OSCORE Sender ID of the pledge in the
security context derivation, as the pledge initially acts as a security context derivation, since the pledge initially acts as a
CoAP client. CoAP client.
o the ID of the JRC MUST be set to the byte string 0x4a5243 ("JRC" o the ID of the JRC MUST be set to the byte string 0x4a5243 ("JRC"
in ASCII). This identifier is used as the OSCORE Recipient ID of in ASCII). This identifier is used as the OSCORE Recipient ID of
the pledge in the security context derivation, as the JRC the pledge in the security context derivation, as the JRC
initially acts as a CoAP server. initially acts as a CoAP server.
o the ID Context MUST be set to the pledge identifier.
o the Algorithm MUST be set to the value from [RFC8152], agreed out- o the Algorithm MUST be set to the value from [RFC8152], agreed out-
of-band by the same mechanism used to provision the PSK. The of-band by the same mechanism used to provision the PSK. The
default is AES-CCM-16-64-128. default is AES-CCM-16-64-128.
o the Key Derivation Function MUST be agreed out-of-band. Default o the Key Derivation Function MUST be agreed out-of-band by the same
is HKDF SHA-256 [RFC5869]. mechanism used to provision the PSK. Default is HKDF SHA-256
[RFC5869].
The derivation in [I-D.ietf-core-object-security] results in traffic Since the pledge's OSCORE ID is the empty byte string, when
keys and a common IV for each side of the conversation. Nonces are constructing the OSCORE option, the pledge sets the k bit in the
constructed by XOR'ing the common IV with the current sequence number OSCORE flag byte, but indicates a 0-length kid. The pledge
and sender identifier. For details on nonce construction, refer to transports its pledge identifier within the kid context field of the
[I-D.ietf-core-object-security]. OSCORE option. The derivation in [I-D.ietf-core-object-security]
results in OSCORE keys and a common IV for each side of the
conversation. Nonces are constructed by XOR'ing the common IV with
the current sequence number. For details on nonce and OSCORE option
construction, refer to [I-D.ietf-core-object-security].
Implementations MUST ensure that multiple CoAP requests to different Implementations MUST ensure that multiple CoAP requests to different
JRCs are properly incrementing the sequence numbers in the OSCORE JRCs are properly incrementing the sequence numbers in the OSCORE
security context for each message, so that the same sequence number security context for each message, so that the same sequence number
is never reused in distinct requests. The pledge typically sends is never reused in distinct requests. The pledge typically sends
requests to different JRCs if it is not provisioned with the network requests to different JRCs if it is not provisioned with the network
identifier and attempts to join one network at a time. A simple identifier and attempts to join one network at a time. A simple
implementation technique is to instantiate the OSCORE security implementation technique is to instantiate the OSCORE security
context with a given PSK only once and use it for all subsequent context with a given PSK only once and use it for all subsequent
requests. Failure to comply will break the security guarantees of requests. Failure to comply will break the security guarantees of
the Authenticated Encryption with Associated Data (AEAD) algorithm the Authenticated Encryption with Associated Data (AEAD) algorithm
due to the nonce reuse. because of nonce reuse.
This OSCORE security context is used for initial joining of the This OSCORE security context is used for initial joining of the
(6LBR) pledge, where the (6LBR) pledge acts as a CoAP client, as well (6LBR) pledge, where the (6LBR) pledge acts as a CoAP client, as well
as for any later parameter updates, where the JRC acts as a CoAP as for any later parameter updates, where the JRC acts as a CoAP
client and the joined node as a CoAP server, as discussed in client and the joined node as a CoAP server, as discussed in
Section 9.2. The (6LBR) pledge and the JRC use the OSCORE security Section 8.2. The (6LBR) pledge and the JRC use the OSCORE security
context parameters (e.g. sender and recipient identifiers) as they context parameters (e.g. sender and recipient identifiers) as they
were used at the moment of context derivation, regardless of whether were used at the moment of context derivation, regardless of whether
they currently act as a CoAP client or a CoAP server. A (6LBR) they currently act as a CoAP client or a CoAP server. A (6LBR)
pledge is expected to have exactly one OSCORE security context with pledge is expected to have exactly one OSCORE security context with
the JRC. the JRC.
8.2.1. Replay Window and Persistency 7.3.1. Replay Window and Persistency
Both (6LBR) pledge and the JRC MUST implement a replay protection Both (6LBR) pledge and the JRC MUST implement a replay protection
mechanism. The use of the default OSCORE replay protection mechanism mechanism. The use of the default OSCORE replay protection mechanism
specified in Section 3.2.2 of [I-D.ietf-core-object-security] is specified in Section 3.2.2 of [I-D.ietf-core-object-security] is
RECOMMENDED. RECOMMENDED.
Implementations MUST ensure that mutable OSCORE context parameters Implementations MUST ensure that mutable OSCORE context parameters
(Sender Sequence Number, Replay Window) are stored in persistent (Sender Sequence Number, Replay Window) are stored in persistent
memory. A technique that prevents reuse of sequence numbers, memory. A technique that prevents reuse of sequence numbers,
detailed in Section 7.5.1 of [I-D.ietf-core-object-security], MUST be detailed in Section 7.5.1 of [I-D.ietf-core-object-security], MUST be
implemented. Each update of the OSCORE Replay Window MUST be written implemented. Each update of the OSCORE Replay Window MUST be written
to persistent memory. to persistent memory.
This is an important security requirement in order to guarantee nonce This is an important security requirement in order to guarantee nonce
uniqueness and resistance to replay attacks across reboots and uniqueness and resistance to replay attacks across reboots and
rejoins. Traffic between the (6LBR) pledge and the JRC is rare, rejoins. Traffic between the (6LBR) pledge and the JRC is rare,
making security outweigh the cost of writing to persistent memory. making security outweigh the cost of writing to persistent memory.
9. Constrained Join Protocol (CoJP) 7.3.2. OSCORE Error Handling
Constrained Join Protocol (CoJP) is a lightweight protocol over CoAP Errors raised by OSCORE during the join process MUST be silently
[RFC7252] and a secure channel provided by OSCORE dropped, with no error response being signaled. The pledge MUST
silently discard any response not protected with OSCORE, including
error codes.
Such errors may happen for a number of reasons, including failed
lookup of an appropriate security context (e.g. the pledge attempting
to join a wrong network), failed decryption, positive replay window
lookup, formatting errors (possibly due to malicious alterations in
transit). Silently dropping OSCORE messages prevents a DoS attack on
the pledge where the attacker could send bogus error responses,
forcing the pledge to attempt joining one network at a time, until
all networks have been tried.
7.3.3. Mandatory to Implement Algorithms
The mandatory to implement AEAD algorithm for use with OSCORE is AES-
CCM-16-64-128 from [RFC8152]. This is the algorithm used for
securing IEEE Std 802.15.4 frames, and hardware acceleration for it
is present in virtually all compliant radio chips. With this choice,
CoAP messages are protected with an 8-byte CCM authentication tag,
and the algorithm uses 13-byte long nonces.
The mandatory to implement hash algorithm is SHA-256 [RFC4231]. The
mandatory to implement key derivation function is HKDF [RFC5869],
instantiated with a SHA-256 hash. See Appendix B for implementation
guidance when code footprint is important.
8. Constrained Join Protocol (CoJP)
The Constrained Join Protocol (CoJP) is a lightweight protocol over
CoAP [RFC7252] and a secure channel provided by OSCORE
[I-D.ietf-core-object-security]. CoJP allows the (6LBR) pledge to [I-D.ietf-core-object-security]. CoJP allows the (6LBR) pledge to
request admission into a network managed by the JRC, and for the JRC request admission into a network managed by the JRC, and for the JRC
to configure the pledge with the parameters necessary for joining the to configure the pledge with the parameters necessary for joining the
network, or advertising it in the case of 6LBR pledge. The JRC may network, or advertising it in the case of 6LBR pledge. The JRC may
update the parameters at any time, by reaching out to the joined node update the parameters at any time, by reaching out to the joined node
that formerly acted as a (6LBR) pledge. For example, network-wide that formerly acted as a (6LBR) pledge. For example, network-wide
rekeying can be implemented by updating the keying material on each rekeying can be implemented by updating the keying material on each
node. node.
This section specifies how the CoJP messages are mapped to CoAP and This section specifies how the CoJP messages are mapped to CoAP and
skipping to change at page 16, line 50 skipping to change at page 18, line 48
| UDP | | UDP |
+-----------------------------------+ +-----------------------------------+
Figure 2: Abstract layering of CoJP. Figure 2: Abstract layering of CoJP.
When a (6LBR) pledge requests admission to a given network, it When a (6LBR) pledge requests admission to a given network, it
undergoes the CoJP join exchange that consists of: undergoes the CoJP join exchange that consists of:
o the Join Request message, sent by the (6LBR) pledge to the JRC, o the Join Request message, sent by the (6LBR) pledge to the JRC,
potentially proxied by the JP. The Join Request message and its potentially proxied by the JP. The Join Request message and its
mapping to CoAP is specified in Section 9.1.1. mapping to CoAP is specified in Section 8.1.1.
o the Join Response message, sent by the JRC to the (6LBR) pledge if o the Join Response message, sent by the JRC to the (6LBR) pledge,
the JRC successfully processes the Join Request using OSCORE and if the JRC successfully processes the Join Request using OSCORE
it determines through a mechanism that is out of scope of this and it determines through a mechanism that is out of scope of this
specification that the (6LBR) pledge is authorized to join the specification that the (6LBR) pledge is authorized to join the
network. The Join Response message is potentially proxied by the network. The Join Response message is potentially proxied by the
JP. The Join Response message and its mapping to CoAP is JP. The Join Response message and its mapping to CoAP is
specified in Section 9.1.2. specified in Section 8.1.2.
When the JRC needs to update the parameters of a joined node that When the JRC needs to update the parameters of a joined node that
formerly acted as a (6LBR) pledge, it executes the CoJP parameter formerly acted as a (6LBR) pledge, it executes the CoJP parameter
update exchange that consists of: update exchange that consists of:
o the Parameter Update message, sent by the JRC to the joined node o the Parameter Update message, sent by the JRC to the joined node
that formerly acted as a (6LBR) pledge. The Parameter Update that formerly acted as a (6LBR) pledge. The Parameter Update
message and its mapping to CoAP is specified in Section 9.2.1. message and its mapping to CoAP is specified in Section 8.2.1.
o the Parameter Update Response message, sent by the joined node to o the Parameter Update Response message, sent by the joined node to
the JRC in response to the Parameter Update message to signal the JRC in response to the Parameter Update message to signal
successful reception of the updated parameters. The Parameter successful reception of the updated parameters. The Parameter
Update Response message and its mapping to CoAP is specified in Update Response message and its mapping to CoAP is specified in
Section 9.2.2. Section 8.2.2.
The payload of CoJP messages is encoded with CBOR [RFC7049]. The The payload of CoJP messages is encoded with CBOR [RFC7049]. The
CBOR data structures that may appear as the payload of different CoJP CBOR data structures that may appear as the payload of different CoJP
messages are specified in Section 9.4. messages are specified in Section 8.4.
9.1. Join Exchange 8.1. Join Exchange
This section specifies the messages exchanged when the (6LBR) pledge This section specifies the messages exchanged when the (6LBR) pledge
requests admission and configuration parameters from the JRC. requests admission and configuration parameters from the JRC.
9.1.1. Join Request Message 8.1.1. Join Request Message
The Join Request message SHALL be mapped to a CoAP request: The Join Request message that the (6LBR) pledge sends SHALL be mapped
to a CoAP request:
o The request method is POST. o The request method is POST.
o The type is Non-confirmable (NON). o The type is Confirmable (CON).
o The Proxy-Scheme option is set to "coap". o The Proxy-Scheme option is set to "coap".
o The Uri-Host option is set to "6tisch.arpa". This is an anycast o The Uri-Host option is set to "6tisch.arpa". This is an anycast
type of identifier of the JRC that is resolved to its IPv6 address type of identifier of the JRC that is resolved to its IPv6 address
by the JP or the 6LBR pledge. by the JP or the 6LBR pledge.
o The Uri-Path option is set to "j". o The Uri-Path option is set to "j".
o The Object-Security option SHALL be set according to o The OSCORE option SHALL be set according to
[I-D.ietf-core-object-security]. The OSCORE security context used [I-D.ietf-core-object-security]. The OSCORE security context used
is the one derived in Section 8.2. The OSCORE kid context allows is the one derived in Section 7.3. The OSCORE kid context allows
the JRC to retrieve the security context for a given pledge. the JRC to retrieve the security context for a given pledge.
o The payload is a Join_Request CBOR object, as defined in o The payload is a Join_Request CBOR object, as defined in
Section 9.4.1. Section 8.4.1.
9.1.2. Join Response Message Since the Join Request is a confirmable message, the transmission at
(6LBR) pledge will be controlled by CoAP's retransmission mechanism.
The JP, when operating in a stateless manner, forwards this Join
Request as a non-confirmable (NON) CoAP message, as specified in
Section 7. If the CoAP at (6LBR) pledge declares the message
transmission as failure, the (6LBR) pledge SHOULD attempt to join the
next advertised 6TiSCH network. See Section 7.2 for recommended
values of CoAP settings to use during the join exchange.
If all join attempts to advertised networks have failed, the (6LBR)
pledge SHOULD signal to the user the presence of an error condition,
through some out-of-band mechanism.
8.1.2. Join Response Message
The Join Response message that the JRC sends SHALL be mapped to a The Join Response message that the JRC sends SHALL be mapped to a
CoAP response: CoAP response:
o The response Code is 2.04 (Changed). o The response Code is 2.04 (Changed).
o The payload is a Configuration CBOR object, as defined in o The payload is a Configuration CBOR object, as defined in
Section 9.4.2. Section 8.4.2.
9.2. Parameter Update Exchange 8.2. Parameter Update Exchange
During the network lifetime, parameters returned as part of the Join During the network lifetime, parameters returned as part of the Join
Response may need to be updated. One typical example is the update Response may need to be updated. One typical example is the update
of link-layer keying material for the network, a process known as of link-layer keying material for the network, a process known as
rekeying. This section specifies a generic mechanism when this rekeying. This section specifies a generic mechanism when this
parameter update is initiated by the JRC. parameter update is initiated by the JRC.
At the time of the join, the (6LBR) pledge acts as a CoAP client and At the time of the join, the (6LBR) pledge acts as a CoAP client and
requests the network parameters through a representation of the "/j" requests the network parameters through a representation of the "/j"
resource, exposed by the JRC. In order for the update of these resource, exposed by the JRC. In order for the update of these
skipping to change at page 18, line 47 skipping to change at page 21, line 9
becomes the joined node and obtains a global address. becomes the joined node and obtains a global address.
Instead, once the (6LBR) pledge receives and successfully validates Instead, once the (6LBR) pledge receives and successfully validates
the Join Response and so becomes a joined node, it becomes a CoAP the Join Response and so becomes a joined node, it becomes a CoAP
server. The joined node exposes the "/j" resource that is used by server. The joined node exposes the "/j" resource that is used by
the JRC to update the parameters. Consequently, the JRC operates as the JRC to update the parameters. Consequently, the JRC operates as
a CoAP client when updating the parameters. The request/response a CoAP client when updating the parameters. The request/response
exchange between the JRC and the (6LBR) pledge happens over the exchange between the JRC and the (6LBR) pledge happens over the
already-established OSCORE secure channel. already-established OSCORE secure channel.
9.2.1. Parameter Update Message 8.2.1. Parameter Update Message
The Parameter Update message that the JRC sends to the joined node The Parameter Update message that the JRC sends to the joined node
SHALL be mapped to a CoAP request: SHALL be mapped to a CoAP request:
o The request method is POST. o The request method is POST.
o The type is Confirmable (CON). o The type is Confirmable (CON).
o The Uri-Path option is set to "j". o The Uri-Path option is set to "j".
o The Object-Security option SHALL be set according to o The OSCORE option SHALL be set according to
[I-D.ietf-core-object-security]. The OSCORE security context used [I-D.ietf-core-object-security]. The OSCORE security context used
is the one derived in Section 8.2. When a joined node receives a is the one derived in Section 7.3. When a joined node receives a
request with the Sender ID set to 0x4a5243 (ID of the JRC), it is request with the Sender ID set to 0x4a5243 (ID of the JRC), it is
able to correctly retrieve the security context with the JRC. able to correctly retrieve the security context with the JRC.
o The payload is a Configuration CBOR object, as defined in o The payload is a Configuration CBOR object, as defined in
Section 9.4.2. Section 8.4.2.
The JRC has implicit knowledge on the global IPv6 address of the The JRC has implicit knowledge on the global IPv6 address of the
joined node, as it knows the pledge identifier that the joined node joined node, as it knows the pledge identifier that the joined node
used when it acted as a pledge, and the IPv6 network prefix. The JRC used when it acted as a pledge, and the IPv6 network prefix. The JRC
uses this implicitly derived IPv6 address of the joined node to uses this implicitly derived IPv6 address of the joined node to
directly address CoAP messages to it. directly address CoAP messages to it.
In case the JRC does not receive a response to a Parameter Update In case the JRC does not receive a response to a Parameter Update
message, it will attempt multiple retransmissions, as configured by message, it attempts multiple retransmissions, as configured by the
the underlying CoAP retransmission mechanism triggered for underlying CoAP retransmission mechanism triggered for confirmable
confirmable messages. Finally, if the CoAP implementation declares messages. Finally, if the CoAP implementation declares the
that the destination is unreachable, the JRC may consider this as a transmission as failure, the JRC may consider this as a hint that the
hint that the joined node is no longer in the network. How JRC joined node is no longer in the network. How the JRC decides when to
decides when to stop managing a given joined node is out of scope of stop attempting to contact a previously joined node is out of scope
this specification but security considerations on the reuse of of this specification but security considerations on the reuse of
assigned resources apply, as discussed in Section 10. assigned resources apply, as discussed in Section 9.
9.2.2. Parameter Update Response Message 8.2.2. Parameter Update Response Message
The Parameter Update Response message that the joined node sends to The Parameter Update Response message that the joined node sends to
the JRC SHALL be mapped to a CoAP response: the JRC SHALL be mapped to a CoAP response:
o The response Code is 2.04 (Changed). o The response Code is 2.04 (Changed).
o The payload is empty. o The payload is empty.
9.3. Error Handling 8.3. Error Handling
9.3.1. OSCORE Error Handling and Retransmission
This section describes handling of errors raised by the underlying
OSCORE.
Since the Join Request is mapped to a Non-confirmable CoAP message,
OSCORE processing at the JRC will silently drop the request in case
of a failure. This may happen for a number of reasons, including
failed lookup of an appropriate security context (e.g. the pledge
attempting to join a wrong network), failed decryption, positive
replay window lookup, formatting errors (possibly due to malicious
alterations in transit). Silently dropping the Join Request at the
JRC prevents a DoS attack where an attacker could force the pledge to
attempt joining one network at a time, until all networks have been
tried.
Using a Non-confirmable CoAP message to transport the Join Request
also helps minimize the required CoAP state at the pledge and the
Join Proxy, keeping it to a minimum typically needed to perform CoAP
congestion control. It does, however, introduce some complexity as
the pledge needs to implement a retransmission mechanism.
The following binary exponential back-off algorithm is inspired by
the one described in [RFC7252]. For each Join Request the pledge
sends while waiting for a Join Response, the pledge MUST keep track
of a timeout and a retransmission counter. For a new Join Request,
the timeout is set to a random value between TIMEOUT_BASE and
(TIMEOUT_BASE * TIMEOUT_RANDOM_FACTOR). The retransmission counter
is set to 0. When the timeout is triggered and the retransmission
counter is less than MAX_RETRANSMIT, the Join Request is
retransmitted, the retransmission counter is incremented, and the
timeout is doubled. Note that the retransmitted Join Request passes
new OSCORE processing, such that the sequence number in the OSCORE
context is properly incremented. If the retransmission counter
reaches MAX_RETRANSMIT on a timeout, the pledge SHOULD attempt to
join the next advertised 6TiSCH network. If the pledge receives a
Join Response that successfully passes OSCORE processing, it cancels
the pending timeout and processes the response. The pledge MUST
silently discard any response not protected with OSCORE, including
error codes. For default values of retransmission parameters, see
Section 9.5.
If all join attempts to advertised networks have failed, the pledge
SHOULD signal to the user the presence of an error condition, through
some out-of-band mechanism.
9.3.2. CoJP CBOR Object Processing 8.3.1. CoJP CBOR Object Processing
This section describes error handling when processing CoJP CBOR This section describes error handling when processing CoJP CBOR
objects that are transported within the payload of different CoJP objects that are transported within the payload of different CoJP
messages. See Section 9.3.1 for the handling of errors that may be messages. See Section 7.3.2 for the handling of errors that may be
raised by the underlying OSCORE implementation. raised by the underlying OSCORE implementation.
CoJP CBOR objects are transported both within CoAP requests and CoJP CBOR objects are transported within both CoAP requests and
responses. When an error is detected while processing CoJP objects responses. When an error is detected while processing CoJP objects
in a CoAP request (Join Request message, Parameter Update message), in a CoAP request (Join Request message, Parameter Update message),
Error Response message MUST be returned. Error Response message maps an Error Response message MUST be returned. An Error Response
to a CoAP response and is specified in Section 9.3.3. message maps to a CoAP response and is specified in Section 8.3.2.
When an error is detected while processing a CoJP object in a CoAP When an error is detected while processing a CoJP object in a CoAP
response (Join Response message), a (6LBR) pledge SHOULD reattempt to response (Join Response message), a (6LBR) pledge SHOULD reattempt to
join. In this case, the (6LBR) pledge SHOULD enclose an Error CBOR join. In this case, the (6LBR) pledge SHOULD include the Error CBOR
object within the Join Request object in the following Join Request object within the Join Request object in the following Join Request
message. A (6LBR) pledge MUST NOT attempt more than MAX_RETRANSMIT message. A (6LBR) pledge MUST NOT attempt more than MAX_RETRANSMIT
number of attempts to join if the processing of the Join Response number of attempts to join if the processing of the Join Response
message fails. If MAX_RETRANSMIT number of attempts is reached message fails each time. If COJP_MAX_JOIN_ATTEMPTS number of
without success, the (6LBR) pledge SHOULD signal to the user the attempts is reached without success, the (6LBR) pledge SHOULD signal
presence of an error condition, through some out-of-band mechanism. to the user the presence of an error condition, through some out-of-
band mechanism.
9.3.3. Error Response Message 8.3.2. Error Response Message
The Error Response Message is returned for any CoJP request when the The Error Response Message is returned for any CoJP request when the
processing of the payload failed. Note that the Error Response processing of the payload failed. The Error Response message is
message is protected by OSCORE as any other CoJP protocol message. protected by OSCORE as any other CoJP protocol message.
The Error Response message SHALL be mapped to a CoAP response: The Error Response message SHALL be mapped to a CoAP response:
o The response Code is 4.00 (Bad Request). o The response Code is 4.00 (Bad Request).
o The payload is an Error CBOR object, as defined in Section 9.4.5, o The payload is an Error CBOR object, as defined in Section 8.4.5,
containing the error code that triggered the sending of this containing the error code that triggered the sending of this
message. message.
9.3.4. Failure Handling 8.3.3. Failure Handling
The Parameter Update exchange may be triggered at any time during the The Parameter Update exchange may be triggered at any time during the
network lifetime that may span several years. During this period, it network lifetime, which may span several years. During this period,
may occur that a joined node or the JRC experience unexpected events it may occur that a joined node or the JRC experience unexpected
such as reboots or complete failures. events such as reboots or complete failures.
This document mandates that the mutable parameters in the security This document mandates that the mutable parameters in the security
context are written to persistent memory (see Section 8.2.1) by both context are written to persistent memory (see Section 7.3.1) by both
the JRC and pledges (joined nodes). In case of a reboot on either the JRC and pledges (joined nodes). In case of a reboot on either
side, the retrieval of mutable security context parameters is side, the retrieval of mutable security context parameters is
feasible from the persistent memory such that there is no risk of feasible from the persistent memory such that there is no risk of
AEAD nonce reuse due to a reinitialized Sender Sequence number, or of AEAD nonce reuse due to a reinitialized Sender Sequence number, or of
a replay attack due to the reinitialized replay window. a replay attack due to the reinitialized replay window.
In the case of a complete failure, where the mutable security context In the case of a complete failure, where the mutable security context
parameters cannot be retrieved, it is expected that a failed joined parameters cannot be retrieved, it is expected that a failed joined
node is replaced with a new physical device, using a new pledge node is replaced with a new physical device, using a new pledge
identifier and a PSK. When such an event occurs at the JRC, it is identifier and a PSK. When such an event occurs at the JRC, it is
likely that the information about joined nodes, their assigned short likely that the information about joined nodes, their assigned short
identifiers and mutable security context parameters is lost. If this identifiers and mutable security context parameters is lost. If this
is the case, during the process of JRC replacement, the network is the case, during the process of JRC replacement, the network
administrator MUST force all the networks managed by the failed JRC administrator MUST force all the networks managed by the failed JRC
to rejoin, through e.g. the reinitialization of the 6LBR nodes. to rejoin, through e.g. the reinitialization of the 6LBR nodes.
Since the joined nodes kept track of their mutable security context Since the joined nodes kept track of their mutable security context
parameters, they will use these during the (re)join exchange without parameters, they will use these during the (re)join exchange without
a risk of AEAD nonce reuse. However, even after all the nodes a risk of AEAD nonce reuse. However, even after all the nodes
rejoined, an AEAD nonce reuse risk exists during the first Parameter rejoined, the AEAD nonce reuse risk exists during the first Parameter
Update exchange, as the new JRC does not possess the last Sender Update exchange, as the new JRC does not possess the last Sender
Sequence number used, and can only initialize it to zero. Since the Sequence number used, and can only initialize it to zero. Since the
loss of security properties including confidentiality for this sending of this first Parameter Update message by the new JRC results
message is likely the JRC MUST limit the information that may be in AEAD nonce reuse, the JRC MUST set the payload to a randomly
exposed within. generated byte string, at least 40 bytes long.
When such a message arrives at the joined node, the OSCORE When such a message arrives at the joined node, the OSCORE
implementation rejects it due to the Partial IV being largely below implementation rejects it due to the Partial IV being largely below
the acceptable replay window state. When this is detected, the the acceptable replay window state and does not process the payload.
joined node MUST send an Error Response message with error code set When this is detected, the joined node MUST send an Error Response
to "Invalid parameter: OSCORE partial IV" from Table 4 and Additional message with error code set to "Significant OSCORE partial IV
information set to the next Partial IV it will expect. When mismatch" from Table 4 and Additional information set to the next
protecting this error response by OSCORE, the joined node MUST use Partial IV it will expect. When protecting this error response by
the value of its Sender Sequence number to generate the Partial IV OSCORE, the joined node uses the value of its Sender Sequence number
and include it in the CoAP OSCORE option, as specified by to generate the Partial IV and includes it in the CoAP OSCORE option,
[I-D.ietf-core-object-security]. Upon successful OSCORE verification as specified by [I-D.ietf-core-object-security]. Upon successful
of the received CoJP message, the JRC processes the error response OSCORE verification of the received CoJP message, the JRC processes
and configures the Sender Sequence number to the one indicated in the the error response and configures the Sender Sequence number to the
Additional information field. The next Parameter Update exchange one indicated in the Additional information field. The next
triggered by the JRC will therefore use the proper Sender Sequence Parameter Update exchange triggered by the JRC will therefore use the
number and will be accepted by the joined node. proper Sender Sequence number and will be accepted by the joined
node.
9.4. CoJP Objects 8.4. CoJP Objects
This section specifies the structure of CoJP CBOR objects that may be This section specifies the structure of CoJP CBOR objects that may be
carried as the payload of CoJP messages. Some of these objects may carried as the payload of CoJP messages. Some of these objects may
be received both as part of the CoJP join exchange when the device be received both as part of the CoJP join exchange when the device
operates as a (CoJP) pledge, or the parameter update exchange, when operates as a (CoJP) pledge, or the parameter update exchange, when
the device operates as a joined (6LBR) node. the device operates as a joined (6LBR) node.
9.4.1. Join Request Object 8.4.1. Join Request Object
The Join_Request structure is built on a CBOR map object. The Join_Request structure is built on a CBOR map object.
The set of parameters that can appear in a Join_Request object is The set of parameters that can appear in a Join_Request object is
summarized below. The labels can be found in "CoJP Parameters" summarized below. The labels can be found in the "CoJP Parameters"
registry Section 12.1, initially populated with the values from registry Section 11.1.
Table 2.
o role: The identifier of the role that the pledge requests to play o role: The identifier of the role that the pledge requests to play
in the network once it joins, encoded as an unsigned integer. in the network once it joins, encoded as an unsigned integer.
Possible values are specified in Table 1. This parameter MAY be Possible values are specified in Table 1. This parameter MAY be
included. In case the parameter is omitted, the default value of included. In case the parameter is omitted, the default value of
0, i.e. the role "6TiSCH Node", MUST be assumed. 0, i.e. the role "6TiSCH Node", MUST be assumed.
o network identifier: The identifier of the network, as discussed in o network identifier: The identifier of the network, as discussed in
Section 3, encoded as a CBOR byte string. This parameter may Section 3, encoded as a CBOR byte string. This parameter may
appear both in the Join_Request and in the Configuration objects. appear both in the Join_Request and in the Configuration objects.
When present in the Join_Request, it hints to the JRC the network When present in the Join_Request, it hints to the JRC the network
that the pledge is requesting to join, enabling the JRC to manage that the pledge is requesting to join, enabling the JRC to manage
multiple networks. The pledge obtains the value of the network multiple networks. The pledge obtains the value of the network
skipping to change at page 23, line 20 skipping to change at page 24, line 38
Section 3, encoded as a CBOR byte string. This parameter may Section 3, encoded as a CBOR byte string. This parameter may
appear both in the Join_Request and in the Configuration objects. appear both in the Join_Request and in the Configuration objects.
When present in the Join_Request, it hints to the JRC the network When present in the Join_Request, it hints to the JRC the network
that the pledge is requesting to join, enabling the JRC to manage that the pledge is requesting to join, enabling the JRC to manage
multiple networks. The pledge obtains the value of the network multiple networks. The pledge obtains the value of the network
identifier from the received EB frames. This parameter MUST be identifier from the received EB frames. This parameter MUST be
included in a Join_Request object if the role parameter is set to included in a Join_Request object if the role parameter is set to
"6TiSCH Node". This parameter MAY be included if the role "6TiSCH Node". This parameter MAY be included if the role
parameter is set to "6LBR". The inclusion of this parameter by parameter is set to "6LBR". The inclusion of this parameter by
the 6LBR pledge depends on whether the parameter was exchanged the 6LBR pledge depends on whether the parameter was exchanged
during the one-touch process, which in turn depends on the during the provisioning phase, which in turn depends on the
operational constraints. operational constraints.
o response processing error: The identifier of the error from the o response processing error: The identifier of the error from the
previous join attempt, encoded as an Error object described in previous join attempt, encoded as an Error object described in
Section 9.4.5. This parameter MAY be included. If a (6LBR) Section 8.4.5. This parameter MAY be included. If a (6LBR)
pledge previously attempted to join and received a valid Join pledge previously attempted to join and received a valid Join
Response message over OSCORE but failed to process its payload Response message over OSCORE, but failed to process its payload
(Configuration object), it SHOULD include this parameter to (Configuration object), it SHOULD include this parameter to
facilitate the debugging process. facilitate the debugging process.
The CDDL fragment that represents the text above for the Join_Request The CDDL fragment that represents the text above for the Join_Request
follows. follows.
Join_Request = { Join_Request = {
? 1 : uint, ; role ? 1 : uint, ; role
? 5 : bstr, ; network identifier ? 5 : bstr, ; network identifier
? 7 : Error, ; response processing error ? 7 : Error, ; response processing error
skipping to change at page 24, line 5 skipping to change at page 25, line 25
| Node | | role of a regular 6TiSCH node, i.e. | document]] | | Node | | role of a regular 6TiSCH node, i.e. | document]] |
| | | non-6LBR node. | | | | | non-6LBR node. | |
| | | | | | | | | |
| 6LBR | 1 | The pledge requests to play the | [[this | | 6LBR | 1 | The pledge requests to play the | [[this |
| | | role of 6LoWPAN Border Router | document]] | | | | role of 6LoWPAN Border Router | document]] |
| | | (6LBR). | | | | | (6LBR). | |
+--------+-------+-------------------------------------+------------+ +--------+-------+-------------------------------------+------------+
Table 1: Role values. Table 1: Role values.
9.4.2. Configuration Object 8.4.2. Configuration Object
The Configuration structure is built on a CBOR map object. The set The Configuration structure is built on a CBOR map object. The set
of parameters that can appear in a Configuration object is summarized of parameters that can appear in a Configuration object is summarized
below. The labels can be found in "CoJP Parameters" registry below. The labels can be found in "CoJP Parameters" registry
Section 12.1, initially populated with the values from Table 2. Section 11.1.
o link-layer key set: An array encompassing a set of cryptographic o link-layer key set: An array encompassing a set of cryptographic
keys and their identifiers that are currently in use in the keys and their identifiers that are currently in use in the
network, or that are scheduled to be used in the future. The network, or that are scheduled to be used in the future. The
encoding of individual keys is described in Section 9.4.3. The encoding of individual keys is described in Section 8.4.3. The
link-layer key set parameter MAY be included in a Configuration link-layer key set parameter MAY be included in a Configuration
object. When present, the link-layer key set parameter MUST object. When present, the link-layer key set parameter MUST
contain at least one key. How the keys are installed and used contain at least one key. How the keys are installed and used
differs for the 6LBR and other nodes. When 6LBR receives this differs for the 6LBR and other nodes. When 6LBR receives this
parameter, it MUST remove any old keys it has installed from the parameter, it MUST immediately install and start using the new
previous key set and immediately install and start using the new keys for all outgoing traffic, and remove any old keys it has
keys for all outgoing and incoming traffic. When a non-6LBR node installed from the previous key set after a delay of
COJP_REKEYING_GUARD_TIME has passed. When a non-6LBR node
receives this parameter, it MUST install the keys, use them for receives this parameter, it MUST install the keys, use them for
any incoming traffic matching the key identifier, but keep using any incoming traffic matching the key identifier, but keep using
the old keys for all outgoing traffic. A non-6LBR node accepts the old keys for all outgoing traffic. 6LBR and non-6LBR nodes
any frames for which it has keys: both old and new keys. Upon accept any frame for which they have keys: both old and new keys.
reception and successful security processing of a link-layer frame Upon reception and successful security processing of a link-layer
secured with a key from the new key set, a non-6LBR node MUST frame secured with a key from the new key set, a non-6LBR node
remove any old keys it has installed from the previous key set. MUST start using the keys from the new set for all outgoing
From that moment on, a non-6LBR node MUST use the keys from the traffic. A non-6LBR node MUST remove any old keys it has
new key set for all outgoing traffic. In the case when the pledge installed from the previous key set after a delay of
COJP_REKEYING_GUARD_TIME has passed. In the case when the pledge
is joining for the first time, before sending the first outgoing is joining for the first time, before sending the first outgoing
frame secured with a received key, the pledge needs to frame secured with a received key, the pledge needs to
successfully complete the security processing of an incoming successfully complete the security processing of an incoming
frame. To do so, the pledge can wait to receive a new frame or it frame. To do so, the pledge can wait to receive a new frame, or
can also store an EB frame that it used to find the JP and use it it can store an EB frame that it used to find the JP and use it
for immediate security processing upon reception of the key set. for immediate security processing upon reception of the key set.
The described mechanism permits the JRC to provision the new key The described mechanism permits the JRC to provision the new key
set to all the nodes while the network continues to use the set to all the nodes while the network continues to use the
existing keys. When the JRC is certain that all (or enough) nodes existing keys. When the JRC is certain that all (or enough) nodes
have been provisioned with the new keys, then the JRC updates the have been provisioned with the new keys, then the JRC updates the
6LBR. In the special case when the JRC is co-located with the 6LBR. In the special case when the JRC is co-located with the
6LBR, it can simply trigger the sending of a new broadcast frame 6LBR, it can simply trigger the sending of a new broadcast frame
(e.g. EB), secured with a key from the new key set. The frame (e.g. EB), secured with a key from the new key set. The frame
goes out with the new key, and upon reception and successful goes out with the new key, and upon reception and successful
security processing of the new frame all receiving nodes will security processing of the new frame all receiving nodes will
switch to the new active keys. Outgoing traffic from those nodes switch to the new active keys. Outgoing traffic from those nodes
will then use the new key, which causes an update of additional will then use the new key, which causes an update of additional
peers, and the network will switch over in a flood-fill fashion. peers, and the network will switch over in a flood-fill fashion.
o short identifier: a compact identifier assigned to the pledge. o short identifier: a compact identifier assigned to the pledge.
The short identifier structure is described in Section 9.4.4. The The short identifier structure is described in Section 8.4.4. The
short identifier parameter MAY be included in a Configuration short identifier parameter MAY be included in a Configuration
object. object.
o JRC address: the IPv6 address of the JRC, encoded as a byte o JRC address: the IPv6 address of the JRC, encoded as a byte
string, with the length of 16 bytes. If the length of the byte string, with the length of 16 bytes. If the length of the byte
string is different than 16, the parameter MUST be discarded. If string is different from 16, the parameter MUST be discarded. If
the JRC is not co-located with the 6LBR and has a different IPv6 the JRC is not co-located with the 6LBR and has a different IPv6
address than the 6LBR, this parameter MUST be included. In the address than the 6LBR, this parameter MUST be included. In the
special case where the JRC is co-located with the 6LBR and has the special case where the JRC is co-located with the 6LBR and has the
same IPv6 address as the 6LBR, this parameter MAY be included. If same IPv6 address as the 6LBR, this parameter MAY be included. If
the JRC address parameter is not present in the Configuration the JRC address parameter is not present in the Configuration
object, this indicates that the JRC has the same IPv6 address as object, this indicates that the JRC has the same IPv6 address as
the 6LBR. The joined node can then discover the IPv6 address of the 6LBR. The joined node can then discover the IPv6 address of
the JRC through network control traffic. See Section 7. the JRC through network control traffic. See Section 6.
o network identifier: the identifier of the network, as discussed in o network identifier: the identifier of the network, as discussed in
Section 3, encoded as a byte string. When present in the Section 3, encoded as a byte string. When present in the
Configuration object, this parameter is only valid when received Configuration object, this parameter is only valid when received
by the 6LBR pledge. The parameter indicates to the 6LBR the value by the 6LBR pledge. The parameter indicates to the 6LBR the value
of the network identifier it should advertise at the link layer. of the network identifier it should advertise at the link layer.
This parameter MUST NOT be included in the Configuration object if This parameter MUST NOT be included in the Configuration object if
the role parameter from the corresponding Join_Request object the role parameter from the corresponding Join_Request object
indicated 0, i.e. the role "6TiSCH Node". In the case where the indicated 0, i.e. the role "6TiSCH Node". In the case where the
corresponding Join_Request object does not contain the network corresponding Join_Request object does not contain the network
identifier parameter, this parameter MUST be included. When the identifier parameter, this parameter MUST be included. When the
corresponding Join_Request object does contain the network corresponding Join_Request object does contain the network
identifier parameter, this parameter MAY be included in the identifier parameter, this parameter MAY be included in the
Configuration object. This may happen if the JRC decides to Configuration object. This may happen if the JRC decides to
overwrite the network identifier provisioned during the one-touch overwrite the network identifier obtained during the provisioning
process. The value of the network identifier parameter from the phase. The value of the network identifier parameter from the
Configuration object SHOULD take precedence over the value Configuration object SHOULD take precedence over the value
provisioned during the one-touch process. obtained during the provisioning phase.
o network prefix: the IPv6 network prefix, encoded as a byte string. o blacklist: An array encompassing a list of pledge identifiers that
The length of the byte string determines the prefix length. This are blacklisted by the JRC, with each pledge identifier encoded as
parameter is only valid when received by the 6LBR pledge. The a byte string. The blacklist parameter MAY be included in a
parameter indicates to the 6LBR the value of the IPv6 network Configuration object. When present, the blacklist parameter MUST
prefix. This parameter MAY be included in the Configuration contain at least one pledge identifier. When the joined node
object if the role parameter from the corresponding Join_Request receives this parameter, it MUST silently drop any link-layer
object indicated 1, i.e. the role "6LBR". This parameter MUST NOT frames originating from the indicated pledge identifiers. This
be included in the Configuration object if the role parameter from parameter allows the JRC to configure the node acting as a JP to
the corresponding Join_Request object indicated 0, i.e. the role filter out traffic from misconfigured or malicious pledges before
"6TiSCH Node". their traffic is forwarded into the network.
The CDDL fragment that represents the text above for the The CDDL fragment that represents the text above for the
Configuration follows. Structures Link_Layer_Key and Configuration follows. Structures Link_Layer_Key and
Short_Identifier are specified in Section 9.4.3 and Section 9.4.4. Short_Identifier are specified in Section 8.4.3 and Section 8.4.4.
Configuration = { Configuration = {
? 2 : [ +Link_Layer_Key ], ; link-layer key set ? 2 : [ +Link_Layer_Key ], ; link-layer key set
? 3 : Short_Identifier, ; short identifier ? 3 : Short_Identifier, ; short identifier
? 4 : bstr ; JRC address ? 4 : bstr, ; JRC address
? 5 : bstr ; network identifier ? 5 : bstr, ; network identifier
? 6 : bstr ; network prefix ? 6 : [ +bstr ], ; blacklist
} }
+------------+-------+----------+----------------------+------------+ +------------+-------+----------+----------------------+------------+
| Name | Label | CBOR | Description | Reference | | Name | Label | CBOR | Description | Reference |
| | | type | | | | | | type | | |
+------------+-------+----------+----------------------+------------+ +------------+-------+----------+----------------------+------------+
| role | 1 | unsigned | Identifies the role | [[this | | role | 1 | unsigned | Identifies the role | [[this |
| | | integer | parameter. | document]] | | | | integer | parameter | document]] |
| | | | | | | | | | | |
| link-layer | 2 | array | Identifies the array | [[this | | link-layer | 2 | array | Identifies the array | [[this |
| key set | | | carrying one or more | document]] | | key set | | | carrying one or more | document]] |
| | | | link-level | | | | | | link-level | |
| | | | cryptographic keys. | | | | | | cryptographic keys | |
| | | | | | | | | | | |
| short | 3 | array | Identifies the | [[this | | short | 3 | array | Identifies the | [[this |
| identifier | | | assigned short | document]] | | identifier | | | assigned short | document]] |
| | | | identifier | | | | | | identifier | |
| | | | | | | | | | | |
| JRC | 4 | byte | Identifies the IPv6 | [[this | | JRC | 4 | byte | Identifies the IPv6 | [[this |
| address | | string | address of the JRC | document]] | | address | | string | address of the JRC | document]] |
| | | | | | | | | | | |
| network | 5 | byte | Identifies the | [[this | | network | 5 | byte | Identifies the | [[this |
| identifier | | string | network identifier | document]] | | identifier | | string | network identifier | document]] |
| | | | parameter | | | | | | parameter | |
| | | | | | | | | | | |
| network | 6 | byte | Identifies the IPv6 | [[this | | blacklist | 6 | array | Identifies the | [[this |
| prefix | | string | prefix of the | document]] | | | | | blacklist parameter | document]] |
| | | | network | |
| | | | | | | | | | | |
| error | 7 | array | Identifies the error | [[this | | error | 7 | array | Identifies the error | [[this |
| | | | parameter | document]] | | | | | parameter | document]] |
+------------+-------+----------+----------------------+------------+ +------------+-------+----------+----------------------+------------+
Table 2: CoJP parameters map labels. Table 2: CoJP parameters map labels.
9.4.3. Link-Layer Key 8.4.3. Link-Layer Key
The Link_Layer_Key structure encompasses the parameters needed to The Link_Layer_Key structure encompasses the parameters needed to
configure the link-layer security module: the key identifier; the configure the link-layer security module: the key identifier; the
value of the cryptographic key; the link-layer algorithm identifier value of the cryptographic key; the link-layer algorithm identifier
and the security level and the frame types that it should be used and the security level and the frame types that it should be used
with, both for outgoing and incoming security operations; and any with, both for outgoing and incoming security operations; and any
additional information that may be needed to configure the key. additional information that may be needed to configure the key.
For encoding compactness, Link_Layer_Key object is not enclosed in a For encoding compactness, the Link_Layer_Key object is not enclosed
top-level CBOR object. Rather, it is transported as a sequence of in a top-level CBOR object. Rather, it is transported as a sequence
CBOR elements, with some being optional. of CBOR elements, some being optional.
The set of parameters that can appear in a Link_Layer_Key object is The set of parameters that can appear in a Link_Layer_Key object is
summarized below, in order: summarized below, in order:
o key_id: The identifier of the key, encoded as a CBOR unsigned o key_id: The identifier of the key, encoded as a CBOR unsigned
integer. This parameter MUST be included. If the decoded CBOR integer. This parameter MUST be included. If the decoded CBOR
unsigned integer value is larger than the maximum link-layer key unsigned integer value is larger than the maximum link-layer key
identifier, the key is considered invalid. In case the key is identifier, the key is considered invalid. In case the key is
considered invalid, the implementation MUST discard the key and considered invalid, the key MUST be discarded and the
attempt to decode the next key in the array. implementation MUST signal the error as specified in
Section 8.3.1.
o key_usage: The identifier of the link-layer algorithm, security o key_usage: The identifier of the link-layer algorithm, security
level and link-layer frame types that can be used with the key, level and link-layer frame types that can be used with the key,
encoded as a CBOR unsigned or negative integer. This parameter encoded as an integer. This parameter MAY be included. Possible
MAY be included. Possible values and the corresponding link-layer values and the corresponding link-layer settings are specified in
settings are specified in IANA "CoJP Key Usage" registry IANA "CoJP Key Usage" registry (Section 11.2). In case the
(Section 12.2). In case the parameter is omitted, the default parameter is omitted, the default value of 0 from Table 3 MUST be
value of 0 from Table 3 MUST be assumed. assumed.
o key_value: The value of the cryptographic key, encoded as a byte o key_value: The value of the cryptographic key, encoded as a byte
string. This parameter MUST be included. If the length of the string. This parameter MUST be included. If the length of the
byte string is different than the corresponding key length for a byte string is different than the corresponding key length for a
given algorithm specified by the key_usage parameter, the key MUST given algorithm specified by the key_usage parameter, the key MUST
be discarded and the decoder should attempt to decode the next key be discarded and the implementation MUST signal the error as
in the array. specified in Section 8.3.1.
o key_addinfo: Additional information needed to configure the link- o key_addinfo: Additional information needed to configure the link-
layer key, encoded as a byte string. This parameter MAY be layer key, encoded as a byte string. This parameter MAY be
included. The processing of this parameter is dependent on the included. The processing of this parameter is dependent on the
link-layer technology in use and a particular keying mode. link-layer technology in use and a particular keying mode.
To be able to decode the keys that are present in the link-layer key To be able to decode the keys that are present in the link-layer key
set, and to identify individual parameters of a single Link_Layer_Key set, and to identify individual parameters of a single Link_Layer_Key
object, the CBOR decoder needs to differentiate between elements object, the CBOR decoder needs to differentiate between elements
based on the CBOR type. For example, a uint that follows a byte based on the CBOR type. For example, a uint that follows a byte
string signals to the decoder that a new Link_Layer_Key object is string signals to the decoder that a new Link_Layer_Key object is
being processed. being processed.
The CDDL fragment that represents the text above for the The CDDL fragment that represents the text above for the
Link_Layer_Key follows. Link_Layer_Key follows.
Link_Layer_Key = ( Link_Layer_Key = (
key_id : uint, key_id : uint,
? key_usage : uint / nint, ? key_usage : int,
key_value : bstr, key_value : bstr,
? key_addinfo : bstr, ? key_addinfo : bstr,
) )
+-----------------+-----+------------------+-------------+----------+ +-----------------+-----+------------------+-------------+----------+
| Name | Val | Algorithm | Description | Referenc | | Name | Val | Algorithm | Description | Referenc |
| | ue | | | e | | | ue | | | e |
+-----------------+-----+------------------+-------------+----------+ +-----------------+-----+------------------+-------------+----------+
| 6TiSCH-K1K2 | 0 | IEEE802154-AES- | Use MIC-32 | [[this d | | 6TiSCH-K1K2 | 0 | IEEE802154-AES- | Use MIC-32 | [[this d |
| -ENC-MIC32 | | CCM-128 | for EBs, | ocument] | | -ENC-MIC32 | | CCM-128 | for EBs, | ocument] |
skipping to change at page 30, line 4 skipping to change at page 31, line 41
| | | | DATA and AC | ] | | | | | DATA and AC | ] |
| | | | KNOWLEDGMEN | | | | | | KNOWLEDGMEN | |
| | | | T. | | | | | | T. | |
| | | | | | | | | | | |
| 6TiSCH-K2-ENC- | 14 | IEEE802154-AES- | Use ENC- | [[this d | | 6TiSCH-K2-ENC- | 14 | IEEE802154-AES- | Use ENC- | [[this d |
| MIC128 | | CCM-128 | MIC-128 for | ocument] | | MIC128 | | CCM-128 | MIC-128 for | ocument] |
| | | | DATA and AC | ] | | | | | DATA and AC | ] |
| | | | KNOWLEDGMEN | | | | | | KNOWLEDGMEN | |
| | | | T. | | | | | | T. | |
+-----------------+-----+------------------+-------------+----------+ +-----------------+-----+------------------+-------------+----------+
Table 3: Key Usage values. Table 3: Key Usage values.
9.4.3.1. Use in IEEE Std 802.15.4 8.4.3.1. Use in IEEE Std 802.15.4
When Link_Layer_Key is used in the context of [IEEE802.15.4], When Link_Layer_Key is used in the context of [IEEE802.15.4], the
following considerations apply. following considerations apply.
Signaling of different keying modes of [IEEE802.15.4] is done based Signaling of different keying modes of [IEEE802.15.4] is done based
on the parameter values present in a Link_Layer_Key object. on the parameter values present in a Link_Layer_Key object.
o Key ID Mode 0x00 (Implicit, pairwise): key_id parameter MUST be o Key ID Mode 0x00 (Implicit, pairwise): key_id parameter MUST be
set to 0. key_addinfo parameter MUST be present. key_addinfo set to 0. key_addinfo parameter MUST be present. key_addinfo
parameter MUST be set to the link-layer address(es) of a single parameter MUST be set to the link-layer address(es) of a single
peer with whom the key should be used. Depending on the peer with whom the key should be used. Depending on the
configuration of the network, key_addinfo may carry the peer's configuration of the network, key_addinfo may carry the peer's
skipping to change at page 31, line 11 skipping to change at page 33, line 5
Key ID Mode 0x00 (Implicit, pairwise) enables the JRC to act as a Key ID Mode 0x00 (Implicit, pairwise) enables the JRC to act as a
trusted third party and assign pairwise keys between nodes in the trusted third party and assign pairwise keys between nodes in the
network. How JRC learns about the network topology is out of scope network. How JRC learns about the network topology is out of scope
of this specification, but could be done through 6LBR - JRC signaling of this specification, but could be done through 6LBR - JRC signaling
for example. Pairwise keys could also be derived through a key for example. Pairwise keys could also be derived through a key
agreement protocol executed between the peers directly, where the agreement protocol executed between the peers directly, where the
authentication is based on the symmetric cryptographic material authentication is based on the symmetric cryptographic material
provided to both peers by the JRC. Such a protocol is out of scope provided to both peers by the JRC. Such a protocol is out of scope
of this specification. of this specification.
9.4.4. Short Identifier 8.4.4. Short Identifier
The Short_Identifier object represents an identifier assigned to the The Short_Identifier object represents an identifier assigned to the
pledge. It is encoded as a CBOR array object, containing, in order: pledge. It is encoded as a CBOR array object, containing, in order:
o identifier: The short identifier assigned to the pledge, encoded o identifier: The short identifier assigned to the pledge, encoded
as a byte string. This parameter MUST be included. The as a byte string. This parameter MUST be included. The
identifier MUST be unique in the set of all identifiers assigned identifier MUST be unique in the set of all identifiers assigned
in a network that is managed by a JRC. In case the identifier is in a network that is managed by a JRC. In case the identifier is
invalid, the decoder MUST silently ignore the Short_Identifier invalid, the decoder MUST silently ignore the Short_Identifier
object. object.
o lease_time: The validity of the identifier in hours after the o lease_time: The validity of the identifier in hours after the
reception of the CBOR object, encoded as a CBOR unsigned integer. reception of the CBOR object, encoded as a CBOR unsigned integer.
This parameter MAY be included. The node MUST stop using the This parameter MAY be included. The node MUST stop using the
assigned short identifier after the expiry of the lease_time assigned short identifier after the expiry of the lease_time
interval. It is up to the JRC to renew the lease before the interval. It is up to the JRC to renew the lease before the
expiry of the previous interval. The JRC updates the lease by expiry of the previous interval. The JRC updates the lease by
executing the Parameter Update exchange with the node and executing the Parameter Update exchange with the node and
including the Short_Identifier in the Configuration object, as including the Short_Identifier in the Configuration object, as
described in Section 9.2. In case the lease expires, the node described in Section 8.2. In case the lease expires, the node
SHOULD initiate a new join exchange, as described in Section 9.1. SHOULD initiate a new join exchange, as described in Section 8.1.
In case this parameter is omitted, the value of positive infinity In case this parameter is omitted, the value of positive infinity
MUST be assumed, meaning that the identifier is valid for as long MUST be assumed, meaning that the identifier is valid for as long
as the node participates in the network. as the node participates in the network.
The CDDL fragment that represents the text above for the The CDDL fragment that represents the text above for the
Short_Identifier follows. Short_Identifier follows.
Short_Identifier = [ Short_Identifier = [
identifier : bstr, identifier : bstr,
? lease_time : uint ? lease_time : uint
] ]
9.4.4.1. Use in IEEE Std 802.15.4 8.4.4.1. Use in IEEE Std 802.15.4
When Short_Identifier is used in the context of [IEEE802.15.4], When Short_Identifier is used in the context of [IEEE802.15.4], the
following considerations apply. following considerations apply.
The identifier MUST be used to set the short address of IEEE Std The identifier MUST be used to set the short address of IEEE Std
802.15.4 module. When operating in TSCH mode, the identifier MUST be 802.15.4 module. When operating in TSCH mode, the identifier MUST be
unique in the set of all identifiers assigned in multiple networks unique in the set of all identifiers assigned in multiple networks
that share link-layer key(s). If the length of the byte string that share link-layer key(s). If the length of the byte string
corresponding to the identifier parameter is different than 2, the corresponding to the identifier parameter is different than 2, the
identifier is considered invalid. The values 0xfffe and 0xffff are identifier is considered invalid. The values 0xfffe and 0xffff are
reserved by [IEEE802.15.4] and their use is considered invalid. reserved by [IEEE802.15.4] and their use is considered invalid.
skipping to change at page 32, line 31 skipping to change at page 34, line 26
short identifiers being used under the same link-layer key. If the short identifiers being used under the same link-layer key. If the
lease_time parameter of a given Short_Identifier object is set to lease_time parameter of a given Short_Identifier object is set to
positive infinity, care needs to be taken that the corresponding positive infinity, care needs to be taken that the corresponding
identifier is not assigned to another node until the JRC is certain identifier is not assigned to another node until the JRC is certain
that it is no longer in use, potentially through out-of-band that it is no longer in use, potentially through out-of-band
signaling. If the lease_time parameter expires for any reason, the signaling. If the lease_time parameter expires for any reason, the
JRC should take into consideration potential ongoing transmissions by JRC should take into consideration potential ongoing transmissions by
the joined node, which may be hanging in the queues, before assigning the joined node, which may be hanging in the queues, before assigning
the same identifier to another node. the same identifier to another node.
9.4.5. Error Object 8.4.5. Error Object
The Error object is encoded as a CBOR array object, containing in The Error object is encoded as a CBOR array object, containing in
order: order:
o error_code: Error code for the first encountered error while o error_code: Error code for the first encountered error while
processing a CoJP object, encoded as an unsigned integer. This processing a CoJP object, encoded as an integer. This parameter
parameter MUST be included. This parameter MUST be set to the MUST be included. Possible values of this parameter are specified
"Value" column of the "CoJP Error Registry" (Section 12.3). in the IANA "CoJP Error Registry" (Section 11.3).
o error_addinfo: Additional information relevant to the error. This o error_addinfo: Additional information relevant to the error. This
parameter MUST be included. This parameter MUST be set as parameter MUST be included. This parameter MUST be set as
described by the "Additional info" column of the "CoJP Error described by the "Additional info" column of the "CoJP Error
Registry" (Section 12.3). Registry" (Section 11.3).
o error_description: Human-readable description of the error, o error_description: Human-readable description of the error,
encoded as a text string. This parameter MAY be included. The encoded as a text string. This parameter MAY be included. The
RECOMMENDED setting of this parameter is the "Description" column RECOMMENDED setting of this parameter is the "Description" column
of the "CoJP Error Registry" Section 12.3). of the "CoJP Error Registry" Section 11.3).
The CDDL fragment that represents the text above for the Error object The CDDL fragment that represents the text above for the Error object
follows. follows.
Error = [ Error = [
error_code : int, error_code : int,
error_addinfo : int / bstr / tstr / nil, error_addinfo : int / bstr / tstr / nil,
? error_description : tstr, ? error_description : tstr,
] ]
skipping to change at page 33, line 26 skipping to change at page 35, line 23
| | | info | info type | | | | | info | info type | |
+-----------------+-------+---------------+------------+------------+ +-----------------+-------+---------------+------------+------------+
| Invalid | 0 | None | nil | [[this | | Invalid | 0 | None | nil | [[this |
| Join_Request | | | | document]] | | Join_Request | | | | document]] |
| object | | | | | | object | | | | |
| | | | | | | | | | | |
| Invalid | 1 | None | nil | [[this | | Invalid | 1 | None | nil | [[this |
| Configuration | | | | document]] | | Configuration | | | | document]] |
| object | | | | | | object | | | | |
| | | | | | | | | | | |
| Invalid | 2 | None | nil | [[this | | Invalid | 2 | Label of the | int | [[this |
| parameter: role | | | | document]] | | parameter | | invalid | | document]] |
| | | | | | | | | parameter | | |
| Invalid | 3 | None | nil | [[this |
| parameter: | | | | document]] |
| network | | | | |
| identifier | | | | |
| | | | | |
| Invalid | 4 | None | nil | [[this |
| parameter: | | | | document]] |
| link-layer key | | | | |
| set | | | | |
| | | | | |
| Invalid | 5 | Index of the | uint | [[this |
| parameter: | | invalid key | | document]] |
| link-layer key | | | | |
| | | | | |
| Invalid | 6 | None | nil | [[this |
| paramater: | | | | document]] |
| short | | | | |
| identifier | | | | |
| | | | | |
| Invalid | 7 | None | nil | [[this |
| parameter: JRC | | | | document]] |
| address | | | | |
| | | | | | | | | | | |
| Invalid | 8 | None | nil | [[this | | Invalid link- | 3 | Index of the | uint | [[this |
| parameter: | | | | document]] | | layer key | | invalid key | | document]] |
| network prefix | | | | |
| | | | | | | | | | | |
| Invalid | 9 | Next | bstr | [[this | | Significant | 4 | Next | bstr | [[this |
| parameter: | | acceptable | | document]] | | OSCORE partial | | acceptable | | document]] |
| OSCORE partial | | OSCORE | | | | IV mismatch | | OSCORE | | |
| IV | | partial IV | | | | | | partial IV | | |
+-----------------+-------+---------------+------------+------------+ +-----------------+-------+---------------+------------+------------+
Table 4: CoJP error codes. Table 4: CoJP error codes.
9.5. Parameters 8.5. Recommended Settings
CoJP uses the following parameters:
+-----------------------+----------------+
| Name | Default Value |
+-----------------------+----------------+
| TIMEOUT_BASE | 10 s |
+-----------------------+----------------+
| TIMEOUT_RANDOM_FACTOR | 1.5 |
+-----------------------+----------------+
| MAX_RETRANSMIT | 4 |
+----------------------------------------+
The values of TIMEOUT_BASE, TIMEOUT_RANDOM_FACTOR, MAX_RETRANSMIT may
be configured to values specific to the deployment. The default
values have been chosen to accommodate a wide range of deployments,
taking into account dense networks.
9.6. Mandatory to Implement Algorithms This section gives RECOMMENDED values of CoJP settings discussed in
this section.
The mandatory to implement AEAD algorithm for use with OSCORE is AES- +--------------------------+---------------+
CCM-16-64-128 from [RFC8152]. This is the algorithm used for | Name | Default Value |
securing IEEE Std 802.15.4 frames, and hardware acceleration for it +--------------------------+---------------+
is present in virtually all compliant radio chips. With this choice, | COJP_MAX_JOIN_ATTEMPTS | 4 |
CoAP messages are protected with an 8-byte CCM authentication tag, | | |
and the algorithm uses 13-byte long nonces. | COJP_REKEYING_GUARD_TIME | 12 seconds |
+--------------------------+---------------+
The mandatory to implement hash algorithm is SHA-256 [RFC4231]. Recommended CoJP settings.
The mandatory to implement key derivation function is HKDF [RFC5869], The COJP_REKEYING_GUARD_TIME value SHOULD take into account possible
instantiated with a SHA-256 hash. retransmissions at the link layer due to imperfect wireless links.
10. Security Considerations 9. Security Considerations
Since this document uses the pledge identifier to set the ID Context Since this document uses the pledge identifier to set the ID Context
parameter of OSCORE, an important security requirement is that the parameter of OSCORE, an important security requirement is that the
pledge identifier is unique in the set of all pledge identifiers pledge identifier is unique in the set of all pledge identifiers
managed by a JRC. The uniqueness of the pledge identifier ensures managed by a JRC. The uniqueness of the pledge identifier ensures
unique (key, nonce) pairs for AEAD algorithm used by OSCORE. It also unique (key, nonce) pairs for AEAD algorithm used by OSCORE. It also
allows the JRC to retrieve the correct security context, upon the allows the JRC to retrieve the correct security context, upon the
reception of a Join Request message. The management of pledge reception of a Join Request message. The management of pledge
identifiers is simplified if the globally unique EUI-64 is used, but identifiers is simplified if the globally unique EUI-64 is used, but
this comes with privacy risks, as discussed in Section 11. this comes with privacy risks, as discussed in Section 10.
This document further mandates that the (6LBR) pledge and the JRC are This document further mandates that the (6LBR) pledge and the JRC are
provisioned with unique PSKs. The PSK is used to set the OSCORE provisioned with unique PSKs. The PSK is used to set the OSCORE
Master Secret during security context derivation and is important for Master Secret during security context derivation. This derivation
mutual authentication of the (6LBR) pledge and the JRC. Should an process results in OSCORE keys that are important for mutual
attacker come to know the PSK, then a man-in-the-middle attack is authentication of the (6LBR) pledge and the JRC. Should an attacker
possible. come to know the PSK, then a man-in-the-middle attack is possible.
Many vendors are known to use unsafe practices when generating and Many vendors are known to use unsafe practices when generating and
provisioning PSKs. The use of a single PSK shared among a group of provisioning PSKs. The use of a single PSK shared among a group of
devices is a common pitfall that results in poor security. In this devices is a common pitfall that results in poor security. In this
case, the compromise of a single device is likely to lead to a case, the compromise of a single device is likely to lead to a
compromise of the whole batch, with the attacker having the ability compromise of the entire batch, with the attacker having the ability
to impersonate a legitimate device and join the network, generate to impersonate a legitimate device and join the network, generate
bogus data and disturb the network operation. As a reminder, recall bogus data and disturb the network operation. As a reminder, recall
the well-known problem with Bluetooth headsets with a "0000" pin. the well-known problem with Bluetooth headsets with a "0000" pin.
Additionally, some vendors use methods such as scrambling or hashing Additionally, some vendors use methods such as scrambling or hashing
of device serial numbers or their EUI-64 to generate "unique" PSKs. of device serial numbers or their EUI-64 to generate "unique" PSKs.
Without any secret information involved, the effort that the attacker Without any secret information involved, the effort that the attacker
needs to invest into breaking these unsafe derivation methods is needs to invest into breaking these unsafe derivation methods is
quite low, resulting in the possible impersonation of any device from quite low, resulting in the possible impersonation of any device from
the batch, without even needing to compromise a single device. The the batch, without even needing to compromise a single device. The
use of cryptographically secure random number generators to generate use of cryptographically secure random number generators to generate
the PSK is RECOMMENDED, see [NIST800-90A] for different mechanisms the PSK is RECOMMENDED, see [NIST800-90A] for different mechanisms
using deterministic methods. using deterministic methods.
The JP forwards the unauthenticated join traffic into the network. A The JP forwards the unauthenticated join traffic into the network. A
simple bandwidth cap on the JP prevents it from forwarding more bandwidth cap on the JP prevents it from forwarding more traffic than
traffic than the network can handle. This forces attackers to use the network can handle. The bandwidth cap is configured through the
more than one Join Proxy if they wish to overwhelm the network. CoAP's PROBING_RATE parameter. The default values recommended in
Marking the join traffic packets with a non-zero DSCP allows the this document allow 3 pledges to concurrently join through the same
network to carry the traffic if it has capacity, but encourages the JP over a window ACK_TIMEOUT long. The use of a bandwidth cap at a
network to drop the extra traffic rather than add bandwidth due to JP forces attackers to use more than one JP if they wish to overwhelm
that traffic. the network. Marking the join traffic packets with a non-zero DSCP
allows the network to carry the traffic if it has capacity, but
encourages the network to drop the extra traffic rather than add
bandwidth due to that traffic.
The shared nature of the "minimal" cell used for the join traffic The shared nature of the "minimal" cell used for the join traffic
makes the network prone to DoS attacks by congesting the JP with makes the network prone to a DoS attack by congesting the JP with
bogus traffic. Such an attacker is limited by its maximum transmit bogus traffic. Such an attacker is limited by its maximum transmit
power. The redundancy in the number of deployed JPs alleviates the power. The redundancy in the number of deployed JPs alleviates the
issue and also gives the pledge a possibility to use the best issue and also gives the pledge a possibility to use the best
available link for joining. How a network node decides to become a available link for joining. How a network node decides to become a
JP is out of scope of this specification. JP is out of scope of this specification.
At the beginning of the join process, the pledge has no means of At the beginning of the join process, the pledge has no means of
verifying the content in the EB, and has to accept it at "face verifying the content in the EB, and has to accept it at "face
value". In case the pledge tries to join an attacker's network, the value". In case the pledge tries to join an attacker's network, the
Join Response message will either fail the security check or time Join Response message will either fail the security check or time
out. The pledge may implement a temporary blacklist in order to out. The pledge may implement a temporary blacklist in order to
filter out undesired EBs and try to join using the next seemingly filter out undesired EBs and try to join using the next seemingly
valid EB. This blacklist alleviates the issue, but is effectively valid EB. This blacklist alleviates the issue, but is effectively
limited by the node's available memory. Bogus beacons prolong the limited by the node's available memory. Note that this temporary
join time of the pledge, and so the time spent in "minimal" [RFC8180] blacklist is different from the one communicated as part of the CoJP
duty cycle mode. Configuration object as it helps pledge fight a DoS attack. These
bogus beacons prolong the join time of the pledge, and so the time
spent in "minimal" [RFC8180] duty cycle mode. The blacklist
communicated as part of the CoJP Configuration object helps JP fight
a DoS attack by a malicious pledge.
11. Privacy Considerations 10. Privacy Considerations
The join solution specified in this document relies on the uniqueness The join solution specified in this document relies on the uniqueness
of the pledge identifier in the set of all pledge identifiers managed of the pledge identifier in the set of all pledge identifiers managed
by a JRC. This identifier is transferred in clear as an OSCORE kid by a JRC. This identifier is transferred in clear as an OSCORE kid
context. The use of the globally unique EUI-64 as pledge identifier context. The use of the globally unique EUI-64 as pledge identifier
simplifies the management but comes with certain privacy risks. The simplifies the management but comes with certain privacy risks. The
implications are thoroughly discussed in [RFC7721] and comprise implications are thoroughly discussed in [RFC7721] and comprise
correlation of activities over time, location tracking, address correlation of activities over time, location tracking, address
scanning and device-specific vulnerability exploitation. Since the scanning and device-specific vulnerability exploitation. Since the
join process occurs rarely compared to the network lifetime, long- join process occurs rarely compared to the network lifetime, long-
skipping to change at page 37, line 5 skipping to change at page 38, line 10
addresses for all further layer 2 (and layer-3) operations. This addresses for all further layer 2 (and layer-3) operations. This
reduces the aforementioned privacy risks as the short layer-2 address reduces the aforementioned privacy risks as the short layer-2 address
(visible even when the network is encrypted) is not traceable between (visible even when the network is encrypted) is not traceable between
locations and does not disclose the manufacturer, as is the case of locations and does not disclose the manufacturer, as is the case of
EUI-64. However, an eavesdropper with access to the radio medium EUI-64. However, an eavesdropper with access to the radio medium
during the join process may be able to correlate the assigned short during the join process may be able to correlate the assigned short
address with the extended address based on timing information with a address with the extended address based on timing information with a
non-negligible probability. This probability decreases with an non-negligible probability. This probability decreases with an
increasing number of pledges joining concurrently. increasing number of pledges joining concurrently.
12. IANA Considerations 11. IANA Considerations
Note to RFC Editor: Please replace all occurrences of "[[this Note to RFC Editor: Please replace all occurrences of "[[this
document]]" with the RFC number of this specification. document]]" with the RFC number of this specification.
This document allocates a well-known name under the .arpa name space This document allocates a well-known name under the .arpa name space
according to the rules given in [RFC3172]. The name "6tisch.arpa" is according to the rules given in [RFC3172]. The name "6tisch.arpa" is
requested. No subdomains are expected. No A, AAAA or PTR record is requested. No subdomains are expected. No A, AAAA or PTR record is
requested. requested.
12.1. CoJP Parameters Registry 11.1. CoJP Parameters Registry
This section defines a sub-registries within the "IPv6 over the TSCH This section defines a sub-registries within the "IPv6 over the TSCH
mode of IEEE 802.15.4e (6TiSCH) parameters" registry with the name mode of IEEE 802.15.4e (6TiSCH) parameters" registry with the name
"Constrained Join Protocol Parameters Registry". "Constrained Join Protocol Parameters Registry".
The columns of the registry are: The columns of the registry are:
Name: This is a descriptive name that enables an easier reference to Name: This is a descriptive name that enables an easier reference to
the item. It is not used in the encoding. the item. It is not used in the encoding.
Label: The value to be used to identify this parameter. The label is Label: The value to be used to identify this parameter. The label is
an unsigned integer. an integer.
CBOR type: This field contains the CBOR type for the field. CBOR type: This field contains the CBOR type for the field.
Description: This field contains a brief description for the field. Description: This field contains a brief description for the field.
Reference: This field contains a pointer to the public specification Reference: This field contains a pointer to the public specification
for the field, if one exists. for the field, if one exists.
This registry is to be populated with the values in Table 2. This registry is to be populated with the values in Table 2.
The amending formula for this sub-registry is: Different ranges of The amending formula for this sub-registry is: Different ranges of
values use different registration policies [RFC8126]. Integer values values use different registration policies [RFC8126]. Integer values
from -256 to 255 are designated as Standards Action. Integer values from -256 to 255 are designated as Standards Action. Integer values
from -65536 to -257 and from 256 to 65535 are designated as from -65536 to -257 and from 256 to 65535 are designated as
Specification Required. Integer values greater than 65535 are Specification Required. Integer values greater than 65535 are
designated as Expert Review. Integer values less than -65536 are designated as Expert Review. Integer values less than -65536 are
marked as Private Use. marked as Private Use.
12.2. CoJP Key Usage Registry 11.2. CoJP Key Usage Registry
This section defines a sub-registries within the "IPv6 over the TSCH This section defines a sub-registries within the "IPv6 over the TSCH
mode of IEEE 802.15.4e (6TiSCH) parameters" registry with the name mode of IEEE 802.15.4e (6TiSCH) parameters" registry with the name
"Constrained Join Protocol Key Usage Registry". "Constrained Join Protocol Key Usage Registry".
The columns of this registry are: The columns of this registry are:
Name: This is a descriptive name that enables easier reference to the Name: This is a descriptive name that enables easier reference to the
item. The name MUST be unique. It is not used in the encoding. item. The name MUST be unique. It is not used in the encoding.
skipping to change at page 38, line 33 skipping to change at page 39, line 41
This registry is to be populated with the values in Table 3. This registry is to be populated with the values in Table 3.
The amending formula for this sub-registry is: Different ranges of The amending formula for this sub-registry is: Different ranges of
values use different registration policies [RFC8126]. Integer values values use different registration policies [RFC8126]. Integer values
from -256 to 255 are designated as Standards Action. Integer values from -256 to 255 are designated as Standards Action. Integer values
from -65536 to -257 and from 256 to 65535 are designated as from -65536 to -257 and from 256 to 65535 are designated as
Specification Required. Integer values greater than 65535 are Specification Required. Integer values greater than 65535 are
designated as Expert Review. Integer values less than -65536 are designated as Expert Review. Integer values less than -65536 are
marked as Private Use. marked as Private Use.
12.3. CoJP Error Registry 11.3. CoJP Error Registry
This section defines a sub-registries within the "IPv6 over the TSCH This section defines a sub-registries within the "IPv6 over the TSCH
mode of IEEE 802.15.4e (6TiSCH) parameters" registry with the name mode of IEEE 802.15.4e (6TiSCH) parameters" registry with the name
"Constrained Join Protocol Error Registry". "Constrained Join Protocol Error Registry".
The columns of this registry are: The columns of this registry are:
Description: This is a descriptive human-readble name. The Description: This is a descriptive human-readable name. The
description MUST be unique. It is not used in the encoding. description MUST be unique. It is not used in the encoding.
Value: This is the value used to identify the error. These values Value: This is the value used to identify the error. These values
MUST be unique. The value is an integer. MUST be unique. The value is an integer.
Additional information: This is a descriptive name of additional Additional information: This is a descriptive name of additional
information that is meaningful for the error. The name is not used information that is meaningful for the error. The name is not used
in the encoding. in the encoding.
Additional information type: A CBOR type of the additional Additional information type: A CBOR type of the additional
skipping to change at page 39, line 18 skipping to change at page 40, line 28
This registry is to be populated with the values in Table 4. This registry is to be populated with the values in Table 4.
The amending formula for this sub-registry is: Different ranges of The amending formula for this sub-registry is: Different ranges of
values use different registration policies [RFC8126]. Integer values values use different registration policies [RFC8126]. Integer values
from -256 to 255 are designated as Standards Action. Integer values from -256 to 255 are designated as Standards Action. Integer values
from -65536 to -257 and from 256 to 65535 are designated as from -65536 to -257 and from 256 to 65535 are designated as
Specification Required. Integer values greater than 65535 are Specification Required. Integer values greater than 65535 are
designated as Expert Review. Integer values less than -65536 are designated as Expert Review. Integer values less than -65536 are
marked as Private Use. marked as Private Use.
13. Acknowledgments 12. Acknowledgments
The work on this document has been partially supported by the The work on this document has been partially supported by the
European Union's H2020 Programme for research, technological European Union's H2020 Programme for research, technological
development and demonstration under grant agreement No 644852, development and demonstration under grant agreements: No 644852,
project ARMOUR. project ARMOUR; No 687884, project F-Interop and open-call project
SPOTS; No 732638, project Fed4FIRE+ and open-call project SODA.
The following individuals provided input to this document (in The following individuals provided input to this document (in
alphabetic order): Tengfei Chang, Klaus Hartke, Tero Kivinen, Jim alphabetic order): Tengfei Chang, Klaus Hartke, Tero Kivinen, Jim
Schaad, Goeran Selander, Yasuyuki Tanaka, Pascal Thubert, William Schaad, Goeran Selander, Yasuyuki Tanaka, Pascal Thubert, William
Vignat, Xavier Vilajosana, Thomas Watteyne. Vignat, Xavier Vilajosana, Thomas Watteyne.
14. References 13. References
14.1. Normative References 13.1. Normative References
[I-D.ietf-core-object-security] [I-D.ietf-core-object-security]
Selander, G., Mattsson, J., Palombini, F., and L. Seitz, Selander, G., Mattsson, J., Palombini, F., and L. Seitz,
"Object Security for Constrained RESTful Environments "Object Security for Constrained RESTful Environments
(OSCORE)", draft-ietf-core-object-security-15 (work in (OSCORE)", draft-ietf-core-object-security-15 (work in
progress), August 2018. progress), August 2018.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
skipping to change at page 40, line 28 skipping to change at page 41, line 38
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
Writing an IANA Considerations Section in RFCs", BCP 26, Writing an IANA Considerations Section in RFCs", BCP 26,
RFC 8126, DOI 10.17487/RFC8126, June 2017, RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>. <https://www.rfc-editor.org/info/rfc8126>.
[RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)",
RFC 8152, DOI 10.17487/RFC8152, July 2017, RFC 8152, DOI 10.17487/RFC8152, July 2017,
<https://www.rfc-editor.org/info/rfc8152>. <https://www.rfc-editor.org/info/rfc8152>.
14.2. Informative References [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
13.2. Informative References
[I-D.hartke-core-stateless] [I-D.hartke-core-stateless]
Hartke, K., "Extended Tokens and Stateless Clients in the Hartke, K., "Extended Tokens and Stateless Clients in the
Constrained Application Protocol (CoAP)", draft-hartke- Constrained Application Protocol (CoAP)", draft-hartke-
core-stateless-02 (work in progress), October 2018. core-stateless-02 (work in progress), October 2018.
[I-D.ietf-6tisch-6top-protocol]
Wang, Q., Vilajosana, X., and T. Watteyne, "6TiSCH
Operation Sublayer Protocol (6P)", draft-ietf-6tisch-6top-
protocol-12 (work in progress), June 2018.
[I-D.ietf-6tisch-architecture] [I-D.ietf-6tisch-architecture]
Thubert, P., "An Architecture for IPv6 over the TSCH mode Thubert, P., "An Architecture for IPv6 over the TSCH mode
of IEEE 802.15.4", draft-ietf-6tisch-architecture-15 (work of IEEE 802.15.4", draft-ietf-6tisch-architecture-15 (work
in progress), October 2018. in progress), October 2018.
[I-D.ietf-6tisch-terminology] [I-D.ietf-6tisch-terminology]
Palattella, M., Thubert, P., Watteyne, T., and Q. Wang, Palattella, M., Thubert, P., Watteyne, T., and Q. Wang,
"Terms Used in IPv6 over the TSCH mode of IEEE 802.15.4e", "Terms Used in IPv6 over the TSCH mode of IEEE 802.15.4e",
draft-ietf-6tisch-terminology-10 (work in progress), March draft-ietf-6tisch-terminology-10 (work in progress), March
2018. 2018.
skipping to change at page 42, line 21 skipping to change at page 43, line 27
[RFC7721] Cooper, A., Gont, F., and D. Thaler, "Security and Privacy [RFC7721] Cooper, A., Gont, F., and D. Thaler, "Security and Privacy
Considerations for IPv6 Address Generation Mechanisms", Considerations for IPv6 Address Generation Mechanisms",
RFC 7721, DOI 10.17487/RFC7721, March 2016, RFC 7721, DOI 10.17487/RFC7721, March 2016,
<https://www.rfc-editor.org/info/rfc7721>. <https://www.rfc-editor.org/info/rfc7721>.
[RFC8180] Vilajosana, X., Ed., Pister, K., and T. Watteyne, "Minimal [RFC8180] Vilajosana, X., Ed., Pister, K., and T. Watteyne, "Minimal
IPv6 over the TSCH Mode of IEEE 802.15.4e (6TiSCH) IPv6 over the TSCH Mode of IEEE 802.15.4e (6TiSCH)
Configuration", BCP 210, RFC 8180, DOI 10.17487/RFC8180, Configuration", BCP 210, RFC 8180, DOI 10.17487/RFC8180,
May 2017, <https://www.rfc-editor.org/info/rfc8180>. May 2017, <https://www.rfc-editor.org/info/rfc8180>.
[RFC8480] Wang, Q., Ed., Vilajosana, X., and T. Watteyne, "6TiSCH
Operation Sublayer (6top) Protocol (6P)", RFC 8480,
DOI 10.17487/RFC8480, November 2018,
<https://www.rfc-editor.org/info/rfc8480>.
Appendix A. Example Appendix A. Example
Figure 3 illustrates a successful join protocol exchange. The pledge Figure 3 illustrates a successful join protocol exchange. The pledge
instantiates the OSCORE context and derives the AEAD keys and nonces instantiates the OSCORE context and derives the OSCORE keys and
from the PSK. It uses the instantiated context to protect the Join nonces from the PSK. It uses the instantiated context to protect the
Request addressed with a Proxy-Scheme option, the well-known host Join Request addressed with a Proxy-Scheme option, the well-known
name of the JRC in the Uri-Host option, and its EUI-64 as pledge host name of the JRC in the Uri-Host option, and its EUI-64 as pledge
identifier and OSCORE kid context. Triggered by the presence of a identifier and OSCORE kid context. Triggered by the presence of a
Proxy-Scheme option, the JP forwards the request to the JRC and sets Proxy-Scheme option, the JP forwards the request to the JRC and sets
the CoAP token to the internally needed state. The JP has learned the CoAP token to the internally needed state. The JP has learned
the IPv6 address of the JRC when it acted as a pledge and joined the the IPv6 address of the JRC when it acted as a pledge and joined the
network. Once the JRC receives the request, it looks up the correct network. Once the JRC receives the request, it looks up the correct
context based on the kid context parameter. OSCORE data authenticity context based on the kid context parameter. The OSCORE data
verification ensures that the request has not been modified in authenticity verification ensures that the request has not been
transit. In addition, replay protection is ensured through modified in transit. In addition, replay protection is ensured
persistent handling of mutable context parameters. through persistent handling of mutable context parameters.
Once the JP receives the Join Response, it authenticates the state Once the JP receives the Join Response, it authenticates the state
within the CoAP token before deciding where to forward. The JP sets within the CoAP token before deciding where to forward. The JP sets
its internal state to that found in the token, and forwards the Join its internal state to that found in the token, and forwards the Join
Response to the correct pledge. Note that the JP does not possess Response to the correct pledge. Note that the JP does not possess
the key to decrypt the CBOR object (configuration) present in the the key to decrypt the CBOR object (configuration) present in the
payload. The Join Response is matched to the Join Request and payload. The Join Response is matched to the Join Request and
verified for replay protection at the pledge using OSCORE processing verified for replay protection at the pledge using OSCORE processing
rules. In this example, the Join Response does not contain the IPv6 rules. In this example, the Join Response does not contain the IPv6
address of the JRC, the pledge hence understands the JRC is co- address of the JRC, the pledge hence understands the JRC is co-
located with the 6LBR. located with the 6LBR.
<---E2E OSCORE--> <---E2E OSCORE-->
Client Proxy Server Client Proxy Server
Pledge JP JRC Pledge JP JRC
| | | | | |
| Join | | Code: { 0.02 } (POST) | Join | | Code: 0.02 (POST)
| Request | | Token: 0x8c | Request | | Token: -
+--------->| | Proxy-Scheme: [ coap ] +--------->| | Proxy-Scheme: coap
| POST | | Uri-Host: [ 6tisch.arpa ] | | | Uri-Host: 6tisch.arpa
| | | Object-Security: [ kid: 0 ] | | | OSCORE: kid: -,
| | | Payload: kid_context: EUI-64 | | | kid_context: EUI-64,
| | | [ Partial IV: 1, | | | Partial IV: 1
| | | { Uri-Path:"j", | | | Payload: { Code: 0.02 (POST),
| | | join_request }, | | | Uri-Path: "j",
| | | <Tag> ] | | | join_request, <Tag> }
| | | | | |
| | Join | Code: { 0.01 } (GET) | | Join | Code: 0.02 (POST)
| | Request | Token: opaque state | | Request | Token: opaque state
| +--------->| Uri-Host: [ 6tisch.arpa ] | +--------->| OSCORE: kid: -,
| | POST | Object-Security: [ kid: 0 ] | | | kid_context: EUI-64,
| | | Payload: kid_context: EUI-64 | | | Partial IV: 1
| | | [ Partial IV: 1, | | | Payload: { Code: 0.02 (POST),
| | | { Uri-Path:"j", | | | Uri-Path: "j",
| | | join_request }, | | | join_request, <Tag> }
| | | <Tag> ] | | |
| | | | | |
| | Join | Code: { 2.05 } (Content) | | Join | Code: 2.04 (Changed)
| | Response | Token: 0x7b | | Response | Token: opaque state
| |<---------+ Object-Security: - | |<---------+ OSCORE: -
| | 2.04 | Payload: [ { configuration }, <Tag> ] | | | Payload: { Code: 2.04 (Changed),
| | | | | | configuration, <Tag> }
| Join | | Code: { 2.05 } (Content) | | |
| Response | | Token: 0x8c | | |
|<---------+ | Object-Security: - | Join | | Code: 2.04 (Changed)
| 2.04 | | Payload: [ { configuration }, <Tag> ] | Response | | Token: -
| | | |<---------+ | OSCORE: -
| | | Payload: { Code: 2.04 (Changed),
| | | configuration, <Tag> }
| | |
Figure 3: Example of a successful join protocol exchange. { ... } Figure 3: Example of a successful join protocol exchange. { ... }
denotes encryption and authentication, [ ... ] denotes denotes authenticated encryption, <Tag> denotes the authentication
authentication. tag.
Where the join_request object is: Where the join_request object is:
join_request: join_request:
{ {
5 : h'cafe' / PAN ID of the network pledge is attempting to join / 5 : h'cafe' / PAN ID of the network pledge is attempting to join /
} }
Since the role parameter is not present, the default role of "6TiSCH Since the role parameter is not present, the default role of "6TiSCH
Node" is implied. Node" is implied.
The join_request object encodes to h'a10542cafe' with a size of 5 The join_request object encodes to h'a10542cafe' with a size of 5
bytes. bytes.
And the configuration object is: And the configuration object is:
configuration: configuration:
{ {
skipping to change at page 44, line 35 skipping to change at page 46, line 41
Since key_addinfo parameter is not present and key_id is different Since key_addinfo parameter is not present and key_id is different
than 0, Key ID Mode 0x01 (Key Index) is implied. Similarly, since than 0, Key ID Mode 0x01 (Key Index) is implied. Similarly, since
the lease_time parameter is not present in the short identifier the lease_time parameter is not present in the short identifier
object, the default value of positive infinity is implied. object, the default value of positive infinity is implied.
The configuration object encodes to The configuration object encodes to
h'a202820150e6bf4287c2d7618d6a9687445ffd33e6038142af93' with a size h'a202820150e6bf4287c2d7618d6a9687445ffd33e6038142af93' with a size
of 26 bytes. of 26 bytes.
Appendix B. Lightweight Implementation Option
In environments where optimizing the implementation footprint is
important, it is possible to implement this specification without
having the implementations of HKDF [RFC5869] and SHA [RFC4231] on
constrained devices. HKDF and SHA are used during the OSCORE
security context derivation phase. This derivation can also be done
by the JRC or a provisioning device, on behalf of the (6LBR) pledge
during the provisioning phase. In that case, the derived OSCORE
security context parameters are written directly into the (6LBR)
pledge, without requiring the PSK be provisioned to the (6LBR)
pledge.
The use of HKDF to derive OSCORE security context parameters ensures
that the resulting OSCORE keys have good security properties, and are
unique as long as the input for different pledges varies. This
specification ensures the uniqueness by mandating unique pledge
identifiers and a unique PSK for each (6LBR) pledge. From the AEAD
nonce reuse viewpoint, having a unique pledge identifier is a
sufficient condition. However, as discussed in Section 9, the use of
a single PSK shared among many devices is a common security pitfall.
The compromise of this shared PSK on a single device would lead to
the compromise of the entire batch. When using the implementation/
deployment scheme outlined above, the PSK does not need to be written
to individual pledges. As a consequence, even if a shared PSK is
used, the scheme offers the same level of security as in the scenario
where each pledge is provisioned with a unique PSK.
Authors' Addresses Authors' Addresses
Malisa Vucinic (editor) Malisa Vucinic (editor)
University of Montenegro Inria
Dzordza Vasingtona bb 2 Rue Simone Iff
Podgorica 81000 Paris 75012
Montenegro France
Email: malisa.vucinic@inria.fr
Email: malisav@ac.me
Jonathan Simon Jonathan Simon
Analog Devices Analog Devices
32990 Alvarado-Niles Road, Suite 910 32990 Alvarado-Niles Road, Suite 910
Union City, CA 94587 Union City, CA 94587
USA USA
Email: jonathan.simon@analog.com Email: jonathan.simon@analog.com
Kris Pister Kris Pister
University of California Berkeley University of California Berkeley
 End of changes. 192 change blocks. 
604 lines changed or deleted 658 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/