Comment

Comment by yeneek

> "how can one player trust the dice of the other player?"

I have an algorithm for that. To roll a dice: 1. both players create a random x bytes long number.

2. both players make a hash from their number and then send it to the other one.

3. players exchange their random numbers and check if hashes are correct

4. concat both players random numbers and hash it to get the final random number

By exchanging hashes, both players can be sure that other player didn't tamper with their random number after getting yours.

(edited formatting)

parent yeneek 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton