dice-entropy-conduit: Cryptographically secure n-sided dice via rejection sampling

[ cryptography, data, lgpl, library ] [ Propose Tags ]

Please see the README on GitHub at https://github.com/pwrobinson/dice-entropy-conduit#readme

[Skip to Readme]
Versions [RSS] [faq],,
Change log ChangeLog.md
Dependencies base (>=4.6 && <5), bytestring (>=0.9), conduit (>=1.1.7), entropy (>=0.3.2), transformers (>= [details]
License LGPL-2.1-only
Copyright 2014-2020 Peter Robinson
Author Peter Robinson
Maintainer pwr@lowerbound.io
Category Data, Cryptography
Home page https://github.com/pwrobinson/dice-entropy-conduit#readme
Bug tracker https://github.com/pwrobinson/dice-entropy-conduit/issues
Source repo head: git clone https://github.com/pwrobinson/dice-entropy-conduit
Uploaded by PeterRobinson at 2020-05-09T14:52:36Z
Distributions Debian:, NixOS:
Downloads 2165 total (19 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-05-09 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees


Readme for dice-entropy-conduit-

[back to package description]

This library uses rejection sampling to provide cryptographically secure n-sided dice rolls and random sampling (within a given range).


If we want to use the system-specific entropy source (systemEntropy) to produce 10 dice rolls of a 6-sided dice (i.e. range [0,5]), you can write:

systemEntropy $$ diceRolls 6 =$= CL.take 10 [5,1,3,3,0,5,3,2,2,1]