Exclusive: Bitcoin Developers Explain Addition of Tor-Style Onion Routing to Lightning Network

Exclusive: Bitcoin Developers Explain Addition of Tor-Style Onion Routing to Lightning Network

By Kyle Torpey - min read
Updated 22 May 2020

Although the Lightning Network has the potential to help Bitcoin scale to millions of new users, the scheme powered by payment channels has become a controversial topic of conversation in the community. Some would rather see an immediate increase in the block size limit, but the developers behind Bitcoin Core seem intent on turning the Lightning Network into a reality as quickly as possible.

One area of dispute involved with the Lightning Network is whether the system would hamper or help privacy in Bitcoin. There have been many proposals for improving privacy in Bitcoin over the years, such as Zerocash and JoinMarket, but the Lightning Network opens up new issues in its system where, effectively, transactions are not immediately broadcasted on the blockchain.

There are now proposals to add Tor-style onion routing to the Lightning Network, which would limit the amount of identifying information shared between users on the network. Two Bitcoin developers who are currently working on the design of the Lightning Network, Blockstream Core Tech Engineer Rusty Russell and Lightning Network Developer Olaoluwa “Laolu” Osuntokun, recently shared some of their thoughts concerning onion routing and privacy on the Lightning Network with CoinJournal.

Privacy is Key for Lightning Network Developers

Many have viewed the Lightning Network as nothing more than a useful tool for microtransactions, but Rusty Russell believes privacy must be viewed with the utmost importance during the development and design of this project. During his correspondence with CoinJournal, Russell used an example of a possible application of the Lightning Network to make his point:

“Privacy is an important topic. While Lightning’s first use case is microtransactions, in some ways their privacy is more important than large transactions! Imagine an ad-blocker which tipped websites in bitcoin: I don’t care if you know that I pay my mortgage on time, but I might care if you know every web page I visit.”

Russell also noted that the battle between privacy and surveillance is not one that will simply go away after specific patches are made to the design of the Lightning Network. He stated:

“Even once you’ve covered the obvious privacy concerns, we’ll have an arms race over things like timing attacks and traffic analysis: just look at the Tor network, for example.”

Although many view Tor as a tool for completely anonymous use of the Internet, the reality is the network is not as private and secure as some would like to imagine. The anonymizing network has proven itself to be useful over time, but it should not be viewed as a bulletproof shield against government-level adversaries.

Lightning Network designers are very much aware of the need to preserve censorship resistance in Bitcoin. Rusty Russell noted the developers working on this concept wish to bring as much privacy to the network as possible.

Proposals for Onion Routing on the Lightning Network

Rusty Russell, who Linus Torvalds once referred to as a “top deputy” for his work on the Linux kernal, has been working on an implementation of the Lightning Network over the past year or so. Russell originally sent a proposal for onion routing to the Lightning Network mailing list in October, and alternative proposals have been made by other developers since then.

 

In an email to CoinJournal, Russell explained that Former Debian Project Leader Anthony Towns has also created a prototype based around the same design, but he noted Olaoluwa “Laolu” Osuntokun’s proposal seems to be the best option right now. Russell stated:

“Laolu posted to the mailing list on a proven design which would save us the work of validating mine, so we’ll clearly do that instead.”

CoinJournal was also able to make contact with Laolu, and after commending Rusty on his work developing an onion routing format from scratch, he confirmed his view that finding an existing, peer-reviewed solution for onion routing would be the best option. Laolu stated:

“I really commend Rusty for developing an onion routing format, from scratch, following first principles. That’s no small feat! However, I felt that we may be able to save some review [and] vetting time by using an existing peer-review solution. So I searched through the existing academic literature on mix-nets and onion routing. I found two schemes which seemed perfect for our particular use case. Both schemes have been thoroughly vetted via academic peer review, and contain formal proofs of security.”

The two schemes found by Laolu were Sphinx and Hornet. Laolu also noted that Hornet can offer a higher level of privacy than Sphinx — if implemented correctly. He explained:

“With the addition of Hornet, the state of privacy within the Lightning Network can be taken to the next level. Within the scheme, Hornet allows for an optional rendezvous system similar to Tor’s hidden services. Leveraging this system within the Lightning Network will allow full sender-receiver anonymity.”

An in-progress implementation of Laolu’s proposal can be found on GitHub.

How Much Privacy Can the Lightning Network Provide to Users?

During CoinJournal’s correspondence with Rusty Russell, the Bitcoin developer also shared his thoughts on the overall level of privacy that will eventually be available on the Lightning Network. Although there are privacy improvements in development right now, it’s clear that Russell does not see this new enhancement for Bitcoin transactions as the best option for those who wish to remain private or anonymous. Russell explained:

“The amounts are known, at least approximately. Also, there’s communication (via numerous hops, sure) between the payer and payee, which offers room for traffic analysis and the like.”

Russell’s key point here is the Lightning Network creates a situation where two peers on the network are communicating with each other rather than having one party (or even a third party) broadcast the transaction onto the Bitcoin network via Tor. He explained further:

“Compare [the Lightning Network’s privacy model] with bitcoin over Tor, where you might have the bitcoin payment address days before and simply drop a transaction on the network, which [the recipient] receives like [any other node on the network].”

When asked how the Lightning Network would eventually compare with something like Zerocash over the long term, Russell noted:

“As far as I can tell, Zerocash is the ultimate in privacy, which doesn’t [reveal] what inputs were spent, what addresses received, or how much was sent.”

Possible Solutions for Lightning Network Privacy

Laolu mentioned some of the privacy issues that still remain with the Lightning Network in an email to CoinJournal. For one, there is an issue with the redemption hash (R-value) in the Lightning Network’s current design that could make it relatively easy for an attacker to correlate payments between two parties. Laolu explained:

“Even with [Hornet], there’s still a glaring hole within the Lightning Network as far as privacy of payments: the R value! Since the value of R remains constant along the route, it’s trivial for an adversary to correlate payments within the onion circuit even though it doesn’t learn the full route.”

The Lightning Network designer went on to note that Blockchain.info’s Mats Jerratsch and Bitcoin Core Developer Greg Maxwell have both come up with schemes that could potentially solve this problem. Laolu explained how a proper solution to this issue would limit the amount of information nodes on the Lightning Network would have in regards to senders and receivers:

“Intermediate nodes are oblivious to: the total length of the payment path, their position within the route, the sender, the receiver, and the R value that the receiver and all other intermediate nodes will used to settle the final payment.“

Tor-Style Onion Routing is Definitely Coming to the Lightning Network

One of the main concerns that most Bitcoin users always have over new proposals that could help scale Bitcoin or bring more privacy to the payment system is that something will inevitably go wrong and the concept will never be implemented. This has, perhaps, been an even bigger issue with companies in the industry that provide nothing but empty promises to their customers.

Having said that, Russell and Laolu are convinced onion routing on the Lightning Network is a development that will definitely take place — in due time. Laolu explained:

“As Rusty said, this is definitely going to happen! At this point, it may be a bit early to concretely assert what the final production system will look like, but it seems that the primary primitives have been agreed upon.”