Devil's Night

Man in the Middle Attack — the Importance of Authentication

by FOX on 11:50 PM, under Encryption

Since Diffie-Hellman is so great, as long as the prime number Alice and Bob pick is big enough, Their conversation should be safe. Recall the whole process between Alice and Bob on Diffie-Hellman Key Exchange. It’s obvious that all the time, Eve does not say a word, All she does is just listen. What if Eve begins to do something between Alice and Bob?

Recall what Alice and Bod do to implement Diffie-Hellman Key Exchange

  1. Alice and Bob agree on some prime number p, and a generator g for this prime number.
  2. Alice picks a value a secretly, and sends Bob A = ga mod p
  3. Bob picks a value b secretly, and sends Alice B = gb mod p
  4. Alice receives B, and Computes A’ = Ba mod p
  5. Bob receives A, and Computes B’ = Ab mop p

Now Eve decides to do these

  1. Alice and Bob agree on some prime number p, and a generator g for this prime number.
    • Eve also gets p and g. She picks b’ and computes B” = gb mod p, then sends it to Alice and says it’s from Bob; on the other hand, she picks a’ and computes A” = ga mod p, then sends it to Bob and say it’s from Alice
  2. Alice picks a value a secretly, and sends Bob A = ga mod p
    • This real A would be ignored by Bob since he receives A” first
  3. Bob picks a value b secretly, and sends Alice B = gb mod p
    • This real B would be ignored by Alice since she receives B” first
  4. Alice receives B”,she believes it’s from Bob and Computes A’ = B”a mod p
  5. Bob receives A”, he believes it’s from Alice and Computes B’ = A”b mop p

Know let’s have a look what do they know

Alice: p, g, a, A’, B”

Bob: p, g, b, B’, A”

Eve: p, g, A, B, A’, B’, A”, B”, a’, b’

Alice is gonna use A’ as her secret key and Bob is going to use B’ to encrypt their message,

Now

Alice wants send Bob message m, she encrypts it with A’, sends Bob C, the message cyphered by Alice

Eve and Bob receives C, Bob thinks it’s noise since his B’ doesn’t equal to A’ any more, but Eve can decrypt C to get m by A’, then she will use B’ to encrypt it, and sends Bob C’, the message cyphered by Eve

Bob and Alice receives C’, Alice thinks it’s noise sine her A’ doesn’t equal to A’ any more, but Bob has B’, he will believe it’s from Alice and can decrypt it by B’

Now Eve successfully infiltrates  Alice and Bob’s conversation.

:,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you are looking for? Drop a comment on a post or contact me so I can take care of it!

Visit my friends

A few highly recommended friends...