RRaffle
NIST-aligned Reproducible Audit-ready

A random drawing with evidence, not just an outcome

RRaffle commits the initial eligible ticket population and secret randomness before the drawing, records selections and permitted eligibility changes in a hash chain, and reveals the evidence needed to independently reproduce the exact order.

Verifiable audited drawing

How the random pull is made verifiable

The method creates evidence before, during, and after the drawing. Each stage narrows the opportunity to change an outcome without detection.

  1. 1

    Commit the initial ticket pool

    Eligible tickets are sorted into a deterministic snapshot. SHA-256 records the exact initial population before activation.

  2. 2

    Commit to a secret seed

    PHP random_bytes(32) creates a cryptographically secure server seed. Only its SHA-256 commitment is published before the first pull.

  3. 3

    Add ceremony entropy

    A public value entered at the event is combined with the committed seed and the initial ticket-pool hash.

  4. 4

    Select without bias

    HMAC-SHA256 produces each candidate selection. Rejection sampling avoids the unequal ranges caused by simple modulo selection.

  5. 5

    Chain every event

    Drawing actions and permitted pool changes include the prior event hash. Pool-version commitments record the eligible population for each pull.

  6. 6

    Reveal and reproduce

    After completion, the server seed is revealed. The commitment, final seed, ticket order, and event chain can all be recomputed.

A fixed pool by default

With audited pool changes disabled, the initial eligible tickets stay fixed. Late-ticket admissions and buy-backs are unavailable after preparation. Finish ticket corrections before committing the drawing.

Recorded changes when enabled before preparation

Enable audited pool changes before preparing the drawing if your event needs late or auction-ticket admissions. Each admission needs a source reference. Buy-backs require configured checkpoints and a fixed amount. The event log records each permitted eligibility transition and commits the updated pool before another pull.

Precise language matters

What “NIST-aligned” means here

NIST describes public-verifiability applications as committing up front to a deterministic operation, deriving a seed from committed and later randomness, and then performing the promised operation. RRaffle adapts that architecture using a secret seed commitment and an event-entered public value, together with ticket-pool commitments, rejection sampling, selection proofs, and an event hash chain.

SHA-256 is part of NIST's Secure Hash Standard. The initial secret seed comes from PHP's random_bytes(), which PHP documents as producing cryptographically secure, uniformly selected random bytes suitable for long-term secrets.

Reports for financial review

Everything needed to trace the drawing

A completed audit workbook separates summary evidence from detailed source records. The drawing's recorded algorithm version and pool policy tell a reviewer which verification process applies. The existing sample below demonstrates a fixed-pool drawing.

Audit Summary

Draw identity, algorithm version, timestamps, commitments, revealed seed, and integrity result.

Initial Ticket Pool

Committed ticket identities, deterministic pool positions, and recorded grand-prize split elections.

Complete Event Log

Exact elimination order, pause/resume events, selection proofs, permitted pool changes, and chained hashes.

Prize Winners

Configured milestone winners, the final winner or split recipients, ticket identity, and split election.

Review the 800-ticket fixed-pool demonstration

This existing fixed-pool sample includes 795 eliminations, a pause and resume, 16 milestone prizes, and a five-way $10,000 split. All names and results are synthetic. It illustrates fixed-pool evidence rather than late-ticket admission or buy-back transitions.