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

Name

Description

suite_in

Preferred suite for sizing, or NULL to pick a random supported suite.

suite

Optional output receiving the suite actually used for sizing.

enc

Destination for a random encapsulated‐key‐sized buffer.

enclen

In/out length of enc.

ct

Destination for a random ciphertext‐sized buffer of length ctlen.

ctlen

Desired ciphertext buffer length (and plaintext‐equivalent sizing input).

libctx

Library context, or NULL for the default.

propq

Optional property query string, or NULL.

Created with MrDocs