Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
Dr. Nguyen Tuan Nam [email protected]
A hash (message digest) is a one-way function Takes an input message and produces an output Not practical to figure out what input corresponds to a given output For a message digest function to be considered cryptographically secure must be computationally infeasible to find A message that has a given pre-specified message digest 2 messages that have the same message digest Given a message, impossible to find a different message with the same message digest All of the digest/hash algorithms Take an arbitrary-length message and wind up with a fixed- length quantity
There certainly will be many messages that yield the same message digest. Why? Example For 1000-bit messages and a 128-bit message digest, on the average, how many messages are there that map to any one particular message digest? Certainly by trying lots of messages one would eventually find 2 that mapped to the same message digest. “Trying a lot” means essentially impossible.
Fingerprint a program or a document to detect modification of it. How?
n selected inputs and k possible outputs Unpredictable mapping from input to output
Assume n selected inputs and k possible outputs Unpredictable mapping from input to output With n inputs n*(n-1)/2 pairs of inputs Each pair: probability of 1/k of both inputs producing the same ouput value Need about k/2 pairs in order for the probability to be about 50% that you’ll find a matching pair If n is greater than square_root(k) good chance of finding a matching pair
WHY WORRIED ABOUT SOMEONE BEING ABLE TO FIND ANY 2 MESSAGES WITH THE SAME MESSAGE DIGEST? Because if cryptographers were happy with message digest functions that merely made it infeasible to find a message with a particular pre-specified digest 64-bit digest would suffice
Alice wants to fire Fred Alice asks Bob, who happens to be Fred’s friend to compose a letter explaining that Fred should be fired After Bob writes the letter, Alice will read it and sign the message digest using her private key Bob needs to find 2 messages with the same message digest
THE MATH BEHIND THE MESSAGE DIGEST FUNCTIONS The math behind RSA and other public key cryptographic algorithm is quire understandable In contrast, message digest functions are like alchemy Bunch of steps that each mangle the message more and more Possible to follow all the steps But incomprehensible part is why this particular shuffling of the message is done, and why it couldn’t be simpler and yet just as secure
MINIMAL VS. OVERKILL SECURE MESSAGE DIGEST FUNCTION Message digest function should be easy to compute However, it is safer for a function to be overkill Shuffling beyond what is necessary But then harder to compute than necessary Why? Similar to secret key algorithms, the digest algorithms tend to be computed in rounds
THE SIGNIFICANT DIFFERENCE BETWEEN A SECRET KEY ALGORITHM AND A MESSAGE DIGEST FUNCTION Whether it is reversible!
Attacker may be able to compute a MAC of a longer message beginning with m, given message m and the correct MAC for m
Having only 64-bits of MAC (rather than using all 128 bits of the MD), will it become less secure?
Keyed hash: hash that combines the secret key and the data
How? Remember it is irreversible