Specification Updates
The TS001 LoRaWAN L2 1.2.x version of the spec is an update to LoRaWAN Specification v1.0.x. Here are the major differences:
Security Enhancements
The LoRaWAN 1.0.x specification requires a single, shared, secret key, the Application Key (AppKey). The AppKey is used to derive two session keys: the AppSKey and the NwkSKey.
New in LoRaWAN 1.2.x is the Network Key (NwkKey). This is a 128-bit AES key that is used to derive three session keys:
- FNwkSIntKey (Forwarding Network Session Integrity Key): Used by an end device to calculate the MIC for all uplink messages
- SNwkSIntKey (Serving Network Session Encryption Key): Used by an end device to verify the MIC for all downlink messages
- NwkSEncKey (Network Session Encryption Key): Used for the encryption of MAC commands
Another security enhancement relates to the frame counter. With LoRaWAN 1.1, the frame counter can never be reset during a session. This means that, when using Authentication by Personalization (ABP), end devices must have persistent memory, to make sure the frame counter does not restart from zero after a power cycle.
To avoid replay attacks, two nonces have been introduced: the DevNonce and the JoinNonce. The DevNonce is a counter which starts at zero when the device is initially powered on. Each time a device initiates a join request, the DevNonce increments by one. This change has also been included from LW1.0.4 onward. The JoinNonce is a counter which also starts at zero. It increments every time a join request is accepted (i.e., when a join accept message is sent by the join server). This mechanism prevents replay attacks, whereby an attacker sends previously-recorded join request messages with the intention of disconnecting the respective end device from the network.
Additionally, several new MAC commands have been added, including the rejoin command, along with additional commands for Class B devices.
Rejoin Procedure
New in LoRaWAN 1.2.x is the rejoin procedure. While a device is “joined” to a network, the network server can request that the end device periodically send a rejoin request. A network server may also send a force rejoin command to require the end device to rejoin the network
Roaming
With LoRaWAN 1.2.x, devices can connect to—and be controlled by—another network, known as the visiting network. When a roaming agreement between operators is in place with this visiting network, its network server can connect to the join server of the end device and take full control over the device.
For full details of the changes in LW1.2.x see the LoRa Alliance website.