redeal-engine
Call redeal to split it. Deterministic fairness computation between parties. Sealed inputs in, an identical signed certificate out for everyone, re-runnable by anyone.
Redeal is neutral infrastructure for how agents (or people) split, allocate, and decide. This repo is the verification core: the deterministic engine, the CLI re-runner, and the published test vectors. No server machinery here. Everything is pure, offline, and deterministic.
The hosted service is redeal.dev. Docs · Verify a certificate · Status and signing keys
What you can do with this repo
Verify any certificate, fully offline. The verifier never contacts the redeal service. You supply the trust anchors yourself: the signing pubkey from KEYS.md or the status page, the tree-head root from GET /v1/log/tree-head, and the revealed inputs from the parties.
cargo run -p redeal-cli -- verify cert.json \
--pubkey es256:<pubkey-hex> \
--tree-head <root-hex> \
--inputs inputs.json
Checks: signature over the signed payload, sealed-commitment reproduction, input Merkle root, bit-for-bit algorithm re-run, transparency-log inclusion. Every flag is optional. Anything you do not anchor is reported as SKIP, never silently assumed.
Run the conformance vectors. Every algorithm version ships vectors, and the CLI byte-compares:
cargo run -p redeal-cli -- vector run vectors/
Re-implement and cross-check. Each algorithm's prose spec lives in its engine module's doc comment (engine/src/split.rs, split2.rs, auction.rs, random.rs, shapley.rs, deal.rs). The vectors are the byte-level bar. An independent implementation must match bit-for-bit.
Layout
| Path | Contents |
|---|---|
engine/ | redeal-engine library crate: JCS canonicalisation (RFC 8785), commit/reveal hashing, algorithms, certificate construction and verification, Merkle log routines. No I/O, no clock, no floats. |
cli/ | redeal-cli, the skeptic's re-runner. A thin wrapper over engine. |
vectors/ | Published test vectors per algorithm version (split.v1, split.v2, auction.v1, random.v1, shapley.v1). |
Algorithms
| id | What it does | Inputs |
|---|---|---|
split.v2 | Fair division with a fixed budget (adjusted winner for two parties, proportional for n) | Parties seal valuations of a declared item catalogue; each party's valuations sum to exactly 1,000 points |
auction.v1 | Sealed-bid second-price (Vickrey) auction | Initiator declares item, unit, reserve; each party seals one integer bid; winner pays the second-highest qualifying bid |
split.v1 | Fair division with free-scale valuations | Same shape as split.v2, without the budget rule. Retired on the hosted service (ADR-0014); split.v2 recommended |
shapley.v1 | Shapley value share | Initiator declares coalition values; counterparties seal accept/reject |
random.v1 | Verifiable random selection | XOR of party nonces, XOR drand beacon at a round pinned at deal creation |
Guarantees
- Deterministic. Integer and fixed-point only, canonical JSON, no clocks. Same inputs, same bytes, forever.
- Versioned. Algorithm and certificate versions never mutate in place. Every release is tagged, so any certificate resolves to this code.
- Reproducible builds. Release binaries build bit-for-bit from these tags.
License
MIT. See LICENSE.