Skip to main content

Module jekt_seal

Module jekt_seal 

Source
Expand description

A cloud file’s key, sealed to the install that receives it (docs/specs/SPEC_JEKT_FILE_TRANSFER_2026_10_05.md §7, Phase 5).

Without sealing, a cloud manifest carries each file’s AES key as plain base64, so the relay, which stores the manifest with the message, could read every file. Here each key is sealed to the receiving agent on the install that runs it:

  • The key. An X25519 key derived from the agent’s WAN seed with HKDF, so it is not the signing key itself (the curve library’s advice), and nothing new is stored: the same seed always gives the same key.
  • The offer. The install signs that key with the agent’s WAN key and offers it in the agent’s lease (offer). The relay only passes it on.
  • The check. The sender fetches the agent’s record from the account’s key directory, whose chain the install’s instance key anchors, and checks the offer’s signature against it (check_offer). The relay can’t substitute a key without that install’s instance key.
  • The seal. Per file: an ephemeral X25519 key, HKDF-SHA256 over the shared secret, both public keys, the file’s hash and its blob id, and AES-256-GCM over the file key (wrap, unwrap).

What stays readable: an older receiver’s lease offers no key, and its files go as before. A cloud that actively adds an install to the account’s directory could be offered files, the residual WAN verification already accepts (SPEC_WAN_JEKT_VERIFICATION_2026_09_24.md §2.6).

Structs§

Recipient
Where a sender seals to: the receiver’s X25519 key, checked, and the fingerprint of the WAN key it came from.
SealOffer
The key an install wants one agent’s file keys sealed to, as its lease carries it. instance and key_fp find the agent’s record in the key directory; key is the X25519 public key and sig the agent’s WAN key over it, both standard base64.

Enums§

UnwrapError
Why a sealed key didn’t open.

Functions§

box_public
The X25519 public key an install’s WAN seed seals to: the key its offers carry, and the box key it lists in a collection’s membership chain.
check_offer
The key offer names, if record (the agent’s entry in the key directory) proves it: the record’s chain holds, it is agent_id’s record for the offer’s install and key, and that key signed the offer. Err says why not, to follow the agent’s name.
offer
This install’s offer for agent_id, whose WAN keypair is wan_public and wan_seed; None for a malformed key.
unwrap
The file key sealed holds, opened with the agent’s WAN seed.
wrap
file_key sealed to to, for the file sha256 stored as blob_id.