Privacy-preserving location-based service protocols with flexible access