Imagine a scenario where user a sends a message to user B, he doesn't mind that someone in the middle will look at the message. As long as it doesn't tamper with the message, it doesn't change it. So, what one can do is after the message is ready to be sent, calculate a hash of the message and concatenate the mask the hash to the message itself. The other side will get the message, calculate the hash. See that both hashes matches and everything seems to be alright. Now what if in amend the middle looks at the message and changes the message Which makes another hash out of the new change message and send it along.
How can we prove that we got our message from the one that we thought sent us the message? How can we be sure that no one tampered with the message and made a secondary hash? What we can do authentication and integrity checking using Mac using Message Authentication codes, which are actually a cryptographic checksums that are done to the message using a key very similar to the symmetric key encryption concept. What are Mac's and what is the difference between them and the classic symmetric encryption more in depth on the next video.