Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 08:40
· 7 commits to main since this release

The first release of libsortition: fair, repeatable and verifiable random lotteries, as a Rust crate with a C ABI, the sortition command, and bindings for many languages.

What is in it

  • The core (Rust, with a C ABI and header): drawing k of n without replacement, repeatable with a seed (xoshiro256**) or from the operating system's randomness (ChaCha20); seeds from strings with a SHA-256 commitment; candidates as arbitrary bytes with order-independent IDs and a set fingerprint; prize stages; sessions that continue where they stopped, with idempotency keys and a revision; saved states (JSON) and sealed tokens (XChaCha20-Poly1305); drawing from lines of text and from JSON, YAML or TOML.
  • The sortition command: draw (with a record of the draw), verify, fingerprint and commit.
  • Bindings: Node.js (native addon and WebAssembly, with a browser persistence helper and a demo), PHP, Python, Ruby, .NET, Go, Java (and Kotlin), Swift and Dart, and a C and C++ example.
  • A specification (docs/SPEC.md), shared test vectors that every binding's tests read, and an independent reference implementation in Python.

Files

file what
sortition-v0.1.0-<target>.tar.gz / .zip the sortition command (bin/), the shared library (lib/) and the C header (include/) for Linux (x86-64, arm64), macOS (arm64, x86-64) and Windows (x86-64)
libsortition-wasm-0.1.0.tgz, sortition-v0.1.0.wasm the npm package of the WebAssembly build, and the module itself
SHA256SUMS the SHA-256 of every file

Verifying the files

sha256sum --check --ignore-missing SHA256SUMS
gh attestation verify <file> --repo small-gear-lab/libsortition

Every file has a build provenance attestation made by the release workflow from the v0.1.0 tag.