The article 'Public Key Cryptography' gives a detailed explanation of how the method works and gives you help in working with modulus arithmetic.