1

I wanted to design and build a secure remote computation application. I wanted to leverage Intel SGX capabilities and I have thought of 2 approaches but due to lack of development experience, I could not be able to decide which approach I should implement.

Scenario: Typical client(assumed secure + Non SGX) machine and Server(could be malicious + SGX enabled) system

Approach 1: Each client(having some data) generates a symmetric key(AES) at client side and encrypt the data locally and sends to the server. The clients secret key is provisioned to the server via remote attestation and then use this secret key to decrypt the data inside the SGX enclave.

Approach 2: The server generates public-private key pair inside enclave and the public key is sent to each client. Each client then encrypts using public key and then send data to the server which is later decrypted using the previously generated private key.

Please Note: SGX enclave can be disassembled but could not be debugged. So is it safe to do approach 2?

Kumar Roshan Mehta
  • 3,078
  • 2
  • 27
  • 50
  • 1
    Approach 2 is vulnerable to man in the middle attacks... Why can't you just use TLS? – Luke Joshua Park Jan 06 '18 at 19:46
  • The connection thing happens outside enclave and I consider the operating system of the server to be malicious. – Kumar Roshan Mehta Jan 06 '18 at 20:04
  • 1
    If the operating system is malicious there isn't much you can do. The TCP stack is managed by the operating system, so you could literally get MITMed by your own server no matter how many enclaves you use. – Luke Joshua Park Jan 06 '18 at 20:11
  • Crypt design/security protocol design questions are off-topic as well as too broad for stackoverflow. Stackoverflow wants you to ask nice narrow software development questions that have a right answer that can be reused by the next person with the same problem. – President James K. Polk Jan 06 '18 at 20:57
  • Can the admin or moderators move this to security.stackexchange.com ? – Kumar Roshan Mehta Jan 06 '18 at 21:38
  • @LukePark: The entire purpose of SGX is to provide Confidentiality and integrity under malicious OS. – Kumar Roshan Mehta Jan 06 '18 at 21:39
  • 3
    And it does provide confidentiality and integrity. You are guaranteed that your code will run in a secure environment. You are **not** guaranteed that input to this environment will also be secure. I highly recommend you use TLS, it is even stated on the [Intel SGX Homepage](https://software.intel.com/en-us/sgx) that it is supported. Don't roll your own. – Luke Joshua Park Jan 06 '18 at 21:57

0 Answers0