Is a message digest useful with symmetric encryption to check for integrity? I have some confusion that concerns the message digest.

I know that the message digest is the real message hashed with function and we use it to verify the integrity of the message.

I understand the usefulness of using this with asymmetric encryption but I can't find the utility of this with symmetric encryption.

I will explain my self:

We have Alice and Bob. Alice wants to transmit a message m to bob with symmetric encryption. Suppose that the two of them know the encryption key in advance.

Alice encrypts m with the key, hashes the message as hash(m) and sends it to Bob as (encrypt(m), hash(m)).

Bob decrypts the message and then hashed to verify the integrity.

In this case I think that the hash(message) is not needed because:

Case 1: If someone doesn't have the key they cannot cipher a message and send it to Bob pretending to be Alice because Bob will know that the message wasn't encrypted using the key. (We didn't use the hash message in this case).

Case 2: If someone has the key, they intercept the message of Alice and modify it to m2 then they encrypt and hash the new message and send it as (encrypt(m2),hash(m2)). When bob tries to verify the integrity of the message, the process will succeed (in this case using the hash didn't help to check the integrity of the message).

So in both cases the hashed message is not (or cannot) be used to check the integrity of the message.

Is this correct? Because I have argued with my teacher and he said that hashing the message helps to check for integrity in both symmetric and asymmetric encryption.

Is there some cases that hashing the message is useful?
Normally a message authentication code (MAC, for instance HMAC) is used for symmetric integrity and authenticity of the message. In that case a hash can be used with a secret key to protect the message; this is also called a keyed hash. Nowadays authenticated modes of encryption is also used a lot; for example an AEAD cipher such as GCM. AEAD ciphers combine message authentication code with encryption.

Sending encrypt(M) followed by hash(M) is certainly not secure, as the hash leaks information about M. If the message is "Yes" or "No!" then an attacker cannot distinguish between the two when CPA secure encryption is used. However, an attacker can simply test both possibilities by recalculating the hash over the message.

A hash over ciphertext send with the message isn't useful at all, as it would enable the attacker to simply change the ciphertext and then recalculate the hash. Before the hash was sometimes put over the plaintext as well and then encrypted, but that is still not as secure as performing a MAC over the ciphertext, and it may still allow for changing the ciphertext, allowing for instance padding oracle attacks.

With all that said, a hash can be used to secure the integrity / authenticity of a message, be it plaintext or ciphertext. In that case the hash itself must however be trusted. This can for instance be accomplished by putting the hash on a secured website, say apache.org. In that case messages (in this case applications) can be downloaded from mirrors and then compared to the hash, published on apache.org (hopefully over TLS, adding an additional layer of security).

With asymmetric encryption the hash can be trusted because it is verified that the hash was used together with the private key to generate the signature.