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)
Will the AES encryption still work correctly though I called the API to do a SHA256 hash before I called the encrypt.
When MMCAU_AES_SetKey() is called it just perform the key expansion and stores the key schedule in the variable "keySch".
Does this method also setup anything in hardware registers which need to keep there state for an encryption/decryption to be successful?
The reason I am asking this is because MMCAU_AES_EncryptEcb() takes the "keySch" as an input. The "keySch" is generated by MMCAU_AES_SetKey(), therefore there nothing in the hardware register that should matter for the encryption/decryption to be successful.
If the CAU does not store anything in the hardware registers that are required to successfully encrypt/decrypt then the answer you proposed is not correct.
After the 3rd calls shouldn't encryption be successful?