Computer Science, asked by parthprajapati5156, 1 year ago

Difference between mac and hash function

Answers

Answered by Anonymous
11
Hey!!!


Here is your answer_______________


* Hash

A Hash is a summary or a finger print of a message and provide neither integrity nor authentication itself, as is it is susceptible to man-in-the-middle attack.

Suppose A wants to send a message M, combined with hash H of M, to B.

Instead C capture the message and generate Message M2 and hash H2 of M2, and sends it to B.

Now B, by no mean can verify whether this is the original message from A or not.

However, hash can be used in some other ways to achieve integrity and authentication, such as MAC.

__________________________
__________________________

* Mac

A MAC which is also a summary of the message provide Integrity and Authentication.

MAC can be computed in many ways.

The simplest method is to use a hash function with two inputs, the message and a shared secret key.

The use of the shared secret key adds the Authentication ability to the MAC, and thus provide integrity and authentication.

However, MAC still does not provide non-repudiation, as any of the party(es) having the shared secret key can produce the message and MAC.

Here comes the Digital Signature and Public Key Cryptography in action.

=================================

HOPE THIS ANSWER WILL HELP U......
Similar questions