3
$\begingroup$

I have a case where I have multiple clients (non SGX, assumed safe) and server(SGX based), talking over a network. I wanted to provision a shared (per client) key which is used to encrypt and decrypt data.

The server admin is assumed to be an adversary. I do not want to use remote attestation as it will require every client to register for the IAS service and other sorts of things. Also, the server TLS connection terminates inside the enclave (used mbed-SGX). The client authentication is happening through username and password.

Now, I have few option, I can think of:

Option 1

Each client generates shared secret key (SK).

Now, is it safe to just directly send each client shared secret key over the network, which is then sealed and stored to disk for later use?

Option 2a

Should I derive a client shared secret from user password inside enclave and then send it over to the client?

Option 2b

Should I derive a client shared secret (SK) from user password one time(at registration probably) inside enclave and then encrypt it with server private key - a different key hard coded into enclave code: (SP-) - send it over to the client which is then decrypted with server public key (SP+)?

Option 3

  • Each of the client application has server public key (SP+) and the server application has each client’s public key (CP+).
  • Each of the client application generates the symmetric key (SK) and a challenge (n).
  • The client concatenates SK and ‘n’ (SK||n) encrypts with the SP+. The client application now signs the encrypted SK||n and challenge with the client private key (CP-). It is sent to the server application enclave.
  • On receiving the signed encrypted symmetric key, the server application enclave checks the authenticity using CP+ and then decrypts with its own private key (SP-).

Could someone just tell me which of these options are safe? If 2 or more option is safe, which one could be easiest to implement.

$\endgroup$
  • $\begingroup$ I think at least one client has to do remote attestation to SGX enclave to ensure it is not compromised. After this, clients can run a distributed key generation protocol. Enclave can then send encrypted data to clients using the generated public key. $\endgroup$ – SpiderRico Jan 28 '19 at 20:53
  • $\begingroup$ As SpiderRico said, at least one client need to be the central authority through remote attestation. That's why PKI is necessary in the network before key exchange. It's used to protect against man-in-the-middle attack. $\endgroup$ – Husen Mar 19 at 3:13
  • $\begingroup$ The "options" are very unclear to me. Some just seem to suggest where the keys are generated, others are formatted like questions - but without question marks. Please check my edit and try to make these options as clear as possible. $\endgroup$ – Maarten Bodewes Mar 19 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.