Jump to content

Simple cryptographic questions about Hash Functions


ecy5maa

Recommended Posts

Suppose Bob produced document m and h(m) using a hash function h which is known publicly.

 

(a) Bob sends {m, h(m)} to Alice over the Internet. Can Alice verify that m has not been tampered with (say during its transit over the Internet)? Explain.

 

 

My answer: I assume Alice can verify that m has not been tampered with, since h(m) should still compute correctly regardless of whether a replay attack has occurred or not. SO yes Alice can check message tampering.

 

 

Can anyone let me know if this is correct?

Link to comment
Share on other sites

It's possible, but the point of cryptographic hash functions is that it is very, very difficult to generate a message that produces a given hash. That's called a preimage attack, and it basically requires brute-forcing it: try a bunch of messages until you get one which has the right hash. It takes a very, very long time.

Link to comment
Share on other sites

Fair enough. Thank you!!

 

Now if u can help me with the second part as well..i will be great full.

 

(a) Bob gives {m, h(m)}to Alice directly (face to face), can Alice be sure that there was no tampering by a third party?

 

 

Ans: Similar to the first part, i would think that even if Bob gave Alice the message face to face.....she would have no way of knowing what the original message was so cannot know if the message was tampered with by a third party. She would have to accept the message that she receives as the original message.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.