pub fn seal_drop(
plaintext: &[u8],
drop_pubkey: &[u8],
content_type: &str,
) -> Result<SealedDrop, DropError>Expand description
Seal plaintext for a guest drop: draw a fresh random K, STREAM-encrypt under it,
and encapsulate K to drop_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 to wasm32-unknown-unknown.
The kem_ct is a KEM-DEM: the X-Wing ciphertext (encapsulating a fresh shared secret
ss to the Drop Key) followed by seal_blob(ss, K). K was chosen by the guest and is
carried wrapped — it is never derived from an AMK — so a weak or reused K
compromises at most its own drop (SSoT: Web Upload Failure Modes). The output length
is fixed by the suite: DEK_CIPHERTEXT_LEN + the sealed-blob overhead.