1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #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_token_out;
- uint8_t m_token_in;
- uint8_t m_id_out;
- uint8_t m_id_in;
- sgx_aes_gcm_128bit_key_t master_secret;
- bool token_channel;
- };
- #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
- #define TOKEN_SIZE SGX_CMAC_MAC_SIZE
- // 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
|