DecentID: Distributed and Privacy-preserving Identity Management using Blockchain-based Smart Contracts