Hot answers tagged keys
2
Generally speaking: no, it is not OK. If you're going to encrypt any data at all with this key, you shouldn't reuse it to MAC other data. Using the same key for two purposes is bad practice and has often led to security problems in the practice.
Encrypting data without MACing it is also bad practice.
Instead, I recommend you use an "authenticated ...
2
It depends on how you encrypt and mac.
If you can still choose then you should use an authenticated encryption with associated data mode (AEAD) like Galois/Counter Mode. If all data you want authenticated in a message has to be transmitted in the clear then just leave the encrypted part empty. These modes have the advantage that they were designed to use ...
Only top voted, non community-wiki answers of a minimum length are eligible