calculate the public key on keypair initialization