29
Hashing (Message Digest)

Hashing (Message Digest)

  • Upload
    phuc

  • View
    32

  • Download
    1

Embed Size (px)

DESCRIPTION

Hashing (Message Digest). Hashing (Message Digest). Hashing (Message Digest). Hello There. Hashing (Message Digest). What not. Hash Function – One way. Needed properties for cryptographically secure hash : 1. Computationally infeasible to find the message that has given the hash - PowerPoint PPT Presentation

Citation preview

Page 1: Hashing (Message Digest)

Hashing (Message Digest)

Page 2: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

Page 3: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

Hello There

Page 4: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.What not

Page 5: Hashing (Message Digest)

Hash Function – One way

Needed properties for cryptographically secure hash:

1. Computationally infeasible to find the message that has given the hash

2. Should be impossible for two messages to hash to the same number (and to find two messages with the same hash).

Message substitution possible otherwise

Page 6: Hashing (Message Digest)

Hash Function – One way

Appearrance to a cracker:

1. Looking at output, any bit should be 1 about ½ the time 0010111...1...001110

2. Each output should have about ½ of its bits set to 1

3. Any two outputs should be uncorrelated no matter how similar the inputs are

Page 7: Hashing (Message Digest)

Hash Function – One way

Birthday Problem:

Assume a completely random hash function

If the number of output bits is k, then 2k outputs possible

Hash needs to map to (2k)*(2k) values to get probabilitythat two outputs are the same below ½.

Page 8: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

Secret

The little brown fox jumped over the lazy dog's back

Page 9: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

The little brown fox jumped over the lazy dog's back

Page 10: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

The little brown fox jumped over the lazy dog's back

Page 11: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

The little brown fox jumped over the lazy dog's back

Page 12: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

The little brown fox jumped over the lazy dog's back

Page 13: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

The little brown fox jumped over the lazy dog's back

Page 14: Hashing (Message Digest)

Hashing (Message Digest)

.

.

.

.

.

..

.

.

.

.

.

The little brown fox jumped over the lazy dog's back

Output

Page 15: Hashing (Message Digest)

Hashing - authentication

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

S S

Client Monitor

Page 16: Hashing (Message Digest)

Hashing - authentication

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

S S

Client Monitor

Challenge R

Page 17: Hashing (Message Digest)

Hashing - authentication

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

S S

Client Monitor

Hash(S | R)

Page 18: Hashing (Message Digest)

Hashing - authentication

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

S S

Client Monitor

Check Hash(S | R)?

Page 19: Hashing (Message Digest)

Hashing - authentication

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

S S

Client Monitor

Challenge P

Page 20: Hashing (Message Digest)

Hashing - authentication

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

S S

Client Monitor

Hash(S | P)

Page 21: Hashing (Message Digest)

Hashing - authentication

.

.

.

.

.

..

.

.

.

.

.

.

.

.

.

.

..

.

.

.

.

.

S S

Client Monitor

Check Hash(S | P)?

Page 22: Hashing (Message Digest)

Hashing - Message Authenication

Same as authentication except concatenate the message with the secretand pad.

Page 23: Hashing (Message Digest)

Hashing - Message Authenication

Same as authentication except concatenate the message with the secretand pad.

Unfortunately, attacker can append a message since s/he knows Hash(S | M)and the Hash algorithm.

Page 24: Hashing (Message Digest)

Hashing - Message Authenication

Same as authentication except concatenate the message with the secretand pad.

Unfortunately, attacker can append a message since s/he knows Hash(S | M)and the Hash algorithm.

Here is what to do: 1. Concatenate secret to front of message 2. Take the hash 3. Concatenate the secret to the front of the hash 4. Take the hash

Page 25: Hashing (Message Digest)

Hashing - encryption

.

.

.

.

.

..

.

.

.

.

.

Secret

The little brown fox jumped over the lazy dog's back

Initialization Vector

+

To receiver

Page 26: Hashing (Message Digest)

Hashing - encryption

.

.

.

.

.

..

.

.

.

.

.

Secret

The little brown fox jumped over the lazy dog's back

+

Page 27: Hashing (Message Digest)

Hashing - encryption

.

.

.

.

.

..

.

.

.

.

.

Secret

The little brown fox jumped over the lazy dog's back

+

To receiver

Page 28: Hashing (Message Digest)

Hashing - encryption

.

.

.

.

.

..

.

.

.

.

.

Secret

The little brown fox jumped over the lazy dog's back

+

Page 29: Hashing (Message Digest)

Hashing - encryption

.

.

.

.

.

..

.

.

.

.

.

Secret

The little brown fox jumped over the lazy dog's back

+

To receiver