Suppose I have a fixed-length arbitrary ciphertext.
To authenticate such ciphertext:
- I generate a random AES Key $K_{auth}$.
- Then I compute the CBC-MAC Tag of the ciphertext with $K_{auth}$.
- Finally, I store the ciphertext and the associated Tag in my database.
For decryption process:
- I get the ciphertext and the associated tag from my database.
- Then I check the ciphertext length and if it match as expected, compute the tag with $K_{auth}$.
- Finally, if tags matches, I process the cipertext.
In my case the database should be considered untrusted, as an adversary may edit both ciphertext and tag. However, as keys remain private, is such Encrypt-then-Mac approach secure (even if the tag is not itself encrypted) ?