Is there a way to generate a random number with given restrictions:
- It will be used in a decentralised network with a big number of peers (no central authority to generate it)
- Its generation should not rely on any third-party service (for example, going to a specific website)
- Its generation is triggered by a semi-random data being sent through the network, and it should relate to the data
- The computer sending the data should not have an advantage in determining the random number (for example, computing some number that would have a really high chance of becoming the seeked number)
I was thinking of using a random number like that to counter a 51% attack against the Bitcoin network. The main problem there is that an attacker with a lot of computation power can compute a couple "blocks" in advance and only release them to counter "blocks" generated by legitimate users. I figured a way to counter that would be by requiring generation of some random number that couldn't be pre-computed in advance, but only when a block is sent through the network. Required use of that number would then invalidate blocks that are precomputed beforehand, preventing the attack.
So, is there a way to generate a random number like that described above?