# modified AES-CMAC algorithm

I want to use AES-CBC for secure firmware upgrades on a microcontroller, with AES-CMAC for checking the integrity of the firmware image. The AES-CMAC algorithm needs a AES-128 encryption funtion. For the firmware upgrade, I need decryption only. Thus, I'd like to replace the AES-128 encryption by AES-128 decryption to reduce the program size by omitting the AES encrypt function.

Are there any implications on security if the AES-CMAC algorithm is modified in this way?

• Use the AES in CTR mode of operation that only requires encryption. – kelalaka Mar 21 at 17:48

There is no security implications by modifying $$\text{AES-CMAC}$$ by replacing the $$\text{AES}$$ block cipher component with $$\text{AES}^{-1}$$. Both are equally strong block ciphers; if $$\text{AES}^{-1}\text{-CMAC}$$ were found to have a weakness, that would imply that $$\text{AES}^{-1}$$ could be distinguished from a random permutation, which would imply that $$AES$$ could be distinguished from a random permutation, which could imply that $$\text{AES-CMAC}$$ might not be as strong as we hoped.