Skip to main content
Skip to main content

Research / Open Format

Open Format

A record you can read and check without us. The format is public, so the proof does not depend on the vendor.

Why a public format

A compliance record that only its vendor can open is a statement, not evidence. An auditor or an authority has to be able to read it years later, with tools of their own choosing, whether or not the software that wrote it is still in use.

So the record is plain JSON, its canonical form is written down here, and its seal is a standard SHA-256 digest. Nothing about checking a record requires our code.

  • Readable

    Plain JSON with named blocks. Exports as JSON, CSV and PDF carry the same content.

  • Verifiable

    One digest over a canonical form. Anyone with SHA-256 can recompute it.

  • Stable

    The format is versioned. A record is checked by the rules of the version it was written under, and its seal is never recomputed.

1 The record

A record is one JSON object. It is written when a person confirms a classification, and it is the unit an auditor reads. Format version 2 has these blocks:

BlockContent
itemRefThe item: article number, manufacturer, country of origin.
legalNatureGoods, software, technology or service.
intentWhat the item was designed for and where it comes from.
editionThe list edition the record was confirmed on.
resultSetPer list: the confirmed position, “not listed” or open, the conditions met, the neighbouring positions that were refuted and the value that refuted each.
threadsEvery fact used: attribute, value, unit, its source (a place in a datasheet, an engineer, a supplier declaration, master data, an entry by the officer) and whether a person confirmed it.
peopleWho confirmed the result, when, and under which release rule.
sealedFormat version, position, list and values as they stood when the seal was computed.
previousHashThe seal of the record this one replaces, if any.
hashThe seal: a SHA-256 digest, hexadecimal.

Further optional blocks carry detail for particular cases, such as the checks under United States re-export rules or the trail of places read in a datasheet. An optional block that a record does not need is absent, not empty.

2 Canonical form

Two JSON documents with the same content can differ in key order and whitespace. A digest is taken over bytes, so the bytes are fixed by a canonical form:

  • the members of every object are ordered by key, at every level of nesting;
  • a member without a value is left out; a null stays a null;
  • the elements of a list keep their order;
  • a member named hash is left out;
  • at the top level, askLog is left out when null, and datasheetTrail when null or empty;
  • the result is serialised as JSON without insignificant whitespace, in UTF-8.

3 Seal

The seal is the SHA-256 digest of the canonical form, written in hexadecimal and stored in hash. Any change to a fact, a source, a result or the decision changes the canonical form and therefore the seal.

The sealed block places the format version, the position, the list and the values under the same digest. Where a system shows these beside a record, a verifier compares what is shown with the block.

4 Verifying a record

The whole check fits on one screen. This reference implementation runs on Node.js without dependencies:

import { createHash } from "node:crypto";

// Optional blocks that count as absent when empty.
const absent = (key, value) =>
  value === undefined ||
  (key === "askLog" && value === null) ||
  (key === "datasheetTrail" &&
    (value === null || (Array.isArray(value) && value.length === 0)));

function canonical(value, top = false) {
  if (value === null || typeof value !== "object") return value ?? null;
  if (Array.isArray(value)) return value.map((entry) => canonical(entry));
  const out = {};
  for (const key of Object.keys(value).sort()) {
    if (key === "hash") continue;
    if (top ? absent(key, value[key]) : value[key] === undefined) continue;
    out[key] = canonical(value[key]);
  }
  return out;
}

export function verifySeal(record) {
  const digest = createHash("sha256")
    .update(JSON.stringify(canonical(record, true)))
    .digest("hex");
  return digest === record.hash;
}

A record that passes is unchanged since it was confirmed. The substantive review comes after that, and the record is built for it: every fact names its source, and every position that was reached and refuted is listed with the value that refuted it. The method, the threat model and the audit chain are set out in A Verifiable Evidence Record.

5 Versions

VersionChange
2Adds the sealed block, so that position, list and values fall under the digest.
1Canonical form and SHA-256 seal over the record.

A new version never changes how an older record is read. A record written under version 1 carries no sealed block and is checked by its digest alone.

Questions

What is the Caelex open format?

It is the public description of the evidence record Caelex stores for each confirmed classification: its blocks, its canonical form and its seal. With it, a record can be read and its integrity checked without Caelex software.

What do I need to verify a record?

The exported record and an implementation of SHA-256. No account, no secret and no connection to Caelex are required.

What does a valid seal prove?

That the record is unchanged since it was confirmed. It does not prove that a fact in the record was correct, and it is not an export authorisation.

Is the format tied to where the software runs?

No. A record is defined the same way in a hosted deployment and on a customer's own infrastructure, and it verifies with the same procedure.

A seal shows that a record is unchanged. It does not show that a fact in it was correct. A record documents a classification; it is not legal advice and not an export authorisation.

Open Format | Caelex — Regulatory OS for the orbital economy