Nordhavn / specs / convene / mix / SealKey

convene / mixdata

SealKey

Purpose

The opaque key material the transport seals its cells under and derives its detection tags from. The mix does not know it as an "epoch key" or anything else from the layer above — the host sets it from whatever key the recipient shares with the sender, and the transport knows only this: holders of the same material can open a cell it sealed and recognise a tag it minted, and no one else can. Sealing a chunk and testing a detection tag both take one of these; the strength and provenance of the material is the comms layer's business, carried down to the seam and no further.

Attributes

Invariants

Operations

seal

Renders a given CellContent into a sealed payload — an opaque text carrying no readable trace of the chunk, its grouping, or its place; recoverable only through this same key. The codec's one home is this artifact: whatever form seal renders here, open reads here, and no other artifact re-derives either half. Result: the sealed payload as Text

open

Recovers the CellContent a given sealed payload Text seals — the inverse of seal, reading exactly the form seal renders. It fails when this key is not the one that sealed the payload, and when the text is no sealing at all. Result: the CellContent the sealed payload seals; fails when the key is not the one that sealed it

Scenarios

The seal round-trips under its own key

Given: the SealKey "sk-0163", and a CellContent with reassembly id "r-01", chunk index 0, chunk count 2, and chunk "sealed words" When: the content is sealed and the sealed payload is opened under the same key Then: the opened CellContent equals the content that was sealed

A different key opens nothing

Given: the SealKey "sk-0163", the SealKey "sk-9999", and a CellContent with reassembly id "r-01", chunk index 0, chunk count 2, and chunk "sealed words" When: the content is sealed under "sk-0163" and the sealed payload is opened under "sk-9999" Then: the opening fails — the key is not the one that sealed it

A seal key is opaque material

Given: the material "sk-0163" When: a SealKey is created Then: it is accepted and reads back with material "sk-0163"

A seal key without material is rejected

Given: empty material When: a SealKey is created Then: the creation is rejected because the material is empty

spoken of by