adequate protection of all keying material. Trust must be assumed in the initial installation of the keys, as well as in the processing of security information. A key can be associated either to a network, being usable by both Zigbee layers and the MAC sublayer, or to a link, acquired through pre-installation, agreement or transport. Establishment of link keys is based on a master key which controls link key correspondence. The initial master key must be obtained through a secure medium (transport or pre-installation), as the security of the whole network depends on it. Link and master keys are only visible to the application layer. Different services use different variations of the link key to avoid leaks and security risks. IPv6 promises to be a key enabler for the future of IoT, providing end-to-end connectivity with a distributed routing mechanism as well as a highly scalable address scheme, providing more than 2 billion addresses per square millimetre of the Earth surface247. This seems sufficient to address the needs of any present and future communicating device. Moreover, IPv6 is supported by a large community of users and researchers supporting ongoing improvement of its security features. RFC 4919 describes the requirements for LoWPANs to work with IPv6, and RFC 4944248 defines the frame format for transmission of IPv6 packets over IEEE 802.15.4 networks. Since IPv6 requires support of packet sizes much larger than the largest IEEE 802.15.4 frame size, an adaptation layer (“6LoWPAN”) is defined. This RFC also defines mechanisms for header compression required to make IPv6 practical on IEEE 802.15.4 networks, and the provisions required for packet delivery in IEEE 802.15.4 meshes. 74 247 https://iot6.eu/ipv6_for_iot 248 https://tools.ietf.org/html/rfc4944 249 Routing Attacks and Countermeasures in the RPL-Based Internet of Things, Wallgren et al, 2012 250 https://lora-alliance.org/about-lorawan The Routing Protocol for Low-Power and Lossy Networks (RPL) is a routing protocol standardised for constrained IoT environments such as 6LoWPAN networks. Providing security in IPv6/RPL connected 6LoWPANs is challenging because the devices are connected to the untrusted Internet and are resource constrained while using novel IoT technologies and lossy communication links. If a node becomes an internal adversary, it can break network operation without being detected by cryptography mechanisms. Therefore, analysing RPL threats in addition to specifying its operation will help to monitor most of the internal malicious behaviours. RPL in authenticated security mode uses secure messages. Pre-installed keys are used to join a network as a leaf to provide message confidentiality, integrity, and authenticity. To join the network as a router, a second key must be obtained from a key authority.249 As opposed to WPANs which are short-range personal-area networks, low-power wireless wide area networks (LPWANs) enable long-range, low-power communication at low cost using simplified, lightweight protocols and either licensefree or licensed bands. LoRaWAN250 is an LPWAN protocol designed to wirelessly connect battery-operated devices to the internet. The LoRaWAN network architecture is deployed in a star-of-stars topology in which gateways relay messages between end-devices and a central network server. The gateways are connected to the network server via standard IP connections and act as a transparent bridge, simply converting RF packets to IP packets and vice versa. The wireless communication takes advantage of the long-range characteristics of the LoRa physical layer, allowing a single-hop link between the end-device and one or many gateways. The LoRaWAN specification defines two layers of cryptography:

Select target paragraph3

Connect to a paragraph
Connect to an entity
Disable highlights
Add to table of contents