I am new to cryptography and have been studying for Dan Boneh's Stanford Course on Coursera, after going through encrytpion and decryption I've started the integrity portion of the Course.
Sir brought up MACs and how they use a key to ensure that data is not tampered. If my understanding is correct, data that is known to a hacker/eavesdropper(say the bootstrap in a windows 10 device) is kept secure since the system has a private key that can verify the data with it's own private key. That under ideal circumstances, the correct message would yield the correct tag and corrupted data would not, therefore any tampered with data would not fool the system(lack of better words).
Is my understanding correct so far?
Coming to the crux of my question, let's say that someone has used an XOR gate with one of the inputs as some random noise, the original data would get altered to some other data set. Is such a case possible if the authentication system is poorly designed? And if it is possible, how would the system get back the original data?