I have heard that hashing the message M prevents an existential forgery attack. I was wondering how.
2 Answers
Existential forgery attacks allow the attacker to choose (or calculate) a signature, and then the message is derived from this signature (and the public key) using the existential forgery attack algorithm.
The signature is valid for the derived message, but the problem is that the attacker cannot control the message. It could be anything.
Hashing the message before verification requires the attacker, Oscar, to additionally find some data that hashes to his derived message, which is practically impossible.
Hashing allows the recipient to know that the message comes from an intended person. By using the SHA-1 algorithm, if the hashed message does not match up, then the recipient knows that the message has been forged/is fraudulent. Check out digital signatures for more information.
-
1$\begingroup$ This is wrong. Hashing does not participate in identifying the origin of the message at all. It is used as a proxy for the integrity of the message but it's the calculation of the signature from the hash that handles the authenticity. $\endgroup$ Feb 25, 2015 at 19:47