Challenge and Proof
Later on, we will be given a Hunk
called challenge
. We will define challenge_id = challenge.evaporate()
.
The terminator again
Next, we will need to successively hash challenge_id
with Hunk::hash()
and Hunk::evaporate()
until it matches
our terminating condition. We'll call the final value end
.
If it never matches our terminating condition (IE, it loops), we will take the hashes of all items in the loop, xor
them together, and that becomes the new challenge
.
end = end
We also have a file called end
. We can read all rainbow tables that have a final hash that matches our end
. Note
that this organization was useful, because this is a sequential read to find all rainbow tables.
start
Now, we have a bunch of start
values for a bunch of rainbow tables. For each hash in each chain, find hash ^ challenge
and keep the smallest one (as a Hunk
read as a big endian integer).
Proof
The start
value is the proof, along with all RainbowParams
.
Verify
Others will need to verify that you actually had a rainbow table.
They will take challenge and convert it to a end
the same way you did. (2^z hashes)
They will take the start
and turn it into end
the same way you did. (2^z hashes)
And, they will find the smallest proof at the same time.