Ensuring Integrity for Lottery and Security Services