negative zero

[Video] Oxen Ecosystem: 2. Lokinet

2022 January 29

[darknets] [decentralization] [info] [lokinet] [opinion] [oxen] [privacy] [tech] [video]

Oxen Ecosystem

  1. Introduction
  2. Oxen
  3. Lokinet
  4. Session
  5. Thoughts on the Oxen Ecosystem

This is the third video in a 5-video series on Oxen, Lokinet, and Session. This video is about Lokinet, a Tor-like anonymity network that runs on the the network of Oxen Service Nodes.

(majestrate's name is Jeff Becker. He doesn't list his name in his GitHub profile, which is why I call him by his username in this video.)

All original content in this video is dedicated to the public domain. Third-party resources included in this video are not necessarily public domain, but they fall into one of two categories:

  1. They are public domain or licensed under a license which permits commercial use without attribution.
  2. They are copyrighted works which I have not licensed but which I believe I am using in accordance with fair use.

All Formats

Sources (in order)

  1. Tor Project. History.
  2. Tor Project. About Tor Browser.
  3. tommy. Introducing Bastet, Our New Directory Authority.
  4. Tor Project. About Tor.
  5. The Invisible Internet Project. The Invisible Internet Project.
  6. The Invisible Internet Project. Tor/Onion Routing.
  7. Tor Project. Sybil attack.
  8. R. Chirgwin. Tor takes aim against malicious nodes on the network., February 2016.
  9. majestrate. LLARP – Low Latency Anon Routing Protocol.
  10. The Oxen Project. Service Node deregistration.
  11. The Oxen Project. Lokinet.
  12. Oxen Project. Onion-routed video call demo (Lokinet).
  13. The Oxen Project. FAQ.
  14. The Oxen Project. How blockchains protect themselves from Sybil attacks.
  15. The Oxen Project. Oxen Service Nodes.
  16. J. Ross, S. Harman, K. Jefferys. Loki Cryptoeconomics.
  17. The Oxen Project. Lokinet Exit Nodes: Onions Gone Wild., November 2020.
  18. The Oxen Project. Oxen Name System (ONS): The Facts., March 2020.
  19. lokinet wiki. http://probably.loki/wiki/index.php?title=Main_Page


This video assumes you're already familiar with Oxen, specifically the network of Oxen Service Nodes and the Oxen Name System. These concepts will be referenced without explanation in this video.

2.1. Background

In order to understand Lokinet, as well as why Oxen works the way it does, we first need to understand Tor and I2P.

2.1.1. Tor

The concept behind Tor, The Onion Routing[1] system, goes back to the 1990s. Researchers at the United States Naval Research Lab designed a system called "onion routing" to protect privacy on an internet that offered none. Tor itself, a Naval Research Lab project that continued the work of the original onion routing design, was started in the early 2000s. It was called The Onion Routing (or Tor) to differentiate it from other onion routing projects being developed at the same time. Onion Routing

Let's look at the basic idea of onion routing.

When you use the internet, you're connecting to other computers that are also connected to the internet. Often these are servers run to provide some service, such as a website. Normally, you connect directly to these computers. Suppose you visit a website by connecting to a server. This action produces certain data:

With onion routing, you instead encrypt your traffic in layers of encryption, like an onion and route your internet traffic through multiple other computers (which we'll call "nodes") to obfuscate the connection.[2] Now, let's look at who knows what:

Put simply, with onion routing, an observer might know 1. who you are, OR 2. what you're doing, but not both. Decentralization

Tor is decentralized by design and available for anyone to use. It needs to be decentralized for it to work; if all the nodes you use are run by the same person, they can combine the data they know to deanonymize you. However, there is some centralization involved in the form of Directory Authorities – "dedicated servers which tell Tor clients which relays make up the Tor network".[3] Tor nodes can be run by anyone, and users of the Tor network need to know which ones exist so they can use them for onion routing. By asking a hardcoded list of 10 directory authorities, Tor clients can get this information[4], making Tor quick and easy to start using. This centralization also helps Tor deal with Sybil attacks, which will be explained later. Exit Nodes

Tor can be used to access the regular internet (which I'll call the "clearnet"), but it also has its own separate network of "hidden services". (I'll call this separate type of network a "darknet" because that's a common term, but it should be noted that that word carries a lot of baggage, and some people don't like it.) In the case of Tor specifically, these are also called "onion services", but I'll use the term "hidden service" here because we're also going to talk about them with other networks.

When you access a clearnet site using Tor, you create a circuit with 3 Tor nodes and route your traffic through that circuit. The last node in the circuit is called the "exit node" because this is where your traffic exits the Tor network.

To understand how hidden services work, consider the previous example where the client uses a circuit with 3 Tor nodes to obfuscate its traffic. This time, the server does the same. Now, we have the client, then 6 Tor nodes obfuscating the route, then the server. These hidden services can only be accessed through Tor, and they offer a number of advantages over clearnet services. For example:

2.1.2. I2P

I2P, or the Invisible Internet Project, is largely similar to Tor, although the two often use different words for similar concepts. I find the best way to talk about I2P is to explain how it's different from Tor. I'll focus here on properties that are actually relevant as background on Lokinet, so look up I2P yourself if you want to learn more about it in general.

I2P uses "garlic routing" rather than "onion routing". The differences between these two things are outside the scope of this video, but understand that if I refer to garlic routing in this section, it's like onion routing. Decentralization

I2P's design is more decentralized than Tor's.[5] The first time you connect to I2P, you have to ask one of the central "reseed servers" for more information about the network, but from then on, you discover more nodes through "exploratory" tunnels. Furthermore, Tor creates a separation between volunteer-operated nodes for routing and clients which route their traffic through these nodes, while I2P encourages regular users to also serve as nodes in the network.[6] This contributes to the decentralization and anonymity but also means there are a lot of low-performance nodes slowing down the network. Exit Nodes

I2P is specifically intended for using hidden services, not for accessing the clearnet. There exist exit nodes which allow you to access the clearnet, but these are centralized services, and I2P is not optimized for these. Connecting to the clearnet using I2P looks like this: You construct a regular hidden service connection: the client, then 6 I2P nodes, then the I2P exit. Then the exit connects to the clearnet server. Protocol Support

Without getting into too much technical detail, I2P supports more types of internet traffic than Tor does. I2P supports applications like BitTorrent and audio calls which are not properly supported by Tor.

2.1.3. Sybil Attacks

Like I said before, if all the nodes you use are run by the same person, they can combine the data they know to deanonymize you. If someone controls a large percentage of the nodes on the network, then it is likely that multiple of their nodes will be selected when building a circuit. A Sybil attack is when someone sets up a bunch of nodes to gain influence over the network, such as in this way.[7]

Tor has some defenses against this type of attack, but they harness the centralized directory authorities.[8] I2P's ability to defend against Sybil attacks is very limited.

2.2. Lokinet

2.2.1. Lokinet

In 2017, majestrate, a developer and blogger involved in I2P and other similar projects, started a new project called LLARP, or Low Latency Anon Routing Protocol. The goal was to take the good parts of Tor and I2P and not the bad parts.[9]

Here are some key properties LLARP tries to take from each:

Here are some key properties LLARP wants to avoid from each:

majestrate stated that another goal was allowing LLARP hidden services to be accessed from the clearnet and allowing clearnet access over LLARP.

Lokinet is the reference implementation of LLARP which seeks to fulfill these goals. Lokinet runs on top of Oxen, using the Oxen Service Nodes as the nodes for the network. Let's explore how each goal can be met this way. Decentralization

Lokinet inherits decentralization from Oxen's blockchain. Oxen Service Nodes are registered, deregistered, etc. through the publication of transactions[10], so anyone can query the public blockchain to learn which Service Nodes are available to use. There's no need for central directory authorities.

(Of course, Lokinet is only as decentralized as Oxen is.) Separation Between Users and Servers

By using Oxen Service Nodes, Lokinet provides servers that users can connect to without having to run their own nodes. Also, Oxen Service Nodes are required to perform well, and they are rewarded for their service.[11] (In fact, the Oxen team recently demonstrated that it is possible to have an onion-routed video call using Lokinet![12]) This is not the case with Tor and I2P, where nodes are run by volunteers or users, and the networks can be very slow and error-prone. Cryptography

By just being built as a new thing, Lokinet avoids the baggage of existing code with outdated cryptography. Protocols

Lokinet supports all types of internet traffic.[13] Protection Against Sybil Attacks

The use of Oxen's blockchain is intended to protect Lokinet against Sybil attacks by making them expensive.[14]

There are two arguments for why a proof-of-stake system should be resistant to Sybil attacks:

  1. When dishonest nodes are detected by the network, they lose part of their stake and the ability to stake in the future. This means the costs of acting dishonestly exceed the rewards.
  2. Since you have to have at minimum 3,750 $OXEN for each node you run, launching a Sybil attack requires a well-funded adversary. Additionally, according to Oxen,
  3. [A]s an attacker accumulates $OXEN, the circulating supply decreases, in turn applying demand-side pressure and driving the price of $OXEN up. This effect spirals, making it increasingly costly for additional $OXEN to be purchased and thus making an attack prohibitively expensive.

    To maintain this protection, Oxen encourages active suppression of the circulating supply. In particular, the emissions curve and staking requirement have been designed to ensure enough circulating supply is locked (and reasonable rewards are provided to operators) to ensure Sybil attack resistance.[15]

I'm a computer scientist. I'm not going to pretend to understand economics well enough to evaluate this claim. There's a paper on Oxen so-called "cryptoeconomics"[16], if you're interested in reading about it yourself. Exit Nodes

In terms of exit nodes, Lokinet works like I2P: By default, it's only used to access hidden services (which Lokinet calls SNApps or Service Node Apps), but there are also centralized exit nodes which provide a gateway to the clearnet.[17] Since Lokinet can carry any type of traffic, this allows Lokinet to be used like a VPN.

As far as I'm aware, there is not yet a way for users of the clearnet to access Lokinet sites without themselves using Lokinet. Lokinet and ONS

Domains on Lokinet are long and difficult to type and remember. Users can optionally register shorter domain names which map to these longer names. Lokinet domains, unlike Oxen wallet and Session usernames, are not permanent and must be periodically re-registered.[18] This is to prevent domain squatting and to make domains available again in the event that someone loses their keys.

2.2.2. Using Lokinet

Now that we know what Lokinet is, let's look at actually using it.

In practice, Tor and I2P are run on the system as proxies. Individual applications such as web browsers can then be configured to route all traffic through these proxies, which provides some protections. Since Tor is designed to work with clearnet traffic, if you visit a clearnet site in a Tor-enabled browser, your connection to that site is routed through a Tor circuit. Since I2P does not support clearnet requests by default, it simply blocks these request.

Lokinet, on the other hand, is configured system-wide. The default behavior is to route only traffic to and from .loki domains through Lokinet and let the system handle all other types of traffic as per usual. This feels very dangerous to me. If a user doesn't use an exit node to route their clearnet traffic through Lokinet as well, a loki site can trivially determine their real IP address by including third-party clearnet content on the site.

Lokinet is a relatively new network, and there's not a lot of content on it yet. There's a Lokinet wiki on probably.loki, which lists some sites.[19] So far, there's nothing that particularly interests me that isn't also available on other networks, but that may change with time.

Lokinet with an exit node works like a VPN: all traffic is routed through an onion-routed connection to the exit node. Currently, there are only 4 public exit nodes that I'm aware of. Torrenting is possible using these exit nodes. It's not obvious what happens if the connection to the exit node drops or the proper way to set up a killswitch. This also makes Lokinet feel unsafe to me.

So far, I don't have a lot of use for Lokinet, but I think it has potential.

2.2.3. Conclusion

To recap: Lokinet is an anonymity network which seeks to solve issues with Tor and I2P. It aims to resist Sybil attacks by using the Oxen network, where running a node is expensive.

In the next video, we'll look at the encrypted messaging app Session.

Next: Session