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.
- Seal
Offer - The key an install wants one agent’s file keys sealed to, as its lease
carries it.
instanceandkey_fpfind the agent’s record in the key directory;keyis the X25519 public key andsigthe agent’s WAN key over it, both standard base64.
Enums§
- Unwrap
Error - 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
offernames, ifrecord(the agent’s entry in the key directory) proves it: the record’s chain holds, it isagent_id’s record for the offer’s install and key, and that key signed the offer.Errsays why not, to follow the agent’s name. - offer
- This install’s offer for
agent_id, whose WAN keypair iswan_publicandwan_seed;Nonefor a malformed key. - unwrap
- The file key
sealedholds, opened with the agent’s WAN seed. - wrap
file_keysealed toto, for the filesha256stored asblob_id.