|
◆ 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_id | Optional UUID of the plugin to use. If NULL , the default plugin will be used. |
[in] | settings | Optional array of seal settings to be used. |
[in] | settings_count | The number of settings specified by settings . Must be 0 if settings is NULL . |
[in] | plaintext | Optional buffer to be encrypted under the seal key. |
[in] | plaintext_size | Size of plaintext , must be 0 if plaintext is NULL . |
[in] | additional_data | Optional 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_size | Size of additional_data , must be 0 if additional_data is NULL . seal key. |
[out] | blob | On success, receives the pointer to a buffer containing encrypted plaintext , along with necessary information for unsealing. Freed by oe_free() . |
[out] | blob_size | On success, receives the size of blob . |
- Return values
-
OE_OK | plaintext was sealed to the enclave successfully. |
OE_INVALID_PARAMETER | At least one parameter is invalid. |
OE_UNSUPPORTED | One or more unsupported seal settings are specified. |
OE_OUT_OF_MEMORY | Failed to allocate memory. |
OE_CRYPTO_ERROR | An error occurred during encryption. |
|