Untrusted.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __UNTRUSTED_HPP__
  2. #define __UNTRUSTED_HPP__
  3. #include <cstddef>
  4. #include <functional>
  5. #include "sgx_eid.h"
  6. #include "sgx_tseal.h"
  7. #include "../Enclave/enclave_api.h"
  8. extern sgx_enclave_id_t global_eid;
  9. int initialize_enclave();
  10. void ecall_identity_key_new(sgx_ec256_public_t* outpub,
  11. sgx_sealed_data_t* outsealedpriv);
  12. bool ecall_identity_key_load(sgx_ec256_public_t* outpub,
  13. const sgx_sealed_data_t* insealedpriv);
  14. bool ecall_config_load(threadid_t nthreads,
  15. struct EnclaveAPIParams *apiparams,
  16. struct EnclaveAPINodeConfig *apinodeconfigs,
  17. nodenum_t num_nodes, nodenum_t my_node_num);
  18. void ecall_close();
  19. bool ecall_comms_start(std::function<void(void)> cb);
  20. bool ecall_message(nodenum_t node_num, uint32_t message_len);
  21. bool ecall_chunk(nodenum_t node_num, const uint8_t *chunkdata,
  22. uint32_t chunklen);
  23. size_t ecall_precompute_sort(int size);
  24. bool ecall_ingest_raw(uint8_t *msgs, uint32_t num_msgs);
  25. void ecall_routing_proceed(std::function<void(uint32_t)> cb);
  26. bool ecall_ingest_msgbundle(clientid_t cid, unsigned char *msgbundle,
  27. uint32_t num_msgs);
  28. bool ecall_ingestion_authenticate(clientid_t cid, unsigned char *auth_string);
  29. bool ecall_storage_authenticate(clientid_t cid, unsigned char *auth_string);
  30. void ecall_supply_storage_buffers(unsigned char *msgbundles,
  31. uint32_t msgbundles_size, unsigned char *tokens, uint32_t tokens_size);
  32. #endif