Tag Info

Hot answers tagged


First, terms: A MAC is a generic term for a class of cryptographic primitives. It's in the same category as "hash" or "PRNG." HMAC is a particular construction that, combined with a suitable cryptographic hash, gives a secure MAC function (it can also be used to generically refer to any HMAC algorithm, since HMAC is secure with pretty much any standard hash, ...


It is "sent over a secure channel like the AES key". It is "safe to use the same HMAC secret for each subsequent AES encrypted message after the initial connection".


If the MAC'ing is done right (after the encryption) and if you pad the CBC data correctly there's no security risk. Howver changing to CTR or even better to GCM would be better, as both don't operate on whole blocks and GCM even provides authentication.

Only top voted, non community-wiki answers of a minimum length are eligible