enclave_api.h 789 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. };
  14. #define ROLE_INGESTION 0x01
  15. #define ROLE_ROUTING 0x02
  16. #define ROLE_STORAGE 0x04
  17. struct EnclaveAPINodeConfig {
  18. sgx_ec256_public_t pubkey;
  19. uint8_t weight;
  20. uint8_t roles;
  21. };
  22. #define SEALED_PRIVKEY_SIZE 610
  23. // Must be a multiple of 16
  24. #define FRAME_SIZE (65536+16)
  25. // Within a 32-bit word for a destination address, the numbers of bits
  26. // for the storage node number and the userid at that storage node
  27. #define DEST_STORAGE_NODE_BITS 10
  28. #define DEST_UID_BITS 22
  29. #endif