MSPM0G3507: Using AES decryption chaining across multiple segments

Part Number: MSPM0G3507

I would like to use the AES module in the MSPM0G3507 to decrypt a long stream that will arrive and be operated on in segments.  I can see from the example (aes_cbc_256_enc_dec) how to perform decryption of a single segment. However, the chaining needs to carry on to the next segment rather than starting from scratch.  Is this supported?  Is it as simple as calling DL_AES_loadDataIn()/DL_AES_getDataOut()/DL_AES_xorData() repeatedly?  If not, does one of the other streaming options (OFB, CFB) offer me a better option?

  • Hi Alan,

     Is this supported?  Is it as simple as calling DL_AES_loadDataIn()/DL_AES_getDataOut()/DL_AES_xorData() repeatedly?

    Yes, this is supported.

    Users need wait for AES completion before loading next new input data.

    B.R.

    Sal

  • That's good to hear, thanks.  Do you have example code or an app note showing this? I realise that it's not quite so obvious (depending on the chaining method) what happens instead of the IV that's passed in to the first round, etc.

  • Hi Alan,

    Unfortunately, right now we have no example for this. The flow is defined in TRM sequence:

    In software process, I think we can treat the previous output segment as the next segment encryption IV for separate operation (as the data might not be ready when the previous CBC encryption done).

    B.R.

    Sal