working public key crypto