Package: drb-client
drb-clientDistributed Randomness Beacon clientGathers entropy from multipledrandinstances, securely mixes responses and outputs to kernel entropy pool or stdout. Suitable for use withLeague of Entropyservers (see "Running" section).drb-clientcan be used as a standalone source of high-quality random number, or as additional source for entropy pool in Linux kernel. Produced amount of entropy should be sufficient to derail attacks based on RNG predictability.Cryptography backgrounddrb-clientpolls list ofdrandservers with given interval and requests private entropy data portion from each one. Communication betweendrb-clientanddrandis protected with AES256-GCM encryption derived on BN-256 curve on top of TLS (this is imposed bydrandAPI format).drb-clientconstructs each output of entropy from at leastquorum(-Qoption) distinct inputs. It is assumed at leastnode_count - quorum + 1nodes produce truly unpredictable secure random numbers, so anyquorumof distinct responses definitely contain at least one truly random input (due topigeonhole principle).Entropy portions from beacon servers are mixed using stateful HKDF-based mixer. Each sufficient set of random responses is used to produce random output and new salt value for HKDF mixer. Therefore, mixer output becomes unpredictable after successful generation of first output, even if all beacon servers get compromised and start feeding client with biased data.Default poll interval is 60 seconds and such interval is chosen for a reason.drandgenerates entropy for each response using its/dev/urandom. On Linuxurandomgets reinitialized from/dev/randomeach 1 minute. So there is no reason to fetch random data more often: responses between reinitializations are in functional dependence.InstallationRequires Python 3.5.3+From PyPIpip3 install drb-clientFrom sourceDownload or clone repository and run following command in source code directory:pip3 install .RunningThere are few available entropy sinks (option-O):devrandom- (default) writes collected entropy into/dev/randomdevice, without increment of kernel counter of available entropy in pool.stdout- writes collected entropy into standard output.rndaddentropy- writes collected entropy into/dev/randomdevice with increment of kernel counter of available entropy in pool. Requires superuser privileges to operate.You may obtain latestgroup.tomlconfig with list of League of Entropy servershere.Run with default sink:drb-client group.tomlContribute into/dev/randomand increment entropy counter:sudo drb-client -O rndaddentropy group.tomlFor logging into file see "Synopsis" section.Synopsis$ drb-client --help
usage: drb-client [-h] [-v {debug,info,warn,error,fatal}] [-l FILE]
                  [-Q QUORUM] [-T PERIOD] [-B BACKOFF] [-w TIMEOUT]
                  [-O {stdout,rndaddentropy,devrandom}]
                  group_config

Distributed Randomness Beacon client

positional arguments:
  group_config          group config

optional arguments:
  -h, --help            show this help message and exit
  -v {debug,info,warn,error,fatal}, --verbosity {debug,info,warn,error,fatal}
                        logging verbosity (default: info)
  -l FILE, --logfile FILE
                        log file location (default: None)

poll options:
  -Q QUORUM, --quorum QUORUM
                        minimal answers required on each poll. Default value
                        is (node_count // 2 + 1). (default: None)
  -T PERIOD, --period PERIOD
                        poll interval for each source (default: 60)
  -B BACKOFF, --backoff BACKOFF
                        backoff after source failure (default: 10)
  -w TIMEOUT, --timeout TIMEOUT
                        timeout for each request (default: 4)

output options:
  -O {stdout,rndaddentropy,devrandom}, --output {stdout,rndaddentropy,devrandom}
                        entropy output (default: devrandom)DeploymentYou may obtain latestgroup.tomlconfig with list of League of Entropy servershere.Seedeploy/drb-client.servicefor example of systemd unit file.CreditsLeague of EntropyprojectdrandprojectJack Lloyd forBN256 implementation for Python