
Frame Counters #īecause we’re working with a radio protocol, anyone will be able to capture and store messages. In The Things Network you can have a default AppKey which will be used to activate all devices, or customize the AppKey per device. Dynamically activated devices (OTAA) use the Application Key ( AppKey) to derive the two session keys during the activation procedure. The application key ( AppKey) is only known by the device and by the application.

If you statically activate your device (ABP), these keys stay the same until you change them. If you dynamically activate your device (OTAA), these keys are re-generated on every activation. These two session keys ( NwkSKey and AppSKey) are unique per device, per session. This means that nobody except you is able to read the contents of messages you send or receive. The payload is fully encrypted between the Node and the Handler/Application Server component of The Things Network (which you will be able to run on your own server). The Application Session Key ( AppSKey) is used for encryption and decryption of the payload. In the backend of The Things Network this validation is also used to map a non-unique device address ( DevAddr) to a unique DevEUI and AppEUI. This MIC is similar to a checksum, except that it prevents intentional tampering with a message.
WW2 ONLINE DEFAULT KEYS CODE
This key is used to validate the integrity of each message by its Message Integrity Code (MIC check). The Network Session Key ( NwkSKey) is used for interaction between the Node and the Network Server.

These session keys will be used for the duration of the session. The NwkSKey is shared with the network, while the AppSKey is kept private. When a device joins the network (this is called a join or activation), an application session key AppSKey and a network session key NwkSKey are generated. The algorithm used for this is AES-128, similar to the algorithm used in the 802.15.4 standard. LoRaWAN 1.0 specifies a number of security keys: NwkSKey, AppSKey and AppKey.
