export public key from private if it does not exist