[BeeStafck and MC1321x] AES Encyption and Decryption

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[BeeStafck and MC1321x] AES Encyption and Decryption

1,953 Views
JanellA
Contributor I
For the purposes of my research, I need to implement key management, payload encryption, and payload decyrption on the MC1321x motes using the BeeStack.

The 802.15.4 Mac Phy Software Reference Manual assures me that the BeeStack does have AES encryption enabled (4.11.2.1), and I found the corresponding header in the SecruityLib.h header. I've read the basic "how to create a custom app," but it does not explain how BeeStack implement or provides functions for the ZigBee-2006 specification security.

I've used BeeStack to generate the configuation for an SRB, Router, GenericApp, Security (default settings), and No Mesh network. (I also created a corresponding project for the NCB as a coordinator.) I further modified the GenericApp to accept UART keyboard input and display the corresponding input in Hyperterminal. The "proof of concept" goal before dealing with OTA transmissions to be able to encrypt a character array and decrypt the array.

Can anyone provide any demo code that uses SecLib_AES (or something which achieves the same resutls)? My attempts to use it thus have either failed to compile or caused the mote to crash :smileysad:
Labels (1)
0 Kudos
Reply
4 Replies

621 Views
Mads
Contributor V
Janell,
 
It is actually quite simple. You do not have to do anything else that selecting a stack configuration with security.
 
ZigBee 2006 stack profile 1 utilizes what is called network layer security, where the all packets after joining a network will be encrypted.
 
Please study the ZigBee specification and the stack profile 1 specification for details.
 
If you use a protocol analyzer you will see that the packets are now encrypted.
 
Br,
Mads
 
0 Kudos
Reply

621 Views
JanellA
Contributor I
After the network is up and running, is it possible to distribute a new key to replace the hard-coded key?
0 Kudos
Reply

621 Views
Mads
Contributor V
Janell A.
 
It can be done by sending a Transport key with a new sequence number and new key as a broadcast and then waiting 9 seconds (for the broadcast to timeout) and then send a swith key command as a broadcast.
 
If you are doing a hobby project i would not recommend spending too much time on doing that.
0 Kudos
Reply

620 Views
JanellA
Contributor I
Thanks for the answer. Sadly, I'm not doing a hobby project; rather I'm attempting to complete a master's thesis in ZigBee security.
0 Kudos
Reply