Hello,
I am using the CAU on the K64 in the multi-threaded environment. I am using these function through the MCUXpresso SDK 2.4.0.
If I am using the CAU for AES encrypt/decrypt can I concurrently use CAU to do SHA256. Before the AES encrypt/decrypt has finished.
For example consider the following call order from a single thread for simplicity.
(The function names are provided by the SDK driver)
- MMCAU_AES_SetKey()
- Sets the AES encryption key in the CAU
- MMCAU_SHA256_HashN()
- User the CAU unit for SHA256, before I encrypted the data
- MMCAU_AES_EncryptEcb()
- I now encrypt the data, with what I assume to be the correct key even though I called SHA256 method above.
Will the AES encryption still work correctly though I called the API to do a SHA256 hash before I called the encrypt.
Hi,
I'm afraid you can't calculate AES and SHA concurrently. Although they have different core module, but they share some of circuit.
Regards,
Jing