Small library for multiple parties to estbalish a shared random number. Even if you are the only honest party.
This version is not necessarily compatible with consensus which uses libtomcrypt. But both now use the blake2b-256 hash function.
- All parties pick a secret random number
- Each party shares a hash of that random number
- Each party reveals the random number
- Each party ensures the hashes matches the revealed number
- All the random numbers are bitwise XOR'd to produce a random number
gcc -o bin/consensus_test -lsodium src/consensus.c src/test.c
See src/test.c
, each party only generates one secret, disseminating the hash, and then the secret is left up to the user. For most applications the secret should be processed for example hashed.