I'm quite new to SGX and still trying to figure out the possibilities it provides. Currently I have two applications (A1, A2) running on a server. Both have their own enclaves created and the two enclaves are communicating over a secure channel established with local attestation.
A client, running on a different system uses remote attestation to securely receive information from A1 on the server.
A1 on the server is now creating a symmetric key pair and sends one to A2 and the other the the client. This key pair should be used to encrypt the connection between the client and A2.
The symmetric keys are now stored in the enclaves of the client and A2. Now I'm not sure how to use those keys securely from within the enclaves to establish the connections? Is it possible to listen on network interfaces for incoming connections within the enclave? Or is the entire concept not plausible?