Hacker News new | past | comments | ask | show | jobs | submit login

All you need is a commitment scheme. This is more secure than having to trust NIST and does not rely on being able to receive their beacon.

Alice and bob want to decide between Italian or Thai food using a coin flip, but do not trust each other to perform a fair flip. They devise a solution to their dilemma:

1. Alice generates a 512b random number A.

2. Alice performs SHA512(A) and shows the result to Bob who stores this as A_1.

3. Bob generates his own 512b random number B and sends it to Alice.

4. Alice sends A to Bob who stores it as A_2.

5. Bob verifies that A_1 = SHA512(A_2)

6. Both Alice and Bob perform XOR(A, B) and use the least significant bit to determine if they eat Thai or Italian.

Alice is satisfied that XOR(A, B) cannot be predicted by Bob because he sent her B before she revealed A to him.

Bob is satisfied that XOR(A, B) cannot be predicted by Alice because she `committed` to her value of A before he sent his B by sending him the cryptographic hash of it. If Alice tried to change her value of A in response to Bob's B, then Bob would detect it in step 5.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: