Go to the documentation of this file.
82 #define __OE_SEAL_SET_POINTER(t, p, s) \
89 #define __OE_SEAL_SET_VALUE(t, v) __OE_SEAL_SET_POINTER(t, v, 0)
97 #define OE_SEAL_SET_POLICY(w) __OE_SEAL_SET_VALUE(OE_SEAL_SETTING_POLICY, w)
110 #define OE_SEAL_SET_CONTEXT(p, s) \
111 __OE_SEAL_SET_POINTER(OE_SEAL_SETTING_ADDITIONAL_CONTEXT, p, s)
125 #define OE_SEAL_SET_IV(p, s) __OE_SEAL_SET_POINTER(OE_SEAL_SETTING_IV, p, s)
159 size_t settings_count,
160 const uint8_t* plaintext,
161 size_t plaintext_size,
162 const uint8_t* additional_data,
163 size_t additional_data_size,
190 const uint8_t* additional_data,
191 size_t additional_data_size,
193 size_t* plaintext_size);
232 size_t settings_count,
233 const uint8_t* plaintext,
234 size_t plaintext_size,
235 const uint8_t* additional_data,
236 size_t additional_data_size,
264 const uint8_t* additional_data,
265 size_t additional_data_size,
267 size_t* plaintext_size);
int type
Setting type. See oe_seal_setting_type_t for details.
Definition: seal.h:30
oe_seal_setting_type_t
Definition: seal.h:45
struct _oe_seal_plugin_definition oe_seal_plugin_definition_t
Seal plug-in definition.
@ OE_SEAL_SETTING_POLICY
Desired sealing policy - either OE_SEAL_POLICY_UNIQUE or OE_SEAL_POLICY_PRODUCT.
Definition: seal.h:51
oe_result_t oe_unseal(const uint8_t *blob, size_t blob_size, const uint8_t *additional_data, size_t additional_data_size, uint8_t **plaintext, size_t *plaintext_size)
Unseal a blob sealed by oe_seal().
oe_result_t oe_register_seal_plugin(const oe_seal_plugin_definition_t *plugin, bool make_default)
Register a plug-in to be used by oe_seal() and oe_unseal().
@ OE_SEAL_SETTING_ADDITIONAL_CONTEXT
Additional context to be included in seal key derivation.
Definition: seal.h:59
oe_result_t(* unseal)(const uint8_t *blob, size_t blob_size, const uint8_t *additional_data, size_t additional_data_size, uint8_t **plaintext, size_t *plaintext_size)
Callback function to be called by oe_unseal() when unsealing a blob.
Definition: seal.h:261
Struct containing the definition for an UUID.
Definition: evidence.h:43
const oe_uuid_t id
UUID of the seal plug-in.
Definition: seal.h:203
oe_result_t oe_unregister_seal_plugin(const oe_uuid_t *plugin_id)
Unregister a plug-in identified by its UUID.
Seal plug-in definition.
Definition: seal.h:198
uint32_t d
double-word value. size should be set to 0.
Definition: seal.h:34
uint16_t w
word value. size should be set to 0.
Definition: seal.h:35
uint32_t size
Size of the buffer pointed to by value.p.
Definition: seal.h:31
uint8_t b
byte value. size should be set to 0.
Definition: seal.h:36
struct _oe_seal_setting oe_seal_setting_t
Seal settings as TLV tuples.
@ OE_SEAL_SETTING_IV
IV (Initialization Vector) to use should the underlying cipher require one.
Definition: seal.h:65
uint64_t q
quad-word value. size should be set to 0.
Definition: seal.h:33
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).
@ OE_SEAL_SETTING_MAX
Upper bound of seal setting types.
Definition: seal.h:72
const void * p
buffer. size should be set to the buffer size in bytes.
Definition: seal.h:38
oe_result_t(* seal)(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)
Callback function to be called by oe_seal() when sealing a blob.
Definition: seal.h:230
@ OE_SEAL_SETTING_PLUGIN_DEFINED
Lower bound of plug-in defined setting types.
Definition: seal.h:79
enum _oe_result oe_result_t
This enumeration type defines return codes for Open Enclave functions.
Seal settings as TLV tuples.
Definition: seal.h:28