Skip to content

Digital product passport

View Markdown

The EU’s Ecodesign for Sustainable Products Regulation (ESPR) introduces Digital Product Passports: verifiable records of a regulated product’s materials, carbon footprint, recycled content and origin. Regulators, recyclers and consumers need to trust those claims. But the exact numbers behind them are commercially sensitive. A precise carbon figure reveals manufacturing efficiency, origin data reveals suppliers, and inspection records reveal defect rates. The tension is real: prove it, but don’t publish it.

Product passport · step 1 / 6
Auditormeasures, commits, co-signs
Product

EV Battery Pack Alpha

carbonSECRETHIDDEN7 kg CO₂e████████
recycledSECRETHIDDEN45 %████████
originSECRETHIDDEN276 (DEU)████████
inspectionsSECRETHIDDEN11, 13, 11████████
blinding r per claim (fresh, 252 bits)SECRETHIDDEN0x9de8…de9f████████
C · carbon = (u, v)COMMITMENT0xe35c…c4cd
CoSignGuard, before signingdatum = exactly my commitments for this productmint is exactly {productId: 1}, one output at the passport addressmy key authorises nothing elsea TTL is set (the demo uses 180 slots); mint history for the product is emptyreserve the product for this tx, then sign

Never asked to co-sign: the script refuses the transaction in local evaluation first.

Only the auditor can revoke: it signs a burn of {productId: −1}.

ManufacturerBatteryAssembly GmbH

Waits for the auditor's report and openings.

openings (m, r), 4 claimsSECRETHIDDENfrom the auditor████████
carbon ≤ 50 kg: proved · CarbonClaimProof, 2,192 constraintsrecycled ≥ 30 %: proved · RecycledClaimProof, 2,192 constraintsmade in the EU: proved · OriginClaimProof, 3,344 constraints3 approved inspections, in order: proved · InspectionClaimProof, 5,094 constraints
Passport transactionMints the token BAT-SN001 to the passport address, with every commitment in its datum. The redeemer carries only the carbon proof.No carbon proof for ≤ 50 kg. "Skip off-chain check" builds the transaction with a proof for ≤ 65,535 instead.
CardanoDppPassport · Plutus V3

No passport yet. Nothing is published before the mint.

Mint checksMint checks, in local evaluation(a) manufacturer and auditor both signed(b) mint map is exactly {productId: 1}(c) one output at the passport address, exact datum(d) proof verifies against [σ, u, v, 50]27.9 % of the CPU budget
Passport · locked at its own address
productIdPUBLICBAT-SN001
manufacturerPkhPUBLIC0xa184…6bd8
claims: 4 × (id, σ, u, v)PUBLIC0xe35c…c4cd …
Reader (customs, buyer, regulator)token found at the passport addressmint history: exactly one passport everσ from its own schema registry, never the datumoff-chain proofs verify against the datum's commitments
Spending the passporttransfer it, or change its datummanufacturer revokesauditor signs and burns {productId: −1}
No passport for BAT-SN001: the script only accepts a proof for its own threshold.

1. Commit

The auditor measures the pack. For each claim it draws a fresh 252-bit blinding r and computes a pedersen-jubjub-vector-v1 commitment C = (u, v) under the claim's schema. It hands the opening (m, r) to the manufacturer with its report. There is no shared secret: the manufacturer gets only its own product's openings.

2. Prove

From the openings, the manufacturer proves each claim's rule against its commitment. Every rule is an assertion, so a claim that doesn't hold has no proof at all. Pick SN003 (65 kg, 20 %) to see two claims with no proof.

3. Co-sign

The manufacturer builds one passport transaction. Before co-signing, the auditor checks that the datum holds exactly its own commitments for this product, that the transaction mints one token and spends nothing of the auditor's, and that no passport for the product was ever minted. It reserves the product, then signs, so it signs at most one passport per product. The transaction is first run through the script locally, so a transaction the script refuses never reaches the auditor.

4. Mint

DppPassport checks both signatures, the exact mint and output, and the carbon proof against its own σ and threshold (50 kg), never values the manufacturer picks. The passport is locked at the script's own address with every commitment in its datum. For SN003 the forced proof is for a different threshold: the demo runs the script locally before the auditor co-signs, the script refuses it, and nothing is submitted.

5. Read

A reader finds the passport on-chain, refuses the product if more than one passport was ever minted, takes each schema digest from its own registry and verifies the other three claims against the datum's commitments. Switch to Chain observer: the commitments are public, the measurements are not.

6. Revoke

A passport never moves and its datum never changes. The only way to spend it is a burn the auditor signs, so only the auditor can revoke it.

SECRET known to the auditor and the manufacturerPUBLIC anyone can read it on CardanoBlindings and points are illustrative.

The auditor seals each measurement in a Pedersen commitment. The manufacturer proves “the value in this commitment is at most 50 kg CO₂e” (or “at least 30 % recycled”, “an EU country”, “three approved inspections in order”) without opening it.

The flow, in plain terms:

  • The auditor commits. It measures the product and, for each claim, computes a pedersen-jubjub-vector-v1 commitment C = (u, v) with a fresh 252-bit random blinding r. It gives the opening (m, r) (value and blinding) to the manufacturer with its report.
  • The manufacturer proves. For each claim, a Groth16 proof shows that the value inside C passes the rule. A claim that doesn’t hold has no proof at all.
  • One transaction mints the passport. The manufacturer builds it, the auditor co-signs it, and the DppPassport script mints a passport token into a locked output whose datum holds every commitment the auditor attests.
  • Anyone reads it. Customs, a buyer or a regulator finds the passport on-chain and checks each claim’s proof against the commitments there. The carbon proof was checked on-chain at mint; the manufacturer publishes the other proofs off-chain (in the demo, its server serves them). Only the auditor can revoke it.

If commitments are new to you, Hide a number explains them with an interactive envelope.

The first version of this demo published auditorHash = Poseidon(auditorSecret, Poseidon(productId, m)) in the passport datum, where m is the measurement. It leaked in two ways:

  • The key was not secret. auditorSecret was an input to the manufacturer’s proof, so every manufacturer had to hold it, and the demo hard-coded it (777777) in its source.
  • The value was easy to guess. Carbon and recycled content are 16-bit numbers, and a country is one of about 250 codes. Anyone could hash all 65,536 candidates and read m off the chain. A hash of a small value with a known key hides nothing.

A Pedersen commitment fixes both. The blinding is fresh for each commitment and is never shared between manufacturers, and for every possible value there is some blinding that gives the same point, so the commitment says nothing about the value. Try the search yourself:

Guess the carbon value · step 1 / 2
Auditormeasures BAT-SN001
carbon (kg, 16 bits)SECRET
auditorSecretPUBLISHED777777 (in the demo source)
blinding r (fresh, 252 bits)SECRET0xf4bd…fdaa

Change the measurement, then let the observer search.

On-chain datumanyone can read it
productIdPUBLICBAT-SN001
auditorHash = Poseidon(secret, Poseidon(productId, carbon))PUBLIC0x97eb…fd4a
C = [carbon]·G₀ + [r]·H_VPUBLIC0xdfc0…f8f6
Observera competitor, anyone
Search all 65,536 valuesNot searched yet.

A 16-bit value with a published key hides nothing.

1. The old datum: a keyed hash

The first version published auditorHash = Poseidon(auditorSecret, Poseidon(productId, carbon)). The manufacturer had to know auditorSecret to prove, so the demo shipped it in its source (777777). Carbon is a 16-bit number, so an observer hashes all 65,536 candidates and keeps the one that matches. Press Try.

2. A Pedersen commitment

Now the auditor commits with a fresh 252-bit blinding r that only it and the manufacturer know. The same search finds nothing: for every carbon value there is some blinding that gives this exact C, so the point carries no information about the value. Press Commit again: same value, a different commitment.

SECRET the auditor and manufacturer know itPUBLIC anyone can see itHash and point values are illustrative.

The old design had binding gaps too. The minting policy fixed neither the threshold nor auditorHash, so a manufacturer could prove against a threshold, or a value, of its own choosing. The token name was not tied to the product and could be minted again, and the demo’s registry and /api/dpp/status returned every measurement. The demo’s PassportBruteForceTest runs the 65,536-value search: it recovers the carbon value from an old datum and nothing from a new passport. The redesign is ADR-0009 D1.

ValueVisibilityWhy
Measurements (carbon_kg, recycled_pct, country, inspector ids and times)SecretThe competitive data; held by the auditor and the manufacturer
Blinding r (one per claim, 252 bits)SecretFresh from SecureRandom; it’s what makes the commitment hide the value
productIdPublicThe token name and the first datum field; ties the passport to one product
manufacturerPkhPublicIn the datum, and fixed by the script
Each claim’s (claim, σ, u, v)PublicThe commitment (u, v) and its schema digest σ, in the datum
Threshold (50 kg) and approved-set rootsPublicFixed by the script (carbon) or by the reader (the other claims)

σ is the digest of the claim’s schema. A commitment point doesn’t record what its values mean, so every proof binds σ as a public input, and every verifier takes the expected σ from its own copy of the schemas.

Each claim is one commitment under its own schema. The labels and bit widths are fixed by the design:

Claim (id)SchemaCircuitPublic inputs, in orderRuleConstraints
Carbon (0)zeroj.demo.dpp.carbon v1: carbon_kg/16CarbonClaimProofσ, u, v, thresholdcarbon_kg ≤ threshold2,192
Recycled content (1)zeroj.demo.dpp.recycled v1: recycled_pct/16RecycledClaimProofσ, u, v, thresholdrecycled_pct ≥ threshold2,192
Origin (2)zeroj.demo.dpp.origin v1: country/16OriginClaimProofσ, u, v, countryRootcountry is a leaf of the approved-set tree (depth 5, the 27 EU states)3,344
Inspections (3)zeroj.demo.dpp.inspections v1: inspector_0/8, time_0/32, … inspector_2/8, time_2/32InspectionClaimProofσ, u, v, inspectorRooteach inspector is a leaf of the approved-inspector tree (depth 3), and time_0 < time_1 < time_25,094
  • No shared secret, no isCompliant. Every rule is an assertion, so a failing measurement simply can’t be proved.
  • The auditor commits only passed inspections, so there is no passed entry. An inspector may appear at more than one checkpoint.
  • Tree padding. Unused leaves hold 2^k, where k is the entry’s width (2^16 for countries, 2^8 for inspectors). A committed value is at most k bits, so it can never equal padding. The old trees padded with 0, which made 0 a member of every set.

The carbon claim, as in the demo’s CarbonClaimProof. It binds the schema, opens the commitment in-circuit (which also range-checks carbon_kg to 16 bits) and asserts the rule:

CarbonClaimProof.java
import org.zeroj.circuit.annotation.Prove;
import org.zeroj.circuit.annotation.Public;
import org.zeroj.circuit.annotation.Secret;
import org.zeroj.circuit.annotation.UInt;
import org.zeroj.circuit.annotation.ZKCircuit;
import org.zeroj.circuit.annotation.ZkContext;
import org.zeroj.circuit.annotation.ZkField;
import org.zeroj.circuit.annotation.ZkUInt;
import org.zeroj.circuit.lib.jubjub.PedersenVectorSchema;
import org.zeroj.circuit.lib.jubjub.PedersenVectorSchema.Entry;
import org.zeroj.circuit.lib.zk.ZkPedersenVector;
import java.util.List;
@ZKCircuit(name = "dpp-carbon-claim", version = 1)
public class CarbonClaimProof {
public static final PedersenVectorSchema SCHEMA = PedersenVectorSchema.of("zeroj.demo.dpp.carbon", 1,
List.of(new Entry("carbon_kg", 16)));
@Prove
void prove(ZkContext zk,
@Public ZkField schemaDigest, // σ
@Public ZkField u, // the commitment C = (u, v)
@Public ZkField v,
@Public @UInt(bits = 16) ZkUInt threshold,
@Secret @UInt(bits = 16) ZkUInt carbonKg, // never revealed
@Secret @UInt(bits = 252) ZkUInt blinding) { // the auditor's fresh blinding
var binding = ZkPedersenVector.bindSchema(zk, SCHEMA, schemaDigest);
ZkPedersenVector.commit(zk, binding, List.of(carbonKg), blinding).assertAffineEquals(zk, u, v);
carbonKg.lte(threshold).assertTrue();
}
}

The auditor’s side, lightly simplified from the demo’s ClaimOpening: one commitment per claim, each with its own blinding.

Auditor: commit to a measurement
import org.zeroj.circuit.lib.jubjub.JubjubPoint;
import org.zeroj.circuit.lib.jubjub.PedersenCommitment;
import org.zeroj.circuit.lib.jubjub.PedersenVectorCommitment;
BigInteger carbonKg = BigInteger.valueOf(7);
BigInteger r = PedersenCommitment.randomBlinding(new SecureRandom()); // fresh, 252 bits
JubjubPoint c = PedersenVectorCommitment.commit(CarbonClaimProof.SCHEMA, List.of(carbonKg), r).point();
// (c.affineU(), c.affineV()) goes into the passport datum; (carbonKg, r) goes to the manufacturer

The other three circuits follow the same pattern with ZkMerkle membership and ordering checks. See Commit to several values at once for vector commitments in general.

DppPassport is a JuLC multi-validator built on Groth16BLS12381Lib.verify(...). Its hash is both the passport minting policy and the passport address, so a passport is a public record that stays where it was minted, not a tradeable token. Its parameters are manufacturerPkh, auditorPkh, the gated claim (carbon) with its σ and threshold (50 kg), and the carbon circuit’s verification key.

It mints one token named productId into an output at its own address with the inline datum

Passport(productId: B, manufacturerPkh: B28, claims: List<Claim(claim: I, σ: B32, u: I, v: I)>)

listing every claim the auditor attests (at most 4). The mint redeemer carries only the proof.

Mint checks:

  • (a) the manufacturer and the auditor both sign;
  • (b) the mint under this policy is exactly {productId: 1}, with a 1–32 byte productId;
  • (c) exactly one output holds the token: at the passport address with no stake credential, no reference script, only ADA and the token, and an inline datum of exactly the shape above. The product id equals the token name, manufacturerPkh equals the parameter, every claim has canonical u, v and a 32-byte σ, claim ids are distinct, and the carbon claim is present with the parameter σ;
  • (d) the Groth16 proof verifies against [σ, u, v, threshold], with u, v from the carbon entry and σ, threshold from the parameters, never from the manufacturer.

Revoke. The only way to spend a passport: the auditor signs and the transaction burns exactly that passport’s token, {productId: −1}. A passport is never moved and its datum never changes, so the datum a reader sees is the one the mint checked.

The auditor’s co-signature. Before signing, the auditor’s CoSignGuard checks the finished transaction: the mint and the passport output are exactly as above, the datum is exactly the auditor’s own commitments for this product and manufacturer, the auditor’s key authorises nothing else (no input or collateral of its own, no withdrawal, certificate or vote), the transaction has a TTL (the demo sets 180 slots), and the policy has never minted this product. It then reserves the product for that transaction in one atomic step and only then signs, so concurrent or retried requests get at most one signature. A reservation is released only after its TTL has passed, so a failed or timed-out mint blocks a retry for that product for up to three minutes.

TransactionCPU steps% CPUMemory% memory
Issue (mint, Groth16 verification, 4 claims)2,789,042,13527.9 %1,390,8488.4 %
Revoke (spend and burn)151,057,1971.5 %561,0453.4 %

Shares of the per-transaction limits, as printed by the demo’s DppPassportVmTest.

Only carbon is checked on-chain. Recycled content, origin and inspections are proved off-chain, against the commitments in the passport datum. That datum is the authenticated record of who issued the commitments: it exists only at the passport address, minted in a transaction the auditor signed. A reader never accepts a commitment from the manufacturer’s API. The demo’s PassportReader:

  • looks for the passport token at the passport address, and nowhere else;
  • reads the policy’s whole mint history for the token and refuses a product with more than one passport ever minted, including a burn followed by a re-mint. If the history is unavailable, it refuses;
  • takes each claim’s expected σ from its own schema registry and never from the datum;
  • verifies each off-chain claim’s proof against [σ, u, v, threshold or root]. In the demo the reader endpoint takes those proofs from the manufacturer’s records on the same server.

A valid proof is not authorization. The passport’s trust comes from the script parameters and the auditor’s signature, not from the proof alone; see Application security.

RoleDoesTrusted for
AuditorMeasures, commits each claim with a fresh blinding, gives the openings to the manufacturer, co-signs the passport transaction after checking it against its report, can revokeMeasuring honestly, keeping measurements confidential, co-signing at most one passport per product
ManufacturerProves claims from the openings and builds the passport transactionNothing about its measurements
Reader (customs, buyer, regulator)Reads the passport from the chain and verifies claim proofs against its commitments—
  • The auditor sees every measurement, could collude with a manufacturer, and alone ensures one passport per product, by co-signing once. A second passport under the same policy would be publicly visible, and readers refuse that product.
  • The reader’s duplicate check needs Yaci Store. The mint history is read in Yaci Store’s format, so the reader’s check and the auditor’s work on DevKit only. Against Blockfrost they refuse rather than guess.
  • A passport shows which product has which claims, but not the values. A very small approved set (one country) would reveal the value.
  • Custodial demo. The demo server holds the manufacturer’s and the auditor’s keys and the openings, and its API is the operator’s view. Privacy holds against chain and mempool observers, not against this server. The API returns no measurements outside the panel labelled “manufacturer (private)”.
  • Giving openings to a regulator is not part of the demo yet; vector openings need their own reviewed design.
  • Development setup. The circuit keys come from a single-party setup; production needs an MPC ceremony (Trusted setup, explained).
  • Not externally reviewed. Vector commitments are experimental in ZeroJ, and the demo hasn’t been audited.
  • Bind every claim to an attested value. A proof that “some country is in the approved set” proves nothing about this product. Here each proof opens a commitment that sits in the product’s own passport, which only the auditor could co-sign.
  • Thresholds and roots belong to the verifier. The carbon threshold is a script parameter, so a proof for a looser threshold is refused. Off-chain readers use their own thresholds and roots.
  • Never reuse a blinding. The same value with the same blinding gives the same point, which links products. The auditor draws a new one for every claim of every product.
  • Linkability of batches. Per-batch passports reveal batch sizes and timing. Decide what you’re willing to publish.

The demo lives in digital-product-passport. With Yaci DevKit running (see Run the demos):

Terminal window
./demo.sh dpp --run

--run has the auditor attest battery BAT-SN001, the manufacturer prove its claims, mints its passport and prints the status. In the UI (port 8088):

  • BAT-SN003 (65 kg, 20 %) has no carbon proof, so no passport. “Skip off-chain check” builds the transaction with a proof for a threshold the manufacturer chose (65,535). The demo runs the script locally before the auditor co-signs; the script refuses it, and nothing is submitted.
  • Textile batch TEX-B2024-003 (made in China, 5 % recycled) gets a passport, because its carbon passes, but its recycled-content and origin claims can’t be proved, and the reader shows no proof for them.
  • Revoke (auditor) burns a passport. The demo’s DevKit end-to-end test also shows that a transfer, or a revoke by the manufacturer, is refused.

The measurements appear only in the “manufacturer (private)” panel. Demo state from the old version isn’t read: start fresh with ./demo.sh dpp --clean-cache.

Broader design notes, written before this redesign: Digital product passport — detailed design (multi-party supply chains, lifecycle state machine, comparison with the Cardano Foundation blueprint).