Q:

Derivative of Diffie Hellman

Looking to get some clarification on this.
We have the same three protagonists, Bob and Alice, trying to send each other a message. And Eve trying to figure out the message sent by Bob and Alice.
Suppose they proceed as follows: 

Alice privately picks numbers a and x such that $ax \equiv 1 mod(p-1)$;
Bob privately picks a number b such
that the gcd(b,p-1) = 1;
Alice computes $u \equiv m^a mod(p)$, and sends
this to Bob;
Bob computes $v \equiv u^b mod(p)$, and sends this to Alice;
Alice computes $w \equiv v^x mod(p)$, and sends this to Bob.

How does bob figure out Alice's message?
Now, suppose Alice and Bob are too lazy to exponentiate, and instead:

Alice privately picks numbers a and x such that $ax \equiv 1 mod(p)$;
Bob privately picks a number b such
that the gcd(b,p) = 1;
Alice computes $u \equiv a\cdot m(mod(p))$, and sends
this to Bob;
Bob computes $v \equiv b \cdot u(mod(p))$, and sends this to Alice;
Alice computes $w \equiv x \cdot v(mod(p))$, and sends this to Bob.

How does Bob figure out Alice's message?

A:

Fermat's little theorem says that if $k \equiv 1 \mod (p-1)$, then $m^k \equiv m \mod p$.
So if you have a number $a$ and you take $m^a \mod p$ and the result you do to the power $x$  ,modulo $p$ then you get $(m^a)^x \equiv m^{ax} \mod p$ and this will equal $m$ again when $ax \equiv 1 \mod (p-1)$. 
Alice puts a lock on $m$ (power $a$), then Bob puts his lock on it (power $b$), and then Alice removes the first lock by using the power $x$, which cancels the effect of the power $a$... 
This should put you on the right track for the first.
The second really isn't that hard...

