Skip to content
RenoktaRenokta

LoRaWAN security: how do OTAA, ABP and keys work?

LoRaWAN security rests on device authentication and two separate AES-128 key layers. The activation method (OTAA or ABP) and how keys are managed shape the result.

Request a demo

Renokta Ekibi ·

A rooftop-mounted LoRaWAN gateway with an antenna above a harbour city.
LoRaWAN security flow
DeviceidentityNetworkjoinSessionkeysEncrypteduplinkApplicationdecrypt
  1. 1. Device identityEach device gets a unique identifier and a root key.
  2. 2. Network joinWith OTAA the device sends a join request and is authenticated.
  3. 3. Session keysTwo separate session keys are derived for network and application.
  4. 4. Encrypted uplinkThe payload is encrypted with the application key and verified with the network key.
  5. 5. Application decryptThe application server decrypts the payload and passes data to the platform.

LoRaWAN security rests on two things: a device proves its identity when it joins, and data is encrypted with AES-128. There are two key layers: the network session key protects integrity at the network level, and the application session key keeps the payload private end to end. No system is absolutely secure, and key management matters as much as the algorithm.

What does LoRaWAN security rely on?

Each device is provisioned with identifiers and keys, either at manufacture or during setup. With these keys the device and the network authenticate each other, messages are checked for tampering and the payload is encrypted. Counters added to messages help make it harder to replay an old message.

What is the difference between OTAA and ABP?

OTAA (Over-The-Air Activation) lets a device join the network over the air, while ABP (Activation By Personalization) stores the session keys in the device in advance.

  • OTAA: The device sends a join request, and the device and network derive fresh session keys from a root key at every join. A device can rejoin to renew its keys.
  • ABP: Session keys are written to the device permanently. Setup is simple, but the keys do not renew themselves.

From a security point of view OTAA is usually preferred. ABP should be considered only in limited, controlled cases, with key handling done deliberately.

What do the two key layers do?

LoRaWAN uses two session keys that separate the network from the application.

  • Network session key: Verifies message integrity and device identity at the network level.
  • Application session key: Encrypts the payload; the key to decrypt it exists only on the application side.

Because of this split, whoever runs the network can forward packets but cannot read their content. Reading the content requires the application session key.

What roles do the network server and application server play?

The network server validates packets, removes duplicates and manages gateways, while the application server decrypts the payload and interprets the data. Keeping the keys apart on these two sides helps limit the impact if one side is compromised.

When you build your own network you control both roles; if you use a service provider, it is important to find out where the keys are held and by whom.

What should you watch for in practice?

  • Use OTAA where possible and give every device a unique key.
  • Do not circulate keys in e-mail, shared spreadsheets or source code; keep them limited to authorized people.
  • Keep gateway and server software up to date and protect management interfaces with authentication and access restrictions.
  • Review incoming data and the device list regularly, and set alarms for unexpected devices or devices that go silent.
  • If an application involves personal data, current legislation and official texts must be followed.

What should be secured on the server side?

The server side shapes security as much as the device side. Encryption protects data between the sensor and the application, but the permissions of people who access the platform are managed at another layer. User accounts, permission levels and access logs therefore need their own attention.

  • Give users only the permissions their work requires.
  • Use personal accounts instead of shared ones.
  • Make sure the link from the gateway to the server follows the security rules of the organization's network.
  • Review backups and logs regularly.

What does LoRaWAN security not guarantee?

Protocol-level encryption does not make up for physical access, weak passwords or a misconfigured server. If a device is stolen, the keys inside it may be exposed, so using a unique key per device helps limit the impact to that single device. Security is best seen not as a one-time setting but as an operating habit that continues after installation.

In short, when configured properly LoRaWAN offers a security model that supports data confidentiality and integrity, but it does not promise absolute security. To go through the security needs of your project before installation, you can request a needs discovery from our LoRaWAN sensor infrastructure solution page.

Frequently asked questions

Is LoRaWAN secure?
LoRaWAN provides AES-128 encryption and device authentication. Absolute security does not exist, though; key management and server security matter too.
Should I choose OTAA or ABP?
OTAA is usually preferred for security. It derives new session keys at every join, whereas ABP writes fixed keys into the device.
Does LoRaWAN offer end-to-end encryption?
Yes, the application session key encrypts the payload. When the decryption key exists only on the application side, the network operator cannot read the content.
Why are two separate keys used?
The network session key covers integrity at the network level and the application session key covers data confidentiality. The split keeps the two roles apart.
What if keys are lost or leaked?
Keys for the affected devices should be renewed. Rejoining with OTAA derives new session keys; if a root key leaked, the device key must be replaced.

Let's plan the right solution for you, together.

Request a demo