Really basic question, but what is the purpose of using a MAC/HMAC when you are encrypting using a symmetric key algorithm?
It is my understanding that the purpose of a MAC is to authenticate the sender by the use of a shared key, but if you are encrypting using a shared key algorithm, doesn't that provide the authentication, without the need for a MAC?
Am I right in thinking the main purpose of using one is for the 'integrity' aspect, rather than any authentication?
Thanks.