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.

CC2340R5: SDK 7.40 lacks implementation AES CBC

Part Number: CC2340R5

Hi,

I spent a few hours to change my encryption setup to AES CBC, only to find that the decryption is not implemented as described in the documentation(!).

In particular, AESCBC_oneStepDecrypt() simply returns AESCBC_STATUS_FEATURE_NOT_SUPPORTED.

Why is it documented with examples and all, if it is not implemented?

I also checked AES ECB, which could be a fallback for me, but this time I checked the Decrypt function before doing any coding, and it is the same with it; not implemented.

What is the workaround?

 Micael

  • Hi Micael,

    Thank you for reaching out. I understand the frustration given the amount of efforts you must have put into this.
    Please refer to the answer I provided in this thread (copied below for convenience).

    As stated in the part's data sheet (see §9.5 in https://www.ti.com/lit/gpn/cc2340r5), CC2340R5 only has a hardware AES CBC encryption accelerator, but does not have a hardware AES CBC decryption accelerator.

    This technical element means the AESCBC_oneStepDecrypt is not planned to be added for CC2340R5.

    I understand this answer is not the one you were expecting, however, I prefer setting the right expectations right now instead of letting you expect something technically not feasible.
    In order to workaround this, I would kindly suggest to implement software AES CBC decryption. There is some code available online (see https://github.com/kokke/tiny-AES-c/blob/master/aes.c) you could leverage.

    Best regards,

  • Hi Clément,

    Yes, I was super frustrated. And I fail to understand; why are you detailing this to work, with examples and all in the SDK documentation??? I clearly states there, that it shall work, it even states that it will work on CC23x0, but with 128 bits only;

    Single call CBC decryption with plaintext CryptoKey in callback return mode

    Note
    The following code example presented uses a 256-bit key. However, CC13x1/CC26x1 and CC23x0 only support a maximum key size of 128-bits, so reduction of keyingMaterial would be required.

    If the documentation cannot be trusted, what good is it then?

     - Micael

  • Hi Micael,

    You have a good point, and I can only apologize on behalf of the team. For information I have opened a ticket requesting this to be improved.

    As you are asking the reasons why the documentation is done this way, this is because the same APIs (in order to enable code portability) are used across multiple devices. This is of course not an excuse.

    Again, I am really sorry for this experience and I am doing my best to get this avoided in the future.

    Best regards,