Ask HN: Protect task execution results from untrusted parties?

2 points by ffhhj 2 months ago

In an untrusted collaborative network each party is given a task to execute, but they could reply with a fake result or a purposely corrupted answer. Error correction won't help because the damage is in the source of computation. How do modern systems protect against attacks from a malicious collaborator?

I'm thinking maybe the task provider could send a key that should be somehow mixed with the response. But, if the worker simply uses the key to encrypt the result, the message could still be corrupted. Is homomorphic encryption any helpful?

Another way is voting, but requires at least 3 different workers to solve the same task, which becomes expensive. Crypto falls in this category.

Yet another way is validating whether the results are in a expected range or format, but this could be difficult since the task provider shouldn't solve it to know. Zero knowledge proof?

db48x 2 months ago

In practice there aren’t any “untrusted collaborative networks” except cryptocurrencies like bitcoin. You either fully trust all the nodes in the network (because you own them all), as in large distributed systems used by Google, Facebook, etc, etc, or you have some way of _verifying_ submitted results. Verification needs to be cheap, easy, and accurate. In Bitcoin every node in the network verifies that each transaction obeys the rules of the ledger (the transaction signatures are cryptographically verified, but also it checks for double–spending and so on). Any transaction that fails verification is simply dropped. Since verification is far easier than mining a new block, this keeps malicious blocks out of the ledger.

Homeomorphic encryption is the middle ground. Solutions still need to be verified, but because only you can understand the encrypted tasks, it is in principle impossible for the other participants to cheat. In practice I think it is still entirely an academic exercise; I don’t think anyone actually uses homeomorphic encryption for anything real.

xyzzy123 2 months ago

You can't practically do nontrivial computation with homeomorphic encyption and the overhead would be much greater than just computing the result 3 times (think at least 10,000 times slower).

There's no generic answer to this, your controls and incentives need to be matched to the type of problem you're trying to solve and the interests of network participants.

For example, seti@home "worked" despite waste, mainly IMHO because you got an awesome looking screensaver out of it and you got to tell people your computer was searching for alien life. The leaderboard rankings also were also a great incentive for the types of people who had control over a lot of compute.