Coconut: Threshold Issuance Selective Disclosure Credentials with Applications to Distributed Ledgers