Other Parts Discussed in Thread: CC2430, CC1310
Hello guys.
I've been exploring CC1110 Wireless MCU for quite sometime now. In the datasheet i've read that it has a built in AES co-processor which can be used to Encrypt the packets in order to add security. So i have been experimenting with that module. My configuration is as follows.
I've 2 CC1110 mcu's over which i can send and receive packets. Here the AES 16-byte key is same for both Tx and Rx code. For example purpose lets assume AES_KEY[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16} and for demo purpose i've kept the IV (Initialization Vector) same and not random for both Tx and Rx. AES_IV[] = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30}. AES mode which i'm using is CBC (Cipher block chaining). I've implemented routines for encryption and decryption as per the steps in the datasheet and encryption and decryption works fine when done on the same device. Suppose i'm encrypting a block of data in Tx device and decrypting it there itself, the decrypted data always matches the original data which was encrypted. But when that encrypted data is sent over RF to Rx device the decryption gives altogether garbage result ie. Original data (sent from Tx) != Decrypted data at Rx. Is there a problem in selecting the mode or in my logic or something else? The same IV and key is used for Encryption and Decryption on both devices and I just want to send 1 block ie 16 bytes over RF packet.
I'm new to AES so please provide me with some insights.
Regards,
Nishit.