In the Diffie-Hellman key exchange protocol, Alice and Bob choose a large prime p and a primitive root g for p. As usual, Alice sends A ≡ g^a (mod p) to Bob, and Bob sends B ≡ g^b (mod p) to Alice. Suppose Oscar bribes Bob to tell him the values of p, b and B. Bob soon regrets it and doesn't tell him the value of g. Show how Oscar can determine g from his knowledge of p, b and B, provided that gcd(b, p - 1) = 1. Hint: Obviously, Oscar attended all Cryptography classes, and therefore knows a little about Fermat.