Expand description
Web-upload guest drops — contract skeleton (SSoT: Web Upload).
A guest with an upload link seals each asset under a fresh random key K,
encapsulates K to the link’s Drop Key, and uploads the sealed bytes to the
provisioning user’s staging inbox. Nothing becomes a library asset until one of that
user’s trusted clients adopts the drop — decapsulating K, rewrapping it under the
album AMK (asset-keywrap/v1, KeyMode::Wrapped), and signing an ordinary create
manifest. The guest is never a signer; drops never flow through verify_asset.
This module owns the client-side halves: link issuance, drop sealing (compiled to WASM
for capsule-web), and adoption. The server halves (drop store, inbox, atomic
inbox→album promotion) live in the server’s drop module.
Structs§
- Adopted
Drop - What adopting a drop produced: the asset it became, and the index tier a push publishes.
- Drop
Descriptor - The unsigned descriptor a guest uploads beside the sealed ciphertext. Deliberately
not an
AssetManifest: no signatures, noalbum_id, no provenance link. Its integrity is established only when a trusted client decapsulatesKand the STREAM tags verify. - DropId
- Identifies a pending drop in the provisioning user’s inbox.
- Link
Caps - Per-link caps, enforced server-side at the no-key layer on every drop-session creation (Web Upload — Security Contract).
- Passphrase
Verifier - An Argon2id abuse-gate verifier for a passphrase-protected upload link. Unlike a
share-link passphrase (which wraps a read secret the client unwraps locally), this
gates a write, so the server must verify possession: the link record stores the
salt+ Argon2id-derivedverifier, and the guest proves possession at drop-session creation. The passphrase itself is never transmitted or stored, and this adds no confidentiality — the guest already encrypts every asset (SSoT: Web Upload Security Contract — Optional passphrase). - Pending
Drop - A drop awaiting review in the provisioning user’s inbox.
- Sealed
Drop - A sealed drop ready for upload: the descriptor plus the STREAM ciphertext.
- Upload
Link - A provisioned upload link: the server-held record plus the fragment-delivered public
half. The
opaque_idfollows the share-link rule (random ≥128-bit, never structured);drop_pubkeytravels only in the URL fragment and never reaches the server. - Upload
Link Id - Identifies a provisioned upload link for revocation.
Enums§
- Drop
Error - Failure surfaced by the drop lifecycle.
Constants§
- OPAQUE_
ID_ LEN - Length of an upload-link opaque URL-path id: a full 128 bits of CSPRNG entropy — never a structured/UUIDv7 id (identical rule to a share link, whose embedded v7 timestamp would cut real entropy to ~62 bits). SSoT: Web Upload Security Contract.
Traits§
- Drop
Adopter - Reviews and adopts pending drops on a trusted (native) client — decapsulate
K, rewrap under the destination album’s AMK, author the sidecar, sign thecreatemanifest withkey_mode = wrapped, and submit the atomic inbox→album promotion. - Upload
Link Issuer - Issues and revokes upload links on a trusted (native) client — the seam
lifecycle::Workspacewill implement. Provisioning mints the Drop Key, wraps its private half under the master key + OGK escrow, and registers the link record.
Functions§
- generate_
opaque_ id - Draw a fresh opaque upload-link URL-path id: a full 128 bits of CSPRNG entropy, not a
structured or sequential identifier. Mirrors the share-link opaque-id discipline exactly
(SSoT: Web Upload Security Contract — the URL is
.../u/{opaque-id}#{drop_pubkey}). - open_
drop_ key - Recover the guest-chosen asset key
Kfrom a drop’skem_ctusing the Drop Key’s private half — the first step of adoption. Splits the X-Wing ciphertext from the AEAD-wrapped key, decapsulates the shared secret, and opens the wrap. A truncatedkem_ct, a foreign/tampered ciphertext, or a wrong Drop Key all fail closed (DropError::Crypto). - seal_
drop - Seal
plaintextfor a guest drop: draw a fresh randomK, STREAM-encrypt under it, and encapsulateKtodrop_pubkey(the link’s KEM public half, from the URL fragment). Runs in the browser (WASM) and on native clients alike — it is the only path compiled towasm32-unknown-unknown. - seal_
drop_ derand - The deterministic core of
seal_drop: every randomized value is supplied explicitly.