OSSL_HPKE_get_grease_value

Produce GREASE-like random encap and ciphertext buffers sized for an HPKE suite.

Synopsis

Declared in <openssl/hpke.h>

int
OSSL_HPKE_get_grease_value(
    OSSL_HPKE_SUITE const* suite_in,
    OSSL_HPKE_SUITE* suite,
    unsigned char* enc,
    size_t* enclen,
    unsigned char* ct,
    size_t ctlen,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
suite_inPreferred suite for sizing, or NULL to pick a random supported suite.
suiteOptional output receiving the suite actually used for sizing.
encDestination for a random encapsulated-key-sized buffer.
enclenIn/out length of enc.
ctDestination for a random ciphertext-sized buffer of length ctlen.
ctlenDesired ciphertext buffer length (and plaintext-equivalent sizing input).
libctxLibrary context, or NULL for the default.
propqOptional property query string, or NULL.