#ifndef __ENCLAVE_API_H__ #define __ENCLAVE_API_H__ #include "sgx_tcrypto.h" typedef uint16_t threadid_t; typedef uint16_t nodenum_t; typedef uint32_t clientid_t; struct EnclaveAPIParams { uint32_t user_count; uint16_t msg_size; uint8_t m_priv_out; uint8_t m_priv_in; uint8_t m_pub_out; uint8_t m_pub_in; sgx_aes_gcm_128bit_key_t master_secret; }; #define ROLE_INGESTION 0x01 #define ROLE_ROUTING 0x02 #define ROLE_STORAGE 0x04 struct EnclaveAPINodeConfig { sgx_ec256_public_t pubkey; uint8_t weight; uint8_t roles; }; #define SEALED_PRIVKEY_SIZE 610 // Must be a multiple of 16 #define FRAME_SIZE (65536+16) // Within a 32-bit word for a destination address, the numbers of bits // for the storage node number and the userid at that storage node #define DEST_STORAGE_NODE_BITS 10 #define DEST_UID_BITS 22 #endif