Public key cryptography: theory and practice