Check a record
ForestClerk signs an entry in a Shopify store’s record for every order with goods the EU deforestation regulation (EUDR) covers: which products, how many, and the reference numbers of the due diligence statements that applied to them that day. Each store has its own key, and its entries form one chain. A customs officer or a business customer can check the file here.
Nothing is sent. Your browser does the whole check. The only thing this page loads is ForestClerk’s public keys, from keys.json on this site.
Result
Nothing checked yet.
What is checked
- Each signature. ForestClerk signs each record with its private key when it makes the record. Your browser checks the signature with ForestClerk’s public key. If anything in the record was changed afterwards, even one character, the signature no longer matches. Only the holder of the private key can make a signature that matches.
- The chain. Each record names the fingerprint (SHA-256) of the record before it. If a record was removed, changed or put in between later, the next record no longer points to it, and the page says where.
A record holds when its signature matches. It shows that ForestClerk made the record and that nobody changed it since. It does not show that what a record says is right: that a reference number is genuine, that it belongs to those goods, or that the EU accepted a statement (check a number in the EU’s own system). A chain shows that no record was changed, and that none was taken out from between the others; it cannot show that records were cut from the end of a file, so keep each export as you received it. To see that a key is the store’s own, compare its id with the store’s keys at /keys/<the store’s myshopify.com address>.json. This is not legal advice.
Check it without us
You do not need this page or ForestClerk to check a record. Save the public keys (keys.json) next to the proof file (saved as proof.json; a single record or a list of records works too) and run this with Node 18 or later. Nothing needs installing:
node -e '
const fs = require("fs"), c = require("crypto");
const C = (v) => v === null || typeof v !== "object" ? (typeof v === "number" && !isFinite(v) ? "null" : JSON.stringify(v))
: Array.isArray(v) ? "[" + v.map((x) => C(x === undefined ? null : x)).join(",") + "]"
: "{" + Object.keys(v).filter((k) => v[k] !== undefined).sort().map((k) => JSON.stringify(k) + ":" + C(v[k])).join(",") + "}";
const f = JSON.parse(fs.readFileSync(process.argv[1], "utf8"));
const keys = JSON.parse(fs.readFileSync(process.argv[2], "utf8")).keys;
let last = null;
for (const s of f.entries || (Array.isArray(f) ? f : [f])) {
const r = s.record || s.receipt, k = keys.find((k) => k.kid === r.keyId);
const ok = !!k && c.verify(null, Buffer.from(C(r)), c.createPublicKey({ key: { kty: "OKP", crv: "Ed25519", x: k.x }, format: "jwk" }), Buffer.from(s.signature, "base64url"));
const linked = !last || r.chain !== last.chain || r.seq !== last.seq + 1 ? "" : r.prev === last.hash ? " linked" : " NOT LINKED";
console.log((r.seq ?? "-") + " " + (ok ? "signature holds" : "SIGNATURE DOES NOT HOLD") + linked);
last = { chain: r.chain, seq: r.seq, hash: c.createHash("sha256").update(C(r)).digest("hex") };
}' proof.json keys.json
Or check one record with OpenSSL 3. Save the record’s proof_record cell (or its
record, written out as canonical JSON) as record.json exactly as it is, with no line break after
it; save the pem of the key it names from keys.json as key.pem; put its signature in place of
SIGNATURE:
printf '%s==' "SIGNATURE" | tr '_-' '/+' | base64 -d > record.sig
openssl pkeyutl -verify -pubin -inkey key.pem -rawin -in record.json -sigfile record.sig
OpenSSL answers “Signature Verified Successfully” when the record is exactly as signed.
For software and AI agents: keys.json is a JSON Web Key Set: each key with its id, algorithm, public key (also as PEM), the day it was first used and the day it was retired, and how records are signed.