
ZigBee security
ZigBee security model
XBee/XBee-PRO® S2C ZigBee® RF Module
103
uncommon for most applications. The following table shows the required time for the frame counter
to reach its maximum value.
Average Transmission Rate
Time until 32-bit frame counter expires
1 / second
136 years
10 / second
13.6 years
To clear the frame counters without compromising security, you can change the network key in the
network. When the network key is updated, the frame counters on all devices reset to 0. See
for details.
Message integrity code
The network header, APS header, and application data are all authenticated with 128-bit AES. The
device performs a hash on these fields and is appended as a 4-byte message integrity code (MIC) to
the end of the packet. The MIC allows receiving devices to ensure the message has not been changed.
The MIC provides message integrity in the ZigBee security model. If a device receives a packet and the
MIC does not match the device’s own hash of the data, it drops the packet.
Network layer encryption and decryption
Packets with network layer encryption are encrypted and decrypted by each hop in a route. When a
device receives a packet with network encryption, it decrypts the packet and authenticates the
packet. If the device is not the destination, it then encrypts and authenticates the packet, using its
own frame counter and source address in the network header section.
Since the device performs network encryption at each hop, packet latency is slightly longer in an
encrypted network than in a non-encrypted network. Also, security requires 18 bytes of overhead to
include a 32-bit frame counter, an 8-byte source address, 4-byte MIC, and 2 other bytes. This reduces
the number of payload bytes that can be sent in a data packet.
Network key updates
ZigBee supports a mechanism for changing the network key in a network. When the network key is
changed, the frame counters in all devices reset to 0.
APS layer security
APS layer security can be used to encrypt application data using a key that is shared between source
and destination devices. Where network layer security is applied to all data transmissions and is
decrypted and reencrypted on a hop-by-hop basis, APS security is optional and provides end-to-end
security using an APS link key known by only the source and destination device. APS security cannot
be applied to broadcast transmissions.
If you enable APS security, the APS header and data payload are authenticated with 128-bit AES as
shown in the following image: