LA.h 728 B

1234567891011121314151617181920212223
  1. //
  2. // Created by miti on 2019-12-21.
  3. //
  4. #ifndef VERIFIER_LA_H
  5. #define VERIFIER_LA_H
  6. #include "ProtobufMessageRW.h"
  7. #include "ProtobufLAMessages.pb.h"
  8. struct _sgx_dh_session_t;
  9. typedef _sgx_dh_session_t sgx_dh_session_t;
  10. class LA {
  11. sgx_dh_session_t* sgx_dh_session;
  12. // dh_session_t global_session_info;
  13. ProtobufMessageRW protobufReaderWriter;
  14. uint8_t key[16];
  15. uint32_t process_protobuf_dh_msg3(protobuf_sgx_dh_msg3_t& protobuf_msg3);
  16. uint32_t process_protobuf_dh_msg1_generate_protobuf_dh_msg2(protobuf_sgx_dh_msg1_t& protobuf_msg1, protobuf_sgx_dh_msg2_t& protobuf_msg2);
  17. public:
  18. uint32_t conduct_la(int fd);
  19. void get_la_symmetric_key(uint8_t* key);
  20. };
  21. #endif //LAINITIATOR_PROTOBUFINTERFACE_H