This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1110-CC1111: Using the AES co processor from CC1110.

Part Number: CC1110-CC1111
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.

  • Unfortunately I do not have any possibility to test this right now, but I recommend that you take a look at the following document:

    www.ti.com/lit/swra172

    I also know that there are some examples for the CC2430 sending and receiving packets over RF, where the packets are being to be
    authenticated and encrypted. Maybe you can use that as a reference (I think the AES is the same for CC2430 and CC1110).

    http://www.ti.com/lit/zip/swrc019

    When you are transmitting the packets, are the radio set for variable packet length mode, expecting the first byte to be the length byte? If so, you need to remember that the length byte should not encrypted.

    Siri

  • Hello.

    Okay I got the problem. I was encrypting 12 bytes of data with rest of the 4 bytes of block padded to zeros and was sending just those 12 bytes. At the receiver end i was taking those 12 bytes with the rest bytes zeros and was decrypting that data. When i sent the entire block ie 16 bytes of payload, encryption and decryption worked properly. So this raises another question to me. What if i want to send just 5 encrypted bytes over payload and not the entire 16 bytes block? Is there any configuration by which i can send variable length encrypted payload? Or do i have to send the entire 16 bytes in payload while using AES module?

    Regards,

    Nishit.

  • Hi

    The AES coprocessor works on blocks of 128 bits. that means that your RF data packet needs to be 16, 32, 48, etc, bytes long.
    It is fully possible to transmit 3 AES blocks in one RF packet by using variable packet length, but then the length byte needs to be 48 and then you write the 3 blocks to the TX FIFO.

    Siri
  • Hello.
    Okay so i have to send the packets in multiples like 16,32 and so on. So no chance of sending just 4-5 encrypted bytes right?

    Nishit

  • correct
  • Hello.

    I know this question is not related to CC1110, but it is related to the AES encryption question which i asked. I read that CC1310 supports variable length packeting for encryption. Can we send variable length encrypted packets using the AES co processor of CC1310? I have the CC1310 launchpad with me. Can i use that to get the results which i desire or is the process same in both CC1110 and CC1310? (Sending full 16 bytes of encrypted data over payload) ?

    Regards,

    Nishit.