Public key cryptography method and system