Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Library to allow trustless generation of a shared random number, even if you are the only honest party

Notifications You must be signed in to change notification settings

ali-raheem/consensus-sodium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Consensus-sodium

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.

Algorithim

  1. All parties pick a secret random number
  2. Each party shares a hash of that random number
  3. Each party reveals the random number
  4. Each party ensures the hashes matches the revealed number
  5. All the random numbers are bitwise XOR'd to produce a random number

Dependencies

Build

gcc -o bin/consensus_test -lsodium src/consensus.c src/test.c 

Usage

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.

About

Library to allow trustless generation of a shared random number, even if you are the only honest party

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages