Open Enclave  0.15.0

◆ oe_seal()

oe_result_t oe_seal ( const oe_uuid_t plugin_id,
const oe_seal_setting_t settings,
size_t  settings_count,
const uint8_t *  plaintext,
size_t  plaintext_size,
const uint8_t *  additional_data,
size_t  additional_data_size,
uint8_t **  blob,
size_t *  blob_size 
)

Seal data to an enclave using AEAD (Authenticated Encryption with Additioonal Data).

Parameters
[in]plugin_idOptional UUID of the plugin to use. If NULL, the default plugin will be used.
[in]settingsOptional array of seal settings to be used.
[in]settings_countThe number of settings specified by settings. Must be 0 if settings is NULL.
[in]plaintextOptional buffer to be encrypted under the seal key.
[in]plaintext_sizeSize of plaintext, must be 0 if plaintext is NULL.
[in]additional_dataOptional additional data to be authenticated under the seal key. This is usually referred to as AAD (Additional Authenticated Data) in cryptographic literature.
[in]additional_data_sizeSize of additional_data, must be 0 if additional_data is NULL. seal key.
[out]blobOn success, receives the pointer to a buffer containing encrypted plaintext, along with necessary information for unsealing. Freed by oe_free().
[out]blob_sizeOn success, receives the size of blob.
Return values
OE_OKplaintext was sealed to the enclave successfully.
OE_INVALID_PARAMETERAt least one parameter is invalid.
OE_UNSUPPORTEDOne or more unsupported seal settings are specified.
OE_OUT_OF_MEMORYFailed to allocate memory.
OE_CRYPTO_ERRORAn error occurred during encryption.