I want to have a source of randomness for which:
- no one but me can predict the next number in the sequence.
- I know the entire sequence in advance, but I have no way of manipulating it once the first number in the sequence has been shared with others and everyone can verify that this is the case.
- it's okay for this sequence to be finite, with the total length being determined in advance.
So, one idea was to take a secret and hash it a few million times. Something like this:
N1 = sha3(secret)
N2 = sha3(N1 + 1)
N3 = sha3(N2 + 2)
N4 = sha3(N3 + 3)
.....
I would then publish the sequence in reverse, starting with Nn. The +# in each step is to avoid loops.
Now the question is, is this secure? Thinking back to my information security classes I recall that one shouldn't apply encryption multiple times as this weakens security.
So,
A: does this mechanic of creating the pseudo-random sequence somehow facilitate it for an attacker to predict an arbitrary future element (from which he then easily could rebuild the chain down to the current element)?
B: does this mechanic of creating the pseudo-random sequence somehow allow me to cheat?