Governate
Sign in Start a trial

File format

A .gvf is a short signed header followed by the encrypted content. This is version 3.

Layout

"GVF3"                    4 bytes
header length             4 bytes, big-endian
header                    JSON
signature length          4 bytes, big-endian
signature                 ML-DSA-87 over everything above it
chunk, chunk, ...         AES-256-GCM
{
  "v": 3,
  "file_id": "...",
  "origin": "https://docs.example.com",
  "deployment_id": "GV-XXXX-XXXX-XXXX-XXXX",
  "key_id": "...",
  "created": "2027-01-15T09:30:00Z",
  "chunk_size": 65536,
  "nonce_prefix": "...",
  "sig_alg": "ML-DSA-87",
  "kdf": "HKDF-SHA384",
  "cipher": "AES-256-GCM"
}
FieldMeaning
originThe address the file opens at.
deployment_idThe installation, whatever its address.
key_idWhich of the installation's signing keys signed this header.
chunk_sizeBytes of content per chunk before encryption.
nonce_prefixRandom, per file.

The header holds no file name, no owner, no permissions and no key. Those live on the installation, which is why they can be changed after the file has been sent.

Content

Signature

The installation signs the magic bytes, the header length and the header. A reader checks the signature before trusting any field, the address included.

Editing

When a document is edited in the viewer, the server writes a new .gvf with the same file ID and file key and a fresh nonce prefix. Copies made before the edit still open, to the content they held.