Skip to content

feat: seal messages under batch keys with the wrap in the head and open them through a batch key cache - #140

Merged
hamzakargin merged 1 commit into
mainfrom
feat/batch-keys
Nov 3, 2026
Merged

hamzakargin merged 1 commit into
mainfrom
feat/batch-keys

Conversation

@hamzakargin

Copy link
Copy Markdown
Member
  • keys::Batches: one open batch per tenant, generation and shard, rotated after 1,024 seals, 60 s or a day change; batch id = first message key; the wrap seals a random batch key to the day public key; every batch key enters a bounded delivery cache that answers only its own tenant and generation and is never overwritten by another owner.
  • Ring::unwrap: local wrap check, single call per tenant, generation, shard and batch, a joining call with another wrap is refused; faults Gone and Bad.
  • Node::sealing(&draft, shard) takes a new message id and seals HEAD (one seal over length, envelope and headers), the body (inline or chunks) and slices, each item once.
  • Node::opener checks the wrap's generation, shard and day against the head and opens each item under its own label.
  • HEAD stores the wrap before the sealed bytes; the clear head carries the wrap day.
  • sched::Keys joins the key source and batch keys; Keyring implements it.

Part of #129

@hamzakargin
hamzakargin enabled auto-merge (squash) November 3, 2026 10:47
@hamzakargin
hamzakargin merged commit 4145410 into main Nov 3, 2026
7 checks passed
@hamzakargin
hamzakargin deleted the feat/batch-keys branch November 3, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant