Live data from Hacker News

Proof-of-Work Defense for Onion Services

blog.torproject.org

21–30 of 159 posts

Re: Proof-of-Work Defense for Onion Services

#21
post #13

This has been suggested before, for email spam. Cloudflare could do this, too. Every time you access a busy site, seconds to minutes of useless crunching. The overall effect would be to drain batteries worldwide.

Cloud flare does do this. You get a screen saying checking your connection and it’s running hashes in your browser.

Re: Proof-of-Work Defense for Onion Services

#22

What's preventing abusers from getting new identities when the PoW kicks in and continuing the DDoS? Edit: looks like PoW is set per "service" that's under attack rather than client?

Correct. PoW is also per request, so identity (new or old) is irrelevant.

Re: Proof-of-Work Defense for Onion Services

#23

Hold on you just made DoS more expensive, but a hell of alot more effective. If I need a RTX4090 to access your site now, the attacker has succeeded.

I think difficulty also kind-of scales per-user, due to the queue mechanism.

Do those queues have a way of resisting a Sybil attack?

Re: Proof-of-Work Defense for Onion Services

#24
post #16
post #13

This has been suggested before, for email spam. Cloudflare could do this, too. Every time you access a busy site, seconds to minutes of useless crunching. The overall effect would be to drain batteries worldwide.

The suggestion for PoW for email bonds was called Hashcash, by Adam Back, and involved partial hash collisions. http://www.hashcash.org/ It served as the inspiration for Bitcoin's PoW mining, interestingly enough.

The original invention of PoW, as well as the idea of using it for email, was years earlier; see Naor and Dwork's "Pricing via Processing, Or, Combatting Junk Mail" in CRYPTO'92.

Re: Proof-of-Work Defense for Onion Services

#25
The article says that there is only a factor of 6 in solution time between a high end server and low end phone. How is that possible? The server likely has much more than 6x the ram and cpu count (and faster cpus) than the phone.

Also, since it is DDOSing, the server’s work is embarrassingly parallel, but the client work isn’t necessarily parallelized at all.

Even if it is only a factor of 6 (or one) they are talking about 1 minute solve times once a DDOS is detected.

At that point the service is basically down anyway, right?

Re: Proof-of-Work Defense for Onion Services

#26

Hold on you just made DoS more expensive, but a hell of alot more effective. If I need a RTX4090 to access your site now, the attacker has succeeded.

There are PoW algorithms specifically developed to resist GPU and ASIC. Typically they do this by being memory intensive instead of (or in addition to) being compute intensive.

Regardless, you need a device that’s more powerful than whatever the attacker is using.

The article says they target 1 minute solve times under load. If that’s 1 minute on a 5GHz, 64 core machine with 512GB ram, an A100 and an FPGA, then it’s going to be at least 5-15 minutes on your phone.

Also, the server farm can parallelize work across an arbitrary number of challenges, but legitimate users cannot.

Re: Proof-of-Work Defense for Onion Services

#27
How will the service operator know when their site is under "stress". Will this effectively prevent someone from having a "high traffic" hidden service free from Tor-imposed puzzles. If the hidden service operator is aware that the site is receiving high traffic, could the operator run several sites as mirrors, so that users had options if, e.g., one site was not responding fast enough. Is there guidance published anywhere on what is the the "normal" traffic for a hidden service.

Re: Proof-of-Work Defense for Onion Services

#28

Earlier quoted context omitted.

I think difficulty also kind-of scales per-user, due to the queue mechanism.

Do those queues have a way of resisting a Sybil attack?

Protecting against sybil attacks without violating tor’s security guarantees seems impossible. Would love to see a proof or counter example.

Re: Proof-of-Work Defense for Onion Services

#29
I have an idea to minimize traffic on the tor network or make it faster. It should be possible to use the network as a cdn. If I want to make a file available, it should be possible for me to send pieces of the file to nodes who gave me permission to do so. When the file is requested, I then could point to these nodes. Of course, some care should be taken not to turn the tor network into a "anonymous torrent replacement" to avoid defeating its purpose.

The current proposal discussed in the post talks about "prioritize verified network traffic". It would be interesting if sharing "file pieces" could prioritize your traffic since you're actually helping the network. Instead of "proof-of-work" it would be "proof-of-bandwidth-contribution".

Re: Proof-of-Work Defense for Onion Services

#30
Really interesting! Digging into the proposal [1]:

> make it harder for attackers to overload the service with introduction request

> We hope that this proposal can help us defend against the script-kiddie attacker and small botnets.

Sets expectations: does not counter large botnets.

> We hope that this proposal will allow the motivated user to always connect

A user who really wants to connect can get through durring a DoS attack, but it may still take work.

Interesting choice of PoW algorithm: https://github.com/tevador/equix

> Hence, instead of forcing clients to go below a static target like in Bitcoin to be successful, we ask clients to "bid" using their PoW effort. Effectively, a client gets higher priority the higher effort they put into their proof-of-work. This is similar to how proof-of-stake works but instead of staking coins, you stake work.

[1] https://gitlab.torproject.org/tpo/core/torspec/-/raw/main/pr...

Post reply on HN