# AES ECB mode for both encryption and authentication

Can AES ECB mode be used for both encryption and authentication, assuming the following conditions are always true?

• Encryption of exactly 128-bit (1 block) size messages

• Different keys used for both encryption and authentication

• Authentication AES ECB uses encrypted ciphertext as input and outputs 128-bit MAC

• Let me make sure I follow. You encrypt a message $m$ that is 128-bits long with AES ECB to get a ciphertext $c$. You then encrypt that ciphertext $c$ with AES ECB using a different key to get $a$. $a$ is then the MAC and $c$ is the ciphertext. Does that correctly describe the setup you are assuming? – mikeazo Sep 4 '18 at 19:55
• @mikeazo Yes, that is correct – MateoConLechuga Sep 4 '18 at 19:56