Eve knows: | |||
Alice knows | Alice and Bob agree to use p, g | Bob knows | |
Alice picks secret a | Bob picks secret b | ||
Alice computes A=ga mod p |
Bob computes B=gb mod p |
||
Alice sends A to Bob | Bob sends B to Alice | ||
Alice receives B from Bob | Bob receives A from Alice | ||
Alice computes s=Ba mod p |
Bob computes s=Ab mod p |
||
Now Alice and Bob share the secret s |