[BeeStafck and MC1321x] AES Encyption and Decryption

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

[BeeStafck and MC1321x] AES Encyption and Decryption

2,523 次查看
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:
标签 (1)
0 项奖励
回复
4 回复数

1,191 次查看
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 项奖励
回复

1,191 次查看
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 项奖励
回复

1,191 次查看
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 项奖励
回复

1,190 次查看
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 项奖励
回复