pub fn seal_drop_derand(
plaintext: &[u8],
drop_pubkey: &[u8],
content_type: &str,
k: &[u8; 32],
nonce_prefix: &[u8; 7],
eseed: &[u8; 64],
blob_nonce: &[u8; 12],
) -> Result<SealedDrop, DropError>Expand description
The deterministic core of seal_drop: every randomized value is supplied explicitly.
Exposed for known-answer testing only — the public path is seal_drop, which draws all
four values from the CSPRNG. Feeding fixed k, nonce_prefix, eseed, and blob_nonce
makes the sealed bytes reproducible so the browser (WASM) seal can be proven byte-identical to
this Rust implementation across the language boundary (the cross-language KAT), and so the
fixture that a Rust adopter consumes is a pure function of its inputs. Never reuse a
(k, nonce_prefix) pair for two distinct plaintexts (STREAM nonce reuse) outside a KAT.
k— the 32-byte asset key.nonce_prefix— the 7-byte STREAM nonce prefix.eseed— the 64-byte X-Wing encapsulation seed (m ‖ x25519-ephemeral).blob_nonce— the 12-byte AEAD nonce wrappingKunder the KEM shared secret.