br.br

Open-source government for Brazil

br.br writes the systems of the Brazilian state as open protocols, each with a specification, a reference implementation and test vectors. Courts, public data, regulation, verification and money run on one procedure engine, Rito. Every act becomes a signed record anyone can check.

An independent proposal by Dover Labs, with no government affiliation.

brbr.call/1 supplier payment
{
  "account": "ed25519:286ba17b4de2ffb7f25b65e712e1a1755ea0105be6cb70e13bf60fe3d62104fb",
  "account_key": "068a18ff1931cda94ed23efa5e14e8188c07c19a63634c6662b23190deaae888",
  "args": {
    "amount": "200000",
    "key_digest": "sha256:d7e5f9c84ac7ae83febe7ec983667db1f38584a1e9e536acd6135b7d1d25a9ac",
    "kind": "supplier",
    "to": "ed25519:b99a55a795e5d7b40df21786bcca2e1ce77005de316008ac6133e40d8c8574a4"
  },
  "call": "transfer",
  "network": "brbr:vectors",
  "nonce": "1",
  "schema": "brbr.call/1",
  "sig": {
    "alg": "ed25519",
    "key_id": "ed25519:286ba17b4de2ffb7f25b65e712e1a1755ea0105be6cb70e13bf60fe3d62104fb",
    "value": "fUtxrPlpHhnlgYLdv92kN2V5Kmjl13kqkttGJIgC14Zq1OKrwbALhUarCAK3WYPaQad+fsVdsYwigCgXU88TDw=="
  }
}
id
checking
canonical form
checking
signature
checking
A R$ 2,000.00 payment to a supplier, carrying the invoice key, taken from the test vectors. The Rust core, compiled to WebAssembly, recomputes the id and checks the signature in your browser.

Modules

Each module starts as a specification. Once built, it has a reference implementation, test vectors and an independent checker written from the text alone.

  • built

    Judicial systems

    Rito runs published, frozen procedures. A case commits its inputs, each step is proven, re-executed, attested or decided by a committee, and the outcome holds only after the challenge window closes. In br.br, invoice checks, PEP disputes, enablement and issuance already run as Rito procedures.

    rito

  • specified

    Data portals and services

    Public consolidation of government data across every sector and level, from raw record to release, with standards per domain, sanitization, coverage reconciliation and verifiable access.

    spec 07

  • specified

    Regulation

    Raw normative acts and registered interpretation layers, each signed by its publisher, with publication witnesses and an explicit record of disagreement between layers.

    spec 05

  • built

    Verification rails

    Envelope defines canonical records, signatures, Merkle trees, on-chain anchoring and enclave attestations. Every br.br and Rito record uses that format.

    envelope

  • core built

    Monetary systems

    Public money with budget as type, the origin of every real and the PEP rule, plus a gate to private money, which leaves no trace and publishes no totals.

    spec 01 spec 02 spec 03 lab

Lab

The monetary module's reference core runs the same scenarios that serve as test vectors. Each step is a signed record that the core accepts or refuses, always with a reason.

Loading the core

Specifications

The text is normative. Where an implementation has to decide something the text leaves open, the build notes record the decision and the matching open question.

SpecificationDraftState
00 Conventions6in the reference core
01 Money6in the reference core
02 Bridge6in the reference core
03 PEP rule4in the reference core
04 Network and validators6specified
05 Acts and interpretation4specified
06 Private chain4requirements
07 Data2specified
rito Verifiable procedures4built
envelope Records and verification2built

Status

What exists

Envelope
Rust, vectors, an independent checker passing 603 of 603 items and a Move anchor module.
Rito
Rust, Move, an independent checker passing 509 of 509 items and RISC Zero proofs for E1 steps.
Monetary core
Specs 00 to 03 in Rust, with an independent checker passing 1,465 of 1,465 items and a browser build.
brbr-dist/1
Groth16 circuit over BN254 for distribution reports, verified in Rust, in Move and in the browser.
Sui
Native checks in Move are done. The core proven in RISC Zero, with Sui keeping the state root, is under construction.

What is missing

  • Nothing is published on any chain.
  • Data, regulation and the network are specified, not implemented.
  • The private chain exists as requirements.
  • This lab's keys are public, for demonstration only.