Open Enclave  0.15.0
Data Structures | Macros | Typedefs | Enumerations | Functions
seal.h File Reference
#include <openenclave/bits/evidence.h>
#include <openenclave/bits/result.h>
#include <openenclave/bits/types.h>
Include dependency graph for seal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _oe_seal_setting
 Seal settings as TLV tuples. More...
 
struct  _oe_seal_plugin_definition
 Seal plug-in definition. More...
 

Macros

#define __OE_SEAL_SET_POINTER(t, p, s)
 
#define __OE_SEAL_SET_VALUE(t, v)   __OE_SEAL_SET_POINTER(t, v, 0)
 
#define OE_SEAL_SET_POLICY(w)   __OE_SEAL_SET_VALUE(OE_SEAL_SETTING_POLICY, w)
 Initialize a oe_seal_setting_t structure to specify seal policy. More...
 
#define OE_SEAL_SET_CONTEXT(p, s)   __OE_SEAL_SET_POINTER(OE_SEAL_SETTING_ADDITIONAL_CONTEXT, p, s)
 Initialize a oe_seal_setting_t structure to specify additional context for seal key derivation. More...
 
#define OE_SEAL_SET_IV(p, s)   __OE_SEAL_SET_POINTER(OE_SEAL_SETTING_IV, p, s)
 Initialize a oe_seal_setting_t structure to specify IV (Initialization Vector) used by the underlying cipher. More...
 

Typedefs

typedef struct _oe_seal_setting oe_seal_setting_t
 Seal settings as TLV tuples. More...
 
typedef struct _oe_seal_plugin_definition oe_seal_plugin_definition_t
 Seal plug-in definition.
 

Enumerations

enum  oe_seal_setting_type_t {
  OE_SEAL_SETTING_POLICY, OE_SEAL_SETTING_ADDITIONAL_CONTEXT, OE_SEAL_SETTING_IV, OE_SEAL_SETTING_MAX = 0x10000,
  OE_SEAL_SETTING_PLUGIN_DEFINED = OE_SEAL_SETTING_MAX / 2
}
 

Functions

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). More...
 
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(). More...
 
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(). More...
 
oe_result_t oe_unregister_seal_plugin (const oe_uuid_t *plugin_id)
 Unregister a plug-in identified by its UUID. More...
 

Detailed Description

This file defines constants and structures for sealing APIs.

Only TEE agnostic definitions should go in this file. SGX specific definitions should go in sgx/seal.h