Mathematical Foundations of Cryptography