# A Blockchain-Based Framework to Enhance Anonymous Services with Accountability Guarantees
## 1 Introduction  
Anonymous services are privacy-preserving services offered to users without requiring them to disclose their identities. We can distinguish two types of services. The first type is represented by one-time services exploited by users just once. Some examples are electronic auctions [1, 2], anonymous surveys [3], or e-voting [4]. In the second type of services, users keep an anonymous account and exploit the same service more times. Each user is associated with a pseudonymous username to which their account's activity is linked. The action of users also includes possible data generated by the user when leveraging the service. A typical example is represented by anonymous social networks [5, 6], in which, a pseudonymous username is associated with some data, such as private messages or posts. In this paper, we refer to the second type of services. A minimal requirement is to provide anonymity to the users with respect to other users leveraging the same service. However, in order to be effective, anonymity should also be guaranteed against the service provider itself. Even though, for the first type of services, full anonymity may be required, when referring to the second type, it is impractical to pursue user anonymity without taking accountability into consideration. Indeed, without the fear of being identified, held responsible, and punished when abusing the services, users are likely to misbehave due to selfishness or malic, thereby disrupting system operations and harming everyone else [7]. Therefore, a trade-off between anonymity and accountability exists [8]. In this paper, we try to solve this trade-off by proposing a blockchain-based protocol including two further parties, in addition to the user and the service provider. They are: (1) an identity gateway, which interfaces a standard identity provider (knowing the real identity of the user) with the other entities of our proposal, and (2) a linkage agency, actingas a third independent party, which allows for the re-identification of the users if needed (e.g., when required by a court order). In particular, our solution allows for the identification of the users only when all three parties (i.e., service provider, identity gateway, and linkage agency) collaborate. In all other cases, anonymity is guaranteed. Our paper reaches similar goals of approaches such as [9; 10; 11], with the relevant difference that, in our solution, the collaboration of just two third parties is not enough to de-anonymize the user. From the security point of view, in our threat model, we require only a minimum degree of trust in the identity provider, in the sense that it does not perform active attacks such as impersonation. However, we allow it to passively collude with, at most, one of the other entities by disclosing the information that it knows (i.e., the real identity of the users), still preserving unlinkability. No trust is required in the identity gateway, service provider, and linkage agency. At the basis of our solution, we rely on a challenge-response mechanism (see Section 4) leveraging a smart contract deployed on the Ethereum blockchain. This smart contract also provides an account recovery mechanism in the case where the user loses their access credentials. Indeed, traditional recovery mechanisms based on the telephone number or email address cannot be adopted since they would reveal personal information about users. Finally, another benefit of the blockchain technology is that the re-identification of the user as a consequence of malicious behaviour can be publicly verifiable by anyone. To show the applicability of our proposal, we provide a user-friendly implementation, including a time-cost analysis. In this implementation, we care about usability by reducing the number of operations performed client-side. This shows that our solution can be easily applied in real-life contexts. The structure of the paper is the following. In Section 2, we survey the related literature and provide some background notions about the Ethereum blockchain.