When we use the saw operation, when both inputs doesn't match, we get a one. When both inputs match, we get a zero. You can play around there are different sort of calculators on the web. Let's try this one. Let's use binary based to an S. But empty, beat one, and beat zero and if we calculate so we get a one both inputs doesn't match. If we use zero in both cases, we'll get a zero since both inputs match.
Now let's try to do a different thing that's right to write down some plain text The attack will start. Don't know, assume that this is the plain text and we have a key let's use a key and hex decimal. And let's calculate for and see what we got. And this is the encrypted text. We use the plain text as after we did some operations as we saw, we input the key, that's the second input, and we do the encryption function. And we get the result which is a cipher text.
Now we'll do we get the cipher to x and anyone who wishes to decrypt it needs that key. A man in the middle an attacker can still harm by altering the text the cipher text and change the content. How? Let's see, let's take the cipher text. And now let's use the cipher text as the input. Let's use the same key.
Unless it's cold sore, we will get the same message. So we did the reverse operation, we actually did the decrypting. We took the cipher text we use the key and the plain text as the attack was started though. Now although it is encrypted and men in the middle can get into the message the payload itself and just change this. And as we can see, the message itself is changing. To be sure that no one has tampered with our message no one touched even or changed even one bit.
We use hashes and H max to prove the integrity and authenticity of the message.