Skip to content

starling-foundries/Burin

Repository files navigation

Burin

Enduring Fingerprints of Where and When

One engraved plate, cut once with the burin, yields a fan of identical impressions. The seal glyph (a 3x3 grid for where, a row of ticks for when) is repeated exactly on each.

Burin is a Python library for tamper-evident, offline-verifiable fingerprints of where and when. Turn a geographic region and a time window into a compact signed mark that anyone can recompute and check — with no blockchain, no central authority, and no master copy — and, optionally, prove things about it in zero knowledge (like "I surveyed at least K places in this region") without revealing the details.

The ground is cut once into a fair, equal-area grid (OGC-aligned rHEALPix), so two strangers who never coordinate compute the same fingerprint from the same ground, down to the last bit. A full seal fits in a 70-byte satellite burst and degrades to 24 spoken words.

A burin is the engraver's tool that cuts the line into the plate. One incision, then identical impressions, struck by anyone who holds it, with no master plate held back.


Install

Not yet on PyPI — install from source (Python ≥ 3.12). uv recommended:

git clone https://github.com/starling-foundries/Burin.git
cd Burin
uv sync                      # or:  pip install -e .

To depend on it from another project, see Use it in your own project.

Quickstart

Fingerprint a region, and prove which cells it covers — the everyday tool:

from shapely.geometry import box
from burin.coverage import fingerprint_polygon_hex, SpatialMerkleTree

# A polygon → a deterministic 32-byte fingerprint. Same polygon + resolution → same bytes, anywhere.
fp = fingerprint_polygon_hex(box(-0.13, 51.50, -0.10, 51.52), resolution=10)
print(fp)   # 27a7de10...f8a53695

# Commit a set of equal-area cells, then prove membership / non-membership against the root.
tree = SpatialMerkleTree.from_suids([("Q", 4, 5, 3), ("Q", 4, 5, 7)], max_depth=4)
assert tree.membership_proof(("Q", 4, 5, 3)).verify(tree.root_hash, 4)       # covered
assert tree.non_membership_proof(("Q", 4, 5, 0)).verify(tree.root_hash, 4)   # absent

Seal what + where + when and verify it offline — in Python:

from burin.kernel import make_seal, verify_seal, Identity

me = Identity.generate()                                   # a signing key (software here; secure element in production)
seal = make_seal(me, commitment=b"\x11" * 32, cell=("Q", 4, 5), time_us=1_000_000)
assert verify_seal(seal).ok                                # recompute + check the signature, no server

…or from the command line (cells.json is a JSON list of rHEALPix cells, e.g. [["Q",4,5,3],["Q",4,5,7]]):

# self-attest a coverage over equal-area cells, binding where and when
uv run python -m burin.kernel seal --cells cells.json --depth 4 --cell Q,4,5 --time 1000000 \
    --key me.json --ledger log.json --out seal.json

uv run python -m burin.kernel verify --seal seal.json          # ✓ seal — signature ✓  composite ✓
uv run python -m burin.kernel detect-fraud a.json b.json       # two seals, one signer, one epoch → fraud (exit 1)
uv run python -m burin.kernel words  --seal seal.json          # degrade to 24 BIP-39 words
uv run python -m burin.kernel burst  --seal seal.json          # degrade to a 70-byte satellite burst

New to the code? Start with KERNEL.md (the central idea) and the burin/kernel/ package.

What it's for

  • Media provenance. Prove a photo was captured in a given region during a given window, while disclosing only the region and never the exact spot. (Binds to C2PA manifests.)
  • Conservation and citizen science. Prove you surveyed at least K distinct cells of habitat without revealing which ones. The nests stay hidden and the effort stays provable.
  • Boundaries and overlap. Two parties prove their claims meet at one cell without either surrendering their whole map, and with no third party holding both.
  • Austere or offline settings. The whole seal degrades to 24 spoken words or a printed card, and it verifies offline with no server in the loop.

The idea

Most conflict over where is not dishonesty. It is representational disagreement. Two parties encode the same ground in incompatible reference systems (different projections, datums, land registers), and the gap between those encodings becomes contested. The imposed version, a sovereign's grid laid over a living people, has been an instrument of dispossession for as long as there have been borders.

Burin supplies the piece that data about place never got: one fair, equal-area, ownerless cutting of the Earth, and a compact signed fingerprint over it that binds what, where, and when. No master copy exists to seize, and no authority stands above them. The agreement is computed rather than adjudicated.

The compact fingerprints and their encoding are the everyday tool. The cryptographic proofs sit underneath as the floor they stand on.

How it works

A seal is one signed, append-only commitment:

seal = sign_K( Poseidon( DOMAIN ‖ commitment ‖ [cell] ‖ [time] ) )   +  the opening
  • commitment is an opaque 32-byte root of what, either an equal-area coverage root or any media hash.
  • cell is where, a deterministic equal-area rHEALPix cell. It is optional.
  • time is when, also optional. Where and when are symmetric dimensions, so a seal can bind either, both, or neither.
  • K is a hardware-attested signing key. The signature scheme is pluggable (SM2, or ECDSA/Ed25519).

Five ideas carry the whole system:

  1. The fold. A region held whole and the same region spelled out cell by cell produce the identical fingerprint (a Merkle roll-up). A whole continent and a single field each cost you one 32-byte mark, and that mark reveals nothing about how finely you counted.
  2. Determinism gives ownerlessness. The same ground folds to the same bytes for anyone who runs the rule, so no master copy is needed.
  3. Accountability without consensus. A signer is a memory, not an authority. Equivocation and backdating produce self-verifying fraud proofs, revoked locally with no quorum and no trusted clock.
  4. Selective disclosure. Prove "at least K distinct cells under a public region" in zero knowledge, without revealing which cells.
  5. Degrade to paper. The seal reduces to 24 words you can carry across a border by hand.

Use it in your own project

burin is a normal Python package. To depend on a local checkout from a sibling project — changes are picked up live, no reinstall — add an editable path source (uv shown; pip is pip install -e ../burin-public):

# your project's pyproject.toml
[project]
dependencies = ["burin"]

[tool.uv.sources]
burin = { path = "../burin-public", editable = true }

Then import from the public API only — never reach into burin.coverage._*:

from burin.coverage import (
    fingerprint_polygon, SpatialMerkleTree, ValuedCoverageTree,
    polyfill, coalesce_ids, canonical_fingerprint,     # cell-array primitives
)
from burin.kernel import make_seal, verify_seal, Identity

burin.coverage.__all__ and burin.kernel.__all__ are the supported surface. Pin a released tag (burin = { git = "…/Burin.git", tag = "v3.0.0" }) when you want a fixed rev instead of a live path.

Documentation

📖 starling-foundries.github.io/Burin — the docs site, with the full API reference generated from the docstrings.

  • KERNEL.md — the central idea (the where-when seal), the best place to start.
  • docs/coverage/SYNTHESIS.md — architecture and theory of the equal-area engine.
  • Build the docs locally with uv run --group docs mkdocs serve (see mkdocs.yml).
  • Design notes live in CLAIMS.md (the honest floor), COMMITMENT.md, ATTESTATION_MODEL.md, SCOPE.md, PRIOR_ART.md, and rfcs/.

Is it real?

Yes, and it is built so you can check for yourself.

  • The equal-area engine (burin.coverage) is roughly 6,000 lines with a property-based suite; the test suite is adversarial (tamper, forgery, and order-independence cases), and uv run pytest is green.
  • The zero-knowledge proofs (zk/) are real PLONK SNARKs. Publish the verification key and anyone can verify a proof with snarkjs, with your repo nowhere in sight. You do not have to trust me. Run the verifier.
  • The recursion (recursion/) is real Nova folding to a constant-size proof.
  • It is source-available end to end: every claim above is a file you can read and a command you can run.

What it is not

  • It is not a blockchain. No chain, no token, no consensus, no global ledger. Trust lives in the bytes.
  • At the base, the kernel's where and when are self-claimed. A signed self-claim is tamper-evident. No external party has vouched for it. Witnessing, where a co-signer with a physical basis countersigns the position, is an optional upgrade.
  • It proves consistency rather than truth. A seal shows that a claim is well-formed and has not been equivocated, and it does not assert that the world matches the claim. It strips out the spurious half of a dispute, the part that is only two notations for one ground, and makes the real half provable. It does no more than that.

Layout

burin/
  kernel/      the seal primitive       →  import burin.kernel · python -m burin.kernel
  coverage/    the equal-area engine    →  import burin.coverage
zk/            real PLONK SNARKs (plus the Poseidon parity oracle)
recursion/     Nova folding IVC
docs/ · tests/ · rfcs/

Status and license

Source-available and offline-verifiable end to end. Licensed under PolyForm Noncommercial 1.0.0, free for any noncommercial use: personal, research, education, nonprofit, and government. Commercial use needs a separate license, which is welcome and straightforward: cameronsajedi@gmail.com. Copyright © 2026 Cameron Sajedi. The OGC-aligned DGGS engine tracks the upstream rHEALPix move to MIT, and the ZK demonstrations compose external tooling under their own licenses. The cultural and narrative material is withheld pending knowledge-keeper review.

I will not buy peace with a master.

About

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors