Fundamentals of Cryptography