Data export

How to read your export

This page describes the JSON file Dekimu Hub produces when you ask for a copy of your data (GDPR Art. 15 and Art. 20), and how to read the values in it that are encrypted. English only.

The short version

These fields are encrypted so that Dekimu cannot read them; the key that opens them is held by you, not by us. To read them, sign in, unlock your vault and use Download decrypted copy in Settings, Data & privacy.

If both your vault passphrase and your recovery phrase are lost, nobody, Dekimu included, can read these fields.

Content submitted from outside your browser (for example a form your client fills in) is encrypted by our server on arrival, so the server reads it briefly.

The button sits in Hub under Settings, Data & privacy. It is shown only while your vault is unlocked. It downloads the same export as the server produces, decrypts the encrypted values in your browser with the key your browser already holds, and saves the result as a file on your device. The decrypted values are not sent to Dekimu; the only request the button makes is the plain download of the normal export. The saved file is not encrypted, so keep it somewhere safe. Workspace data is included only for the workspace you are signed in to, and only if you own it (a member, viewer or non-owner admin gets just their own records). That workspace's key is the one your browser holds.

What the export file looks like

A UTF-8 JSON object. The top-level keys:

{
  "app": "hub",
  "userId": "<your user id>",
  "exportedAt": "<ISO 8601 timestamp>",
  "rejectedWorkspaceIds": [],
  "incomplete": false,          // true if part of the export was cut off
  "incompleteReasons": [],
  "sealed_fields": { ... },     // see below
  "how_to_read": "...",
  "lost_key_note": "...",
  "how_to_read_url": "https://app.dekimu.com/how-to-read-your-export",
  "data": {
    "decisions": [...],
    "activity": [...],
    "workspaces": [ { "workspaceId": "...", "modules": { ... }, ... } ],
    "designer": { ... }
  }
}

Everything in data that is not encrypted is plain JSON. An encrypted value sits in a property named vault on the record it belongs to.

The sealed_fields manifest

sealed_fields is built from the shape of the export, not from any key, and lists what is encrypted:

"sealed_fields": {
  "envelope_formats": ["zkv1"],          // formats that occur in this file
  "record_types": [
    {
      "record_type": "workspaces[].modules.consentLedger.records[]",
      "sealed_as": "one_blob_per_record",
      "fields": ["clientName", "notes"],
      "records": 12,                      // records of this type with encrypted content
      "blobs": 12                         // encrypted values in those records
    },
    {
      "record_type": "workspaces[].okrs[]",
      "sealed_as": "one_blob_per_field",
      "fields": ["body", "title"],
      "records": 3,
      "blobs": 5
    }
  ],
  "total_records": 15,
  "total_blobs": 17
}

record_type is the path inside data, with [] where the path passes through a list. Two layouts exist:

Next to an encrypted value the app often stores a blank placeholder in the plain field of the same name. In the decrypted copy, the decrypted values are under sealed on each record; the value under sealed is the current one. A value that could not be opened stays as it was under vault and its name is listed in sealed_unreadable.

The encrypted value format

Each encrypted value is a JSON object with a version tag v. Binary fields are base64url without padding. The reference implementation is the open-source package @dekimuhq/crypto (Apache-2.0, github.com/dekimuhq/forget, directory packages/crypto/src/vault). It runs on the standard Web Crypto API.

zkv1

{ "v": "zkv1", "kid": "<optional>", "iv": "...", "data": "...", "key": "..." }

zkv2

{ "v": "zkv2", "cls": "member", "scope": "ws:<id>", "kid": "...", "epoch": 0,
  "purpose": "field", "coll": "...", "rec": "...", "field": "...", "ver": 0,
  "iv": "...", "data": "..." }

InvoiceUp exports use the same two formats. There, a zkv2 value with scope u:<your user id> is sealed to your personal key: the data key is HKDF-SHA-256 over your raw vault key, salt = your user id, info = dekimu/pdk/v1. A zkv1 value without kid is wrapped to your personal RSA key.

If the key is lost

The key that opens these values is derived from your vault passphrase (PBKDF2-SHA-256, 600,000 iterations, unwraps your vault key, which unwraps your RSA private key); the recovery phrase is an alternative way to reach the same vault key. For these values Dekimu stores only wrapped keys. If both your vault passphrase and your recovery phrase are lost, nobody, Dekimu included, can read these fields.