algorithm for public-key cryptography (encryption and decryption)