oqs_sys::kem

Function OQS_KEM_decaps

source
pub unsafe extern "C" fn OQS_KEM_decaps(
    kem: *const OQS_KEM,
    shared_secret: *mut u8,
    ciphertext: *const u8,
    secret_key: *const u8,
) -> OQS_STATUS
Expand description

Decapsulation algorithm.

Caller is responsible for allocating sufficient memory for shared_secret, based on the length_* members in this object or the per-scheme compile-time macros OQS_KEM_*_length_*.

@param[in] kem The OQS_KEM object representing the KEM. @param[out] shared_secret The shared secret represented as a byte string. @param[in] ciphertext The ciphertext (encapsulation) represented as a byte string. @param[in] secret_key The secret key represented as a byte string. @return OQS_SUCCESS or OQS_ERROR