Skip to main content

open_drop_key

Function open_drop_key 

Source
pub fn open_drop_key(
    drop_key: &DekKeypair,
    kem_ct: &[u8],
) -> Result<[u8; 32], DropError>
Expand description

Recover the guest-chosen asset key K from a drop’s kem_ct using 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 truncated kem_ct, a foreign/tampered ciphertext, or a wrong Drop Key all fail closed (DropError::Crypto).