1
$\begingroup$

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?

$\endgroup$
1
  • 1
    $\begingroup$ Use the AES in CTR mode of operation that only requires encryption. $\endgroup$
    – kelalaka
    Commented Mar 21, 2020 at 17:48

1 Answer 1

2
$\begingroup$

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

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.

BTW: CMAC assumes that the device has a secret key; if someone else learned that secret key, they could generate their own images (which would validate just as well). Do you have such an unlearnable secret key?

$\endgroup$
1
  • $\begingroup$ Thank you very much for this great explanation! I'm aware that someone could produce images that would pass the CMAC validation. Each device has its own keys, and they are secured against reading by the microcontroller. $\endgroup$
    – joe
    Commented Mar 21, 2020 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.