Untrusted.hpp 1013 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. bool private_routing,
  16. struct EnclaveAPIParams *apiparams,
  17. struct EnclaveAPINodeConfig *apinodeconfigs,
  18. nodenum_t num_nodes, nodenum_t my_node_num);
  19. void ecall_close();
  20. bool ecall_comms_start();
  21. bool ecall_message(nodenum_t node_num, uint32_t message_len);
  22. bool ecall_chunk(nodenum_t node_num, const uint8_t *chunkdata,
  23. uint32_t chunklen);
  24. size_t ecall_precompute_sort(int size);
  25. bool ecall_ingest_raw(uint8_t *msgs, uint32_t num_msgs);
  26. void ecall_routing_proceed(std::function<void(uint32_t)>);
  27. #endif