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.

MSP430FR5989: AES 128-bit accelerator in CFB mode

Part Number: MSP430FR5989
Other Parts Discussed in Thread: AES-128

Hi,

Need help on making the AES accelerator work in CFB. I spent two days creating a DMA and non-DMA solution but I am not getting the expected result. I am using this site aes.online-domain-tools.com/  to verify the encryption but it is not tallying with what I am getting from the AES-128 accelerator. I also have a python script that uses pycryptodrome and created an sample test script that encrypts data in OFB and it tallies with what I am getting from aes.online.domain-tools.com.

I saw this question asked last 2014 but there are no replies.

http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/375303?AES-128-bit-accelerator-with-OFB-and-CFB-modes

I have the same question: Does TI provide any useful example for modes CFB (Im using IAR EWB for MSP430 by the way)? There is a pseudo-code on the datasheet (uses DMA) and I had been following that but not getting the expected result.

  • Hello,

    Thank you for your inquiry. Please give me a couple of days to reach out to an expert with our AES accelerator module to get their feedback and report back to you.

    Best regards,

    Matt

  • Hi,

    Thank you for your patience during this process. I am working with the SW team to find examples using the AES accelerator. I potentially found a code example that uses the AES IP in CBC mode but I am still determining if there is an example showing CFB. Please give me a couple more days to look into this.

    Best regards,

    Matt

  • Hello,

    At the moment the only released example we have showcasing the AES accelerator module is provided in Driverlib: http://dev.ti.com/tirex/explore/node?node=AGgUPuspmu9R22mosme6Fg__IOGqZri__LATEST

    Another resource I found which might help you more is an E2E Post where the latest comment is a code snippet from a customer that seems to provide a solution for AES encryption/decryption using DMA for OFB, CFB, CBC, or ECB modes. Please refer to that thread to see if that helps point you in the right direction.

    Best regards,

    Matt

  • Hi Matt,

    Thank you for the reply. I tried that E2E post last week. The CBC on that works, however the CFB doesn't give the correct results. It seems to me that the implementation is correct as per the datasheet, but seems lacking as per the standard CFB implementation as I saw from this link https://pdfs.semanticscholar.org/8822/66e916ec18ea7022bfa149954a29593f7490.pdf  , it seems to me that there are additional steps needed for the CFB (discarding of bits and shift operations)


    We are not pursuing the idea of using CFB anymore. We will be using AES in CTR mode, and noticed that it closely resembles the CFB procedure (based from the pdf posted and the datasheet) except for the part where the ciphertext being fed to the next block. I implemented the AES accelerator module in CTR mode and it works very well.

    Thank you for the support.

**Attention** This is a public forum