Mathematical Background for Cryptography