#ifndef __UNTRUSTED_HPP__ #define __UNTRUSTED_HPP__ #include #include #include "sgx_eid.h" #include "sgx_tseal.h" #include "../Enclave/enclave_api.h" extern sgx_enclave_id_t global_eid; int initialize_enclave(); void ecall_identity_key_new(sgx_ec256_public_t* outpub, sgx_sealed_data_t* outsealedpriv); bool ecall_identity_key_load(sgx_ec256_public_t* outpub, const sgx_sealed_data_t* insealedpriv); bool ecall_config_load(threadid_t nthreads, struct EnclaveAPIParams *apiparams, struct EnclaveAPINodeConfig *apinodeconfigs, nodenum_t num_nodes, nodenum_t my_node_num); void ecall_close(); bool ecall_comms_start(std::function cb); bool ecall_message(nodenum_t node_num, uint32_t message_len); bool ecall_chunk(nodenum_t node_num, const uint8_t *chunkdata, uint32_t chunklen); size_t ecall_precompute_sort(int size); bool ecall_ingest_raw(uint8_t *msgs, uint32_t num_msgs); void ecall_routing_proceed(std::function cb); bool ecall_ingest_msgbundle(clientid_t cid, unsigned char *msgbundle, uint32_t num_msgs); bool ecall_ingestion_authenticate(clientid_t cid, unsigned char *auth_string); bool ecall_storage_authenticate(clientid_t cid, unsigned char *auth_string); void ecall_supply_storage_buffers(unsigned char *msgbundles, uint32_t msgbundles_size, unsigned char *tokens, uint32_t tokens_size); #endif