Internet Censorship

written by Silvia Puglisi [Hiro] on 2030-03-04

When we talk about things like internet censorship and surveillance, these might appear as abstract concepts to some people, especially in global north countries. This post will tries to explain the effects of these activities, and what can be done to help people subjected to both.

How does internet censorship look like?

Internet censorship can take many different forms. In most countries there is some form of internet censorship, meaning that the government might decide to block some websites for different reasons. Usually, in democratic settings, internet blocking is regulated by the state and it takes more the shape of content restrictions based on various constitutional rights and principles, and it is enacted both through the democratic process and formal legislation.

Generally speaking a network can be censored by blocking or slowing down access to certain websites, services, protocols. The ooni project [1] has been developing tests to find out when and how is censorship happening in a network [2]. How blocking is implementing varies widely from country to country and even by specific political situations or events. Measures that can be adopted to circumnvent censorship at a certain moment might not work after a while. It is said that censorship circumnvention is a arms race. As censorship circunvention measures become more sophisticated so does censorship technology. Eventually the right for freedom and democracy is won at the political level.

Ooni keeps a blog [3] where they present each internet censorship events and describe both the political background and the technical details of how the blocking is performed.

While interent censorship might seems secondary it is important to point out that autoritarian regimes use communication control and blocking to shutdown or reduce people ability to organize and protest. There is evidence that as digitalr rights are restricted human rights are violated [4] [5].

Internet censorship doesn't affect everyone equally either. Marginalized groups and people living in the global south are the ones that summer digital rights violation the most [6] [7].

Relationship between internet censorship and surveillance

When communication networks are controlled and blocked, citizens are surveilled [8][9]. Controlling dissent by targeting certain groups and dissidents is a common practice for many authoritarian governments [10]. In certain cases these governments prefer to engage themeselves online or partern with online media companies to control content and who has access to it [11]. In other cases the technics are more sophisticated. In certain cases even, having a state actor surveil their citizens affects users and business outside that country. This is the example of China weaponizing ligitimate requests to attack certain websites outside the Great Firewall (GFW) and even target the global chinese community [10].

How to protect yourself from surveillance and circumnvent censorship

The global investigative journalism network advises journalist to protect themselves and their sources from possible threats [13]. The first step is usually try to protect communications [14] by using end-to-end encrypted services, followed by taking necessary measures to protect access to personal accounts and using secure and encrypted tools and services to store and share documents.

The ability to interact with sources is strategically important for journalist. This is why tools like Secure Drop [16] are used in newsrooms around the globe. Often journalists rely on more lightweight applications. One of this is OnionShare [17]. Onionshare allows users to share or receive files, or to publish a website, directly from their computer. Because OnionShare uses the Onion Service protocol [19] and expose the service on the Tor network only. The Onion Service protocol allows for bi-directional anonymity, meaning both the party offering the service and the party receiving the service are anonymous and protected by a 3-hops tor circuit.

The Onion Service protocol also allows news organizations to reach surveilled and censored individuals [21] by offering their website on the Tor network. These website addresses end in the TLD .onion. Similar to how the https:// protocol of a website provides more security than the http:// protocol, an onion address also appears to be the same site but gives a visitor more privacy and security through end-to-end encryption and improved authentication. Visiting an onion address is easy. All that’s needed is Tor Browser (Tor Browser is built from Firefox and is similar to use); you visit the onion address in Tor Browser like you visit any web address.

Because journalists and activists often have a public profile, both in real life and on social media, they need to take extra care to protect themselves from phishing attacks [15]. To understand the magnitude of phishing operations we just have to consider that the NSO's spyware Pegasus was targeting people in 45 countries [18].

In other situation activists and journalist need to protect themselves by remaining anonymous. Tools like Tor [20] allow activists to safely browse the internet, do research, publish articles, and plan actions. All without being tracked.






















Supporting the Tor network

written by Silvia Puglisi [Hiro] on 2030-03-04

How can small organization run relays on the Tor network while sustain their operations

How is the Tor network composed

The Tor network consists entirely of relays run by volunteers, provinding bandwidth and other services to Tor users. There are currently about 6000 relays sustaining the network [1]. Up to now the Tor network has grown organically, by the mean of community outreach activities. Tor relay operators are usually individuals that are motivated by various factors. The Tor project mission itself is a strong driver for individuals interested in providing privacy enhancing communication tools to people all over the world. Other relay operators might be researchers interested in the technical aspects of the Tor software and protocol. Others can also simply be open source entusiasts that want to be part of its community. Many relay operators have often been recruited, so to speak, by other comnmunity members or core developers. Finally some relay operators are adeversaries that are trying to run different analysis over the Tor network itself, like collecting information on its use or on the content being transferred.

All the motivations described above do not require direct compensation by the Tor Project and the volunteer-based approach to sustain the network has been proved successful. Relay operators do not only invest their hardware, but also time and commitment in running the relays and in being part of the Tor community. Expenading the set of relays is vital for the Tor network. More importantly the network needs a diverse set of relay, not just advertised bandwidth. Diversity means different hardware and operating systems, but also different locations accross the globe in order to reach users worldwide and offer overall the same quality of service.

Throughout Tor history, there have never been in place an official mechanism for relay operators to be rewarded extrinsically. The intrinsic reward of being a relay operator was the social perceeved value, like recognition within the Tor community. Many different proposals have been made for a Tor incentives system [2], but none has ever been implemented.

How do relay operators organize

Relay operators sometimes create a small non profit or join an umbrella organization, to support their activities. These are setup so that the individual operators are not legally responsible in case of a legal dispute. Also the organization is setup to share the burden of possible legal expenses and to collect donations for their activities. The Tor Project itself advises people to constitute a non-profit organization responsible for the relays in case of possible legal disputes. There are some legal risks in fact associated with running relays. These are usually not different from the same risks that an ISP could have since both relay internet traffic. Exits relays have more legal concerns that bridges, guards or middle relays, because middles and guards only relay encrypted traffic, while exits performs requests to the open internet. The Tor Project provides some standard response letters that relay operators can use and some legal resources that could become handy. In any case relay operators are adivised to consult with a lawyer if any problem with law enforcement should arise.

How much does it cost to run a relay

Runing a relay can be as cheap as a few dollars per month and as expensive as a few hundred, depending on where the realy runs, which kind of hardware it's running on, bandwidth, operating system and so on. Most relays operators rely on donations from individuals that want to contriubute to the network but for several reasons are not able to run a relay at the moment. There is again intrinsic value to donate to relay operators to contribute to the Tor community.

A big portion of relay costs are taken over by bandwidth consumption. If an individual or group wants to run a node that relays a lot of traffic, bandwidth might become expensive.

Participatory Business Models for Off-Grid utilities, what can we learn

Certain mechanisms developed by and for the maintenance and operations of the Tor network have much in common with off-grid utility implementation. To start both are ipso-facto decentralized, community based and require experimenting with different business models for implementation.

A number of previous studies have developed their own classifications for electrification models.

  • Commercially led modelswhich are driven by suppliers and dealers with relatively little government control.
  • Multi-stakeholder programmatic modelwherein a project management unit or multi-stakeholder management authority is typically charged with reaching consumers.
  • Utility modeltypically operates on a fee-for-service basis.
  • Grant based models.

[3] describes different participatory models for off-grid electricy services in rural areas. Drawing from previous defined classification systems, they identify five models with different types of operations that have been used in rural electrification.

  1. Co-operatives;
  2. Service distribution franchises;
  3. Fee-for-service models;
  4. Community managed models; and
  5. Private sector models.

One thing that differentiate the ecosystem of companies and cooperatives providing utilities and relay operators is the fact that while utility providing organizations could in theory charge its users for using their network, the Tor network is freely accessible by everyone running a Tor client. Since neither the Tor Project nor any reasonable relay operator would like to charge Tor users for bandwidth used, in the past people have speculated whether it would make sense to build mechanisms so that the network could reward relays for the bandwidth provided to the network. A part of this speculation has also involved considering possible harms of such mechanism to both the privacy and security of Tor users and the community of relay operators. For example some have argued that this could encourage bad or malicious relays, or the growth of relay farms with the only interest to cash out instead of maintaining the network and protecting the privacy of its users.

Some relay operators groups have developed a membership model to help sustain their operations [4] [5]. The membership model allows such group to build a close relationship with their supporters while also sustaining their operations.

Running a participatory relay community

While relay operators cannot be directly compensated by Tor users directly, they could be compensated for offering other services in a partecipatory way to the community of Tor users and .onion websites. The relay operators group could add a certain fee to the service offered and redirect part of this compensation to sustaining their infrastructure and work in maintaining the Tor network. This mechanism could help both the relay operators and the Tor network itself in more than one way. One the one hand relay operators can build a relationship with their members by offering a set of privacy friendly services that might or might not use the Tor network itself to be operated, like bridges, .onion hosting, vpn, and so on. On the other hand the Tor project will benefit by seeing more diverse use of the Tor network. Finally, this could also be an incentive for creating a better experience for onion services developers and operators and therefore fostering a more legitimate onion service ecosystem.

This mechanism could be easier to implement for some relay operators that other form of financing, simply because they are already running some of these services as these are needed for day-to-day operations. For example many operators group running exit are already running an authoritative dns and could easily offer this service to their members (some in fact already do). This might actually be easier in many circumnstances than applying for international grants or public funding, since in many cases this suppose a big overhead in work that small relay operators group cannot sustain.



[3] Krithika, P.R. and Palit, D., 2013. Participatory business models for off-grid electrification. In Rural electrification through decentralised off-grid systems in developing countries (pp. 187-225). Springer, London.



How to setup and use yubikeys for authentication

written by Silvia Puglisi [Hiro] on 2019-11-15

I use yubikeys to store my gpg and ssh keys.

Before starting do a little bit of reading to familiarize yourself with the setup procedure. I have added a list of links at the end. These are mainly the resources that I used.

Generate a new gpg key

I have generated my keys on a qube VM without internet connection.

$ gpg --gen-key

Selected option 0 and moved on to create my ID associated with the key.

In this step I used mostly the guide from yubico developers website [1] The guide goes through generating Sign (S) Authentication (A) and Encryption (E) keys.

Add an authentication key

$ gpg --expert --edit-key 123ABC45

At this step we select another RSA key to attach to our key. In the gpg selection menu this corresponds to option 8.


Here is where you should backup your keys and revocation certificates. Please do I have personally lost yubikeys and having backups really helps.

Also setup a PIN and a admin PIN for your yubikey [5]. With:

$ gpg --card-edit

$ gpg/card> admin

Import the key to the yubikey

Finally we edit our key and add it to the keycard [1].

$ gpg --expert --edit-key 123ABC45

$ gpg> keytocard

Now your key is exported to your card and ready to be used.

Setup key to be used with ssh

$ gpg2 -K --with-keygrip

This will show all your keys available with keygrip. Use the keygrip of your authentication key to export it to sshcontrol

echo 1234567AB8CDFFF90G9H1I23JJ4K5L67M89N012O > ~/.gnupg/sshcontrol

I have also added the following to my ~/.gnupg/gpg-agent.conf [4]:

default-cache-ttl 600
max-cache-ttl 7200
write-env-file ~/.gpg-agent-info

And edited my ~/.bashrc with:

gpg-connect-agent /bye
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)

You can now:

$ source ~/.bashrc
$ ssh-add -l

This should list your new key.