3
$\begingroup$

I have a case where I have multiple clients(non sgx, assumeed safe) and server(sgx based), talking over a network. I wanted to provision 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:

  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?

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

2 B. 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 hardcoded into enclave code: (SP-)) send it over to the client which is then decrypted with server public key (SP+).

  1. 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 at 20:53

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.