enclave_api.h 815 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef __ENCLAVE_API_H__
  2. #define __ENCLAVE_API_H__
  3. #include "sgx_tcrypto.h"
  4. typedef uint16_t threadid_t;
  5. typedef uint16_t nodenum_t;
  6. struct EnclaveAPIParams {
  7. uint32_t user_count;
  8. uint16_t msg_size;
  9. uint8_t m_priv_out;
  10. uint8_t m_priv_in;
  11. uint8_t m_pub_out;
  12. uint8_t m_pub_in;
  13. bool private_routing;
  14. };
  15. #define ROLE_INGESTION 0x01
  16. #define ROLE_ROUTING 0x02
  17. #define ROLE_STORAGE 0x04
  18. struct EnclaveAPINodeConfig {
  19. sgx_ec256_public_t pubkey;
  20. uint8_t weight;
  21. uint8_t roles;
  22. };
  23. #define SEALED_PRIVKEY_SIZE 610
  24. // Must be a multiple of 16
  25. #define FRAME_SIZE (65536+16)
  26. // Within a 32-bit word for a destination address, the numbers of bits
  27. // for the storage node number and the userid at that storage node
  28. #define DEST_STORAGE_NODE_BITS 10
  29. #define DEST_UID_BITS 22
  30. #endif