I thought I would share this. I just watched it and saw it was a very good explanation.
http://www.wimp.com/howencryption/
EDIT: Just tried it, pretty cool math
Code:Exponent and modulus 3 mod 17 Private Numbers alice 10 bob 15 Calculate public numbers 3 ^ 10 mod 17 = 8 3 ^ 15 mod 17 = 6 Verify with public numbers 8 ^ 15 = 35184372088832 mod 17 = 15 6 ^ 10 = 60466176 mod 17 = 15