// // Created by miti on 2019-12-21. // #ifndef VERIFIER_LAINITIATOR_PROTOBUFINTERFACE_H #define VERIFIER_LAINITIATOR_PROTOBUFINTERFACE_H #include "sgx_eid.h" #define __STDC_FORMAT_MACROS #include #include "ProtobufLAMessages.h" #include #include "sgx_trts.h" #include "sgx_utils.h" #include "error_codes.h" #include "sgx_ecp_types.h" #include "sgx_thread.h" #include #include "sgx_dh.h" #include "dh_session_protocol.h" #include "sgx_tcrypto.h" #include "datatypes.h" #include "Initiator_Transforms.h" #define MAX_SESSION_COUNT 16 #define SGX_CAST(type, item) ((type)(item)) #include #include "crypto.h" #include "stdio.h" // For socket programming #include #include #include class LAInitiator_Protobuf { sgx_dh_session_t sgx_dh_session; dh_session_t global_session_info; ProtobufMessageRW protobufReaderWriter; uint32_t process_protobuf_dh_msg3(protobuf_sgx_dh_msg3_t& protobuf_msg3, uint32_t* session_id); uint32_t process_protobuf_dh_msg1_generate_protobuf_dh_msg2(protobuf_sgx_dh_msg1_t& protobuf_msg1, protobuf_sgx_dh_msg2_t& protobuf_msg2, uint32_t* session_id); public: uint32_t conduct_la(); uint32_t get_la_symmetric_key(uint8_t* key); }; // TODO: Get them to take in lists as inputs and change verifier's code too to put in elements into a list. // TODO: Revert php code back by two commits (before rollback) and edit from there. // TODO: Also get the decryptor codebase in sync with this format of sgx/protobuf files. #endif //LAINITIATOR_PROTOBUFINTERFACE_H