8
$\begingroup$

I know the definitions of both but can't specifically tell how they are different and if one is better than the other. Please help.

$\endgroup$
1
$\begingroup$

They are used in completely different contexts. In public key encryption there is the notion of signature that protects sender authenticity. The secret key is used as the signing key and everybody can verify its correctness. On the other hand in symmetric encryption there is the notion of MAC that protects the integrity of the message with an agreed MAC key between the sender and the receiver.

$\endgroup$
  • $\begingroup$ So MAC can be used to protect sender authenticity like public-key encryption? $\endgroup$ – Shaily Nov 1 '13 at 1:07
  • $\begingroup$ no MAC is for message integrity.That is nobody has tampered with your message. Put it simpler an attacker cannot provide valid ciphertexts. $\endgroup$ – curious Nov 1 '13 at 1:08
  • 1
    $\begingroup$ So simply speaking, MAC cannot be used to verify sender authentication because it only protects the message integrity. Alright, thank you so much. $\endgroup$ – Shaily Nov 1 '13 at 1:11
  • 1
    $\begingroup$ Explain the negative vote in order to improve :) $\endgroup$ – curious Nov 1 '13 at 11:07
  • $\begingroup$ @Shaily That is not correct. A MAC can be used for authentication. $\endgroup$ – mat May 7 '17 at 20:56
6
$\begingroup$

The main functional difference is that anyone able to verify a Message Authentication Code is also able to forge one, because the same key is used for both tasks; whereas someone with the public key can verify a digital signature, but can't forge one.

Contrary to a MAC, digital signature is thus usable in contexts where the verifier is not trusted, which is of tremendous practical value. There's a price to pay for that: a digital signature is significantly larger, and slower to generate and/or verify, than a MAC is.

$\endgroup$
  • 2
    $\begingroup$ +1; also, the deniability of MACs may sometimes be considered a desirable property, e.g. for encrypted private communications where you may not wish to leave the other party with a permanent proof of what you said to them. $\endgroup$ – Ilmari Karonen Oct 27 '15 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.