Go to the documentation of this file.
83 #define __OE_SEAL_SET_POINTER(t, p, s) \
90 #define __OE_SEAL_SET_VALUE(t, v) __OE_SEAL_SET_POINTER(t, v, 0)
98 #define OE_SEAL_SET_POLICY(w) __OE_SEAL_SET_VALUE(OE_SEAL_SETTING_POLICY, w)
111 #define OE_SEAL_SET_CONTEXT(p, s) \
112 __OE_SEAL_SET_POINTER(OE_SEAL_SETTING_ADDITIONAL_CONTEXT, p, s)
126 #define OE_SEAL_SET_IV(p, s) __OE_SEAL_SET_POINTER(OE_SEAL_SETTING_IV, p, s)
160 size_t settings_count,
161 const uint8_t* plaintext,
162 size_t plaintext_size,
163 const uint8_t* additional_data,
164 size_t additional_data_size,
191 const uint8_t* additional_data,
192 size_t additional_data_size,
194 size_t* plaintext_size);
233 size_t settings_count,
234 const uint8_t* plaintext,
235 size_t plaintext_size,
236 const uint8_t* additional_data,
237 size_t additional_data_size,
265 const uint8_t* additional_data,
266 size_t additional_data_size,
268 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:46
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:52
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:60
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:262
Struct containing the definition for an UUID.
Definition: evidence.h:55
const oe_uuid_t id
UUID of the seal plug-in.
Definition: seal.h:204
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:199
uint32_t d
double-word value. size should be set to 0.
Definition: seal.h:35
uint16_t w
word value. size should be set to 0.
Definition: seal.h:36
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:37
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:66
uint64_t q
quad-word value. size should be set to 0.
Definition: seal.h:34
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:73
const void * p
buffer. size should be set to the buffer size in bytes.
Definition: seal.h:39
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:231
@ OE_SEAL_SETTING_PLUGIN_DEFINED
Lower bound of plug-in defined setting types.
Definition: seal.h:80
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