Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LoRaWAN DevEUI, AppEUI and AppKey

I'm trying to understand the three magic LoRaWAN IDs from the LoRaWAN 1.2 specification. My understanding is:

  • DevEUI is like a MAC address
  • AppKey is like a public key (roughly...)
  • AppEUI is like a port number

Now I'm having problem understanding who is responsible for creating these IDs:

  • DevEUI can be generated from the LoRa chip internal ID registers (I'm using Murata's type ABZ chip)
  • AppKey: should it be unique for each end node? Should I choose a random one or ask one from the LoRaWAN provider (e.g. Objenious)?
  • AppEUI: should be common to each end node (I guess it should)? Should I choose a random one or ask one from the LoRaWAN provider?
like image 745
Matthieu Avatar asked Jan 08 '19 17:01

Matthieu


People also ask

What is DevEUI in LoRaWAN?

The DevEUI is a 64-bit globally-unique Extended Unique Identifier (EUI-64) assigned by the manufacturer, or the owner, of the end-device. To create EUI-64 identifiers, the assignor must have an Organizationally Unique Identifier (OUI) from the IEEE Registration Authority. Think of DevEUIs as a limited resource.

What is AppKey LoRaWAN?

AppKey is the encryption key used for messages during every over the air activation. After the activation the AppSKey is used. A listener knowing the AppKey can derive the AppSKey. So you want to keep the AppKey secret.

How do I find my device Eui?

Where can I find the default Device EUI, App EUI and App Key for LoRaWAN sensors? This is the ID on the label located on the sensor itself. The barcode provided can also be used to read the Device EUI. By default this is set to: 0101010101010101.

How does data integrity be achieved by LoRaWAN endpoints?

Integrity protection is provided in a hop-by-hop nature: one hop over the air through the integrity protection provided by LoRaWAN L2 and the other hop between the Network Server and the Application Server by using secure transport solutions such as HTTPS and VPNs.


1 Answers

The DevEUI is an ID in the IEEE EUI64 address space used to identify a device. It is supplied by the device manufacturer. A deprecated algorithm exists to convert 48bit MAC addresses to EUI64. For MAC addresses with 6 bytes (e.g. 01 02 03 04 05 06) put ff fe or ff fe in the middle (e.g. 01 02 03 ff fe 04 05 06). This algorithm has been deprecated as it may lead to collisions with other DevEUIs. During over the air activation a DevAddr is assigned to the device. This DevAddr is used in the LoRaWAN protocol afterwards. The DevEUI is sent unencrypted.

The JoinEUI (formerly called AppEUI) is a global application ID in the IEEE EUI64 address space identifying the join server during the over the air activation. For non-private networks it corresponds to a subdomain of joineuis.lora-alliance.org. This server name is used to find the IP address of the join server via DNS. This is described in LoRaWAN™ Back-End Interfaces v1.0.

AppKey is the encryption key used for messages during every over the air activation. After the activation the AppSKey is used. A listener knowing the AppKey can derive the AppSKey. So you want to keep the AppKey secret. Which side of the communication channel creates it is not important. You simply want to be sure that it is random.

like image 161
Xypron Avatar answered Dec 13 '22 12:12

Xypron