Secure Implementations of Identification Systems