Hi,
I would like to use the functions CryptoCC32XX_encrypt and CryptoCC32XX_decrypt to encrypt/decrypt items with AES CBC which are up to 1K in length.
This will work just fine, as long as I have separate memory for input and output parts. However, that requires me to sacrifice 1K of precious memory.
In theory, encrypting/decrypting CBC stuff in place (same memory in/out) should be possible, by using at most another blocksize of extra memory. This is because the algorithm basically just iterates over the entire input.
However, since I'd like to use the hardware acceleration of the CC3220, I am not sure if this is even possible/supported by the API.
Worst case, I'd have to make my own CBC wrapper around it, e.g. executing up to 256B blocks at a time, and using the last cypertext as IV. But that's also a bit stupid of course.
What would be the recommended approach for encrypting large messages without using twice the amount of memory?
Thanks for your reponse!