Skip to content

About

An open-source protocol for cryptographically verifiable, statistically auditable, and independently reproducible gaming outcomes.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

CIGP Protocol

CIGP: Casino Integrity & Gaming Proof Protocol

Phase 1 / Stage 1 Research Release

Author: Ciprian Ștefan Pleșca

License: Apache-2.0

Status: Research infrastructure and reference implementation Protocol version: 0.1

CIGP is an open, vendor-neutral evidence protocol for independently reproducing and verifying declared gaming-system events. It is not a casino, a payment system, a regulator, or a certification authority.

Abstract

Gaming systems combine random inputs, mapping rules, game logic, paytables, and configuration. CIGP studies how these inputs can be bound into a signed, reproducible evidence object: a RoundProof. The Phase 1 reference implementation demonstrates deterministic proof generation, independent cryptographic verification, a hash-linked audit ledger, Merkle inclusion proofs, and deliberate tamper detection using a virtual-credit slot example.

The project makes narrow, testable claims. A valid CIGP proof establishes consistency between supplied evidence and the declared reference construction. It does not establish that an operator is honest, that a game is licensed, or that observed outcomes are statistically fair.

flowchart LR
    A[Declared inputs] --> B[Commit-reveal derivation]
    B --> C[RoundProof]
    C --> D[Hash-linked ledger]
    D --> E[Merkle batch]
    C --> F[Independent verifier]
    F --> G{Evidence consistent?}
    G -->|Yes| H[VALID]
    G -->|No| I[INVALID]
Loading

Phase 1 Result

Phase 1 is an end-to-end research milestone, not a finished certification platform.

Capability Phase 1 status
Typed RoundProof and exact money representation Implemented
Canonical JSON hashing and commit-reveal derivation Implemented
Ed25519 signatures Implemented
Hash-linked audit ledger and Merkle inclusion proof Implemented
cigp CLI generation and verification Implemented
Virtual-credit demo slot Implemented
Tamper fixture and negative verification result Implemented
Batch ledger, reload, and full chain verification Implemented research reference
Descriptive RTP and payout-variance report Implemented research reference
Cross-language canonicalization and HMAC vectors Implemented for Rust, Python, and TypeScript
Julia statistical utilities Implemented research reference
Python anomaly utilities Implemented research reference
TypeScript verifier helpers Implemented research reference
Regulatory certification or real-money operation Out of scope
sequenceDiagram
    participant O as Operator reference process
    participant C as CIGP reference core
    participant V as Independent verifier

    O->>C: server_seed and client_seed
    C->>C: commitment and HMAC-SHA-256 output
    C->>C: map virtual-credit demo outcome
    C->>C: canonical hash and Ed25519 signature
    C-->>V: RoundProof and public key
    V->>V: recompute commitment, derivation, hash, signature
    V-->>V: VALID or INVALID
Loading

Reproduce the Demonstration

Prerequisite: stable Rust.

cargo test --workspace
cargo run -p cigp -- generate-demo-round test-vectors
cargo run -p cigp -- verify test-vectors/demo-round.json
cargo run -p cigp -- verify test-vectors/tampered-round.json

The valid fixture returns RESULT: VALID. The tampered fixture deliberately changes the payout and returns RESULT: INVALID with exit code 1.

Batch ledger and descriptive statistics

cargo run -p cigp -- generate-demo-ledger 100 output
cargo run -p cigp -- ledger-verify output/demo-ledger.jsonl <public-key-hex>
cargo run -p cigp -- stats output/demo-ledger.jsonl

The batch command produces an append-only JSONL ledger, a public key sidecar, a Merkle root, and a deterministic descriptive-statistics report. See JSONL ledger operations and Phase 2/3 release note. These metrics are descriptive only; they do not establish fairness or certification.

flowchart TD
    A[demo-round.json] --> B[Recompute round hash]
    B --> C{Matches stored hash?}
    C -->|Yes| D[Verify signature and seed evidence]
    D --> E[RESULT: VALID]
    F[tampered-round.json] --> B
    C -->|No| G[RESULT: INVALID]
Loading

Evidence Model

RoundProof binds the following evidence categories.

mindmap
  root((RoundProof))
    Identity
      round_id
      operator_id
      game version
    Cryptography
      server commitment
      client seed
      nonce
      Ed25519 signature
    Reproducibility
      RNG output
      mapping evidence
      outcome
      payout
    Integrity
      logic hash
      paytable hash
      configuration hash
      previous round hash
Loading

The current cryptographic profile is documented in spec/cryptographic-profile.md. The reference schema lives in schemas/round-proof.schema.json.

Research Boundaries

CIGP must not be read as a claim of institutional, statistical, or legal certainty.

flowchart TB
    P[Cryptographic consistency] --> L1[What Phase 1 checks]
    S[Statistical consistency] --> L2[Research layer; not proof of fairness]
    A[Software and configuration attestation] --> L3[Hash evidence; not a deployed machine attestation system]
    R[Regulatory certification] --> L4[External authority; not provided by CIGP]
Loading
  • No real-money gambling, payment processing, wagering, prediction, or player-loss optimization is implemented.
  • No CIGP artifact replaces licensing, accredited laboratory testing, regulatory approval, legal advice, or a security audit.
  • An anomaly is a reason to investigate, never an automatic accusation of fraud.
  • Physical machine attestation is design-only in v0.1.

Academic Documentation and Wiki

The repository keeps its Phase 1 research narrative under version control.

Document Purpose
MANIFESTO.md Research position and epistemic commitments
GitHub Wiki Wiki entry point
Research Question Problem statement and research question
Architecture Architecture and evidence lifecycle
Verification Method Reproducibility and verification method
Phase 1 Results Implemented milestone and test evidence
Limitations and Roadmap Limitations and phased research roadmap
Academic Evidence Package Claim-to-evidence mapping, reproduction procedure, and position paper
Verification Receipt Standard Portable, bounded independent-verification result
DONATE.md Support the independent research program

Repository Map

flowchart TB
    ROOT[CIGP-Protocol]
    ROOT --> CORE[crates: Rust core, crypto, proof, ledger]
    ROOT --> CLI[cli/cigp: reference commands]
    ROOT --> SIM[simulator/slot: virtual-credit demo]
    ROOT --> SPEC[spec and schemas]
    ROOT --> VECTORS[test-vectors]
    ROOT --> RESEARCH[julia, python, typescript]
    ROOT --> DOCS[wiki and docs]
Loading

Governance, Security, and Contribution

Read SECURITY.md, GOVERNANCE.md, and CONTRIBUTING.md before contributing. Security claims must remain bounded by the code, test vectors, and published threat model.

Citation

Pleșca, Ciprian Ștefan. CIGP: Casino Integrity & Gaming Proof Protocol.
Phase 1 / Stage 1 Research Release, 2026. Apache-2.0.

License

Copyright 2026 Ciprian Ștefan Pleșca. Licensed under the Apache License 2.0.

About

An open-source protocol for cryptographically verifiable, statistically auditable, and independently reproducible gaming outcomes.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages