Skip to main content
Version: 0.10.0

The file

A package is the transport form of an application: its bundle archived, with a fixed-size footer appended. Nothing runs from a package, and nothing is read out of it until the checks below have passed.

PartWhat it is
the name<id>-<version>.yoke — com.yoke.station-2.1.0.yoke
the payloada Zip archive whose root entries are the bundle's: yoke.yaml, manifests/, components/
the footer512 bytes appended at the end, never inside the archive
  • Everything a host decides on is in the footer, found by reading the last bytes of the file without interpreting the archive, and readable when the payload is sealed.
  • A package that is not sealed opens with ordinary tools: unzip and any Zip library find the archive's directory by scanning backwards, past the footer.

512 bytes, [SIG(256)][META(256)]. SIG begins at EOF-512 and META at EOF-256. Every multi-byte field is little-endian. The payload region is every byte before the footer.

META​

OffsetSizeFieldHolds
08magicYOKEPKG1, in ASCII
82formatthe version of this footer format: 1
102header_lenthe bytes of META the checksum covers: 252
122modelthe version of the description model the descriptor is written against
141hash_idthe digest algorithm
151sig_idthe signature algorithm, 0 where there is none
161seal_idthe seal algorithm, 0 where the payload is in clear
177—reserved, zero
248payload_sizethe bytes of the payload region as it sits in the file
328built_atnanoseconds since the epoch, UTC
4032digestthe digest of the payload
7232key_idthe SHA-256 of the signing public key; zero where there is no signature
10448idthe application's namespaced identifier
15232versionthe application's version
18412archthe architecture the bundle's executables are built for
19624corethe range of Core versions the application declares
22032—reserved, zero
2524crc32the checksum over bytes [0, 252) of META
  • The identity fields are the descriptor's own, carried so a host can decide whether it wants a file before opening it. The data range is not among them.
  • Text fields are UTF-8, zero-padded, with no terminator. A value that does not fit cannot be carried: a package is not produced rather than truncated.
  • Reserved bytes are zero, and covered by the checksum and the signature. A reader of format 1 refuses a footer whose reserved bytes are not zero.
  • There is no flags field. Whether a package is signed or sealed is what sig_id and seal_id say.
  • Nothing reads the clock. built_at is reported and never checked; nothing in a package expires.

SIG​

The signature bytes, left-aligned and zero-padded to 256; all zeros where sig_id is 0. It covers META, checksum included, and is covered by nothing.

The algorithms​

An identifier is one byte, and a value this host does not know is refused, naming it — reported as cannot decide, distinctly from a check that decided against the file.

FieldValueMeans
hash_id1SHA-256, filling the 32-byte digest
sig_id0no signature
sig_id1Ed25519, 64 bytes — the reference algorithm
sig_id2RSA-2048, PKCS#1 v1.5 over SHA-256, 256 bytes
seal_id0the payload is in clear
seal_id1AES-256-GCM, a 12-byte nonce and a 16-byte tag

The checksum is CRC-32 (ISO 3309), the polynomial Zip uses, stored little-endian.

Three checks, three different things​

CheckEstablishesDoes not establish
the CRC over METAthe block is intact and was written by something implementing this formatanything against an adversary, who recalculates it
the digest of the payloadthe payload is the one META describes: no corruption, not the wrong fileanything deliberate: whoever replaces the payload writes its digest
the signature over METAauthenticity — the only one of the three that survives an adversarythat this host wants the application

The signature covers the metadata, and the metadata covers the payload: one signature, covering everything transitively.

The order a host checks in​

#StepA failure here is
1read the last 512 bytes; check magic, then format, then the CRCnot a package, or a damaged or foreign file
2verify SIG over META against a trusted key; where the policy requires a signature and there is none, stopa failure of trust; the payload is untouched
3compare arch, model and core against this hostthis host does not want it, each named
4unseal, where seal_id is not 0a refusal: no credential, the wrong one, or a tag that does not verify
5recompute the payload's digest and comparenot the payload META describes
6expand — and only now read what the application says about itself—
  • Steps 1 and 2 decide whether the host wants the file while it holds only the last 512 bytes. The descriptor is not read until step 6.
  • The digest covers the payload as it is after unsealing. Sealing does not change an artifact's digest; the ciphertext's integrity is the seal's tag, checked at step 4.
  • Nothing step 4 produces is used before step 5 has passed.

Sealing​

Sealing is optional, independent of signing, and outside the footer. A sealed payload region is [nonce · 12 B][ciphertext][tag · 16 B], and payload_size counts all three. The footer stays in clear, so a host refuses a package from an unknown signer without holding any key for it.

  • The seal acts once, at install. It protects the package in transit and decides who can bring it into service. The installed bundle is in clear, and nothing consults the seal again.
  • Where the credential that opens it comes from is the trust store's.

Architecture, identity and versions​

  • A package is built for one architecture and says which. There is no value meaning any; a package of images and interpreted code names the architecture of the host it is for.
  • An application is named by a namespaced identifier that survives every version: an instance record, an installed bundle and a package all carry it.
  • A version must parse as a semantic version, or the package is refused at install.
  • A pre-release installs and runs, and is never removed automatically.